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