summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2023-01-17 13:16:26 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-17 16:36:59 +0000
commit124b765051333010a3cf1038c601568001e39574 (patch)
treea10ff561375151ac5608cb21322b7583a4d6f20a /OvmfPkg/Include
parente0375304682683f6e5c466fba948619bc6e6f377 (diff)
downloadedk2-124b765051333010a3cf1038c601568001e39574.tar.gz
edk2-124b765051333010a3cf1038c601568001e39574.tar.bz2
edk2-124b765051333010a3cf1038c601568001e39574.zip
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>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r--OvmfPkg/Include/Library/PlatformInitLib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/OvmfPkg/Include/Library/PlatformInitLib.h b/OvmfPkg/Include/Library/PlatformInitLib.h
index bf6f90a576..051b311911 100644
--- a/OvmfPkg/Include/Library/PlatformInitLib.h
+++ b/OvmfPkg/Include/Library/PlatformInitLib.h
@@ -26,6 +26,7 @@ typedef struct {
BOOLEAN Q35SmramAtDefaultSmbase;
UINT16 Q35TsegMbytes;
+ UINT32 LowMemory;
UINT64 FirstNonAddress;
UINT8 PhysMemAddressWidth;
UINT32 Uc32Base;
@@ -144,7 +145,7 @@ PlatformQemuUc32BaseInitialization (
IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
);
-UINT32
+VOID
EFIAPI
PlatformGetSystemMemorySizeBelow4gb (
IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob