]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SourceLevelDebugPkg: Change use of EFI_D_* to DEBUG_*
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 17 Nov 2021 03:21:40 +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: Hao A Wu <hao.a.wu@intel.com>
SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/SerialIo.c
SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c
SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c
SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.c
SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.c
SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c

index 8021437ca903a52ac25d1b85cc928381a56270d1..4a19f37e595a8a30a50351cf991a5cc7bdb2fc11 100644 (file)
@@ -283,8 +283,8 @@ VerifyMailboxChecksum (
   // and ToBeCheckSum field to validate the mail box.\r
   //\r
   if (CheckSum != Mailbox->CheckSum && CheckSum != Mailbox->ToBeCheckSum) {\r
-    DEBUG ((EFI_D_ERROR, "DebugAgent: Mailbox checksum error, stack or heap crashed!\n"));\r
-    DEBUG ((EFI_D_ERROR, "DebugAgent: CheckSum = %x, Mailbox->CheckSum = %x, Mailbox->ToBeCheckSum = %x\n", CheckSum, Mailbox->CheckSum, Mailbox->ToBeCheckSum));\r
+    DEBUG ((DEBUG_ERROR, "DebugAgent: Mailbox checksum error, stack or heap crashed!\n"));\r
+    DEBUG ((DEBUG_ERROR, "DebugAgent: CheckSum = %x, Mailbox->CheckSum = %x, Mailbox->ToBeCheckSum = %x\n", CheckSum, Mailbox->CheckSum, Mailbox->ToBeCheckSum));\r
     CpuDeadLoop ();\r
   }\r
 }\r
@@ -2637,4 +2637,3 @@ InterruptProcess (
 \r
   return;\r
 }\r
-\r
index b6ae21e091de8eaab8c0e2bc39e6842fa2d8f42d..eab8e153a16a2d2cdf46bde42b4a7ca0363a2e7f 100644 (file)
@@ -48,10 +48,10 @@ InitializeDebugTimer (
   DisableApicTimerInterrupt ();\r
 \r
   if (DumpFlag) {\r
-    DEBUG ((EFI_D_INFO, "Debug Timer: FSB Clock    = %d\n", PcdGet32(PcdFSBClock)));\r
-    DEBUG ((EFI_D_INFO, "Debug Timer: Divisor      = %d\n", ApicTimerDivisor));\r
-    DEBUG ((EFI_D_INFO, "Debug Timer: Frequency    = %d\n", ApicTimerFrequency));\r
-    DEBUG ((EFI_D_INFO, "Debug Timer: InitialCount = %d\n", InitialCount));\r
+    DEBUG ((DEBUG_INFO, "Debug Timer: FSB Clock    = %d\n", PcdGet32(PcdFSBClock)));\r
+    DEBUG ((DEBUG_INFO, "Debug Timer: Divisor      = %d\n", ApicTimerDivisor));\r
+    DEBUG ((DEBUG_INFO, "Debug Timer: Frequency    = %d\n", ApicTimerFrequency));\r
+    DEBUG ((DEBUG_INFO, "Debug Timer: InitialCount = %d\n", InitialCount));\r
   }\r
   if (TimerFrequency != NULL) {\r
     *TimerFrequency = ApicTimerFrequency;\r
@@ -140,4 +140,3 @@ IsDebugTimerTimeout (
 \r
   return (BOOLEAN) (Delta >= TimeoutTicker);\r
 }\r
-\r
index bb37aa99b4d4fc0e0aa62dcafc86fba9e70598f4..70564ffd53815a97e75d46fbf0981eddd103279c 100644 (file)
@@ -73,7 +73,7 @@ InternalConstructorWorker (
     //\r
     Status = gBS->InstallConfigurationTable (&gEfiVectorHandoffTableGuid, (VOID *) &mVectorHandoffInfoDebugAgent[0]);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Cannot install configuration table for persisted vector handoff info!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Cannot install configuration table for persisted vector handoff info!\n"));\r
       CpuDeadLoop ();\r
     }\r
   }\r
@@ -91,7 +91,7 @@ InternalConstructorWorker (
                   &Address\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "DebugAgent: Cannot install configuration table for mailbox!\n"));\r
+    DEBUG ((DEBUG_ERROR, "DebugAgent: Cannot install configuration table for mailbox!\n"));\r
     CpuDeadLoop ();\r
   }\r
 \r
@@ -115,7 +115,7 @@ InternalConstructorWorker (
 \r
   Status = gBS->InstallConfigurationTable (&gEfiDebugAgentGuid, (VOID *) mMailboxPointer);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to install configuration for mailbox!\n"));\r
+    DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to install configuration for mailbox!\n"));\r
     CpuDeadLoop ();\r
   }\r
 }\r
@@ -402,7 +402,7 @@ InitializeDebugAgent (
     // Check if Debug Agent has been initialized before\r
     //\r
     if (IsDebugAgentInitialzed ()) {\r
-      DEBUG ((EFI_D_INFO, "Debug Agent: The former agent will be overwritten by the new one!\n"));\r
+      DEBUG ((DEBUG_INFO, "Debug Agent: The former agent will be overwritten by the new one!\n"));\r
     }\r
 \r
     mMultiProcessorDebugSupport = TRUE;\r
@@ -537,7 +537,7 @@ InitializeDebugAgent (
     // Only DEBUG_AGENT_INIT_PREMEM_SEC and DEBUG_AGENT_INIT_POSTMEM_SEC are allowed for this\r
     // Debug Agent library instance.\r
     //\r
-    DEBUG ((EFI_D_ERROR, "Debug Agent: The InitFlag value is not allowed!\n"));\r
+    DEBUG ((DEBUG_ERROR, "Debug Agent: The InitFlag value is not allowed!\n"));\r
     CpuDeadLoop ();\r
     break;\r
   }\r
index 3e64852e9027ad66c288db9fb5d8c7cce4665f42..a2fbf115d57fbdcb3d93a9ba34f2e5270525ffc1 100644 (file)
@@ -368,7 +368,7 @@ InstallSerialIo (
                   NULL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "Debug Agent: Failed to install EFI Serial IO Protocol on Debug Port!\n"));\r
+    DEBUG ((DEBUG_ERROR, "Debug Agent: Failed to install EFI Serial IO Protocol on Debug Port!\n"));\r
   }\r
 }\r
 \r
index 51e07f70e7bb7ed92da0a36f42f4fcdd2aa825e3..0f639ecbcd9534f9c86e82037ad8f34c095f3dd5 100644 (file)
@@ -411,7 +411,7 @@ InitializeDebugAgent (
     //\r
     // If reaches here, it means Debug Port initialization failed.\r
     //\r
-    DEBUG ((EFI_D_ERROR, "Debug Agent: Debug port initialization failed.\n"));\r
+    DEBUG ((DEBUG_ERROR, "Debug Agent: Debug port initialization failed.\n"));\r
 \r
     break;\r
 \r
@@ -432,7 +432,7 @@ InitializeDebugAgent (
     //\r
     Status = PeiServicesInstallPpi (&mVectorHandoffInfoPpiList[0]);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to install Vector Handoff Info PPI!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to install Vector Handoff Info PPI!\n"));\r
       CpuDeadLoop ();\r
     }\r
     //\r
@@ -464,7 +464,7 @@ InitializeDebugAgent (
                  &Address\r
                  );\r
       if (EFI_ERROR (Status)) {\r
-        DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to allocate pages!\n"));\r
+        DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to allocate pages!\n"));\r
         CpuDeadLoop ();\r
       }\r
       NewMailbox = (DEBUG_AGENT_MAILBOX *) (UINTN) Address;\r
@@ -494,14 +494,14 @@ InitializeDebugAgent (
 \r
   case DEBUG_AGENT_INIT_PEI:\r
     if (Context == NULL) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n"));\r
       CpuDeadLoop ();\r
     }\r
     //\r
     // Check if Debug Agent has initialized before\r
     //\r
     if (IsDebugAgentInitialzed()) {\r
-      DEBUG ((EFI_D_WARN, "Debug Agent: It has already initialized in SEC Core!\n"));\r
+      DEBUG ((DEBUG_WARN, "Debug Agent: It has already initialized in SEC Core!\n"));\r
       break;\r
     }\r
     //\r
@@ -509,7 +509,7 @@ InitializeDebugAgent (
     //\r
     Status = PeiServicesInstallPpi (&mVectorHandoffInfoPpiList[0]);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to install Vector Handoff Info PPI!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to install Vector Handoff Info PPI!\n"));\r
       CpuDeadLoop ();\r
     }\r
     //\r
@@ -521,7 +521,7 @@ InitializeDebugAgent (
     //\r
     Mailbox = AllocateZeroPool (sizeof (DEBUG_AGENT_MAILBOX));\r
     if (Mailbox == NULL) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to allocate memory!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to allocate memory!\n"));\r
       CpuDeadLoop ();\r
     } else {\r
       MailboxLocation = (UINT64)(UINTN)Mailbox;\r
@@ -550,7 +550,7 @@ InitializeDebugAgent (
     //\r
     Status = PeiServicesNotifyPpi (&mDebugAgentMemoryDiscoveredNotifyList[0]);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to register memory discovered callback function!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to register memory discovered callback function!\n"));\r
       CpuDeadLoop ();\r
     }\r
     //\r
@@ -571,7 +571,7 @@ InitializeDebugAgent (
 \r
   case DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64:\r
     if (Context == NULL) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n"));\r
       CpuDeadLoop ();\r
     } else {\r
       Ia32Idtr =  (IA32_DESCRIPTOR *) Context;\r
@@ -604,7 +604,7 @@ InitializeDebugAgent (
     // Only DEBUG_AGENT_INIT_PREMEM_SEC and DEBUG_AGENT_INIT_POSTMEM_SEC are allowed for this\r
     // Debug Agent library instance.\r
     //\r
-    DEBUG ((EFI_D_ERROR, "Debug Agent: The InitFlag value is not allowed!\n"));\r
+    DEBUG ((DEBUG_ERROR, "Debug Agent: The InitFlag value is not allowed!\n"));\r
     CpuDeadLoop ();\r
     break;\r
   }\r
index 37b0e8f397593f820dc88592d7711fc432489f17..3bdfaa9370de825170bc934dc478eda15164057e 100644 (file)
@@ -203,7 +203,7 @@ InitializeDebugAgent (
                       sizeof (EFI_VECTOR_HANDOFF_INFO) * mVectorHandoffInfoCount\r
                       );\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Cannot install configuration table for persisted vector handoff info!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Cannot install configuration table for persisted vector handoff info!\n"));\r
       CpuDeadLoop ();\r
     }\r
     //\r
@@ -336,7 +336,7 @@ InitializeDebugAgent (
 \r
   case DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64:\r
     if (Context == NULL) {\r
-      DEBUG ((EFI_D_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n"));\r
+      DEBUG ((DEBUG_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n"));\r
       CpuDeadLoop ();\r
     } else {\r
       Ia32Idtr =  (IA32_DESCRIPTOR *) Context;\r
@@ -378,9 +378,8 @@ InitializeDebugAgent (
     // Only DEBUG_AGENT_INIT_PREMEM_SEC and DEBUG_AGENT_INIT_POSTMEM_SEC are allowed for this\r
     // Debug Agent library instance.\r
     //\r
-    DEBUG ((EFI_D_ERROR, "Debug Agent: The InitFlag value is not allowed!\n"));\r
+    DEBUG ((DEBUG_ERROR, "Debug Agent: The InitFlag value is not allowed!\n"));\r
     CpuDeadLoop ();\r
     break;\r
   }\r
 }\r
-\r
index 045026508e80d5fc20c87be8b29214b65de26845..2b85559aef6f2f387b15e3f4af278a66fe9cc6cb 100644 (file)
@@ -59,7 +59,7 @@ DebugPortInitialize (
 \r
   Status = SerialPortInitialize ();\r
   if (RETURN_ERROR(Status)) {\r
-    DEBUG ((EFI_D_ERROR, "Debug Serial Port: Initialization failed!\n"));\r
+    DEBUG ((DEBUG_ERROR, "Debug Serial Port: Initialization failed!\n"));\r
   }\r
 \r
   if (Function != NULL) {\r
@@ -151,4 +151,3 @@ DebugPortPollBuffer (
 {\r
   return SerialPortPoll ();\r
 }\r
-\r
index 9fcc1ddd48fdec60da5bd6a13379739b33eb68be..cc156baaa02017d2345b01861c877ccb0005daa0 100644 (file)
@@ -617,7 +617,7 @@ InitializeUsbDebugHardware (
   if (((MmioRead32((UINTN)&UsbDebugPortRegister->ControlStatus) & (USB_DEBUG_PORT_OWNER | USB_DEBUG_PORT_IN_USE))\r
        != (USB_DEBUG_PORT_OWNER | USB_DEBUG_PORT_IN_USE)) || (Handle->Initialized == USBDBG_RESET)) {\r
     DEBUG ((\r
-      EFI_D_INFO,\r
+      DEBUG_INFO,\r
       "UsbDbg: Need to reset the host controller. ControlStatus = %08x\n",\r
       MmioRead32((UINTN)&UsbDebugPortRegister->ControlStatus)\r
       ));\r
@@ -625,7 +625,7 @@ InitializeUsbDebugHardware (
     // If the host controller is halted, then reset and restart it.\r
     //\r
     if ((MmioRead32((UINTN)UsbStatus) & BIT12) != 0) {\r
-      DEBUG ((EFI_D_INFO, "UsbDbg: Reset the host controller.\n"));\r
+      DEBUG ((DEBUG_INFO, "UsbDbg: Reset the host controller.\n"));\r
       //\r
       // reset the host controller.\r
       //\r
@@ -662,7 +662,7 @@ InitializeUsbDebugHardware (
 \r
   if (Handle->Initialized != USBDBG_INIT_DONE ||\r
       (MmioRead32 ((UINTN) &UsbDebugPortRegister->ControlStatus) & USB_DEBUG_PORT_ENABLE) == 0) {\r
-    DEBUG ((EFI_D_INFO, "UsbDbg: Reset the debug port.\n"));\r
+    DEBUG ((DEBUG_INFO, "UsbDbg: Reset the debug port.\n"));\r
     //\r
     // Reset the debug port\r
     //\r
@@ -1058,7 +1058,7 @@ DebugPortInitialize (
 \r
   Status = CalculateUsbDebugPortBar(&Handle.DebugPortOffset, &Handle.DebugPortBarNumber);\r
   if (RETURN_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "UsbDbg: the pci device pointed by PcdUsbEhciPciAddress is not EHCI host controller or does not support debug port capability!\n"));\r
+    DEBUG ((DEBUG_ERROR, "UsbDbg: the pci device pointed by PcdUsbEhciPciAddress is not EHCI host controller or does not support debug port capability!\n"));\r
     goto Exit;\r
   }\r
 \r
@@ -1085,10 +1085,10 @@ DebugPortInitialize (
   Handle.Initialized = USBDBG_RESET;\r
 \r
   if (NeedReinitializeHardware(&Handle)) {\r
-    DEBUG ((EFI_D_ERROR, "UsbDbg: Start EHCI debug port initialization!\n"));\r
+    DEBUG ((DEBUG_ERROR, "UsbDbg: Start EHCI debug port initialization!\n"));\r
     Status = InitializeUsbDebugHardware (&Handle);\r
     if (RETURN_ERROR(Status)) {\r
-      DEBUG ((EFI_D_ERROR, "UsbDbg: Failed, please check if USB debug cable is plugged into EHCI debug port correctly!\n"));\r
+      DEBUG ((DEBUG_ERROR, "UsbDbg: Failed, please check if USB debug cable is plugged into EHCI debug port correctly!\n"));\r
       goto Exit;\r
     }\r
   }\r
@@ -1103,4 +1103,3 @@ Exit:
 \r
   return (DEBUG_PORT_HANDLE)(UINTN)&mDebugCommunicationLibUsbDebugPortHandle;\r
 }\r
-\r
index 31e875251c0a8f1604d99183b12ef3b4d55e5673..766f6d75f7a29c1327c2c523604606b6b2f5bc74 100644 (file)
@@ -64,7 +64,7 @@ PeCoffLoaderExtraActionCommon (
   ASSERT (ImageContext != NULL);\r
 \r
   if (ImageContext->PdbPointer != NULL) {\r
-    DEBUG((EFI_D_ERROR, "    PDB = %a\n", ImageContext->PdbPointer));\r
+    DEBUG((DEBUG_ERROR, "    PDB = %a\n", ImageContext->PdbPointer));\r
   }\r
 \r
   //\r