]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 23 Apr 2020 09:53:58 +0000 (10:53 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 28 Apr 2020 21:12:01 +0000 (21:12 +0000)
Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag to enable logging
debug output to the Xen console.

This will work with both Xen HVM guest and Xen PVH guest whereas the
default PlatformDebugLibIoPort works only in HVM when QEMU is present.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20200423095358.2518197-6-anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/OvmfXen.dsc

index 39b6ec155fc9bc9c1177a2c79bc03ad71dbb7f0f..8b3615e0b07e8be7075a900644137eca9936131b 100644 (file)
   Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf\r
   TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf\r
   RealTimeClockLib|OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.inf\r
+!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf\r
+!else\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
 \r
 [LibraryClasses.common]\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
 \r
 [LibraryClasses.common.SEC]\r
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf\r
+!ifndef $(DEBUG_ON_HYPERVISOR_CONSOLE)\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf\r
+!endif\r
   ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
   ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf\r
 !if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   #\r
 !include NetworkPkg/NetworkPcds.dsc.inc\r
 \r
+!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)\r
+  ## Set Xen's debug IO port for PlatformDebugLibIoPort\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort|0xe9\r
+!endif\r
+\r
   # IRQs 5, 9, 10, 11 are level-triggered\r
   gUefiOvmfPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0E20\r
 \r