audk/MdeModulePkg
Laszlo Ersek 1366cd58cd MdeModulePkg/Core/Dxe: log memory base and length, after lib ctors again
CoreInitializeMemoryServices() logs "BaseAddress" and "Length" with
DEBUG() before DxeMain() calls ProcessLibraryConstructorList()
explicitly. (Library construction is not an automatic part of the DXE
Core entry point.)

So those DEBUG()s in CoreInitializeMemoryServices() are issued against
an un-constructed DebugLib, and also against a -- possibly underlying --
un-constructed SerialPortLib.

Some DebugLib instances can deal with this (see for example commit
91a5b13650, "OvmfPkg/PlatformDebugLibIoPort: fix port detection for
use in the DXE Core", 2018-08-06), while some others can't (see for
example the DebugLib instance
"MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf"
coupled with the SerialPortLib instance
"ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.inf").

Addressing this issue in a SerialPortLib instance that underlies
BaseDebugLibSerialPort seems wrong; either the DebugLib instance should
cope directly with being called un-constructed (see again commit
91a5b13650), or the DXE Core should log relevant information *at
least* after library instances have been constructed. This patch
implements the latter (only for the "BaseAddress" and "Length" values
calculated by CoreInitializeMemoryServices()).

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201103161557.30621-1-lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2020-11-06 20:37:22 +00:00
..
Application MdeModulePkg/CapsuleApp: Fix spelling mistake 2020-08-07 18:53:01 +00:00
Bus MdeModulePkg/XhciDxe: Retry device slot init on failure 2020-11-02 01:30:24 +00:00
Core MdeModulePkg/Core/Dxe: log memory base and length, after lib ctors again 2020-11-06 20:37:22 +00:00
Include MdeModulePkg: Fix spelling mistake for occurred 2020-08-19 00:54:23 +00:00
Library MdeModulePkg: Fix constructor invocation ordering 2020-10-16 17:21:04 +00:00
Logo MdeModulePkg/Logo:Add RISCV64 architecture 2020-05-07 03:17:15 +00:00
Test MdeModulePkg: Add DxeResetSystemLib unit test 2020-02-07 19:18:53 +00:00
Universal MdeModulePkg/AcpiTableDxe: use pool allocation for RSDP if possible 2020-10-30 14:50:33 +00:00
MdeModulePkg.ci.yaml MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for Ecc check 2020-08-17 03:28:09 +00:00
MdeModulePkg.dec MdeModulePkg: Create PCDs to be used in support of SEV-ES 2020-08-16 16:45:42 +00:00
MdeModulePkg.dsc MdeModulePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES 2020-10-13 01:35:03 +00:00
MdeModulePkg.uni MdeModulePkg: Create PCDs to be used in support of SEV-ES 2020-08-16 16:45:42 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00