From aceb3490a2a350b128156fd4e36e53fc19739e4e Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 14 Feb 2024 11:45:04 +0100 Subject: [PATCH] OvmfPkg/PlatformPei: log pei memory cap details Signed-off-by: Gerd Hoffmann Message-Id: <20240214104504.2931339-5-kraxel@redhat.com> Reviewed-by: Laszlo Ersek --- OvmfPkg/PlatformPei/MemDetect.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c index 81c29c626b..04409b28ba 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -263,6 +263,30 @@ GetPeiMemoryCap ( // MemoryCap = EFI_PAGES_TO_SIZE ((UINTN)TotalPages) + ApStacks + SIZE_64MB; + DEBUG (( + DEBUG_INFO, + "%a: page tables: %6lu KB (%u/%u/%u/%u pages for levels 5/4/3/2)\n", + __func__, + RShiftU64 (EFI_PAGES_TO_SIZE ((UINTN)TotalPages), 10), + Level5Pages, + Level4Pages, + Level3Pages, + Level2Pages + )); + DEBUG (( + DEBUG_INFO, + "%a: ap stacks: %6lu KB (%u cpus)\n", + __func__, + RShiftU64 (ApStacks, 10), + PlatformInfoHob->PcdCpuMaxLogicalProcessorNumber + )); + DEBUG (( + DEBUG_INFO, + "%a: memory cap: %6lu KB\n", + __func__, + RShiftU64 (MemoryCap, 10) + )); + ASSERT (MemoryCap <= MAX_UINT32); return (UINT32)MemoryCap; }