OvmfPkg/PlatformPei: debug log "etc/reserved-memory-end" from fw_cfg

QEMU calculates the UINT64 value in "etc/reserved-memory-end" in a quite
complex way, in the pc_memory_init() function. Log the value as a
DEBUG_VERBOSE message to support debugging.

Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1353591
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
Laszlo Ersek 2018-03-28 13:26:35 +02:00
parent b90c335fbb
commit c27c0003c1
1 changed files with 2 additions and 0 deletions

View File

@ -358,6 +358,8 @@ GetFirstNonAddress (
if (!EFI_ERROR (Status) && FwCfgSize == sizeof HotPlugMemoryEnd) { if (!EFI_ERROR (Status) && FwCfgSize == sizeof HotPlugMemoryEnd) {
QemuFwCfgSelectItem (FwCfgItem); QemuFwCfgSelectItem (FwCfgItem);
QemuFwCfgReadBytes (FwCfgSize, &HotPlugMemoryEnd); QemuFwCfgReadBytes (FwCfgSize, &HotPlugMemoryEnd);
DEBUG ((DEBUG_VERBOSE, "%a: HotPlugMemoryEnd=0x%Lx\n", __FUNCTION__,
HotPlugMemoryEnd));
ASSERT (HotPlugMemoryEnd >= FirstNonAddress); ASSERT (HotPlugMemoryEnd >= FirstNonAddress);
FirstNonAddress = HotPlugMemoryEnd; FirstNonAddress = HotPlugMemoryEnd;