UefiCpuPkg/PiSmmCpuDxeSmm: Use SMM Interrupt Shadow Stack
When CET shadow stack feature is enabled, it needs to use IST for the exceptions, and uses interrupt shadow stack for the stack switch. Shadow stack should be 32 bytes aligned. Check IST field, when clear shadow stack token busy bit when using retf. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3728 Signed-off-by: Sheng Wei <w.sheng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
@@ -557,6 +557,20 @@ InitializeIDTSmmStackGuard (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Initialize IDT IST Field.
|
||||
|
||||
@param[in] ExceptionType Exception type.
|
||||
@param[in] Ist IST value.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
InitializeIdtIst (
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN UINT8 Ist
|
||||
);
|
||||
|
||||
/**
|
||||
Initialize Gdt for all processors.
|
||||
|
||||
|
Reference in New Issue
Block a user