24 UINT8 SmmSaveStateRegisterLma;
32 SmmSaveStateRegisterLma = (UINT8)EFI_MM_SAVE_STATE_REGISTER_LMA_64BIT;
35 return SmmSaveStateRegisterLma;
54 AmdCpuState->x64.SMBASE = (UINT32)SmBase;
87 IN UINT64 NewInstructionPointer32,
88 IN UINT64 NewInstructionPointer
91 UINT64 OriginalInstructionPointer;
97 OriginalInstructionPointer = AmdCpuState->x64._RIP;
98 Msr.Uint64 = AmdCpuState->x64.EFER;
101 AmdCpuState->x64._RIP = NewInstructionPointer32;
103 AmdCpuState->x64._RIP = NewInstructionPointer;
110 if ((AmdCpuState->x64.AutoHALTRestart & BIT0) != 0) {
111 AmdCpuState->x64.AutoHALTRestart &= ~BIT0;
114 return OriginalInstructionPointer;
UINT64 EFIAPI HookReturnFromSmm(IN OUT SMRAM_SAVE_STATE_MAP *CpuState, IN UINT64 NewInstructionPointer32, IN UINT64 NewInstructionPointer)
VOID EFIAPI ConfigureSmBase(IN UINT64 SmBase)
UINT8 GetMmSaveStateRegisterLma(VOID)
UINT64 EFIAPI AsmReadMsr64(IN UINT32 Index)
#define SMM_DEFAULT_SMBASE
#define SMRAM_SAVE_STATE_MAP_OFFSET
#define EFI_MM_SAVE_STATE_REGISTER_LMA_32BIT