OvmfPkg/PlatformPei: log pei memory cap details

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

View File

@ -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;
}