]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
OvmfPkg: replace old EFI_D_ debug levels with new DEBUG_ ones
[mirror_edk2.git] / OvmfPkg / AcpiPlatformDxe / QemuFwCfgAcpi.c
index 75a3a88a36129ca6d5f1dbf31bede1d737e1e1d4..b62027db6e6692ee2f5415267f5e2226b8449f30 100644 (file)
@@ -329,19 +329,19 @@ ProcessCmdAllocate (
   BLOB                 *Blob;\r
 \r
   if (Allocate->File[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {\r
-    DEBUG ((EFI_D_ERROR, "%a: malformed file name\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
 \r
   if (Allocate->Alignment > EFI_PAGE_SIZE) {\r
-    DEBUG ((EFI_D_ERROR, "%a: unsupported alignment 0x%x\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: unsupported alignment 0x%x\n", __FUNCTION__,\r
       Allocate->Alignment));\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
   Status = QemuFwCfgFindFile ((CHAR8 *)Allocate->File, &FwCfgItem, &FwCfgSize);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "%a: QemuFwCfgFindFile(\"%a\"): %r\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: QemuFwCfgFindFile(\"%a\"): %r\n", __FUNCTION__,\r
       Allocate->File, Status));\r
     return Status;\r
   }\r
@@ -372,7 +372,7 @@ ProcessCmdAllocate (
 \r
   Status = OrderedCollectionInsert (Tracker, NULL, Blob);\r
   if (Status == RETURN_ALREADY_STARTED) {\r
-    DEBUG ((EFI_D_ERROR, "%a: duplicated file \"%a\"\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: duplicated file \"%a\"\n", __FUNCTION__,\r
       Allocate->File));\r
     Status = EFI_PROTOCOL_ERROR;\r
   }\r
@@ -384,7 +384,7 @@ ProcessCmdAllocate (
   QemuFwCfgReadBytes (FwCfgSize, Blob->Base);\r
   ZeroMem (Blob->Base + Blob->Size, EFI_PAGES_TO_SIZE (NumPages) - Blob->Size);\r
 \r
-  DEBUG ((EFI_D_VERBOSE, "%a: File=\"%a\" Alignment=0x%x Zone=%d Size=0x%Lx "\r
+  DEBUG ((DEBUG_VERBOSE, "%a: File=\"%a\" Alignment=0x%x Zone=%d Size=0x%Lx "\r
     "Address=0x%Lx\n", __FUNCTION__, Allocate->File, Allocate->Alignment,\r
     Allocate->Zone, (UINT64)Blob->Size, (UINT64)(UINTN)Blob->Base));\r
   return EFI_SUCCESS;\r
@@ -432,14 +432,14 @@ ProcessCmdAddPointer (
 \r
   if (AddPointer->PointerFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0' ||\r
       AddPointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {\r
-    DEBUG ((EFI_D_ERROR, "%a: malformed file name\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
 \r
   TrackerEntry = OrderedCollectionFind (Tracker, AddPointer->PointerFile);\r
   TrackerEntry2 = OrderedCollectionFind (Tracker, AddPointer->PointeeFile);\r
   if (TrackerEntry == NULL || TrackerEntry2 == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "%a: invalid blob reference(s) \"%a\" / \"%a\"\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: invalid blob reference(s) \"%a\" / \"%a\"\n",\r
       __FUNCTION__, AddPointer->PointerFile, AddPointer->PointeeFile));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -450,7 +450,7 @@ ProcessCmdAddPointer (
        AddPointer->PointerSize != 4 && AddPointer->PointerSize != 8) ||\r
       Blob->Size < AddPointer->PointerSize ||\r
       Blob->Size - AddPointer->PointerSize < AddPointer->PointerOffset) {\r
-    DEBUG ((EFI_D_ERROR, "%a: invalid pointer location or size in \"%a\"\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: invalid pointer location or size in \"%a\"\n",\r
       __FUNCTION__, AddPointer->PointerFile));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -459,7 +459,7 @@ ProcessCmdAddPointer (
   PointerValue = 0;\r
   CopyMem (&PointerValue, PointerField, AddPointer->PointerSize);\r
   if (PointerValue >= Blob2->Size) {\r
-    DEBUG ((EFI_D_ERROR, "%a: invalid pointer value in \"%a\"\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: invalid pointer value in \"%a\"\n", __FUNCTION__,\r
       AddPointer->PointerFile));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -473,14 +473,14 @@ ProcessCmdAddPointer (
   PointerValue += (UINT64)(UINTN)Blob2->Base;\r
   if (AddPointer->PointerSize < 8 &&\r
       RShiftU64 (PointerValue, AddPointer->PointerSize * 8) != 0) {\r
-    DEBUG ((EFI_D_ERROR, "%a: relocated pointer value unrepresentable in "\r
+    DEBUG ((DEBUG_ERROR, "%a: relocated pointer value unrepresentable in "\r
       "\"%a\"\n", __FUNCTION__, AddPointer->PointerFile));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
 \r
   CopyMem (PointerField, &PointerValue, AddPointer->PointerSize);\r
 \r
-  DEBUG ((EFI_D_VERBOSE, "%a: PointerFile=\"%a\" PointeeFile=\"%a\" "\r
+  DEBUG ((DEBUG_VERBOSE, "%a: PointerFile=\"%a\" PointeeFile=\"%a\" "\r
     "PointerOffset=0x%x PointerSize=%d\n", __FUNCTION__,\r
     AddPointer->PointerFile, AddPointer->PointeeFile,\r
     AddPointer->PointerOffset, AddPointer->PointerSize));\r
@@ -515,13 +515,13 @@ ProcessCmdAddChecksum (
   BLOB                     *Blob;\r
 \r
   if (AddChecksum->File[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {\r
-    DEBUG ((EFI_D_ERROR, "%a: malformed file name\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
 \r
   TrackerEntry = OrderedCollectionFind (Tracker, AddChecksum->File);\r
   if (TrackerEntry == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "%a: invalid blob reference \"%a\"\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: invalid blob reference \"%a\"\n", __FUNCTION__,\r
       AddChecksum->File));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -530,7 +530,7 @@ ProcessCmdAddChecksum (
   if (Blob->Size <= AddChecksum->ResultOffset ||\r
       Blob->Size < AddChecksum->Length ||\r
       Blob->Size - AddChecksum->Length < AddChecksum->Start) {\r
-    DEBUG ((EFI_D_ERROR, "%a: invalid checksum range in \"%a\"\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: invalid checksum range in \"%a\"\n",\r
       __FUNCTION__, AddChecksum->File));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -539,7 +539,7 @@ ProcessCmdAddChecksum (
                                            Blob->Base + AddChecksum->Start,\r
                                            AddChecksum->Length\r
                                            );\r
-  DEBUG ((EFI_D_VERBOSE, "%a: File=\"%a\" ResultOffset=0x%x Start=0x%x "\r
+  DEBUG ((DEBUG_VERBOSE, "%a: File=\"%a\" ResultOffset=0x%x Start=0x%x "\r
     "Length=0x%x\n", __FUNCTION__, AddChecksum->File,\r
     AddChecksum->ResultOffset, AddChecksum->Start, AddChecksum->Length));\r
   return EFI_SUCCESS;\r
@@ -848,7 +848,7 @@ Process2ndPassCmdAddPointer (
   }\r
 \r
   Blob2Remaining -= (UINTN) PointerValue;\r
-  DEBUG ((EFI_D_VERBOSE, "%a: checking for ACPI header in \"%a\" at 0x%Lx "\r
+  DEBUG ((DEBUG_VERBOSE, "%a: checking for ACPI header in \"%a\" at 0x%Lx "\r
     "(remaining: 0x%Lx): ", __FUNCTION__, AddPointer->PointeeFile,\r
     PointerValue, (UINT64)Blob2Remaining));\r
 \r
@@ -864,7 +864,7 @@ Process2ndPassCmdAddPointer (
         Facs->Length <= Blob2Remaining &&\r
         Facs->Signature ==\r
                 EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) {\r
-      DEBUG ((EFI_D_VERBOSE, "found \"%-4.4a\" size 0x%x\n",\r
+      DEBUG ((DEBUG_VERBOSE, "found \"%-4.4a\" size 0x%x\n",\r
         (CONST CHAR8 *)&Facs->Signature, Facs->Length));\r
       TableSize = Facs->Length;\r
     }\r
@@ -884,7 +884,7 @@ Process2ndPassCmdAddPointer (
       // - Length field consistent with both ACPI and containing blob size\r
       // - checksum is correct\r
       //\r
-      DEBUG ((EFI_D_VERBOSE, "found \"%-4.4a\" size 0x%x\n",\r
+      DEBUG ((DEBUG_VERBOSE, "found \"%-4.4a\" size 0x%x\n",\r
         (CONST CHAR8 *)&Header->Signature, Header->Length));\r
       TableSize = Header->Length;\r
 \r
@@ -901,13 +901,13 @@ Process2ndPassCmdAddPointer (
   }\r
 \r
   if (TableSize == 0) {\r
-    DEBUG ((EFI_D_VERBOSE, "not found; marking fw_cfg blob as opaque\n"));\r
+    DEBUG ((DEBUG_VERBOSE, "not found; marking fw_cfg blob as opaque\n"));\r
     Blob2->HostsOnlyTableData = FALSE;\r
     return EFI_SUCCESS;\r
   }\r
 \r
   if (*NumInstalled == INSTALLED_TABLES_MAX) {\r
-    DEBUG ((EFI_D_ERROR, "%a: can't install more than %d tables\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: can't install more than %d tables\n",\r
       __FUNCTION__, INSTALLED_TABLES_MAX));\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto RollbackSeenPointer;\r
@@ -917,7 +917,7 @@ Process2ndPassCmdAddPointer (
                            (VOID *)(UINTN)PointerValue, TableSize,\r
                            &InstalledKey[*NumInstalled]);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "%a: InstallAcpiTable(): %r\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTable(): %r\n", __FUNCTION__,\r
       Status));\r
     goto RollbackSeenPointer;\r
   }\r
@@ -980,7 +980,7 @@ InstallQemuFwCfgTables (
     return Status;\r
   }\r
   if (FwCfgSize % sizeof *LoaderEntry != 0) {\r
-    DEBUG ((EFI_D_ERROR, "%a: \"etc/table-loader\" has invalid size 0x%Lx\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: \"etc/table-loader\" has invalid size 0x%Lx\n",\r
       __FUNCTION__, (UINT64)FwCfgSize));\r
     return EFI_PROTOCOL_ERROR;\r
   }\r
@@ -1060,7 +1060,7 @@ InstallQemuFwCfgTables (
         break;\r
 \r
     default:\r
-      DEBUG ((EFI_D_VERBOSE, "%a: unknown loader command: 0x%x\n",\r
+      DEBUG ((DEBUG_VERBOSE, "%a: unknown loader command: 0x%x\n",\r
         __FUNCTION__, LoaderEntry->Type));\r
       break;\r
     }\r
@@ -1128,7 +1128,7 @@ UninstallAcpiTables:
       AcpiProtocol->UninstallAcpiTable (AcpiProtocol, InstalledKey[Installed]);\r
     }\r
   } else {\r
-    DEBUG ((EFI_D_INFO, "%a: installed %d tables\n", __FUNCTION__, Installed));\r
+    DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __FUNCTION__, Installed));\r
   }\r
 \r
   for (SeenPointerEntry = OrderedCollectionMin (SeenPointers);\r
@@ -1172,7 +1172,7 @@ RollbackWritePointersAndFreeTracker:
     Blob = UserStruct;\r
 \r
     if (EFI_ERROR (Status) || Blob->HostsOnlyTableData) {\r
-      DEBUG ((EFI_D_VERBOSE, "%a: freeing \"%a\"\n", __FUNCTION__,\r
+      DEBUG ((DEBUG_VERBOSE, "%a: freeing \"%a\"\n", __FUNCTION__,\r
         Blob->File));\r
       gBS->FreePages ((UINTN)Blob->Base, EFI_SIZE_TO_PAGES (Blob->Size));\r
     }\r