TianoCore EDK2 master
Loading...
Searching...
No Matches
AcpiS3ContextSave.c File Reference

Go to the source code of this file.

Macros

#define EXTRA_PAGE_TABLE_PAGES   8
 

Functions

VOID * AllocateMemoryBelow4G (IN EFI_MEMORY_TYPE MemoryType, IN UINTN Size)
 
BOOLEAN IsLongModeWakingVectorSupport (IN EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *Facs)
 
EFI_PHYSICAL_ADDRESS S3AllocatePageTablesBuffer (IN BOOLEAN LongModeWakingVectorSupport)
 
VOID EFIAPI AcpiS3ContextSaveOnEndOfDxe (IN EFI_EVENT Event, IN VOID *Context)
 

Variables

EFI_GUID mAcpiS3IdtrProfileGuid
 

Detailed Description

This is the implementation to save ACPI S3 Context.

Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file AcpiS3ContextSave.c.

Macro Definition Documentation

◆ EXTRA_PAGE_TABLE_PAGES

#define EXTRA_PAGE_TABLE_PAGES   8

Definition at line 26 of file AcpiS3ContextSave.c.

Function Documentation

◆ AcpiS3ContextSaveOnEndOfDxe()

VOID EFIAPI AcpiS3ContextSaveOnEndOfDxe ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Callback function executed when the EndOfDxe event group is signaled.

Parameters
[in]EventEvent whose notification function is being invoked.
[in]ContextThe pointer to the notification function's context, which is implementation-dependent.

Definition at line 230 of file AcpiS3ContextSave.c.

◆ AllocateMemoryBelow4G()

VOID * AllocateMemoryBelow4G ( IN EFI_MEMORY_TYPE  MemoryType,
IN UINTN  Size 
)

Allocate memory below 4G memory address.

This function allocates memory below 4G memory address.

Parameters
MemoryTypeMemory type of memory to allocate.
SizeSize of memory to allocate.
Returns
Allocated address for output.

Definition at line 44 of file AcpiS3ContextSave.c.

◆ IsLongModeWakingVectorSupport()

BOOLEAN IsLongModeWakingVectorSupport ( IN EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs)

The function will check if long mode waking vector is supported.

Parameters
[in]FacsPointer to FACS table.
Return values
TRUELong mode waking vector is supported.
FALSELong mode waking vector is not supported.

Definition at line 81 of file AcpiS3ContextSave.c.

◆ S3AllocatePageTablesBuffer()

EFI_PHYSICAL_ADDRESS S3AllocatePageTablesBuffer ( IN BOOLEAN  LongModeWakingVectorSupport)

Allocates page table buffer.

Parameters
[in]LongModeWakingVectorSupportSupport long mode waking vector or not.

If BootScriptExecutor driver will run in 64-bit mode, this function will establish the 1:1 virtual to physical mapping page table when long mode waking vector is supported, otherwise create 4G page table when long mode waking vector is not supported and let PF handler to handle > 4G request. If BootScriptExecutor driver will not run in 64-bit mode, this function will do nothing.

Returns
Page table base address.

Definition at line 123 of file AcpiS3ContextSave.c.

Variable Documentation

◆ mAcpiS3IdtrProfileGuid

EFI_GUID mAcpiS3IdtrProfileGuid
Initial value:
= {
0xdea652b0, 0xd587, 0x4c54, { 0xb5, 0xb4, 0xc6, 0x82, 0xe7, 0xa0, 0xaa, 0x3d }
}

Definition at line 28 of file AcpiS3ContextSave.c.