30 UINT16 SmmOtherSegment;
57X86_ASSEMBLY_PATCH_LABEL gPatchSmiStack;
58X86_ASSEMBLY_PATCH_LABEL gPatchSmiCr3;
59extern volatile UINT8 gcSmiHandlerTemplate[];
60extern CONST UINT16 gcSmiHandlerSize;
65IA32_DESCRIPTOR gSmiHandlerIdtr;
91 return gcSmiHandlerSize;
139 CopyMem (Psd, &gcPsd,
sizeof (gcPsd));
140 Psd->SmmGdtPtr = (UINT64)GdtBase;
141 Psd->SmmGdtSize = (UINT32)GdtSize;
166 CpuSmiStack = (UINT32)((
UINTN)SmiStack + StackSize -
sizeof (
UINTN));
170 gSmiHandlerIdtr.Base = IdtBase;
171 gSmiHandlerIdtr.Limit = (UINT16)(IdtSize - 1);
183 (VOID *)gcSmiHandlerTemplate,
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID InitShadowStack(IN UINTN CpuIndex, IN VOID *ShadowStack)
#define SMM_HANDLER_OFFSET
VOID EFIAPI SmmCpuFeaturesInstallSmiHandler(IN UINTN CpuIndex, IN UINT32 SmBase, IN VOID *SmiStack, IN UINTN StackSize, IN UINTN GdtBase, IN UINTN GdtSize, IN UINTN IdtBase, IN UINTN IdtSize, IN UINT32 Cr3)
UINTN EFIAPI SmmCpuFeaturesGetSmiHandlerSize(VOID)
UINTN EFIAPI GetSmiHandlerSize(VOID)
X86_ASSEMBLY_PATCH_LABEL gPatchSmbase
UINT8 mSmmSaveStateRegisterLma
VOID EFIAPI InstallSmiHandler(IN UINTN CpuIndex, IN UINT32 SmBase, IN VOID *SmiStack, IN UINTN StackSize, IN UINTN GdtBase, IN UINTN GdtSize, IN UINTN IdtBase, IN UINTN IdtSize, IN UINT32 Cr3)
VOID EFIAPI PatchInstructionX86(OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, IN UINT64 PatchValue, IN UINTN ValueSize)