]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Change use of EFI_D_* to DEBUG_*
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 17 Nov 2021 03:21:31 +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: Liming Gao <gaoliming@byosoft.com.cn>
MdePkg/Include/Library/DebugLib.h
MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
MdePkg/Library/BasePostCodeLibDebug/PostCode.c
MdePkg/Library/DxeHstiLib/HstiDxe.c
MdePkg/Library/SmmMemLib/SmmMemLib.c
MdePkg/Library/UefiLib/UefiNotTiano.c

index 7fb75f956c6e46c3920d023f371423c9bd8d0aa6..056ceb63adbbb9f81c46ede4417f31a94d10591a 100644 (file)
@@ -448,7 +448,7 @@ UnitTestDebugAssert (
     do {                                                                                 \\r
       if (DebugAssertEnabled ()) {                                                       \\r
         if (EFI_ERROR (StatusParameter)) {                                               \\r
-          DEBUG ((EFI_D_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", StatusParameter));  \\r
+          DEBUG ((DEBUG_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", StatusParameter));  \\r
           _ASSERT (!EFI_ERROR (StatusParameter));                                        \\r
         }                                                                                \\r
       }                                                                                  \\r
index 7e868db895fdae76d25ea2a62ace3d785fdd0111..a851a448d634f6f0330bcda7daae35dd7e7f2add 100644 (file)
@@ -235,10 +235,9 @@ PeHotRelocateImageEx (
     ASSERT (FALSE);\r
     // break omitted - ARM instruction encoding not implemented\r
   default:\r
-    DEBUG ((EFI_D_ERROR, "PeHotRelocateEx:unknown fixed type\n"));\r
+    DEBUG ((DEBUG_ERROR, "PeHotRelocateEx:unknown fixed type\n"));\r
     return RETURN_UNSUPPORTED;\r
   }\r
 \r
   return RETURN_SUCCESS;\r
 }\r
-\r
index b9254fa33250118a2fe2eb90de647df85e1f0f2e..1bb4ed5e93f86da30d4e5a180465208ee6a6088d 100644 (file)
@@ -36,7 +36,7 @@ PostCode (
   IN UINT32  Value\r
   )\r
 {\r
-  DEBUG((EFI_D_INFO, "POST %08x\n", Value));\r
+  DEBUG((DEBUG_INFO, "POST %08x\n", Value));\r
   return Value;\r
 }\r
 \r
@@ -72,7 +72,7 @@ PostCodeWithDescription (
   IN CONST CHAR8  *Description  OPTIONAL\r
   )\r
 {\r
-  DEBUG((EFI_D_INFO, "POST %08x - %s\n", Value, Description));\r
+  DEBUG((DEBUG_INFO, "POST %08x - %s\n", Value, Description));\r
   return Value;\r
 }\r
 \r
index 4e1c67616b0123a79dbc13058f2d47445b62c950..262413266c7cc561246b26f467d2eeecbed8a476 100644 (file)
@@ -161,15 +161,15 @@ InternalHstiIsValidTable (
   // basic check for header\r
   //\r
   if (HstiData == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "HstiData == NULL\n"));\r
+    DEBUG ((DEBUG_ERROR, "HstiData == NULL\n"));\r
     return FALSE;\r
   }\r
   if (HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) {\r
-    DEBUG ((EFI_D_ERROR, "HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)\n"));\r
+    DEBUG ((DEBUG_ERROR, "HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)\n"));\r
     return FALSE;\r
   }\r
   if (((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < Hsti->SecurityFeaturesSize) {\r
-    DEBUG ((EFI_D_ERROR, "((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < SecurityFeaturesSize\n"));\r
+    DEBUG ((DEBUG_ERROR, "((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < SecurityFeaturesSize\n"));\r
     return FALSE;\r
   }\r
 \r
@@ -177,7 +177,7 @@ InternalHstiIsValidTable (
   // Check Version\r
   //\r
   if (Hsti->Version != PLATFORM_SECURITY_VERSION_VNEXTCS) {\r
-    DEBUG ((EFI_D_ERROR, "Version != PLATFORM_SECURITY_VERSION_VNEXTCS\n"));\r
+    DEBUG ((DEBUG_ERROR, "Version != PLATFORM_SECURITY_VERSION_VNEXTCS\n"));\r
     return FALSE;\r
   }\r
 \r
@@ -186,8 +186,8 @@ InternalHstiIsValidTable (
   //\r
   if ((Hsti->Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE) ||\r
       (Hsti->Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM)) {\r
-    DEBUG ((EFI_D_ERROR, "Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE ||\n"));\r
-    DEBUG ((EFI_D_ERROR, "Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM\n"));\r
+    DEBUG ((DEBUG_ERROR, "Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE ||\n"));\r
+    DEBUG ((DEBUG_ERROR, "Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM\n"));\r
     return FALSE;\r
   }\r
 \r
@@ -200,7 +200,7 @@ InternalHstiIsValidTable (
     }\r
   }\r
   if (Index == sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0])) {\r
-    DEBUG ((EFI_D_ERROR, "ImplementationID has no NUL CHAR\n"));\r
+    DEBUG ((DEBUG_ERROR, "ImplementationID has no NUL CHAR\n"));\r
     return FALSE;\r
   }\r
 \r
@@ -211,11 +211,11 @@ InternalHstiIsValidTable (
   // basic check for ErrorString\r
   //\r
   if (ErrorStringSize == 0) {\r
-    DEBUG ((EFI_D_ERROR, "ErrorStringSize == 0\n"));\r
+    DEBUG ((DEBUG_ERROR, "ErrorStringSize == 0\n"));\r
     return FALSE;\r
   }\r
   if ((ErrorStringSize & BIT0) != 0) {\r
-    DEBUG ((EFI_D_ERROR, "(ErrorStringSize & BIT0) != 0\n"));\r
+    DEBUG ((DEBUG_ERROR, "(ErrorStringSize & BIT0) != 0\n"));\r
     return FALSE;\r
   }\r
 \r
@@ -232,11 +232,11 @@ InternalHstiIsValidTable (
   // check the length of ErrorString\r
   //\r
   if (ErrorChar != 0) {\r
-    DEBUG ((EFI_D_ERROR, "ErrorString has no NUL CHAR\n"));\r
+    DEBUG ((DEBUG_ERROR, "ErrorString has no NUL CHAR\n"));\r
     return FALSE;\r
   }\r
   if (ErrorStringLength == (ErrorStringSize/2)) {\r
-    DEBUG ((EFI_D_ERROR, "ErrorString Length incorrect\n"));\r
+    DEBUG ((DEBUG_ERROR, "ErrorString Length incorrect\n"));\r
     return FALSE;\r
   }\r
 \r
index 63a4ff7a97f128786941a26f3ac5ecdb8614e992..d1fc9e3e46f2925e9c7db04e61278a5e9c8458bf 100644 (file)
@@ -97,7 +97,7 @@ SmmMemLibInternalCalculateMaximumSupportAddress (
   // Save the maximum support address in one global variable\r
   //\r
   mSmmMemLibInternalMaximumSupportAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)(LShiftU64 (1, PhysicalAddressBits) - 1);\r
-  DEBUG ((EFI_D_INFO, "mSmmMemLibInternalMaximumSupportAddress = 0x%lx\n", mSmmMemLibInternalMaximumSupportAddress));\r
+  DEBUG ((DEBUG_INFO, "mSmmMemLibInternalMaximumSupportAddress = 0x%lx\n", mSmmMemLibInternalMaximumSupportAddress));\r
 }\r
 \r
 /**\r
@@ -129,7 +129,7 @@ SmmIsBufferOutsideSmmValid (
     // Overflow happen\r
     //\r
     DEBUG ((\r
-      EFI_D_ERROR,\r
+      DEBUG_ERROR,\r
       "SmmIsBufferOutsideSmmValid: Overflow: Buffer (0x%lx) - Length (0x%lx), MaximumSupportAddress (0x%lx)\n",\r
       Buffer,\r
       Length,\r
@@ -142,13 +142,13 @@ SmmIsBufferOutsideSmmValid (
     if (((Buffer >= mSmmMemLibInternalSmramRanges[Index].CpuStart) && (Buffer < mSmmMemLibInternalSmramRanges[Index].CpuStart + mSmmMemLibInternalSmramRanges[Index].PhysicalSize)) ||\r
         ((mSmmMemLibInternalSmramRanges[Index].CpuStart >= Buffer) && (mSmmMemLibInternalSmramRanges[Index].CpuStart < Buffer + Length))) {\r
       DEBUG ((\r
-        EFI_D_ERROR,\r
+        DEBUG_ERROR,\r
         "SmmIsBufferOutsideSmmValid: Overlap: Buffer (0x%lx) - Length (0x%lx), ",\r
         Buffer,\r
         Length\r
         ));\r
       DEBUG ((\r
-        EFI_D_ERROR,\r
+        DEBUG_ERROR,\r
         "CpuStart (0x%lx) - PhysicalSize (0x%lx)\n",\r
         mSmmMemLibInternalSmramRanges[Index].CpuStart,\r
         mSmmMemLibInternalSmramRanges[Index].PhysicalSize\r
@@ -176,7 +176,7 @@ SmmIsBufferOutsideSmmValid (
 \r
     if (!InValidCommunicationRegion) {\r
       DEBUG ((\r
-        EFI_D_ERROR,\r
+        DEBUG_ERROR,\r
         "SmmIsBufferOutsideSmmValid: Not in ValidCommunicationRegion: Buffer (0x%lx) - Length (0x%lx)\n",\r
         Buffer,\r
         Length\r
@@ -191,7 +191,7 @@ SmmIsBufferOutsideSmmValid (
       if (((Buffer >= mSmmMemLibGcdMemSpace[Index].BaseAddress) && (Buffer < mSmmMemLibGcdMemSpace[Index].BaseAddress + mSmmMemLibGcdMemSpace[Index].Length)) ||\r
           ((mSmmMemLibGcdMemSpace[Index].BaseAddress >= Buffer) && (mSmmMemLibGcdMemSpace[Index].BaseAddress < Buffer + Length))) {\r
         DEBUG ((\r
-          EFI_D_ERROR,\r
+          DEBUG_ERROR,\r
           "SmmIsBufferOutsideSmmValid: In Untested Memory Region: Buffer (0x%lx) - Length (0x%lx)\n",\r
           Buffer,\r
           Length\r
@@ -213,7 +213,7 @@ SmmIsBufferOutsideSmmValid (
             if (((Buffer >= Entry->PhysicalStart) && (Buffer < Entry->PhysicalStart + LShiftU64 (Entry->NumberOfPages, EFI_PAGE_SHIFT))) ||\r
                 ((Entry->PhysicalStart >= Buffer) && (Entry->PhysicalStart < Buffer + Length))) {\r
               DEBUG ((\r
-                EFI_D_ERROR,\r
+                DEBUG_ERROR,\r
                 "SmmIsBufferOutsideSmmValid: In RuntimeCode Region: Buffer (0x%lx) - Length (0x%lx)\n",\r
                 Buffer,\r
                 Length\r
@@ -255,7 +255,7 @@ SmmCopyMemToSmram (
   )\r
 {\r
   if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) {\r
-    DEBUG ((EFI_D_ERROR, "SmmCopyMemToSmram: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));\r
+    DEBUG ((DEBUG_ERROR, "SmmCopyMemToSmram: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
   CopyMem (DestinationBuffer, SourceBuffer, Length);\r
@@ -288,7 +288,7 @@ SmmCopyMemFromSmram (
   )\r
 {\r
   if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationBuffer, Length)) {\r
-    DEBUG ((EFI_D_ERROR, "SmmCopyMemFromSmram: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));\r
+    DEBUG ((DEBUG_ERROR, "SmmCopyMemFromSmram: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
   CopyMem (DestinationBuffer, SourceBuffer, Length);\r
@@ -322,11 +322,11 @@ SmmCopyMem (
   )\r
 {\r
   if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationBuffer, Length)) {\r
-    DEBUG ((EFI_D_ERROR, "SmmCopyMem: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));\r
+    DEBUG ((DEBUG_ERROR, "SmmCopyMem: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
   if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) {\r
-    DEBUG ((EFI_D_ERROR, "SmmCopyMem: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));\r
+    DEBUG ((DEBUG_ERROR, "SmmCopyMem: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
   CopyMem (DestinationBuffer, SourceBuffer, Length);\r
@@ -358,7 +358,7 @@ SmmSetMem (
   )\r
 {\r
   if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Length)) {\r
-    DEBUG ((EFI_D_ERROR, "SmmSetMem: Security Violation: Source (0x%x), Length (0x%x)\n", Buffer, Length));\r
+    DEBUG ((DEBUG_ERROR, "SmmSetMem: Security Violation: Source (0x%x), Length (0x%x)\n", Buffer, Length));\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
   SetMem (Buffer, Length, Value);\r
index 5e32f4abf4632ba3148349087197b80b538a7f76..c614b1ea1a858f2eed1e8e4a320fed8b01c9a37a 100644 (file)
@@ -80,7 +80,7 @@ EfiCreateEventLegacyBootEx (
   ASSERT (LegacyBootEvent != NULL);\r
 \r
   if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {\r
-    DEBUG ((EFI_D_ERROR, "EFI1.1 can't support LegacyBootEvent!"));\r
+    DEBUG ((DEBUG_ERROR, "EFI1.1 can't support LegacyBootEvent!"));\r
     ASSERT (FALSE);\r
 \r
     return EFI_UNSUPPORTED;\r
@@ -175,7 +175,7 @@ EfiCreateEventReadyToBootEx (
   ASSERT (ReadyToBootEvent != NULL);\r
 \r
   if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {\r
-    DEBUG ((EFI_D_ERROR, "EFI1.1 can't support ReadyToBootEvent!"));\r
+    DEBUG ((DEBUG_ERROR, "EFI1.1 can't support ReadyToBootEvent!"));\r
     ASSERT (FALSE);\r
 \r
     return EFI_UNSUPPORTED;\r
@@ -327,4 +327,3 @@ EfiInitializeFwVolDevicepathNode (
 \r
   CopyGuid (&FvDevicePathNode->FvFileName, NameGuid);\r
 }\r
-\r