summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2024-02-14 11:45:01 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-02-27 13:29:25 +0000
commit9d32a02a724c79215a00bb2d2563c7fd026b0726 (patch)
tree01d3e880297625b187c502478891fb4560068242 /OvmfPkg/PlatformPei
parentba9c3ceaf83d3ee448b2fd38bc9ad28b690c697a (diff)
downloadedk2-9d32a02a724c79215a00bb2d2563c7fd026b0726.tar.gz
edk2-9d32a02a724c79215a00bb2d2563c7fd026b0726.tar.bz2
edk2-9d32a02a724c79215a00bb2d2563c7fd026b0726.zip
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>
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r--OvmfPkg/PlatformPei/MemDetect.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
index 493cb1fbeb..e0ecca10b6 100644
--- a/OvmfPkg/PlatformPei/MemDetect.c
+++ b/OvmfPkg/PlatformPei/MemDetect.c
@@ -319,6 +319,14 @@ PublishPeiMemory (
if (MemorySize > PeiMemoryCap) {
MemoryBase = LowerMemorySize - 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
+ ));
}
}