diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2023-01-17 13:16:26 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-01-17 16:36:59 +0000 |
commit | 124b765051333010a3cf1038c601568001e39574 (patch) | |
tree | a10ff561375151ac5608cb21322b7583a4d6f20a /OvmfPkg/PlatformPei | |
parent | e0375304682683f6e5c466fba948619bc6e6f377 (diff) | |
download | edk2-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/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/MemDetect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c index 3d8375320d..41d186986b 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -271,7 +271,8 @@ PublishPeiMemory ( UINT32 S3AcpiReservedMemoryBase;
UINT32 S3AcpiReservedMemorySize;
- LowerMemorySize = PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob);
+ PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob);
+ LowerMemorySize = PlatformInfoHob->LowMemory;
if (PlatformInfoHob->SmmSmramRequire) {
//
// TSEG is chipped from the end of low RAM
|