]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/Include: Add CET instructions to Nasm.inc
authorSheng Wei <w.sheng@intel.com>
Tue, 26 Jan 2021 08:54:15 +0000 (16:54 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 2 Mar 2021 05:11:55 +0000 (05:11 +0000)
This is to add instruction SAVEPREVSSP, CLRSSBSY and RSTORSSP_RAX in Nasm.
The open CI is using NASM 2.14.02.
CET instructions are supported since NASM 2.15.01.

DB-encoded CET instructions need to be removed after open CI update to
 NASM 2.15.01.
The BZ ticket is https://bugzilla.tianocore.org/show_bug.cgi?id=3227 .

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3192

Signed-off-by: Sheng Wei <w.sheng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdePkg/Include/Ia32/Nasm.inc
MdePkg/Include/X64/Nasm.inc

index 31ce861f1e7ecf55c4ccc0d55905adaeb0ab3c4c..fa42f9d3e99b5d210700d55b2a23a137948c91c4 100644 (file)
@@ -9,6 +9,18 @@
 ;\r
 ;------------------------------------------------------------------------------\r
 \r
+%macro SAVEPREVSSP     0\r
+    DB 0xF3, 0x0F, 0x01, 0xEA\r
+%endmacro\r
+\r
+%macro CLRSSBSY_EAX    0\r
+    DB 0x67, 0xF3, 0x0F, 0xAE, 0x30\r
+%endmacro\r
+\r
+%macro RSTORSSP_EAX    0\r
+    DB 0x67, 0xF3, 0x0F, 0x01, 0x28\r
+%endmacro\r
+\r
 %macro SETSSBSY        0\r
     DB 0xF3, 0x0F, 0x01, 0xE8\r
 %endmacro\r
index 42412735ea861ac4e0b1a06e21a5cebdbdb92d6c..e57a803c81a7f3a554835ee19a35a767f6b7de47 100644 (file)
@@ -9,6 +9,18 @@
 ;\r
 ;------------------------------------------------------------------------------\r
 \r
+%macro SAVEPREVSSP     0\r
+    DB 0xF3, 0x0F, 0x01, 0xEA\r
+%endmacro\r
+\r
+%macro CLRSSBSY_RAX    0\r
+    DB 0xF3, 0x0F, 0xAE, 0x30\r
+%endmacro\r
+\r
+%macro RSTORSSP_RAX    0\r
+    DB 0xF3, 0x0F, 0x01, 0x28\r
+%endmacro\r
+\r
 %macro SETSSBSY        0\r
     DB 0xF3, 0x0F, 0x01, 0xE8\r
 %endmacro\r