diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2020-04-23 10:53:58 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-04-28 21:12:01 +0000 |
commit | 3a402f961143e07c8f9ffe38cdd3db065e3d72f3 (patch) | |
tree | 98b7124c4432a217000cd6ea5b4aa4550df45e2a /OvmfPkg/OvmfXen.dsc | |
parent | a91443885dc15918c4df56e7085f9acd7dafc8c5 (diff) | |
download | edk2-3a402f961143e07c8f9ffe38cdd3db065e3d72f3.tar.gz edk2-3a402f961143e07c8f9ffe38cdd3db065e3d72f3.tar.bz2 edk2-3a402f961143e07c8f9ffe38cdd3db065e3d72f3.zip |
OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag
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>
Diffstat (limited to 'OvmfPkg/OvmfXen.dsc')
-rw-r--r-- | OvmfPkg/OvmfXen.dsc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 39b6ec155f..8b3615e0b0 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -205,14 +205,20 @@ Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
RealTimeClockLib|OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.inf
+!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)
+ DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
+!else
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
+!endif
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
[LibraryClasses.common.SEC]
QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf
+!ifndef $(DEBUG_ON_HYPERVISOR_CONSOLE)
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
+!endif
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
!if $(SOURCE_DEBUG_ENABLE) == TRUE
@@ -409,6 +415,11 @@ #
!include NetworkPkg/NetworkPcds.dsc.inc
+!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)
+ ## Set Xen's debug IO port for PlatformDebugLibIoPort
+ gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort|0xe9
+!endif
+
# IRQs 5, 9, 10, 11 are level-triggered
gUefiOvmfPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0E20
|