]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: Change use of EFI_D_* to DEBUG_*
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 17 Nov 2021 03:21:14 +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: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvb.c
ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c
ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
ArmPlatformPkg/PlatformPei/PlatformPeim.c

index f412731200cf451a48a549cd50124e16cb9441b8..baa3c8125b454d873550090ac89537156882e16c 100644 (file)
@@ -201,7 +201,7 @@ NorFlashUnlockAndEraseSingleBlock (
   } while ((Index < NOR_FLASH_ERASE_RETRY) && (Status == EFI_WRITE_PROTECTED));\r
 \r
   if (Index == NOR_FLASH_ERASE_RETRY) {\r
-    DEBUG((EFI_D_ERROR,"EraseSingleBlock(BlockAddress=0x%08x: Block Locked Error (try to erase %d times)\n", BlockAddress,Index));\r
+    DEBUG((DEBUG_ERROR,"EraseSingleBlock(BlockAddress=0x%08x: Block Locked Error (try to erase %d times)\n", BlockAddress,Index));\r
   }\r
 \r
   if (!EfiAtRuntime ()) {\r
@@ -249,7 +249,7 @@ NorFlashWriteFullBlock (
 \r
   Status = NorFlashUnlockAndEraseSingleBlock (Instance, BlockAddress);\r
   if (EFI_ERROR(Status)) {\r
-    DEBUG((EFI_D_ERROR, "WriteSingleBlock: ERROR - Failed to Unlock and Erase the single block at 0x%X\n", BlockAddress));\r
+    DEBUG((DEBUG_ERROR, "WriteSingleBlock: ERROR - Failed to Unlock and Erase the single block at 0x%X\n", BlockAddress));\r
     goto EXIT;\r
   }\r
 \r
@@ -310,7 +310,7 @@ EXIT:
   }\r
 \r
   if (EFI_ERROR(Status)) {\r
-    DEBUG((EFI_D_ERROR, "NOR FLASH Programming [WriteSingleBlock] failed at address 0x%08x. Exit Status = \"%r\".\n", WordAddress, Status));\r
+    DEBUG((DEBUG_ERROR, "NOR FLASH Programming [WriteSingleBlock] failed at address 0x%08x. Exit Status = \"%r\".\n", WordAddress, Status));\r
   }\r
   return Status;\r
 }\r
@@ -329,13 +329,13 @@ NorFlashInitialise (
 \r
   Status = NorFlashPlatformInitialization ();\r
   if (EFI_ERROR(Status)) {\r
-    DEBUG((EFI_D_ERROR,"NorFlashInitialise: Fail to initialize Nor Flash devices\n"));\r
+    DEBUG((DEBUG_ERROR,"NorFlashInitialise: Fail to initialize Nor Flash devices\n"));\r
     return Status;\r
   }\r
 \r
   Status = NorFlashPlatformGetDevices (&NorFlashDevices, &mNorFlashDeviceCount);\r
   if (EFI_ERROR(Status)) {\r
-    DEBUG((EFI_D_ERROR,"NorFlashInitialise: Fail to get Nor Flash devices\n"));\r
+    DEBUG((DEBUG_ERROR,"NorFlashInitialise: Fail to get Nor Flash devices\n"));\r
     return Status;\r
   }\r
 \r
@@ -366,7 +366,7 @@ NorFlashInitialise (
       &mNorFlashInstances[Index]\r
     );\r
     if (EFI_ERROR(Status)) {\r
-      DEBUG((EFI_D_ERROR,"NorFlashInitialise: Fail to create instance for NorFlash[%d]\n",Index));\r
+      DEBUG((DEBUG_ERROR,"NorFlashInitialise: Fail to create instance for NorFlash[%d]\n",Index));\r
     }\r
   }\r
 \r
index db8eb595f4b8e32c6dbf8696b4f18faf82ca5916..c2effb7101b7b47b8a778e6296417d13cef20ca8 100644 (file)
@@ -187,14 +187,14 @@ ValidateFvHeader (
       || (FwVolHeader->FvLength  != FvLength)\r
       )\r
   {\r
-    DEBUG ((EFI_D_INFO, "%a: No Firmware Volume header present\n",\r
+    DEBUG ((DEBUG_INFO, "%a: No Firmware Volume header present\n",\r
       __FUNCTION__));\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
   // Check the Firmware Volume Guid\r
   if( CompareGuid (&FwVolHeader->FileSystemGuid, &gEfiSystemNvDataFvGuid) == FALSE ) {\r
-    DEBUG ((EFI_D_INFO, "%a: Firmware Volume Guid non-compatible\n",\r
+    DEBUG ((DEBUG_INFO, "%a: Firmware Volume Guid non-compatible\n",\r
       __FUNCTION__));\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -202,7 +202,7 @@ ValidateFvHeader (
   // Verify the header checksum\r
   Checksum = CalculateSum16((UINT16*)FwVolHeader, FwVolHeader->HeaderLength);\r
   if (Checksum != 0) {\r
-    DEBUG ((EFI_D_INFO, "%a: FV checksum is invalid (Checksum:0x%X)\n",\r
+    DEBUG ((DEBUG_INFO, "%a: FV checksum is invalid (Checksum:0x%X)\n",\r
       __FUNCTION__, Checksum));\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -212,14 +212,14 @@ ValidateFvHeader (
   // Check the Variable Store Guid\r
   if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) &&\r
       !CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid)) {\r
-    DEBUG ((EFI_D_INFO, "%a: Variable Store Guid non-compatible\n",\r
+    DEBUG ((DEBUG_INFO, "%a: Variable Store Guid non-compatible\n",\r
       __FUNCTION__));\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
   VariableStoreLength = PcdGet32 (PcdFlashNvStorageVariableSize) - FwVolHeader->HeaderLength;\r
   if (VariableStoreHeader->Size != VariableStoreLength) {\r
-    DEBUG ((EFI_D_INFO, "%a: Variable Store Length does not match\n",\r
+    DEBUG ((DEBUG_INFO, "%a: Variable Store Length does not match\n",\r
       __FUNCTION__));\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -386,7 +386,7 @@ FvbGetBlockSize (
   DEBUG ((DEBUG_BLKIO, "FvbGetBlockSize(Lba=%ld, BlockSize=0x%x, LastBlock=%ld)\n", Lba, Instance->Media.BlockSize, Instance->Media.LastBlock));\r
 \r
   if (Lba > Instance->Media.LastBlock) {\r
-    DEBUG ((EFI_D_ERROR, "FvbGetBlockSize: ERROR - Parameter LBA %ld is beyond the last Lba (%ld).\n", Lba, Instance->Media.LastBlock));\r
+    DEBUG ((DEBUG_ERROR, "FvbGetBlockSize: ERROR - Parameter LBA %ld is beyond the last Lba (%ld).\n", Lba, Instance->Media.LastBlock));\r
     Status = EFI_INVALID_PARAMETER;\r
   } else {\r
     // This is easy because in this platform each NorFlash device has equal sized blocks.\r
@@ -472,7 +472,7 @@ FvbRead (
   if ((Offset               >= BlockSize) ||\r
       (*NumBytes            >  BlockSize) ||\r
       ((Offset + *NumBytes) >  BlockSize)) {\r
-    DEBUG ((EFI_D_ERROR, "FvbRead: ERROR - EFI_BAD_BUFFER_SIZE: (Offset=0x%x + NumBytes=0x%x) > BlockSize=0x%x\n", Offset, *NumBytes, BlockSize ));\r
+    DEBUG ((DEBUG_ERROR, "FvbRead: ERROR - EFI_BAD_BUFFER_SIZE: (Offset=0x%x + NumBytes=0x%x) > BlockSize=0x%x\n", Offset, *NumBytes, BlockSize ));\r
     return EFI_BAD_BUFFER_SIZE;\r
   }\r
 \r
@@ -635,7 +635,7 @@ FvbEraseBlocks (
   // Detect WriteDisabled state\r
   if (Instance->Media.ReadOnly == TRUE) {\r
     // Firmware volume is in WriteDisabled state\r
-    DEBUG ((EFI_D_ERROR, "FvbEraseBlocks: ERROR - Device is in WriteDisabled state.\n"));\r
+    DEBUG ((DEBUG_ERROR, "FvbEraseBlocks: ERROR - Device is in WriteDisabled state.\n"));\r
     return EFI_ACCESS_DENIED;\r
   }\r
 \r
@@ -665,7 +665,7 @@ FvbEraseBlocks (
       ));\r
     if ((NumOfLba == 0) || ((Instance->StartLba + StartingLba + NumOfLba - 1) > Instance->Media.LastBlock)) {\r
       VA_END (Args);\r
-      DEBUG ((EFI_D_ERROR, "FvbEraseBlocks: ERROR - Lba range goes past the last Lba.\n"));\r
+      DEBUG ((DEBUG_ERROR, "FvbEraseBlocks: ERROR - Lba range goes past the last Lba.\n"));\r
       Status = EFI_INVALID_PARAMETER;\r
       goto EXIT;\r
     }\r
@@ -737,4 +737,3 @@ FvbVirtualNotifyEvent (
   EfiConvertPointer (0x0, (VOID**)&mFlashNvStorageVariableBase);\r
   return;\r
 }\r
-\r
index 3ecce233440dbe7ebe20d0d99f4d499399597164..8057cbb5518c80687567e0a1e4720b49e93de8c6 100644 (file)
@@ -47,7 +47,7 @@ PL061Locate (
       return EFI_SUCCESS;\r
     }\r
   }\r
-  DEBUG ((EFI_D_ERROR, "%a, failed to locate gpio %d\n", __func__, Gpio));\r
+  DEBUG ((DEBUG_ERROR, "%a, failed to locate gpio %d\n", __func__, Gpio));\r
   return EFI_INVALID_PARAMETER;\r
 }\r
 \r
@@ -375,7 +375,7 @@ PL061InstallProtocol (
     // Create the mPL061PlatformGpio\r
     mPL061PlatformGpio = (PLATFORM_GPIO_CONTROLLER *)AllocateZeroPool (sizeof (PLATFORM_GPIO_CONTROLLER) + sizeof (GPIO_CONTROLLER));\r
     if (mPL061PlatformGpio == NULL) {\r
-      DEBUG ((EFI_D_ERROR, "%a: failed to allocate PLATFORM_GPIO_CONTROLLER\n", __func__));\r
+      DEBUG ((DEBUG_ERROR, "%a: failed to allocate PLATFORM_GPIO_CONTROLLER\n", __func__));\r
       return EFI_BAD_BUFFER_SIZE;\r
     }\r
 \r
index 05b6f8974f12fafd53cdff2314d33f9c93d79670..b5192025733986b39e7667ec81ceb5dfb922b12a 100644 (file)
@@ -26,7 +26,7 @@ LcdIdentify (
   VOID\r
   )\r
 {\r
-  DEBUG ((EFI_D_WARN, "Probing ID registers at 0x%lx for a PL111\n",\r
+  DEBUG ((DEBUG_WARN, "Probing ID registers at 0x%lx for a PL111\n",\r
     PL111_REG_CLCD_PERIPH_ID_0));\r
 \r
   // Check if this is a PL111\r
index e58b4bed1c50f2a8a1b9830966955852c911b589..1163e86381dbff93db002af0a8ada9ed516be9c6 100644 (file)
@@ -35,7 +35,7 @@ InitMmu (
   //      DRAM (even at the top of DRAM as it is the first permanent memory allocation)\r
   Status = ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "Error: Failed to enable MMU\n"));\r
+    DEBUG ((DEBUG_ERROR, "Error: Failed to enable MMU\n"));\r
   }\r
 }\r
 \r
index 45bdf94970dae96757e6667f286bbea75400a564..ca0301ca74a7cb341d6c8118dbcc37d09834ac32 100644 (file)
@@ -95,7 +95,7 @@ InitializeMemory (
   UINTN                                 FdTop;\r
   UINTN                                 UefiMemoryBase;\r
 \r
-  DEBUG ((EFI_D_LOAD | EFI_D_INFO, "Memory Init PEIM Loaded\n"));\r
+  DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Memory Init PEIM Loaded\n"));\r
 \r
   // Ensure PcdSystemMemorySize has been set\r
   ASSERT (PcdGet64 (PcdSystemMemorySize) != 0);\r
index 8fcdc99c0ee7c8c4424307231ea4a761865fc0e2..a36c0d09ce19f0f961ccc27ca6795ed52644ae49 100644 (file)
@@ -79,7 +79,7 @@ InitializePlatformPeim (
   EFI_STATUS                    Status;\r
   EFI_BOOT_MODE                 BootMode;\r
 \r
-  DEBUG ((EFI_D_LOAD | EFI_D_INFO, "Platform PEIM Loaded\n"));\r
+  DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Platform PEIM Loaded\n"));\r
 \r
   Status = PeiServicesSetBootMode (ArmPlatformGetBootMode ());\r
   ASSERT_EFI_ERROR (Status);\r