]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/PlatformInitLib: Add PlatformGetLowMemoryCB
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 17 Jan 2023 12:16:26 +0000 (13:16 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 17 Jan 2023 16:36:59 +0000 (16:36 +0000)
commit124b765051333010a3cf1038c601568001e39574
treea10ff561375151ac5608cb21322b7583a4d6f20a
parente0375304682683f6e5c466fba948619bc6e6f377
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>
OvmfPkg/Include/Library/PlatformInitLib.h
OvmfPkg/Library/PeilessStartupLib/Hob.c
OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c
OvmfPkg/Library/PlatformInitLib/MemDetect.c
OvmfPkg/Library/PlatformInitLib/Platform.c
OvmfPkg/PlatformPei/MemDetect.c