OvmfPkg/PlatformPei: log a warning when memory is tight

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20240214104504.2931339-2-kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2024-02-14 11:45:01 +01:00 committed by mergify[bot]
parent ba9c3ceaf8
commit 9d32a02a72
1 changed files with 8 additions and 0 deletions

View File

@ -319,6 +319,14 @@ PublishPeiMemory (
if (MemorySize > PeiMemoryCap) { if (MemorySize > PeiMemoryCap) {
MemoryBase = LowerMemorySize - PeiMemoryCap; MemoryBase = LowerMemorySize - PeiMemoryCap;
MemorySize = PeiMemoryCap; MemorySize = PeiMemoryCap;
} else {
DEBUG ((
DEBUG_WARN,
"%a: Not enough memory for PEI (have %lu KB, estimated need %u KB)\n",
__func__,
RShiftU64 (MemorySize, 10),
PeiMemoryCap >> 10
));
} }
} }