diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2020-04-23 10:53:57 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-04-28 21:12:01 +0000 |
commit | a91443885dc15918c4df56e7085f9acd7dafc8c5 (patch) | |
tree | cb5e9224ceadda5316ea29a5f773dc4346c833d0 | |
parent | 52f012129ac497a3abd4aae0dc75f2a32acfd918 (diff) | |
download | edk2-a91443885dc15918c4df56e7085f9acd7dafc8c5.tar.gz |
OvmfPkg/PlatformDebugLibIoPort: Introduce a Nocheck variant
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 <anthony.perard@citrix.com>
Message-Id: <20200423095358.2518197-5-anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
-rw-r--r-- | OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c | 25 | ||||
-rw-r--r-- | OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf | 48 |
2 files changed, 73 insertions, 0 deletions
diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c new file mode 100644 index 0000000000..0ef7920a8f --- /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;
+}
diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf new file mode 100644 index 0000000000..6a85b333ee --- /dev/null +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf @@ -0,0 +1,48 @@ +## @file
+# Instance of Debug Library for an hypervisor debug console port.
+# It uses Print Library to produce formatted output strings.
+#
+# Copyright (c) 2020, Citrix Systems, Inc.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PlatformRomDebugLibIoPortNocheck
+ FILE_GUID = 92AEB68E-C2CF-466E-9AB2-3F5E713F7DE6
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = DebugLib
+ CONSTRUCTOR = PlatformRomDebugLibIoPortConstructor
+
+#
+# VALID_ARCHITECTURES = IA32 X64 EBC
+#
+
+[Sources]
+ DebugIoPortNocheck.c
+ DebugLib.c
+ DebugLibDetect.h
+ DebugLibDetectRom.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ OvmfPkg/OvmfPkg.dec
+
+[LibraryClasses]
+ BaseMemoryLib
+ IoLib
+ PcdLib
+ PrintLib
+ BaseLib
+ DebugPrintErrorLevelLib
+
+[Pcd]
+ gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel ## CONSUMES
+
|