OvmfPkg: Add support for memory above 4GB
When QEMU has more than 3.5GB of RAM, it will map the additional memory above 4GB. This change will make that RAM accessible to OVMF. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11266 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -103,6 +103,37 @@ AddMemoryRangeHob (
|
||||
AddMemoryBaseSizeHob (MemoryBase, (UINT64)(MemoryLimit - MemoryBase));
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
AddUntestedMemoryBaseSizeHob (
|
||||
EFI_PHYSICAL_ADDRESS MemoryBase,
|
||||
UINT64 MemorySize
|
||||
)
|
||||
{
|
||||
BuildResourceDescriptorHob (
|
||||
EFI_RESOURCE_SYSTEM_MEMORY,
|
||||
EFI_RESOURCE_ATTRIBUTE_PRESENT |
|
||||
EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
|
||||
EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
|
||||
EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
|
||||
EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
|
||||
EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE,
|
||||
MemoryBase,
|
||||
MemorySize
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
AddUntestedMemoryRangeHob (
|
||||
EFI_PHYSICAL_ADDRESS MemoryBase,
|
||||
EFI_PHYSICAL_ADDRESS MemoryLimit
|
||||
)
|
||||
{
|
||||
AddUntestedMemoryBaseSizeHob (MemoryBase, (UINT64)(MemoryLimit - MemoryBase));
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
MemMapInitialization (
|
||||
EFI_PHYSICAL_ADDRESS TopOfMemory
|
||||
|
Reference in New Issue
Block a user