]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformDebugLibIoPort: Introduce a Nocheck variant
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 23 Apr 2020 09:53:57 +0000 (10:53 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 28 Apr 2020 21:12:01 +0000 (21:12 +0000)
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>
OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c [new file with mode: 0644]
OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf [new file with mode: 0644]

diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c
new file mode 100644 (file)
index 0000000..0ef7920
--- /dev/null
@@ -0,0 +1,25 @@
+/** @file\r
+  Dectection code for hypervisor debug port.\r
+\r
+  Copyright (c) 2020, Citrix Systems, Inc.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include "DebugLibDetect.h"\r
+\r
+/**\r
+  Always return TRUE without detection as the debug I/O port is always\r
+  present.\r
+\r
+  @retval TRUE   The debug I/O port is always present.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+PlatformDebugLibIoPortDetect (\r
+  VOID\r
+  )\r
+{\r
+  return TRUE;\r
+}\r
diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
new file mode 100644 (file)
index 0000000..6a85b33
--- /dev/null
@@ -0,0 +1,48 @@
+## @file\r
+#  Instance of Debug Library for an hypervisor debug console port.\r
+#  It uses Print Library to produce formatted output strings.\r
+#\r
+#  Copyright (c) 2020, Citrix Systems, Inc.\r
+#\r
+#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = PlatformRomDebugLibIoPortNocheck\r
+  FILE_GUID                      = 92AEB68E-C2CF-466E-9AB2-3F5E713F7DE6\r
+  MODULE_TYPE                    = BASE\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = DebugLib\r
+  CONSTRUCTOR                    = PlatformRomDebugLibIoPortConstructor\r
+\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 EBC\r
+#\r
+\r
+[Sources]\r
+  DebugIoPortNocheck.c\r
+  DebugLib.c\r
+  DebugLibDetect.h\r
+  DebugLibDetectRom.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  OvmfPkg/OvmfPkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseMemoryLib\r
+  IoLib\r
+  PcdLib\r
+  PrintLib\r
+  BaseLib\r
+  DebugPrintErrorLevelLib\r
+\r
+[Pcd]\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort                ## CONSUMES\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue        ## CONSUMES\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask            ## CONSUMES\r
+  gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel    ## CONSUMES\r
+\r