mirror of https://github.com/acidanthera/audk.git
OvmfPkg: PlatformPei: reserve early page tables on X64
On X64, the reset vector code in "OvmfPkg/ResetVector/Ia32/PageTables64.asm" identity maps the first 4GB of RAM for PEI, consuming six frames starting at 8MB. This range is declared by the PcdOvmfSecPageTablesBase/Size PCDs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> [jordan.l.justen@intel.com: Move to MemDetect.c; use PCDs] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15298 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e249f906f1
commit
78a38b73c3
|
@ -203,5 +203,19 @@ InitializeRamRegions (
|
|||
PcdGet32 (PcdOvmfSecPeiTempRamSize),
|
||||
EfiACPIMemoryNVS
|
||||
);
|
||||
|
||||
#ifdef MDE_CPU_X64
|
||||
//
|
||||
// Reserve the initial page tables built by the reset vector code.
|
||||
//
|
||||
// Since this memory range will be used by the Reset Vector on S3
|
||||
// resume, it must be reserved as ACPI NVS.
|
||||
//
|
||||
BuildMemoryAllocationHob (
|
||||
(EFI_PHYSICAL_ADDRESS)(UINTN) PcdGet32 (PcdOvmfSecPageTablesBase),
|
||||
(UINT64)(UINTN) PcdGet32 (PcdOvmfSecPageTablesSize),
|
||||
EfiACPIMemoryNVS
|
||||
);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,6 +68,8 @@
|
|||
gUefiOvmfPkgTokenSpaceGuid.PcdS3AcpiReservedMemoryBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
|
||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
||||
|
|
Loading…
Reference in New Issue