On 04/23/20 11:53, Anthony PERARD wrote:
> Introduce PlatformRomDebugLibIoPortNocheck which doesn't try to detect
> the debug IO port. Instead, debug logs are always written to the IO port.
>
> Signed-off-by: Anthony PERARD <[email protected]>
> ---
> ...f => PlatformRomDebugLibIoPortNocheck.inf} | 15 ++++++-----
> .../DebugIoPortNocheck.c | 25 +++++++++++++++++++
> 2 files changed, 32 insertions(+), 8 deletions(-)
> copy OvmfPkg/Library/PlatformDebugLibIoPort/{PlatformRomDebugLibIoPort.inf
> => PlatformRomDebugLibIoPortNocheck.inf} (65%)
> create mode 100644
> OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c
>
> diff --git
> a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
> b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
> similarity index 65%
> copy from OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
> copy to
> OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
> index 8f721d249dd5..34034e1eb887 100644
> --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
> +++
> b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
> @@ -1,9 +1,8 @@
> ## @file
> -# Instance of Debug Library for the QEMU debug console port.
> +# Instance of Debug Library for an hypervisor debug console port.
> # It uses Print Library to produce formatted output strings.
> #
> -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> -# Copyright (c) 2017, Red Hat, Inc.<BR>
> +# Copyright (c) 2020, Citrix Systems, Inc.
> #
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> #
> @@ -12,11 +11,11 @@
>
> [Defines]
> INF_VERSION = 0x00010005
> - BASE_NAME = PlatformRomDebugLibIoPort
> - FILE_GUID = CEB0D9D3-328F-4C24-8C02-28FA1986AE1B
> + BASE_NAME = PlatformRomDebugLibIoPortNocheck
> + FILE_GUID = 92AEB68E-C2CF-466E-9AB2-3F5E713F7DE6
> MODULE_TYPE = BASE
> VERSION_STRING = 1.0
> - LIBRARY_CLASS = DebugLib|SEC
> + LIBRARY_CLASS = DebugLib|SEC PEI_CORE PEIM DXE_CORE
> DXE_DRIVER DXE_RUNTIME_DRIVER SMM_CORE DXE_SMM_DRIVER UEFI_DRIVER
> UEFI_APPLICATION
(1) The simple way to say the same is to just drop the "|..." part :)
But I can fix this up for you.
> CONSTRUCTOR = PlatformRomDebugLibIoPortConstructor
>
> #
> @@ -24,10 +23,10 @@ [Defines]
> #
>
> [Sources]
> - DebugIoPortQemu.c
> + DebugIoPortNocheck.c
> DebugLib.c
> - DebugLibDetect.h
> DebugLibDetectRom.c
> + DebugLibDetect.h
(2) The re-ordering of "DebugLibDetect.h" is curious. Maybe you may have
an LC_COLLATE setting that sorts "." after "R"?
Anyway I can re-sort this when I merge the series.
>
> [Packages]
> MdePkg/MdePkg.dec
> diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c
> b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c
> new file mode 100644
> index 000000000000..0ef7920a8fb8
> --- /dev/null
> +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c
> @@ -0,0 +1,25 @@
> +/** @file
> + Dectection code for hypervisor debug port.
> +
> + Copyright (c) 2020, Citrix Systems, Inc.
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include "DebugLibDetect.h"
> +
> +/**
> + Always return TRUE without detection as the debug I/O port is always
> + present.
> +
> + @retval TRUE The debug I/O port is always present.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +PlatformDebugLibIoPortDetect (
> + VOID
> + )
> +{
> + return TRUE;
> +}
>
Reviewed-by: Laszlo Ersek <[email protected]>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#58093): https://edk2.groups.io/g/devel/message/58093
Mute This Topic: https://groups.io/mt/73215162/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-