55#define STACK_ALIGN_DOWN(Ptr) \
56 ((UINTN)(Ptr) & ~(UINTN)(CPU_STACK_ALIGNMENT - 1))
58#define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull
73 UINT32 DefaultSize : 1;
74 UINT32 Granularity : 1;
88 UINT64 UserSupervisor : 1;
89 UINT64 WriteThrough : 1;
90 UINT64 CacheDisabled : 1;
93 UINT64 MustBeZero : 2;
95 UINT64 PageTableBaseAddress : 40;
96 UINT64 AvabilableHigh : 11;
108 UINT64 ReadWrite : 1;
109 UINT64 UserSupervisor : 1;
110 UINT64 WriteThrough : 1;
111 UINT64 CacheDisabled : 1;
116 UINT64 Available : 3;
118 UINT64 MustBeZero : 8;
119 UINT64 PageTableBaseAddress : 31;
120 UINT64 AvabilableHigh : 11;
132 UINT64 ReadWrite : 1;
133 UINT64 UserSupervisor : 1;
134 UINT64 WriteThrough : 1;
135 UINT64 CacheDisabled : 1;
140 UINT64 Available : 3;
142 UINT64 MustBeZero : 17;
143 UINT64 PageTableBaseAddress : 22;
144 UINT64 AvabilableHigh : 11;
156 UINT32 MessageLength;
162 UINT64 MessageLength;
181 IN UINT32 S3WakingVector,
182 IN UINT32 AcpiLowMemoryBase
231 IN UINT16 SelectorValue
240 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
241 &gEfiPeiS3Resume2PpiGuid,
246 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
247 &gPeiPostScriptTablePpiGuid,
252 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
253 &gEfiEndOfPeiSignalPpiGuid,
258 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
259 &gEdkiiS3SmmInitDoneGuid,
264 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
265 &gEdkiiEndOfS3ResumeGuid,
275 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
278 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
281 { 0xFFFF, 0, 0, 0xB, 1, 0, 1, 0xF, 0, 0, 1, 1, 0 }
284 { 0xFFFF, 0, 0, 0x3, 1, 0, 1, 0xF, 0, 0, 1, 1, 0 }
287 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
290 { 0xFFFF, 0, 0, 0xB, 1, 0, 1, 0xF, 0, 0, 0, 1, 0 }
293 { 0xFFFF, 0, 0, 0x3, 1, 0, 1, 0xF, 0, 0, 0, 1, 0 }
296 { 0xFFFF, 0, 0, 0xB, 1, 0, 1, 0xF, 0, 1, 0, 1, 0 }
299 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
303#define DATA_SEGEMENT_SELECTOR 0x18
309 sizeof (mGdtEntries) - 1,
329 if ((Facs ==
NULL) ||
331 ((Facs->FirmwareWakingVector == 0) && (Facs->XFirmwareWakingVector == 0)))
337 if (Facs->XFirmwareWakingVector != 0) {
339 ((Facs->Flags & EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F) != 0) &&
343 ASSERT ((
FeaturePcdGet (PcdDxeIplSwitchToLongMode)) || (
sizeof (
UINTN) ==
sizeof (UINT64)));
369 DEBUG ((DEBUG_INFO,
"Signal %g to SMM - Enter\n", HandlerType));
377 if ((
sizeof (
UINTN) ==
sizeof (UINT64)) || (
FeaturePcdGet (PcdDxeIplSwitchToLongMode))) {
378 CommBuffer = &Header64;
379 Header64.MessageLength = 0;
382 CommBuffer = &Header32;
383 Header32.MessageLength = 0;
390 &gEfiPeiSmmCommunicationPpiGuid,
393 (VOID **)&SmmCommunicationPpi
395 if (EFI_ERROR (Status)) {
396 DEBUG ((DEBUG_ERROR,
"Locate Smm Communicate Ppi failed (%r)!\n", Status));
400 Status = SmmCommunicationPpi->Communicate (
405 if (EFI_ERROR (Status)) {
406 DEBUG ((DEBUG_ERROR,
"SmmCommunicationPpi->Communicate return failure (%r)!\n", Status));
409 DEBUG ((DEBUG_INFO,
"Signal %g to SMM - Exit (%r)\n", HandlerType, Status));
431 UINTN TempStack[0x10];
438 if (PeiS3ResumeState->ReturnStatus !=
EFI_SUCCESS) {
444 (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_BOOT_SCRIPT_ERROR)
471 if ((Facs ==
NULL) ||
473 ((Facs->FirmwareWakingVector == 0) && (Facs->XFirmwareWakingVector == 0)))
479 EFI_ERROR_CODE | EFI_ERROR_MAJOR,
480 (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_OS_WAKE_ERROR)
498 DEBUG ((DEBUG_INFO,
"Signal EndOfS3Resume\n"));
519 if (Facs->XFirmwareWakingVector != 0) {
523 TempStackTop = (
UINTN)&TempStack +
sizeof (TempStack);
526 "%a() Stack Base: 0x%x, Stack Size: 0x%x\n",
532 ((Facs->Flags & EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F) != 0) &&
538 DEBUG ((DEBUG_INFO,
"Transfer from PEI to 64bit OS waking vector - %x\r\n", (
UINTN)Facs->XFirmwareWakingVector));
545 Facs->XFirmwareWakingVector,
548 (UINT64)(
UINTN)TempStackTop
551 if (
sizeof (
UINTN) ==
sizeof (UINT64)) {
559 (VOID *)(
UINTN)TempStackTop
567 EFI_ERROR_CODE | EFI_ERROR_MAJOR,
568 (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_OS_WAKE_ERROR)
570 DEBUG ((DEBUG_ERROR,
"Unsupported for 32bit DXE transfer to 64bit OS waking vector!\r\n"));
580 DEBUG ((DEBUG_INFO,
"Transfer to 32bit OS waking vector - %x\r\n", (
UINTN)Facs->XFirmwareWakingVector));
581 if (
sizeof (
UINTN) ==
sizeof (UINT64)) {
587 (UINT32)Facs->XFirmwareWakingVector,
600 (VOID *)(
UINTN)TempStackTop
608 DEBUG ((DEBUG_INFO,
"Transfer to 16bit OS waking vector - %x\r\n", (
UINTN)Facs->FirmwareWakingVector));
616 EFI_ERROR_CODE | EFI_ERROR_MAJOR,
617 (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_OS_WAKE_ERROR)
635 IN UINTN S3NvsPageTableAddress,
636 IN BOOLEAN Build4GPageTableOnly
639 if ((
FeaturePcdGet (PcdDxeIplSwitchToLongMode)) || (
sizeof (
UINTN) ==
sizeof (UINT64))) {
642 UINT8 PhysicalAddressBits;
644 UINTN IndexOfPml4Entries;
645 UINTN IndexOfPdpEntries;
646 UINTN IndexOfPageDirectoryEntries;
647 UINT32 NumberOfPml4EntriesNeeded;
648 UINT32 NumberOfPdpEntriesNeeded;
654 BOOLEAN Page1GSupport;
656 UINT64 AddressEncMask;
661 AddressEncMask =
PcdGet64 (PcdPteMemoryEncryptionAddressOrMask) & PAGING_1G_ADDRESS_MASK_64;
669 DEBUG ((DEBUG_INFO,
"S3NvsPageTableAddress - %x (%x)\n", (
UINTN)S3NvsPageTableAddress, (
UINTN)Build4GPageTableOnly));
675 S3NvsPageTableAddress += SIZE_4KB;
677 Page1GSupport =
FALSE;
680 if (RegEax >= 0x80000001) {
682 if ((RegEdx & BIT26) != 0) {
683 Page1GSupport =
TRUE;
693 PhysicalAddressBits = ((
EFI_HOB_CPU *)Hob)->SizeOfMemorySpace;
696 if (RegEax >= 0x80000008) {
698 PhysicalAddressBits = (UINT8)RegEax;
700 PhysicalAddressBits = 36;
707 ASSERT (PhysicalAddressBits <= 52);
708 if (PhysicalAddressBits > 48) {
709 PhysicalAddressBits = 48;
716 if (Build4GPageTableOnly) {
717 PhysicalAddressBits = 32;
724 if (PhysicalAddressBits <= 39) {
725 NumberOfPml4EntriesNeeded = 1;
726 NumberOfPdpEntriesNeeded = (UINT32)
LShiftU64 (1, (PhysicalAddressBits - 30));
728 NumberOfPml4EntriesNeeded = (UINT32)
LShiftU64 (1, (PhysicalAddressBits - 39));
729 NumberOfPdpEntriesNeeded = 512;
732 PageMapLevel4Entry = PageMap;
734 for (IndexOfPml4Entries = 0; IndexOfPml4Entries < NumberOfPml4EntriesNeeded; IndexOfPml4Entries++, PageMapLevel4Entry++) {
740 S3NvsPageTableAddress += SIZE_4KB;
745 PageMapLevel4Entry->Uint64 = (UINT64)(
UINTN)PageDirectoryPointerEntry | AddressEncMask;
746 PageMapLevel4Entry->Bits.ReadWrite = 1;
747 PageMapLevel4Entry->Bits.Present = 1;
750 PageDirectory1GEntry = (VOID *)PageDirectoryPointerEntry;
752 for (IndexOfPageDirectoryEntries = 0; IndexOfPageDirectoryEntries < 512; IndexOfPageDirectoryEntries++, PageDirectory1GEntry++, PageAddress += SIZE_1GB) {
756 PageDirectory1GEntry->Uint64 = (UINT64)PageAddress | AddressEncMask;
757 PageDirectory1GEntry->Bits.ReadWrite = 1;
758 PageDirectory1GEntry->Bits.Present = 1;
759 PageDirectory1GEntry->Bits.MustBe1 = 1;
762 for (IndexOfPdpEntries = 0; IndexOfPdpEntries < NumberOfPdpEntriesNeeded; IndexOfPdpEntries++, PageDirectoryPointerEntry++) {
768 S3NvsPageTableAddress += SIZE_4KB;
773 PageDirectoryPointerEntry->Uint64 = (UINT64)(
UINTN)PageDirectoryEntry | AddressEncMask;
774 PageDirectoryPointerEntry->Bits.ReadWrite = 1;
775 PageDirectoryPointerEntry->Bits.Present = 1;
777 for (IndexOfPageDirectoryEntries = 0; IndexOfPageDirectoryEntries < 512; IndexOfPageDirectoryEntries++, PageDirectoryEntry++, PageAddress += SIZE_2MB) {
781 PageDirectoryEntry->Uint64 = (UINT64)PageAddress | AddressEncMask;
782 PageDirectoryEntry->Bits.ReadWrite = 1;
783 PageDirectoryEntry->Bits.Present = 1;
784 PageDirectoryEntry->Bits.MustBe1 = 1;
820 BOOLEAN InterruptStatus;
822 DEBUG ((DEBUG_INFO,
"S3ResumeExecuteBootScript()\n"));
828 if (GuidHob !=
NULL) {
843 &gPeiSmmAccessPpiGuid,
848 if (!EFI_ERROR (Status)) {
849 DEBUG ((DEBUG_INFO,
"Close all SMRAM regions before executing boot script\n"));
851 for (Index = 0, Status =
EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
855 DEBUG ((DEBUG_INFO,
"Lock all SMRAM regions before executing boot script\n"));
857 for (Index = 0, Status =
EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
862 DEBUG ((DEBUG_INFO,
"Signal S3SmmInitDone\n"));
895 PeiS3ResumeState =
AllocatePool (
sizeof (*PeiS3ResumeState));
896 if (PeiS3ResumeState ==
NULL) {
898 EFI_ERROR_CODE | EFI_ERROR_MAJOR,
899 (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_RESUME_FAILED)
904 DEBUG ((DEBUG_INFO,
"PeiS3ResumeState - %x\r\n", PeiS3ResumeState));
905 PeiS3ResumeState->ReturnCs = 0x10;
924 DEBUG ((DEBUG_INFO,
"Enable X64 and transfer control to Standalone Boot Script Executor\r\n"));
931 EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint,
932 (UINT64)(
UINTN)AcpiS3Context,
933 (UINT64)(
UINTN)PeiS3ResumeState,
934 (UINT64)(
UINTN)(AcpiS3Context->BootScriptStackBase + AcpiS3Context->BootScriptStackSize)
940 DEBUG ((DEBUG_INFO,
"transfer control to Standalone Boot Script Executor\r\n"));
943 (VOID *)AcpiS3Context,
944 (VOID *)PeiS3ResumeState,
945 (VOID *)(
UINTN)(AcpiS3Context->BootScriptStackBase + AcpiS3Context->BootScriptStackSize)
1017 BOOLEAN Build4GPageTableOnly;
1018 BOOLEAN InterruptStatus;
1023 TempAcpiS3Context = 0;
1024 TempEfiBootScriptExecutorVariable = 0;
1026 DEBUG ((DEBUG_INFO,
"Enter S3 PEIM\r\n"));
1030 &gEfiAcpiVariableGuid,
1037 &gEfiAcpiS3ContextGuid,
1044 ASSERT (AcpiS3Context !=
NULL);
1048 &gEfiBootScriptExecutorVariableGuid,
1049 &TempEfiBootScriptExecutorVariable,
1055 &gEfiBootScriptExecutorContextGuid,
1062 ASSERT (EfiBootScriptExecutorVariable !=
NULL);
1064 DEBUG ((DEBUG_INFO,
"AcpiS3Context = %x\n", AcpiS3Context));
1066 DEBUG ((DEBUG_INFO,
"AcpiS3Context->AcpiFacsTable = %x\n", AcpiS3Context->AcpiFacsTable));
1067 DEBUG ((DEBUG_INFO,
"AcpiS3Context->IdtrProfile = %x\n", AcpiS3Context->IdtrProfile));
1068 DEBUG ((DEBUG_INFO,
"AcpiS3Context->S3NvsPageTableAddress = %x\n", AcpiS3Context->S3NvsPageTableAddress));
1069 DEBUG ((DEBUG_INFO,
"AcpiS3Context->S3DebugBufferAddress = %x\n", AcpiS3Context->S3DebugBufferAddress));
1070 DEBUG ((DEBUG_INFO,
"AcpiS3Context->BootScriptStackBase = %x\n", AcpiS3Context->BootScriptStackBase));
1071 DEBUG ((DEBUG_INFO,
"AcpiS3Context->BootScriptStackSize = %x\n", AcpiS3Context->BootScriptStackSize));
1072 DEBUG ((DEBUG_INFO,
"EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint = %x\n", EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint));
1081 if (EFI_ERROR (Status)) {
1091 Build4GPageTableOnly =
FALSE;
1093 Build4GPageTableOnly =
TRUE;
1103 if (GuidHob !=
NULL) {
1105 &gPeiSmmAccessPpiGuid,
1110 for (Index = 0; !EFI_ERROR (Status); Index++) {
1118 &gEdkiiPeiMpServices2PpiGuid,
1121 (VOID **)&MpService2Ppi
1130 &gEdkiiS3MtrrSettingGuid,
1139 Status = MpService2Ppi->StartupAllCPUs (
1150 SmmS3ResumeState->ReturnCs =
AsmReadCs ();
1156 DEBUG ((DEBUG_INFO,
"SMM S3 Signature = %x\n", SmmS3ResumeState->Signature));
1157 DEBUG ((DEBUG_INFO,
"SMM S3 Stack Base = %x\n", SmmS3ResumeState->SmmS3StackBase));
1158 DEBUG ((DEBUG_INFO,
"SMM S3 Stack Size = %x\n", SmmS3ResumeState->SmmS3StackSize));
1159 DEBUG ((DEBUG_INFO,
"SMM S3 Resume Entry Point = %x\n", SmmS3ResumeState->SmmS3ResumeEntryPoint));
1160 DEBUG ((DEBUG_INFO,
"SMM S3 CR0 = %x\n", SmmS3ResumeState->SmmS3Cr0));
1161 DEBUG ((DEBUG_INFO,
"SMM S3 CR3 = %x\n", SmmS3ResumeState->SmmS3Cr3));
1162 DEBUG ((DEBUG_INFO,
"SMM S3 CR4 = %x\n", SmmS3ResumeState->SmmS3Cr4));
1163 DEBUG ((DEBUG_INFO,
"SMM S3 Return CS = %x\n", SmmS3ResumeState->ReturnCs));
1164 DEBUG ((DEBUG_INFO,
"SMM S3 Return Entry Point = %x\n", SmmS3ResumeState->ReturnEntryPoint));
1165 DEBUG ((DEBUG_INFO,
"SMM S3 Return Context1 = %x\n", SmmS3ResumeState->ReturnContext1));
1166 DEBUG ((DEBUG_INFO,
"SMM S3 Return Context2 = %x\n", SmmS3ResumeState->ReturnContext2));
1167 DEBUG ((DEBUG_INFO,
"SMM S3 Return Stack Pointer = %x\n", SmmS3ResumeState->ReturnStackPointer));
1168 DEBUG ((DEBUG_INFO,
"SMM S3 Smst = %x\n", SmmS3ResumeState->Smst));
1173 if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) {
1174 ASSERT (
sizeof (
UINTN) ==
sizeof (UINT32));
1180 if (((SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) && (sizeof (
UINTN) ==
sizeof (UINT32))) ||
1181 ((SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_64) && (sizeof (
UINTN) ==
sizeof (UINT64))))
1185 (VOID *)AcpiS3Context,
1187 (VOID *)(
UINTN)(SmmS3ResumeState->SmmS3StackBase + SmmS3ResumeState->SmmS3StackSize)
1191 if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_64) {
1211 if (Cr0.Bits.PG != 0) {
1233 SmmS3ResumeState->SmmS3ResumeEntryPoint,
1234 (UINT64)(
UINTN)AcpiS3Context,
1236 SmmS3ResumeState->SmmS3StackBase + SmmS3ResumeState->SmmS3StackSize
1268 Status = (**PeiServices).InstallPpi (PeiServices, &mPpiList);
#define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE
#define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION
#define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F
CONST EFI_PEI_SERVICES **EFIAPI GetPeiServicesTablePointer(VOID)
VOID *EFIAPI GetFirstHob(IN UINT16 Type)
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
BOOLEAN EFIAPI SetInterruptState(IN BOOLEAN InterruptState)
BOOLEAN EFIAPI SaveAndDisableInterrupts(VOID)
VOID EFIAPI SwitchStack(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack,...)
VOID EFIAPI CpuDeadLoop(VOID)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
VOID(EFIAPI * SWITCH_STACK_ENTRY_POINT)(IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
BOOLEAN EFIAPI SaveAndSetDebugTimerInterrupt(IN BOOLEAN EnableStatus)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
EFI_STATUS EFIAPI PeiServicesInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
UINTN EFIAPI AsmWriteCr3(UINTN Cr3)
UINTN EFIAPI AsmReadCr0(VOID)
UINTN EFIAPI AsmWriteCr0(UINTN Cr0)
UINT16 EFIAPI AsmReadCs(VOID)
VOID EFIAPI SendSmiIpi(IN UINT32 ApicId)
UINT32 EFIAPI GetApicId(VOID)
VOID EFIAPI SendSmiIpiAllExcludingSelf(VOID)
RETURN_STATUS EFIAPI RestoreLockBox(IN GUID *Guid, IN VOID *Buffer OPTIONAL, IN OUT UINTN *Length OPTIONAL)
RETURN_STATUS EFIAPI RestoreAllLockBoxInPlace(VOID)
#define OFFSET_OF(TYPE, Field)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define REPORT_STATUS_CODE(Type, Value)
UINT32 EFIAPI AsmCpuid(IN UINT32 Index, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
MTRR_SETTINGS *EFIAPI MtrrSetAllMtrrs(IN MTRR_SETTINGS *MtrrSetting)
#define PcdGet64(TokenName)
#define PcdGetBool(TokenName)
#define FeaturePcdGet(TokenName)
VOID(EFIAPI * EFI_AP_PROCEDURE)(IN OUT VOID *Buffer)
VOID * EFI_PEI_FILE_HANDLE
#define EFI_PROGRESS_CODE
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STATUS EFIAPI PeimS3ResumeEntryPoint(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
VOID EFIAPI LoadMtrrData(IN VOID *MtrrTable)
VOID(EFIAPI * ASM_TRANSFER_CONTROL)(IN UINT32 S3WakingVector, IN UINT32 AcpiLowMemoryBase)
VOID SignalToSmmByCommunication(IN EFI_GUID *HandlerType)
#define STACK_ALIGN_DOWN(Ptr)
EFI_STATUS EFIAPI S3RestoreConfig2(IN EFI_PEI_S3_RESUME2_PPI *This)
BOOLEAN IsLongModeWakingVector(IN ACPI_S3_CONTEXT *AcpiS3Context)
VOID EFIAPI S3ResumeBootOs(IN ACPI_S3_CONTEXT *AcpiS3Context, IN PEI_S3_RESUME_STATE *PeiS3ResumeState)
VOID RestoreS3PageTables(IN UINTN S3NvsPageTableAddress, IN BOOLEAN Build4GPageTableOnly)
VOID EFIAPI S3ResumeExecuteBootScript(IN ACPI_S3_CONTEXT *AcpiS3Context, IN BOOT_SCRIPT_EXECUTOR_VARIABLE *EfiBootScriptExecutorVariable)
VOID EFIAPI AsmSetDataSelectors(IN UINT16 SelectorValue)
VOID AsmTransferControl(IN UINT32 S3WakingVector, IN UINT32 AcpiLowMemoryBase)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_PAGES_TO_SIZE(Pages)
VOID EFIAPI AsmDisablePaging64(IN UINT16 Cs, IN UINT32 EntryPoint, IN UINT32 Context1 OPTIONAL, IN UINT32 Context2 OPTIONAL, IN UINT32 NewStack)
VOID EFIAPI AsmEnablePaging64(IN UINT16 Cs, IN UINT64 EntryPoint, IN UINT64 Context1 OPTIONAL, IN UINT64 Context2 OPTIONAL, IN UINT64 NewStack)
VOID EFIAPI AsmReadIdtr(OUT IA32_DESCRIPTOR *Idtr)
VOID EFIAPI AsmWriteGdtr(IN CONST IA32_DESCRIPTOR *Gdtr)
VOID EFIAPI AsmWriteIdtr(IN CONST IA32_DESCRIPTOR *Idtr)
EFI_PHYSICAL_ADDRESS CpuStart