On 04/23/20 11:53, Anthony PERARD wrote:
> Patch series available in this git branch:
> git://xenbits.xen.org/people/aperard/ovmf.git br.ovmfxen-debug-io-v2
>
> v2:
> - reuse PlatformDebugLibIoPort rather than duplicate it.
>
> Remove non working DEBUG_ON_SERIAL_PORT, then add a new LibIoPort which always
> writes to the IO port.
>
> Issues was discovered and discuss in this mail threads:
> <e1f7e62c-adb4-eace-3828-7d73ae59ecd4@bsdio.com>
> "OvmfPkg XenPkg: X64 DEBUG GCC5 -DDEBUG_ON_SERIAL_PORT=TRUE build is broken"
>
> Cheers,
>
> Anthony PERARD (5):
> OvmfPkg/OvmfXen: Remove DEBUG_ON_SERIAL_PORT
> OvmfPkg/PlatformDebugLibIoPort: Reword QEMU to hypervisor
> OvmfPkg/PlatformDebugLibIoPort: factor out debug port detection
> OvmfPkg/PlatformDebugLibIoPort: Introduce a Nocheck variant
> OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag
>
> OvmfPkg/OvmfXen.dsc | 49 +++++--------------
> .../PlatformDebugLibIoPort.inf | 1 +
> .../PlatformRomDebugLibIoPort.inf | 1 +
> ...f => PlatformRomDebugLibIoPortNocheck.inf} | 14 +++---
> .../PlatformDebugLibIoPort/DebugLibDetect.h | 8 +--
> .../DebugIoPortNocheck.c | 25 ++++++++++
> .../PlatformDebugLibIoPort/DebugIoPortQemu.c | 34 +++++++++++++
> .../Library/PlatformDebugLibIoPort/DebugLib.c | 18 +------
> .../PlatformDebugLibIoPort/DebugLibDetect.c | 2 +-
> .../DebugLibDetectRom.c | 2 +-
> 10 files changed, 84 insertions(+), 70 deletions(-)
> copy OvmfPkg/Library/PlatformDebugLibIoPort/{PlatformRomDebugLibIoPort.inf => PlatformRomDebugLibIoPortNocheck.inf} (65%)
> create mode 100644 OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c
> create mode 100644 OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortQemu.c
>
Merged as commit range 099dfbb29d8b..3a402f961143, via
<https://github.com/tianocore/edk2/pull/554>, with the following changes
(listed with git-range-diff):
> 1: 30e967c8caff ! 1: 8131bcf75724 OvmfPkg/OvmfXen: Remove DEBUG_ON_SERIAL_PORT
> @@ -18,6 +18,7 @@
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> Message-Id: <20200423095358.2518197-2-anthony.perard@citrix.com>
> + Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> --- a/OvmfPkg/OvmfXen.dsc
> 2: f5074c29bed8 ! 2: d81604376c2c OvmfPkg/PlatformDebugLibIoPort: Reword QEMU to hypervisor
> @@ -8,6 +8,7 @@
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> Message-Id: <20200423095358.2518197-3-anthony.perard@citrix.com>
> + Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
> diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h
> --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h
> 3: f34d57687c4f ! 3: b2d70c6189ac OvmfPkg/PlatformDebugLibIoPort: factor out debug port detection
> @@ -6,6 +6,8 @@
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> Message-Id: <20200423095358.2518197-4-anthony.perard@citrix.com>
> + Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> + Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
> diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> 4: c095623a5cfb ! 4: 37f050ea8228 OvmfPkg/PlatformDebugLibIoPort: Introduce a Nocheck variant
> @@ -7,6 +7,7 @@
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> Message-Id: <20200423095358.2518197-5-anthony.perard@citrix.com>
> + Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
> diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
> new file mode 100644
> @@ -30,7 +31,7 @@
> + FILE_GUID = 92AEB68E-C2CF-466E-9AB2-3F5E713F7DE6
> + MODULE_TYPE = BASE
> + VERSION_STRING = 1.0
> -+ LIBRARY_CLASS = DebugLib|SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER SMM_CORE DXE_SMM_DRIVER UEFI_DRIVER UEFI_APPLICATION
> ++ LIBRARY_CLASS = DebugLib
> + CONSTRUCTOR = PlatformRomDebugLibIoPortConstructor
> +
> +#
> @@ -40,8 +41,8 @@
> +[Sources]
> + DebugIoPortNocheck.c
> + DebugLib.c
> -+ DebugLibDetectRom.c
> + DebugLibDetect.h
> ++ DebugLibDetectRom.c
> +
> +[Packages]
> + MdePkg/MdePkg.dec
> 5: 979f76d57653 ! 5: c6f8d17f53f9 OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag
> @@ -10,6 +10,7 @@
>
> 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>
>
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> --- a/OvmfPkg/OvmfXen.dsc
> @@ -29,9 +30,7 @@
>
> [LibraryClasses.common.SEC]
> QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf
> -+!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)
> -+ DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
> -+!else
> ++!ifndef $(DEBUG_ON_HYPERVISOR_CONSOLE)
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
> +!endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
Thanks!
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#58263): https://edk2.groups.io/g/devel/message/58263
Mute This Topic: https://groups.io/mt/73215158/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-