On 04/23/20 11:53, Anthony PERARD wrote: > 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.per...@citrix.com> > --- > OvmfPkg/OvmfXen.dsc | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc > index 4859faf1bff7..0a8fd26990a3 100644 > --- a/OvmfPkg/OvmfXen.dsc > +++ b/OvmfPkg/OvmfXen.dsc > @@ -205,14 +205,22 @@ [LibraryClasses] > > 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 > +!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE) > + > DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf > +!else > > DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf > +!endif
(1) This part can be simplified with an !ifndef, instead, I think. (When DEBUG_ON_HYPERVISOR_CONSOLE is defined, then the default resolution can take effect for SEC too.) If you wish I can change this for you as well. Alternatively, if you'd rather repost, that's OK too. (And maybe Phil intends to review more of the patches in this series; I'm not sure.) > > ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf > > ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf > !if $(SOURCE_DEBUG_ENABLE) == TRUE > @@ -405,6 +413,11 @@ [PcdsFixedAtBuild] > # > !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 > > With (1) updated: Reviewed-by: Laszlo Ersek <ler...@redhat.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58095): https://edk2.groups.io/g/devel/message/58095 Mute This Topic: https://groups.io/mt/73215163/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-