]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Change use of EFI_D_* to DEBUG_*
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 17 Nov 2021 03:21:33 +0000 (19:21 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 7 Dec 2021 17:24:28 +0000 (17:24 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739

Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c
OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c
OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c

index 0099b8e3c391b31ff8977facd1bbd8ce96077f18..56d00edb7ce9b807fc447b24b44922c90371e444 100644 (file)
@@ -121,7 +121,7 @@ ProcessPciHost (
   Status = FdtClient->FindCompatibleNode (FdtClient, "pci-host-ecam-generic",\r
                         &Node);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_INFO,\r
+    DEBUG ((DEBUG_INFO,\r
       "%a: No 'pci-host-ecam-generic' compatible DT node found\n",\r
       __FUNCTION__));\r
     return EFI_NOT_FOUND;\r
@@ -141,7 +141,7 @@ ProcessPciHost (
 \r
   Status = FdtClient->GetNodeProperty (FdtClient, Node, "reg", &Prop, &Len);\r
   if (EFI_ERROR (Status) || Len != 2 * sizeof (UINT64)) {\r
-    DEBUG ((EFI_D_ERROR, "%a: 'reg' property not found or invalid\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: 'reg' property not found or invalid\n",\r
       __FUNCTION__));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -158,7 +158,7 @@ ProcessPciHost (
   Status = FdtClient->GetNodeProperty (FdtClient, Node, "bus-range", &Prop,\r
                         &Len);\r
   if (EFI_ERROR (Status) || Len != 2 * sizeof (UINT32)) {\r
-    DEBUG ((EFI_D_ERROR, "%a: 'bus-range' not found or invalid\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: 'bus-range' not found or invalid\n",\r
       __FUNCTION__));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -171,7 +171,7 @@ ProcessPciHost (
   //\r
   if (*BusMax < *BusMin || *BusMax - *BusMin == MAX_UINT32 ||\r
       DivU64x32 (ConfigSize, SIZE_4KB * 8 * 32) < *BusMax - *BusMin + 1) {\r
-    DEBUG ((EFI_D_ERROR, "%a: invalid 'bus-range' and/or 'reg'\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: invalid 'bus-range' and/or 'reg'\n",\r
       __FUNCTION__));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -182,7 +182,7 @@ ProcessPciHost (
   Status = FdtClient->GetNodeProperty (FdtClient, Node, "ranges", &Prop, &Len);\r
   if (EFI_ERROR (Status) || Len == 0 ||\r
       Len % sizeof (DTB_PCI_HOST_RANGE_RECORD) != 0) {\r
-    DEBUG ((EFI_D_ERROR, "%a: 'ranges' not found or invalid\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __FUNCTION__));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
 \r
@@ -207,14 +207,14 @@ ProcessPciHost (
 \r
       if (*Mmio32Base > MAX_UINT32 || *Mmio32Size > MAX_UINT32 ||\r
           *Mmio32Base + *Mmio32Size > SIZE_4GB) {\r
-        DEBUG ((EFI_D_ERROR, "%a: MMIO32 space invalid\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a: MMIO32 space invalid\n", __FUNCTION__));\r
         return EFI_PROTOCOL_ERROR;\r
       }\r
 \r
       ASSERT (PcdGet64 (PcdPciMmio32Translation) == Mmio32Translation);\r
 \r
       if (Mmio32Translation != 0) {\r
-        DEBUG ((EFI_D_ERROR, "%a: unsupported nonzero MMIO32 translation "\r
+        DEBUG ((DEBUG_ERROR, "%a: unsupported nonzero MMIO32 translation "\r
           "0x%Lx\n", __FUNCTION__, Mmio32Translation));\r
         return EFI_UNSUPPORTED;\r
       }\r
@@ -229,7 +229,7 @@ ProcessPciHost (
       ASSERT (PcdGet64 (PcdPciMmio64Translation) == Mmio64Translation);\r
 \r
       if (Mmio64Translation != 0) {\r
-        DEBUG ((EFI_D_ERROR, "%a: unsupported nonzero MMIO64 translation "\r
+        DEBUG ((DEBUG_ERROR, "%a: unsupported nonzero MMIO64 translation "\r
           "0x%Lx\n", __FUNCTION__, Mmio64Translation));\r
         return EFI_UNSUPPORTED;\r
       }\r
@@ -238,7 +238,7 @@ ProcessPciHost (
     }\r
   }\r
   if (*IoSize == 0 || *Mmio32Size == 0) {\r
-    DEBUG ((EFI_D_ERROR, "%a: %a space empty\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: %a space empty\n", __FUNCTION__,\r
       (*IoSize == 0) ? "IO" : "MMIO32"));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -249,7 +249,7 @@ ProcessPciHost (
   //\r
   ASSERT (PcdGet64 (PcdPciExpressBaseAddress) == ConfigBase);\r
 \r
-  DEBUG ((EFI_D_INFO, "%a: Config[0x%Lx+0x%Lx) Bus[0x%x..0x%x] "\r
+  DEBUG ((DEBUG_INFO, "%a: Config[0x%Lx+0x%Lx) Bus[0x%x..0x%x] "\r
     "Io[0x%Lx+0x%Lx)@0x%Lx Mem32[0x%Lx+0x%Lx)@0x0 Mem64[0x%Lx+0x%Lx)@0x0\n",\r
     __FUNCTION__, ConfigBase, ConfigSize, *BusMin, *BusMax, *IoBase, *IoSize,\r
     IoTranslation, *Mmio32Base, *Mmio32Size, *Mmio64Base, *Mmio64Size));\r
@@ -301,7 +301,7 @@ PciHostBridgeGetRootBridges (
   PCI_ROOT_BRIDGE_APERTURE PMemAbove4G;\r
 \r
   if (PcdGet64 (PcdPciExpressBaseAddress) == 0) {\r
-    DEBUG ((EFI_D_INFO, "%a: PCI host bridge not present\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_INFO, "%a: PCI host bridge not present\n", __FUNCTION__));\r
 \r
     *Count = 0;\r
     return NULL;\r
@@ -310,7 +310,7 @@ PciHostBridgeGetRootBridges (
   Status = ProcessPciHost (&IoBase, &IoSize, &Mmio32Base, &Mmio32Size,\r
              &Mmio64Base, &Mmio64Size, &BusMin, &BusMax);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "%a: failed to discover PCI host bridge: %r\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: failed to discover PCI host bridge: %r\n",\r
       __FUNCTION__, Status));\r
     *Count = 0;\r
     return NULL;\r
index 25201010177c57e497d92158595e7f8e2df89400..8dd8fc9b3d8920fdb8c25ff8160269e18804e0a7 100644 (file)
@@ -57,7 +57,7 @@ GetPciIoTranslation (
   Status = FdtClient->GetNodeProperty (FdtClient, Node, "ranges", &Prop, &Len);\r
   if (EFI_ERROR (Status) || Len == 0 ||\r
       Len % sizeof (DTB_PCI_HOST_RANGE_RECORD) != 0) {\r
-    DEBUG ((EFI_D_ERROR, "%a: 'ranges' not found or invalid\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __FUNCTION__));\r
     return RETURN_PROTOCOL_ERROR;\r
   }\r
 \r
@@ -135,7 +135,7 @@ FdtPciPcdProducerLibConstructor (
         // to abort in the general case. So leave it up to the actual driver to\r
         // complain about this if it wants to, and just issue a warning here.\r
         //\r
-        DEBUG ((EFI_D_WARN,\r
+        DEBUG ((DEBUG_WARN,\r
           "%a: 'pci-host-ecam-generic' device encountered with no I/O range\n",\r
           __FUNCTION__));\r
       }\r
index 3bcd3eb213402c715793111afe256968f76bd784..e2ae706127f2ab3285e3a447006504e9b73f3815 100644 (file)
@@ -80,7 +80,7 @@ InitializeHighMemDxe (
                         CurSize, EFI_MEMORY_WB);\r
 \r
         if (EFI_ERROR (Status)) {\r
-          DEBUG ((EFI_D_ERROR,\r
+          DEBUG ((DEBUG_ERROR,\r
             "%a: Failed to add System RAM @ 0x%lx - 0x%lx (%r)\n",\r
             __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
           continue;\r
@@ -114,11 +114,11 @@ InitializeHighMemDxe (
         Status = Cpu->SetMemoryAttributes (Cpu, CurBase, CurSize, Attributes);\r
 \r
         if (EFI_ERROR (Status)) {\r
-          DEBUG ((EFI_D_ERROR,\r
+          DEBUG ((DEBUG_ERROR,\r
             "%a: Failed to set System RAM @ 0x%lx - 0x%lx attribute (%r)\n",\r
             __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
         } else {\r
-          DEBUG ((EFI_D_INFO, "%a: Add System RAM @ 0x%lx - 0x%lx\n",\r
+          DEBUG ((DEBUG_INFO, "%a: Add System RAM @ 0x%lx - 0x%lx\n",\r
             __FUNCTION__, CurBase, CurBase + CurSize - 1));\r
         }\r
       }\r
index 9625693b154d6a6fe4b9039362a13c8cce705ec5..fdef5f166afb1c74a667781cdfaa4f4546fde42d 100644 (file)
@@ -57,7 +57,7 @@ InitializeVirtioFdtDxe (
     Status = FdtClient->GetNodeProperty (FdtClient, Node, "reg",\r
                           (CONST VOID **)&Reg, &RegSize);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "%a: GetNodeProperty () failed (Status == %r)\n",\r
+      DEBUG ((DEBUG_ERROR, "%a: GetNodeProperty () failed (Status == %r)\n",\r
         __FUNCTION__, Status));\r
       continue;\r
     }\r
@@ -73,7 +73,7 @@ InitializeVirtioFdtDxe (
                                   HW_VENDOR_DP,\r
                                   sizeof (VIRTIO_TRANSPORT_DEVICE_PATH));\r
     if (DevicePath == NULL) {\r
-      DEBUG ((EFI_D_ERROR, "%a: Out of memory\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: Out of memory\n", __FUNCTION__));\r
       continue;\r
     }\r
 \r
@@ -88,7 +88,7 @@ InitializeVirtioFdtDxe (
                      &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE,\r
                      DevicePath);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "%a: Failed to install the EFI_DEVICE_PATH "\r
+      DEBUG ((DEBUG_ERROR, "%a: Failed to install the EFI_DEVICE_PATH "\r
         "protocol on a new handle (Status == %r)\n",\r
         __FUNCTION__, Status));\r
       FreePool (DevicePath);\r
@@ -97,7 +97,7 @@ InitializeVirtioFdtDxe (
 \r
     Status = VirtioMmioInstallDevice (RegBase, Handle);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "%a: Failed to install VirtIO transport @ 0x%Lx "\r
+      DEBUG ((DEBUG_ERROR, "%a: Failed to install VirtIO transport @ 0x%Lx "\r
         "on handle %p (Status == %r)\n", __FUNCTION__, RegBase,\r
         Handle, Status));\r
 \r
@@ -110,7 +110,7 @@ InitializeVirtioFdtDxe (
   }\r
 \r
   if (EFI_ERROR (FindNodeStatus) && FindNodeStatus != EFI_NOT_FOUND) {\r
-     DEBUG ((EFI_D_ERROR, "%a: Error occurred while iterating DT nodes "\r
+     DEBUG ((DEBUG_ERROR, "%a: Error occurred while iterating DT nodes "\r
        "(FindNodeStatus == %r)\n", __FUNCTION__, FindNodeStatus));\r
   }\r
 \r
index e767c3b172ba9b09164fa2843674f67be3785b74..639dbd6e454fbce8dc59ba2da411c06f3ce500e5 100644 (file)
@@ -253,7 +253,7 @@ RemoveStaleFvFileOptions (
       DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,\r
                            FALSE, FALSE);\r
       DEBUG ((\r
-        EFI_ERROR (Status) ? EFI_D_WARN : DEBUG_VERBOSE,\r
+        EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_VERBOSE,\r
         "%a: removing stale Boot#%04x %s: %r\n",\r
         __FUNCTION__,\r
         (UINT32)BootOptions[Index].OptionNumber,\r
index b953f2eb6c81c5309e6cfb839d0b86db924f62d2..457eba82fa6f6f72cf34ac6ea796bb9e05cbc611 100644 (file)
@@ -125,7 +125,7 @@ QemuFwCfgInitialize (
                          (CONST VOID **)&Reg, &AddressCells, &SizeCells,\r
                          &RegSize);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_WARN,\r
+    DEBUG ((DEBUG_WARN,\r
       "%a: No 'qemu,fw-cfg-mmio' compatible DT node found (Status == %r)\n",\r
       __FUNCTION__, Status));\r
     return EFI_SUCCESS;\r
@@ -156,7 +156,7 @@ QemuFwCfgInitialize (
   mFwCfgSelectorAddress = FwCfgSelectorAddress;\r
   mFwCfgDataAddress     = FwCfgDataAddress;\r
 \r
-  DEBUG ((EFI_D_INFO, "Found FwCfg @ 0x%Lx/0x%Lx\n", FwCfgSelectorAddress,\r
+  DEBUG ((DEBUG_INFO, "Found FwCfg @ 0x%Lx/0x%Lx\n", FwCfgSelectorAddress,\r
     FwCfgDataAddress));\r
 \r
   if (SwapBytes64 (Reg[1]) >= 0x18) {\r
@@ -168,7 +168,7 @@ QemuFwCfgInitialize (
     //\r
     ASSERT (FwCfgDmaAddress <= MAX_UINTN - FwCfgDmaSize + 1);\r
 \r
-    DEBUG ((EFI_D_INFO, "Found FwCfg DMA @ 0x%Lx\n", FwCfgDmaAddress));\r
+    DEBUG ((DEBUG_INFO, "Found FwCfg DMA @ 0x%Lx\n", FwCfgDmaAddress));\r
   } else {\r
     FwCfgDmaAddress = 0;\r
   }\r