OvmfPkg/PlatformInitLib: Add PlatformGetLowMemoryCB
Add PlatformGetLowMemoryCB() callback function for use with PlatformScanE820(). It stores the low memory size in PlatformInfoHob->LowMemory. This replaces calls to PlatformScanOrAdd64BitE820Ram() with non-NULL LowMemory. Write any actions done (setting LowMemory) to the firmware log with INFO loglevel. Also change PlatformGetSystemMemorySizeBelow4gb() to likewise set PlatformInfoHob->LowMemory instead of returning the value. Update all Callers to the new convention. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
e037530468
commit
124b765051
@@ -42,7 +42,8 @@ ConstructSecHobList (
|
||||
|
||||
ZeroMem (&PlatformInfoHob, sizeof (PlatformInfoHob));
|
||||
PlatformInfoHob.HostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID);
|
||||
LowMemorySize = PlatformGetSystemMemorySizeBelow4gb (&PlatformInfoHob);
|
||||
PlatformGetSystemMemorySizeBelow4gb (&PlatformInfoHob);
|
||||
LowMemorySize = PlatformInfoHob.LowMemory;
|
||||
ASSERT (LowMemorySize != 0);
|
||||
LowMemoryStart = FixedPcdGet32 (PcdOvmfDxeMemFvBase) + FixedPcdGet32 (PcdOvmfDxeMemFvSize);
|
||||
LowMemorySize -= LowMemoryStart;
|
||||
|
Reference in New Issue
Block a user