Signed-off-by: Sheng Wei <w.sh...@intel.com> Cc: Eric Dong <eric.d...@intel.com> Cc: Ray Ni <ray...@intel.com> Cc: Laszlo Ersek <ler...@redhat.com> Cc: Wu Jiaxin <jiaxin...@intel.com> Cc: Tan Dun <dun....@intel.com> --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Cet.nasm | 5 +++-- UefiCpuPkg/PiSmmCpuDxeSmm/X64/Cet.nasm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Cet.nasm b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Cet.nasm index 9d66b9c5da..3d07da1cd4 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Cet.nasm +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Cet.nasm @@ -5,6 +5,7 @@ ;------------------------------------------------------------------------------- %include "Nasm.inc" +%include "Cet.inc" SECTION .text @@ -16,7 +17,7 @@ ASM_PFX(DisableCet): incsspd eax mov eax, cr4 - btr eax, 23 ; clear CET + btr eax, CR4_CET_BIT ; clear CET mov cr4, eax ret @@ -24,7 +25,7 @@ global ASM_PFX(EnableCet) ASM_PFX(EnableCet): mov eax, cr4 - bts eax, 23 ; set CET + bts eax, CR4_CET_BIT ; set CET mov cr4, eax ; use jmp to skip the check for ret diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/Cet.nasm b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/Cet.nasm index 8bbdbb31cc..700aef4703 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/Cet.nasm +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/Cet.nasm @@ -5,6 +5,7 @@ ;------------------------------------------------------------------------------- %include "Nasm.inc" +%include "Cet.inc" DEFAULT REL SECTION .text @@ -17,7 +18,7 @@ ASM_PFX(DisableCet): incsspq rax mov rax, cr4 - btr eax, 23 ; clear CET + btr eax, CR4_CET_BIT ; clear CET mov cr4, rax ret @@ -25,7 +26,7 @@ global ASM_PFX(EnableCet) ASM_PFX(EnableCet): mov rax, cr4 - bts eax, 23 ; set CET + bts eax, CR4_CET_BIT ; set CET mov cr4, rax ; use jmp to skip the check for ret -- 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111124): https://edk2.groups.io/g/devel/message/111124 Mute This Topic: https://groups.io/mt/102556834/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-