]> xenbits.xensource.com Git - people/aperard/ovmf.git/commitdiff
OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag br.ovmfxen-debug-io-v2
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 31 Jan 2018 16:01:26 +0000 (16:01 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 23 Apr 2020 09:51:15 +0000 (10:51 +0100)
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>
OvmfPkg/OvmfXen.dsc

index 4859faf1bff7ea9b97170ac99fc389dbea034ca0..0a8fd26990a3bab3c10d8bbca21d4714bd2c1f78 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
+!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)\r
+  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf\r
+!else\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