audk/ArmVirtPkg/Library
Laszlo Ersek 601abf5d50 ArmVirtPkg: introduce DebugLibFdtPL011Uart DXE Runtime instance
Introduce three new DebugLib instances, forked from
MdePkg/Library/BaseDebugLibSerialPort. All three instances rely on
PL011UartLib rather than SerialPortLib so that they can customize the
PL011 UART that the debug messages are written to. All three instances
direct the debug output to the first such PL011 UART that *differs* from
the one specified in the Device Tree's /chosen node's "stdout-path"
property.

From these, DxeRuntimeDebugLibFdtPL011Uart is identical to
DebugLibFdtPL011UartRam, with the addition that UART access is permanently
disabled when the containing DXE_RUNTIME_DRIVER module is notified about
exiting boot services.

The contexts in which these DebugLib instances run are identical to those
in which the corresponding SerialPortLib instances run. The particular
original dependency chain is

  DxeRuntimeDebugLibSerialPort (DXE_RUNTIME_DRIVER)
    FdtPL011SerialPortLib
      gEarlyPL011BaseAddressGuid
      HobLib
      PL011UartLib

and the new dependency chain is

  DxeRuntimeDebugLibFdtPL011Uart (DXE_RUNTIME_DRIVER)
    gEarlyPL011BaseAddressGuid
    HobLib
    PL011UartLib

The ArmVirtPkg DSC files will be switched to the new library instances in
a separate patch.

This patch is worth viewing with "git show --find-copies-harder".

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20231008153912.175941-9-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4577
[lersek@redhat.com: add TianoCore BZ reference]
2023-10-26 18:55:43 +00:00
..
ArmPlatformLibQemu
ArmVirtDxeHobLib
ArmVirtGicArchLib
ArmVirtMemoryInitPeiLib
ArmVirtPL031FdtClientLib
ArmVirtPciHostBridgeUtilityLib
ArmVirtPsciResetSystemLib
ArmVirtPsciResetSystemPeiLib
ArmVirtTimerFdtClientLib ArmVirtPkg: handle virtual EL2 timer in DT 2023-09-19 20:27:55 +00:00
CloudHvVirtMemInfoLib
DebugLibFdtPL011Uart ArmVirtPkg: introduce DebugLibFdtPL011Uart DXE Runtime instance 2023-10-26 18:55:43 +00:00
Fdt16550SerialPortHookLib ArmVirtPkg/Fdt16550SerialPortHookLib: rebase to FdtSerialPortAddressLib 2023-10-26 18:55:43 +00:00
FdtPL011SerialPortLib ArmVirtPkg: store separate console and debug PL011 addresses in GUID HOB 2023-10-26 18:55:43 +00:00
FdtSerialPortAddressLib ArmVirtPkg: introduce FdtSerialPortAddressLib 2023-10-26 18:55:43 +00:00
KvmtoolPlatformPeiLib
KvmtoolRtcFdtClientLib
KvmtoolVirtMemInfoLib
NorFlashKvmtoolLib
NorFlashQemuLib
PlatformBootManagerLib
PlatformPeiLib ArmVirtPkg: store separate console and debug PL011 addresses in GUID HOB 2023-10-26 18:55:43 +00:00
QemuVirtMemInfoLib
XenArmGenericTimerVirtCounterLib
XenVirtMemInfoLib