public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io, anthony.perard@citrix.com
Cc: Laszlo Ersek <lersek@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@arm.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Julien Grall <julien@xen.org>
Subject: Re: [edk2-devel] [PATCH v2 1/5] OvmfPkg/OvmfXen: Remove DEBUG_ON_SERIAL_PORT
Date: Thu, 23 Apr 2020 12:52:43 +0200	[thread overview]
Message-ID: <1a390d13-ef61-a138-a8b6-c7ee74b1ef2d@redhat.com> (raw)
In-Reply-To: <20200423095358.2518197-2-anthony.perard@citrix.com>

On 4/23/20 11:53 AM, Anthony PERARD wrote:
> Remove support for DEBUG_ON_SERIAL_PORT because OvmfXen can't be build
> with it due to a circular dependency:
>    DebugLib        : BaseDebugLibSerialPort ->
>    SerialPortLib   : XenConsoleSerialPortLib ->
>    XenHypercallLib : XenHypercallLib ->
>    DebugLib
> 
> Also, if that dependency is fixed, I think it would be harder to find
> which console the debug is sent to when running an HVM guest. The xen
> console isn't the serial console used by default. Furthermore,
> XenHypercallLib isn't initialised early enough, so we would loose
> debug output from the SEC phase and early PEI phase.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> ---
>   OvmfPkg/OvmfXen.dsc | 40 +---------------------------------------
>   1 file changed, 1 insertion(+), 39 deletions(-)
> 
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 47ee8db8b884..4859faf1bff7 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -205,17 +205,14 @@ [LibraryClasses]
>     Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
>     TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
>     RealTimeClockLib|OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.inf
> +  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
>   
>   [LibraryClasses.common]
>     BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
>   
>   [LibraryClasses.common.SEC]
>     QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf
> -!ifdef $(DEBUG_ON_SERIAL_PORT)
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!else
>     DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
> -!endif
>     ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>     ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
>   !if $(SOURCE_DEBUG_ENABLE) == TRUE
> @@ -236,11 +233,6 @@ [LibraryClasses.common.PEI_CORE]
>     ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>     OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>     PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> -!ifdef $(DEBUG_ON_SERIAL_PORT)
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!else
> -  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> -!endif
>     PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
>   
>   [LibraryClasses.common.PEIM]
> @@ -252,11 +244,6 @@ [LibraryClasses.common.PEIM]
>     ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>     OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
>     PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> -!ifdef $(DEBUG_ON_SERIAL_PORT)
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!else
> -  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> -!endif
>     PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
>     ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
>     ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> @@ -274,11 +261,6 @@ [LibraryClasses.common.DXE_CORE]
>     DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
>     MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
>     ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
> -!ifdef $(DEBUG_ON_SERIAL_PORT)
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!else
> -  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> -!endif
>     ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
>   !if $(SOURCE_DEBUG_ENABLE) == TRUE
>     DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> @@ -292,11 +274,6 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
>     DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
>     MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
>     ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
> -!ifdef $(DEBUG_ON_SERIAL_PORT)
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!else
> -  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> -!endif
>     UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
>     BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
>     PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -308,11 +285,6 @@ [LibraryClasses.common.UEFI_DRIVER]
>     DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
>     MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
>     ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
> -!ifdef $(DEBUG_ON_SERIAL_PORT)
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!else
> -  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> -!endif
>     UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
>     PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
>   
> @@ -322,11 +294,6 @@ [LibraryClasses.common.DXE_DRIVER]
>     MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
>     ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
>     UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
> -!ifdef $(DEBUG_ON_SERIAL_PORT)
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!else
> -  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> -!endif
>     PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
>     PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
>     QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
> @@ -344,11 +311,6 @@ [LibraryClasses.common.UEFI_APPLICATION]
>     HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
>     MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
>     ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
> -!ifdef $(DEBUG_ON_SERIAL_PORT)
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!else
> -  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> -!endif
>     PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
>   
>   ################################################################################
> 

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>


  reply	other threads:[~2020-04-23 10:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  9:53 [PATCH v2 0/5] OvmfXen: Cleanup debug options Anthony PERARD
2020-04-23  9:53 ` [PATCH v2 1/5] OvmfPkg/OvmfXen: Remove DEBUG_ON_SERIAL_PORT Anthony PERARD
2020-04-23 10:52   ` Philippe Mathieu-Daudé [this message]
2020-04-23  9:53 ` [PATCH v2 2/5] OvmfPkg/PlatformDebugLibIoPort: Reword QEMU to hypervisor Anthony PERARD
2020-04-24 17:48   ` [edk2-devel] " Laszlo Ersek
2020-04-23  9:53 ` [PATCH v2 3/5] OvmfPkg/PlatformDebugLibIoPort: factor out debug port detection Anthony PERARD
2020-04-23 10:50   ` [edk2-devel] " Philippe Mathieu-Daudé
2020-04-24 17:52   ` Laszlo Ersek
2020-04-23  9:53 ` [PATCH v2 4/5] OvmfPkg/PlatformDebugLibIoPort: Introduce a Nocheck variant Anthony PERARD
2020-04-24 17:58   ` [edk2-devel] " Laszlo Ersek
2020-04-27 14:19     ` Anthony PERARD
2020-04-23  9:53 ` [PATCH v2 5/5] OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag Anthony PERARD
2020-04-24 18:05   ` [edk2-devel] " Laszlo Ersek
2020-04-27 14:22     ` Anthony PERARD
2020-04-28 21:23 ` [edk2-devel] [PATCH v2 0/5] OvmfXen: Cleanup debug options Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a390d13-ef61-a138-a8b6-c7ee74b1ef2d@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox