summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/ArmVirtKvmTool.dsc
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2023-10-08 17:39:12 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-10-26 18:55:43 +0000
commitf945b72331d7e9eed7f84c71052f198377ac3950 (patch)
treed542e14c0068bc0121b7c1d3ab7afd99d7812a49 /ArmVirtPkg/ArmVirtKvmTool.dsc
parent601abf5d50ca7e797bf0e3e9f3398cd7225aa30b (diff)
downloadedk2-f945b72331d7e9eed7f84c71052f198377ac3950.tar.gz
edk2-f945b72331d7e9eed7f84c71052f198377ac3950.tar.bz2
edk2-f945b72331d7e9eed7f84c71052f198377ac3950.zip
ArmVirtPkg: steer DebugLib output away from SerialPortLib+console traffic
For the RELEASE target, all ArmVirtPkg DSCs inherit BaseDebugLibNull from "ArmVirt.dsc.inc"; keep that. For NOOPT and DEBUG: - switch the lib class resolution pair (BaseDebugLibSerialPort + FdtPL011SerialPortLib) that is set as the default for all module types in "ArmVirt.dsc.inc" to DebugLibFdtPL011UartRam; - switch the lib class resolution pair (BaseDebugLibSerialPort + EarlyFdtPL011SerialPortLib) that is set as an override for SEC, PEI_CORE, PEIM modules in "ArmVirt.dsc.inc" to DebugLibFdtPL011UartFlash; - switch the lib class resolution pair (DxeRuntimeDebugLibSerialPort + FdtPL011SerialPortLib) that is set as an override for DXE_RUNTIME_DRIVER modules in "ArmVirt.dsc.inc" to DxeRuntimeDebugLibFdtPL011Uart; - mask all of the above DebugLib class resolution changes in "ArmVirtKvmTool.dsc", because "ArmVirtKvmTool.dsc" uses BaseSerialPortLib16550 rather than PL011 UARTs, - mask all of the above DebugLib class resolution changes in "ArmVirtXen.dsc" too, because "ArmVirtXen.dsc" uses XenConsoleSerialPortLib rather than PL011 UARTs. I regression-tested this change for "ArmVirtKvmTool.dsc" and "ArmVirtXen.dsc" by building them for both DEBUG and RELEASE, both before the patch and after, and comparing the edk2 build report files (focusing on lib class resolutions). There are no changes. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Julien Grall <julien@xen.org> 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-10-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]
Diffstat (limited to 'ArmVirtPkg/ArmVirtKvmTool.dsc')
-rw-r--r--ArmVirtPkg/ArmVirtKvmTool.dsc11
1 files changed, 11 insertions, 0 deletions
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index 00b6c64d1c..f50d53bf15 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -77,6 +77,9 @@
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
+!if $(TARGET) != RELEASE
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+!endif
HwInfoParserLib|DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf
DynamicPlatRepoLib|DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepoLib.inf
@@ -88,6 +91,14 @@
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
+!if $(TARGET) != RELEASE
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+!endif
+
+[LibraryClasses.common.DXE_RUNTIME_DRIVER]
+!if $(TARGET) != RELEASE
+ DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
+!endif
[LibraryClasses.common.UEFI_DRIVER]
UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf