} 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
\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
}\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
\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
&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
|| (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
// 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
// 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
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
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
// 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
));\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
EfiConvertPointer (0x0, (VOID**)&mFlashNvStorageVariableBase);\r
return;\r
}\r
-\r
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
// 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