} else if (EFI_ERROR (Status)) {\r
SEND_LITERAL ("FAILError flashing partition.");\r
mTextOut->OutputString (mTextOut, L"Error flashing partition.\r\n");\r
- DEBUG ((EFI_D_ERROR, "Couldn't flash image: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Couldn't flash image: %r\n", Status));\r
} else {\r
mTextOut->OutputString (mTextOut, L"Done.\r\n");\r
SEND_LITERAL ("OKAY");\r
Status = mPlatform->ErasePartition (PartitionName);\r
if (EFI_ERROR (Status)) {\r
SEND_LITERAL ("FAILCheck device console.");\r
- DEBUG ((EFI_D_ERROR, "Couldn't erase image: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Couldn't erase image: %r\n", Status));\r
} else {\r
SEND_LITERAL ("OKAY");\r
}\r
\r
Status = BootAndroidBootImg (mNumDataBytes, mDataBuffer);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Failed to boot downloaded image: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Failed to boot downloaded image: %r\n", Status));\r
}\r
// We shouldn't get here\r
}\r
gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);\r
\r
// Shouldn't get here\r
- DEBUG ((EFI_D_ERROR, "Fastboot: gRT->ResetSystem didn't work\n"));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: gRT->ResetSystem didn't work\n"));\r
} else if (MATCH_CMD_LITERAL ("powerdown", Command)) {\r
SEND_LITERAL ("OKAY");\r
gRT->ResetSystem (EfiResetShutdown, EFI_SUCCESS, 0, NULL);\r
\r
// Shouldn't get here\r
- DEBUG ((EFI_D_ERROR, "Fastboot: gRT->ResetSystem didn't work\n"));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: gRT->ResetSystem didn't work\n"));\r
} else if (MATCH_CMD_LITERAL ("oem", Command)) {\r
// The "oem" command isn't in the specification, but it was observed in the\r
// wild, followed by a space, followed by the actual command.\r
(VOID **) &mTransport\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fastboot: Couldn't open Fastboot Transport Protocol: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: Couldn't open Fastboot Transport Protocol: %r\n", Status));\r
return Status;\r
}\r
\r
Status = gBS->LocateProtocol (&gAndroidFastbootPlatformProtocolGuid, NULL, (VOID **) &mPlatform);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fastboot: Couldn't open Fastboot Platform Protocol: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: Couldn't open Fastboot Platform Protocol: %r\n", Status));\r
return Status;\r
}\r
\r
Status = mPlatform->Init ();\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fastboot: Couldn't initialise Fastboot Platform Protocol: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: Couldn't initialise Fastboot Platform Protocol: %r\n", Status));\r
return Status;\r
}\r
\r
Status = gBS->LocateProtocol (&gEfiSimpleTextOutProtocolGuid, NULL, (VOID **) &mTextOut);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR,\r
+ DEBUG ((DEBUG_ERROR,\r
"Fastboot: Couldn't open Text Output Protocol: %r\n", Status\r
));\r
return Status;\r
\r
Status = gBS->LocateProtocol (&gEfiSimpleTextInProtocolGuid, NULL, (VOID **) &TextIn);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fastboot: Couldn't open Text Input Protocol: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: Couldn't open Text Input Protocol: %r\n", Status));\r
return Status;\r
}\r
\r
// Disable watchdog\r
Status = gBS->SetWatchdogTimer (0, 0x10000, 0, NULL);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fastboot: Couldn't disable watchdog timer: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: Couldn't disable watchdog timer: %r\n", Status));\r
}\r
\r
// Create event for receipt of data from the host\r
ReceiveEvent\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fastboot: Couldn't start transport: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: Couldn't start transport: %r\n", Status));\r
return Status;\r
}\r
\r
\r
mTransport->Stop ();\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Warning: Fastboot Transport Stop: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Warning: Fastboot Transport Stop: %r\n", Status));\r
}\r
mPlatform->UnInit ();\r
\r
StrSize (LoadOptions),\r
LoadOptions);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Couldn't Boot Linux: %d\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Couldn't Boot Linux: %d\n", Status));\r
Status = EFI_DEVICE_ERROR;\r
goto FreeLoadOptions;\r
}\r
\r
// If we got here we do a confused face because BootLinuxFdt returned,\r
// reporting success.\r
- DEBUG ((EFI_D_ERROR, "WARNING: BdsBootLinuxFdt returned EFI_SUCCESS.\n"));\r
+ DEBUG ((DEBUG_ERROR, "WARNING: BdsBootLinuxFdt returned EFI_SUCCESS.\n"));\r
return EFI_SUCCESS;\r
\r
FreeLoadOptions:\r
FragmentBuffer = AllocatePool (RX_FRAGMENT_SIZE);\r
ASSERT (FragmentBuffer != NULL);\r
if (FragmentBuffer == NULL) {\r
- DEBUG ((EFI_D_ERROR, "TCP Fastboot out of resources"));\r
+ DEBUG ((DEBUG_ERROR, "TCP Fastboot out of resources"));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
\r
Status = mTcpConnection->Receive (mTcpConnection, &mReceiveToken[mNextSubmitIndex]);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "TCP Receive: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "TCP Receive: %r\n", Status));\r
FreePool (FragmentBuffer);\r
}\r
\r
\r
Status = mTcpListener->Accept (mTcpListener, &mAcceptToken);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "TCP Accept: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "TCP Accept: %r\n", Status));\r
}\r
}\r
\r
\r
NewEntry = AllocatePool (sizeof (FASTBOOT_TCP_PACKET_LIST));\r
if (NewEntry == NULL) {\r
- DEBUG ((EFI_D_ERROR, "TCP Fastboot: Out of resources\n"));\r
+ DEBUG ((DEBUG_ERROR, "TCP Fastboot: Out of resources\n"));\r
return;\r
}\r
\r
NewEntry->Buffer = NULL;\r
NewEntry->BufferSize = 0;\r
\r
- DEBUG ((EFI_D_ERROR, "\nTCP Fastboot Receive error: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "\nTCP Fastboot Receive error: %r\n", Status));\r
}\r
\r
InsertTailList (&mPacketListHead, &NewEntry->Link);\r
Status = AcceptToken->CompletionToken.Status;\r
\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "TCP Fastboot: Connection Error: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "TCP Fastboot: Connection Error: %r\n", Status));\r
return;\r
}\r
- DEBUG ((EFI_D_ERROR, "TCP Fastboot: Connection Received.\n"));\r
+ DEBUG ((DEBUG_ERROR, "TCP Fastboot: Connection Received.\n"));\r
\r
//\r
// Accepting a new TCP connection creates a new instance of the TCP protocol.\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Open TCP Connection: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Open TCP Connection: %r\n", Status));\r
return;\r
}\r
\r
&HandleBuffer\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Find TCP Service Binding: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Find TCP Service Binding: %r\n", Status));\r
return Status;\r
}\r
\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Open TCP Service Binding: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Open TCP Service Binding: %r\n", Status));\r
return Status;\r
}\r
\r
Status = mTcpServiceBinding->CreateChild (mTcpServiceBinding, &mTcpHandle);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "TCP ServiceBinding Create: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "TCP ServiceBinding Create: %r\n", Status));\r
return Status;\r
}\r
\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Open TCP Protocol: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Open TCP Protocol: %r\n", Status));\r
}\r
\r
//\r
} while (!Ip4ModeData.IsConfigured);\r
Status = mTcpListener->Configure (mTcpListener, &TcpConfigData);\r
} else if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "TCP Configure: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "TCP Configure: %r\n", Status));\r
return Status;\r
}\r
\r
\r
Status = mTcpListener->Accept (mTcpListener, &mAcceptToken);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "TCP Accept: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "TCP Accept: %r\n", Status));\r
return Status;\r
}\r
\r
\r
Status = mTransmitToken.CompletionToken.Status;\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "TCP Fastboot transmit result: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "TCP Fastboot transmit result: %r\n", Status));\r
gBS->SignalEvent (*(EFI_EVENT *) Context);\r
}\r
\r
\r
Status = mTcpConnection->Transmit (mTcpConnection, &mTransmitToken);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "TCP Transmit: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "TCP Transmit: %r\n", Status));\r
return Status;\r
}\r
\r
(VOID **) &mTextOut\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fastboot: Open Text Output Protocol: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: Open Text Output Protocol: %r\n", Status));\r
return Status;\r
}\r
\r
&mTransportProtocol\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Fastboot: Install transport Protocol: %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Fastboot: Install transport Protocol: %r\n", Status));\r
}\r
\r
return Status;\r
}\r
\r
if ((*RegSize % 16) != 0) {\r
- DEBUG ((EFI_D_ERROR,\r
+ DEBUG ((DEBUG_ERROR,\r
"%a: '%a' compatible node has invalid 'reg' property (size == 0x%x)\n",\r
__FUNCTION__, CompatibleString, *RegSize));\r
return EFI_NOT_FOUND;\r
//\r
Status = GetNodeProperty (This, Next, "reg", Reg, RegSize);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_WARN,\r
+ DEBUG ((DEBUG_WARN,\r
"%a: ignoring memory node with no 'reg' property\n",\r
__FUNCTION__));\r
continue;\r
}\r
if ((*RegSize % 16) != 0) {\r
- DEBUG ((EFI_D_WARN,\r
+ DEBUG ((DEBUG_WARN,\r
"%a: ignoring memory node with invalid 'reg' property (size == 0x%x)\n",\r
__FUNCTION__, *RegSize));\r
continue;\r
DeviceTreeBase = (VOID *)(UINTN)*(UINT64 *)GET_GUID_HOB_DATA (Hob);\r
\r
if (fdt_check_header (DeviceTreeBase) != 0) {\r
- DEBUG ((EFI_D_ERROR, "%a: No DTB found @ 0x%p\n", __FUNCTION__,\r
+ DEBUG ((DEBUG_ERROR, "%a: No DTB found @ 0x%p\n", __FUNCTION__,\r
DeviceTreeBase));\r
return EFI_NOT_FOUND;\r
}\r
\r
mDeviceTreeBase = DeviceTreeBase;\r
\r
- DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase));\r
+ DEBUG ((DEBUG_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase));\r
\r
//\r
// Register a protocol notify for the EDKII Platform Has Device Tree\r
}\r
\r
InvalidateInstructionCacheRange ((VOID *)mSingleStepPC, mSingleStepDataSize);\r
- //DEBUG((EFI_D_ERROR, "AddSingleStep at 0x%08x (was: 0x%08x is:0x%08x)\n", SystemContext.SystemContextArm->PC, mSingleStepData, *(UINT32 *)mSingleStepPC));\r
+ //DEBUG((DEBUG_ERROR, "AddSingleStep at 0x%08x (was: 0x%08x is:0x%08x)\n", SystemContext.SystemContextArm->PC, mSingleStepData, *(UINT32 *)mSingleStepPC));\r
}\r
\r
\r
if (mSingleStepDataSize == sizeof (UINT16)) {\r
*(UINT16 *)mSingleStepPC = (UINT16)mSingleStepData;\r
} else {\r
- //DEBUG((EFI_D_ERROR, "RemoveSingleStep at 0x%08x (was: 0x%08x is:0x%08x)\n", SystemContext.SystemContextArm->PC, *(UINT32 *)mSingleStepPC, mSingleStepData));\r
+ //DEBUG((DEBUG_ERROR, "RemoveSingleStep at 0x%08x (was: 0x%08x is:0x%08x)\n", SystemContext.SystemContextArm->PC, *(UINT32 *)mSingleStepPC, mSingleStepData));\r
*(UINT32 *)mSingleStepPC = mSingleStepData;\r
}\r
InvalidateInstructionCacheRange ((VOID *)mSingleStepPC, mSingleStepDataSize);\r
*(UINT32 *)Address = GDB_ARM_BKPT;\r
InvalidateInstructionCacheRange ((VOID *)Address, 4);\r
\r
- //DEBUG((EFI_D_ERROR, "SetBreakpoint at 0x%08x (was: 0x%08x is:0x%08x)\n", Address, Breakpoint->Instruction, *(UINT32 *)Address));\r
+ //DEBUG((DEBUG_ERROR, "SetBreakpoint at 0x%08x (was: 0x%08x is:0x%08x)\n", Address, Breakpoint->Instruction, *(UINT32 *)Address));\r
}\r
\r
VOID\r
*(UINT32 *)Address = Breakpoint->Instruction;\r
InvalidateInstructionCacheRange ((VOID *)Address, 4);\r
\r
- //DEBUG((EFI_D_ERROR, "ClearBreakpoint at 0x%08x (was: 0x%08x is:0x%08x)\n", Address, GDB_ARM_BKPT, *(UINT32 *)Address));\r
+ //DEBUG((DEBUG_ERROR, "ClearBreakpoint at 0x%08x (was: 0x%08x is:0x%08x)\n", Address, GDB_ARM_BKPT, *(UINT32 *)Address));\r
\r
FreePool (Breakpoint);\r
}\r
break;\r
\r
default :\r
- DEBUG((EFI_D_ERROR, "Insert breakpoint default: %x\n", Type));\r
+ DEBUG((DEBUG_ERROR, "Insert breakpoint default: %x\n", Type));\r
SendError (GDB_EINVALIDBRKPOINTTYPE);\r
return;\r
}\r
\r
return TRUE;\r
}\r
-\r
&Handles\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Debug Support Protocol not found\n"));\r
+ DEBUG ((DEBUG_ERROR, "Debug Support Protocol not found\n"));\r
\r
return Status;\r
}\r
FreePool (Handles);\r
\r
if (!IsaSupported) {\r
- DEBUG ((EFI_D_ERROR, "Debug Support Protocol does not support our ISA\n"));\r
+ DEBUG ((DEBUG_ERROR, "Debug Support Protocol does not support our ISA\n"));\r
\r
return EFI_NOT_FOUND;\r
}\r
Status = DebugSupport->GetMaximumProcessorIndex (DebugSupport, &gMaxProcessorIndex);\r
ASSERT_EFI_ERROR (Status);\r
\r
- DEBUG ((EFI_D_INFO, "Debug Support Protocol ISA %x\n", DebugSupport->Isa));\r
- DEBUG ((EFI_D_INFO, "Debug Support Protocol Processor Index %d\n", gMaxProcessorIndex));\r
+ DEBUG ((DEBUG_INFO, "Debug Support Protocol ISA %x\n", DebugSupport->Isa));\r
+ DEBUG ((DEBUG_INFO, "Debug Support Protocol Processor Index %d\n", gMaxProcessorIndex));\r
\r
// Call processor-specific init routine\r
InitializeProcessor ();\r
AcpiTableSize = ((EFI_ACPI_DESCRIPTION_HEADER *) AcpiTable)->Length;\r
ASSERT (SectionSize >= AcpiTableSize);\r
\r
- DEBUG ((EFI_D_ERROR, "- Found '%c%c%c%c' ACPI Table\n",\r
+ DEBUG ((DEBUG_ERROR, "- Found '%c%c%c%c' ACPI Table\n",\r
(((EFI_ACPI_DESCRIPTION_HEADER *) AcpiTable)->Signature & 0xFF),\r
((((EFI_ACPI_DESCRIPTION_HEADER *) AcpiTable)->Signature >> 8) & 0xFF),\r
((((EFI_ACPI_DESCRIPTION_HEADER *) AcpiTable)->Signature >> 16) & 0xFF),\r
\r
Char = IoRead8 (gPort);\r
\r
- // Make this an EFI_D_INFO after we get everything debugged.\r
- DEBUG ((EFI_D_ERROR, "<%c<", Char));\r
+ // Make this an DEBUG_INFO after we get everything debugged.\r
+ DEBUG ((DEBUG_ERROR, "<%c<", Char));\r
return Char;\r
}\r
\r
{\r
UINT8 Data;\r
\r
- // Make this an EFI_D_INFO after we get everything debugged.\r
- DEBUG ((EFI_D_ERROR, ">%c>", Char));\r
+ // Make this an DEBUG_INFO after we get everything debugged.\r
+ DEBUG ((DEBUG_ERROR, ">%c>", Char));\r
\r
// Wait for the serial port to be ready\r
do {\r
String++;\r
}\r
}\r
-\r
-\r
-\r
-\r
//\r
// GetInfo failed\r
//\r
- DEBUG ((EFI_D_ERROR, "Decompress GetInfo Failed - %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Decompress GetInfo Failed - %r\n", Status));\r
return EFI_NOT_FOUND;\r
}\r
//\r
//\r
// Decompress failed\r
//\r
- DEBUG ((EFI_D_ERROR, "Decompress Failed - %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Decompress Failed - %r\n", Status));\r
return EFI_NOT_FOUND;\r
} else {\r
return FfsProcessSection (\r
\r
return EFI_SUCCESS;\r
}\r
-\r
-\r
\r
BuildModuleHob (&FvFileInfo.FileName, (EFI_PHYSICAL_ADDRESS)(UINTN)ImageAddress, EFI_SIZE_TO_PAGES ((UINT32) ImageSize) * EFI_PAGE_SIZE, EntryPoint);\r
\r
- DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading DxeCore at 0x%10p EntryPoint=0x%10p\n", (VOID *)(UINTN)ImageAddress, (VOID *)(UINTN)EntryPoint));\r
+ DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Loading DxeCore at 0x%10p EntryPoint=0x%10p\n", (VOID *)(UINTN)ImageAddress, (VOID *)(UINTN)EntryPoint));\r
\r
Hob = GetHobList ();\r
if (StackSize == 0) {\r
}\r
\r
// Should never get here as DXE Core does not return\r
- DEBUG ((EFI_D_ERROR, "DxeCore returned\n"));\r
+ DEBUG ((DEBUG_ERROR, "DxeCore returned\n"));\r
ASSERT (FALSE);\r
\r
return EFI_DEVICE_ERROR;\r
\r
return Status;\r
}\r
-\r
-\r
\r
for (i = 0; i < (BufferSize >> 3); i++) {\r
if (*BufferA64 != *BufferB64) {\r
- DEBUG ((EFI_D_ERROR, "CompareBuffer: Error at %i", i));\r
- DEBUG ((EFI_D_ERROR, "(0x%lX) != (0x%lX)\n", *BufferA64, *BufferB64));\r
+ DEBUG ((DEBUG_ERROR, "CompareBuffer: Error at %i", i));\r
+ DEBUG ((DEBUG_ERROR, "(0x%lX) != (0x%lX)\n", *BufferA64, *BufferB64));\r
return FALSE;\r
}\r
BufferA64++;\r
#include <Library/DebugLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
\r
-#define MMC_TRACE(txt) DEBUG((EFI_D_BLKIO, "MMC: " txt "\n"))\r
+#define MMC_TRACE(txt) DEBUG((DEBUG_BLKIO, "MMC: " txt "\n"))\r
\r
#define MMC_IOBLOCKS_READ 0\r
#define MMC_IOBLOCKS_WRITE 1\r
CmdArg = MmcHostInstance->CardInfo.RCA << 16;\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD13, CmdArg);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcGetCardStatus(MMC_CMD13): Error and Status = %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcGetCardStatus(MMC_CMD13): Error and Status = %r\n", Status));\r
return Status;\r
}\r
\r
\r
Status = MmcHost->SendCommand (MmcHost, Cmd, CmdArg);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "%a(MMC_CMD%d): Error %r\n", __func__, Cmd, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a(MMC_CMD%d): Error %r\n", __func__, Cmd, Status));\r
return Status;\r
}\r
\r
// Read Data\r
Status = MmcHost->ReadBlockData (MmcHost, Lba, BufferSize, Buffer);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_BLKIO, "%a(): Error Read Block Data and Status = %r\n", __func__, Status));\r
+ DEBUG ((DEBUG_BLKIO, "%a(): Error Read Block Data and Status = %r\n", __func__, Status));\r
MmcStopTransmission (MmcHost);\r
return Status;\r
}\r
Status = MmcNotifyState (MmcHostInstance, MmcProgrammingState);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "%a() : Error MmcProgrammingState\n", __func__));\r
+ DEBUG ((DEBUG_ERROR, "%a() : Error MmcProgrammingState\n", __func__));\r
return Status;\r
}\r
} else {\r
// Write Data\r
Status = MmcHost->WriteBlockData (MmcHost, Lba, BufferSize, Buffer);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_BLKIO, "%a(): Error Write Block Data and Status = %r\n", __func__, Status));\r
+ DEBUG ((DEBUG_BLKIO, "%a(): Error Write Block Data and Status = %r\n", __func__, Status));\r
MmcStopTransmission (MmcHost);\r
return Status;\r
}\r
if (BufferSize > This->Media->BlockSize) {\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD12, 0);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_BLKIO, "%a(): Error and Status:%r\n", __func__, Status));\r
+ DEBUG ((DEBUG_BLKIO, "%a(): Error and Status:%r\n", __func__, Status));\r
}\r
MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1b, Response);\r
}\r
\r
Status = MmcNotifyState (MmcHostInstance, MmcTransferState);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIoBlocks() : Error MmcTransferState\n"));\r
+ DEBUG ((DEBUG_ERROR, "MmcIoBlocks() : Error MmcTransferState\n"));\r
return Status;\r
}\r
return Status;\r
}\r
\r
if (0 == Timeout) {\r
- DEBUG ((EFI_D_ERROR, "The Card is busy\n"));\r
+ DEBUG ((DEBUG_ERROR, "The Card is busy\n"));\r
return EFI_NOT_READY;\r
}\r
\r
}\r
Status = MmcTransferBlock (This, Cmd, Transfer, MediaId, Lba, ConsumeSize, Buffer);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "%a(): Failed to transfer block and Status:%r\n", __func__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a(): Failed to transfer block and Status:%r\n", __func__, Status));\r
}\r
\r
RemainingBlock -= BlockCount;\r
IN UINT32* Cid\r
)\r
{\r
- DEBUG ((EFI_D_ERROR, "- PrintCID\n"));\r
- DEBUG ((EFI_D_ERROR, "\t- Manufacturing date: %d/%d\n", (Cid[0] >> 8) & 0xF, (Cid[0] >> 12) & 0xFF));\r
- DEBUG ((EFI_D_ERROR, "\t- Product serial number: 0x%X%X\n", Cid[1] & 0xFFFFFF, (Cid[0] >> 24) & 0xFF));\r
- DEBUG ((EFI_D_ERROR, "\t- Product revision: %d\n", Cid[1] >> 24));\r
- //DEBUG ((EFI_D_ERROR, "\t- Product name: %s\n", (char*)(Cid + 2)));\r
- DEBUG ((EFI_D_ERROR, "\t- OEM ID: %c%c\n", (Cid[3] >> 8) & 0xFF, (Cid[3] >> 16) & 0xFF));\r
+ DEBUG ((DEBUG_ERROR, "- PrintCID\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- Manufacturing date: %d/%d\n", (Cid[0] >> 8) & 0xF, (Cid[0] >> 12) & 0xFF));\r
+ DEBUG ((DEBUG_ERROR, "\t- Product serial number: 0x%X%X\n", Cid[1] & 0xFFFFFF, (Cid[0] >> 24) & 0xFF));\r
+ DEBUG ((DEBUG_ERROR, "\t- Product revision: %d\n", Cid[1] >> 24));\r
+ //DEBUG ((DEBUG_ERROR, "\t- Product name: %s\n", (char*)(Cid + 2)));\r
+ DEBUG ((DEBUG_ERROR, "\t- OEM ID: %c%c\n", (Cid[3] >> 8) & 0xFF, (Cid[3] >> 16) & 0xFF));\r
}\r
\r
\r
UINTN Value;\r
\r
if (((Csd[2] >> 30) & 0x3) == 0) {\r
- DEBUG ((EFI_D_ERROR, "- PrintCSD Version 1.01-1.10/Version 2.00/Standard Capacity\n"));\r
+ DEBUG ((DEBUG_ERROR, "- PrintCSD Version 1.01-1.10/Version 2.00/Standard Capacity\n"));\r
} else if (((Csd[2] >> 30) & 0x3) == 1) {\r
- DEBUG ((EFI_D_ERROR, "- PrintCSD Version 2.00/High Capacity\n"));\r
+ DEBUG ((DEBUG_ERROR, "- PrintCSD Version 2.00/High Capacity\n"));\r
} else {\r
- DEBUG ((EFI_D_ERROR, "- PrintCSD Version Higher than v3.3\n"));\r
+ DEBUG ((DEBUG_ERROR, "- PrintCSD Version Higher than v3.3\n"));\r
}\r
\r
- DEBUG ((EFI_D_ERROR, "\t- Supported card command class: 0x%X\n", MMC_CSD_GET_CCC (Csd)));\r
- DEBUG ((EFI_D_ERROR, "\t- Speed: %a %a\n",mStrValue[(MMC_CSD_GET_TRANSPEED (Csd) >> 3) & 0xF],mStrUnit[MMC_CSD_GET_TRANSPEED (Csd) & 7]));\r
- DEBUG ((EFI_D_ERROR, "\t- Maximum Read Data Block: %d\n",2 << (MMC_CSD_GET_READBLLEN (Csd)-1)));\r
- DEBUG ((EFI_D_ERROR, "\t- Maximum Write Data Block: %d\n",2 << (MMC_CSD_GET_WRITEBLLEN (Csd)-1)));\r
+ DEBUG ((DEBUG_ERROR, "\t- Supported card command class: 0x%X\n", MMC_CSD_GET_CCC (Csd)));\r
+ DEBUG ((DEBUG_ERROR, "\t- Speed: %a %a\n",mStrValue[(MMC_CSD_GET_TRANSPEED (Csd) >> 3) & 0xF],mStrUnit[MMC_CSD_GET_TRANSPEED (Csd) & 7]));\r
+ DEBUG ((DEBUG_ERROR, "\t- Maximum Read Data Block: %d\n",2 << (MMC_CSD_GET_READBLLEN (Csd)-1)));\r
+ DEBUG ((DEBUG_ERROR, "\t- Maximum Write Data Block: %d\n",2 << (MMC_CSD_GET_WRITEBLLEN (Csd)-1)));\r
\r
if (!MMC_CSD_GET_FILEFORMATGRP (Csd)) {\r
Value = MMC_CSD_GET_FILEFORMAT (Csd);\r
if (Value == 0) {\r
- DEBUG ((EFI_D_ERROR, "\t- Format (0): Hard disk-like file system with partition table\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- Format (0): Hard disk-like file system with partition table\n"));\r
} else if (Value == 1) {\r
- DEBUG ((EFI_D_ERROR, "\t- Format (1): DOS FAT (floppy-like) with boot sector only (no partition table)\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- Format (1): DOS FAT (floppy-like) with boot sector only (no partition table)\n"));\r
} else if (Value == 2) {\r
- DEBUG ((EFI_D_ERROR, "\t- Format (2): Universal File Format\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- Format (2): Universal File Format\n"));\r
} else {\r
- DEBUG ((EFI_D_ERROR, "\t- Format (3): Others/Unknown\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- Format (3): Others/Unknown\n"));\r
}\r
} else {\r
- DEBUG ((EFI_D_ERROR, "\t- Format: Reserved\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- Format: Reserved\n"));\r
}\r
}\r
\r
IN UINT32 Rca\r
)\r
{\r
- DEBUG ((EFI_D_ERROR, "- PrintRCA: 0x%X\n", Rca));\r
- DEBUG ((EFI_D_ERROR, "\t- Status: 0x%X\n", Rca & 0xFFFF));\r
- DEBUG ((EFI_D_ERROR, "\t- RCA: 0x%X\n", (Rca >> 16) & 0xFFFF));\r
+ DEBUG ((DEBUG_ERROR, "- PrintRCA: 0x%X\n", Rca));\r
+ DEBUG ((DEBUG_ERROR, "\t- Status: 0x%X\n", Rca & 0xFFFF));\r
+ DEBUG ((DEBUG_ERROR, "\t- RCA: 0x%X\n", (Rca >> 16) & 0xFFFF));\r
}\r
\r
VOID\r
Volts++;\r
}\r
\r
- DEBUG ((EFI_D_ERROR, "- PrintOCR Ocr (0x%X)\n",Ocr));\r
- DEBUG ((EFI_D_ERROR, "\t- Card operating voltage: %d.%d to %d.%d\n", MinV/10, MinV % 10, MaxV/10, MaxV % 10));\r
+ DEBUG ((DEBUG_ERROR, "- PrintOCR Ocr (0x%X)\n",Ocr));\r
+ DEBUG ((DEBUG_ERROR, "\t- Card operating voltage: %d.%d to %d.%d\n", MinV/10, MinV % 10, MaxV/10, MaxV % 10));\r
if (((Ocr >> 29) & 3) == 0) {\r
- DEBUG ((EFI_D_ERROR, "\t- AccessMode: Byte Mode\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- AccessMode: Byte Mode\n"));\r
} else {\r
- DEBUG ((EFI_D_ERROR, "\t- AccessMode: Block Mode (0x%X)\n", ((Ocr >> 29) & 3)));\r
+ DEBUG ((DEBUG_ERROR, "\t- AccessMode: Block Mode (0x%X)\n", ((Ocr >> 29) & 3)));\r
}\r
\r
if (Ocr & MMC_OCR_POWERUP) {\r
- DEBUG ((EFI_D_ERROR, "\t- PowerUp\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- PowerUp\n"));\r
} else {\r
- DEBUG ((EFI_D_ERROR, "\t- Voltage Not Supported\n"));\r
+ DEBUG ((DEBUG_ERROR, "\t- Voltage Not Supported\n"));\r
}\r
}\r
\r
IN UINT32 Response\r
)\r
{\r
- DEBUG ((EFI_D_INFO, "Response: 0x%X\n", Response));\r
+ DEBUG ((DEBUG_INFO, "Response: 0x%X\n", Response));\r
if (Response & MMC_R0_READY_FOR_DATA) {\r
- DEBUG ((EFI_D_INFO, "\t- READY_FOR_DATA\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- READY_FOR_DATA\n"));\r
}\r
\r
switch ((Response >> 9) & 0xF) {\r
case 0:\r
- DEBUG ((EFI_D_INFO, "\t- State: Idle\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Idle\n"));\r
break;\r
case 1:\r
- DEBUG ((EFI_D_INFO, "\t- State: Ready\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Ready\n"));\r
break;\r
case 2:\r
- DEBUG ((EFI_D_INFO, "\t- State: Ident\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Ident\n"));\r
break;\r
case 3:\r
- DEBUG ((EFI_D_INFO, "\t- State: StandBy\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: StandBy\n"));\r
break;\r
case 4:\r
- DEBUG ((EFI_D_INFO, "\t- State: Tran\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Tran\n"));\r
break;\r
case 5:\r
- DEBUG ((EFI_D_INFO, "\t- State: Data\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Data\n"));\r
break;\r
case 6:\r
- DEBUG ((EFI_D_INFO, "\t- State: Rcv\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Rcv\n"));\r
break;\r
case 7:\r
- DEBUG ((EFI_D_INFO, "\t- State: Prg\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Prg\n"));\r
break;\r
case 8:\r
- DEBUG ((EFI_D_INFO, "\t- State: Dis\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Dis\n"));\r
break;\r
default:\r
- DEBUG ((EFI_D_INFO, "\t- State: Reserved\n"));\r
+ DEBUG ((DEBUG_INFO, "\t- State: Reserved\n"));\r
break;\r
}\r
}\r
RCA = MmcHostInstance->CardInfo.RCA << RCA_SHIFT_OFFSET;\r
Status = Host->SendCommand (Host, MMC_CMD13, RCA);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcGetDeviceState(): Failed to get card status, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcGetDeviceState(): Failed to get card status, Status=%r.\n", Status));\r
return Status;\r
}\r
Status = Host->ReceiveResponse (Host, MMC_RESPONSE_TYPE_R1, &Data);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcGetDeviceState(): Failed to get response of CMD13, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcGetDeviceState(): Failed to get response of CMD13, Status=%r.\n", Status));\r
return Status;\r
}\r
if (Data & EMMC_SWITCH_ERROR) {\r
- DEBUG ((EFI_D_ERROR, "EmmcGetDeviceState(): Failed to switch expected mode, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcGetDeviceState(): Failed to switch expected mode, Status=%r.\n", Status));\r
return EFI_DEVICE_ERROR;\r
}\r
*State = DEVICE_STATE(Data);\r
EMMC_CMD6_ARG_VALUE(Value) | EMMC_CMD6_ARG_CMD_SET(1);\r
Status = Host->SendCommand (Host, MMC_CMD6, Argument);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcSetEXTCSD(): Failed to send CMD6, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcSetEXTCSD(): Failed to send CMD6, Status=%r.\n", Status));\r
return Status;\r
}\r
// Make sure device exiting prog mode\r
do {\r
Status = EmmcGetDeviceState (MmcHostInstance, &State);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcSetEXTCSD(): Failed to get device state, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcSetEXTCSD(): Failed to get device state, Status=%r.\n", Status));\r
return Status;\r
}\r
} while (State == EMMC_PRG_STATE);\r
// Fetch card identity register\r
Status = Host->SendCommand (Host, MMC_CMD2, 0);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): Failed to send CMD2, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): Failed to send CMD2, Status=%r.\n", Status));\r
return Status;\r
}\r
\r
Status = Host->ReceiveResponse (Host, MMC_RESPONSE_TYPE_R2, (UINT32 *)&(MmcHostInstance->CardInfo.CIDData));\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): CID retrieval error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): CID retrieval error, Status=%r.\n", Status));\r
return Status;\r
}\r
\r
RCA = MmcHostInstance->CardInfo.RCA << RCA_SHIFT_OFFSET;\r
Status = Host->SendCommand (Host, MMC_CMD3, RCA);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): RCA set error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): RCA set error, Status=%r.\n", Status));\r
return Status;\r
}\r
\r
// Fetch card specific data\r
Status = Host->SendCommand (Host, MMC_CMD9, RCA);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): Failed to send CMD9, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): Failed to send CMD9, Status=%r.\n", Status));\r
return Status;\r
}\r
\r
Status = Host->ReceiveResponse (Host, MMC_RESPONSE_TYPE_R2, (UINT32 *)&(MmcHostInstance->CardInfo.CSDData));\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): CSD retrieval error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): CSD retrieval error, Status=%r.\n", Status));\r
return Status;\r
}\r
\r
// Select the card\r
Status = Host->SendCommand (Host, MMC_CMD7, RCA);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): Card selection error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): Card selection error, Status=%r.\n", Status));\r
}\r
\r
if (MMC_HOST_HAS_SETIOS(Host)) {\r
// Set 1-bit bus width\r
Status = Host->SetIos (Host, 0, 1, EMMCBACKWARD);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): Set 1-bit bus width error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): Set 1-bit bus width error, Status=%r.\n", Status));\r
return Status;\r
}\r
\r
// Set 1-bit bus width for EXTCSD\r
Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_1BIT);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): Set extcsd bus width error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): Set extcsd bus width error, Status=%r.\n", Status));\r
return Status;\r
}\r
}\r
}\r
Status = Host->SendCommand (Host, MMC_CMD8, 0);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): ECSD fetch error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): ECSD fetch error, Status=%r.\n", Status));\r
}\r
\r
Status = Host->ReadBlockData (Host, 0, 512, (UINT32 *)MmcHostInstance->CardInfo.ECSDData);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): ECSD read error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): ECSD read error, Status=%r.\n", Status));\r
goto FreePageExit;\r
}\r
\r
do {\r
Status = EmmcGetDeviceState (MmcHostInstance, &State);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): Failed to get device state, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "EmmcIdentificationMode(): Failed to get device state, Status=%r.\n", Status));\r
goto FreePageExit;\r
}\r
} while (State == EMMC_DATA_STATE);\r
CmdArg = MmcHostInstance->CardInfo.RCA << 16;\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD9, CmdArg);\r
if (EFI_ERROR (Status)) {\r
- DEBUG((EFI_D_ERROR, "InitializeSdMmcDevice(MMC_CMD9): Error, Status=%r\n", Status));\r
+ DEBUG((DEBUG_ERROR, "InitializeSdMmcDevice(MMC_CMD9): Error, Status=%r\n", Status));\r
return Status;\r
}\r
\r
// Read Response\r
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_CSD, Response);\r
if (EFI_ERROR (Status)) {\r
- DEBUG((EFI_D_ERROR, "InitializeSdMmcDevice(): Failed to receive CSD, Status=%r\n", Status));\r
+ DEBUG((DEBUG_ERROR, "InitializeSdMmcDevice(): Failed to receive CSD, Status=%r\n", Status));\r
return Status;\r
}\r
PrintCSD (Response);\r
CmdArg = MmcHostInstance->CardInfo.RCA << 16;\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD7, CmdArg);\r
if (EFI_ERROR (Status)) {\r
- DEBUG((EFI_D_ERROR, "InitializeSdMmcDevice(MMC_CMD7): Error and Status = %r\n", Status));\r
+ DEBUG((DEBUG_ERROR, "InitializeSdMmcDevice(MMC_CMD7): Error and Status = %r\n", Status));\r
return Status;\r
}\r
\r
/* SCR */\r
Status = MmcHost->SendCommand (MmcHost, MMC_ACMD51, 0);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "%a(MMC_ACMD51): Error and Status = %r\n", __func__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a(MMC_ACMD51): Error and Status = %r\n", __func__, Status));\r
return Status;\r
} else {\r
Status = MmcHost->ReadBlockData (MmcHost, 0, 8, Buffer);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "%a(MMC_ACMD51): ReadBlockData Error and Status = %r\n", __func__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a(MMC_ACMD51): ReadBlockData Error and Status = %r\n", __func__, Status));\r
return Status;\r
}\r
CopyMem (&Scr, Buffer, 8);\r
if (Scr.SD_SPEC == 2) {\r
if (Scr.SD_SPEC3 == 1) {\r
- if (Scr.SD_SPEC4 == 1) {\r
- DEBUG ((EFI_D_INFO, "Found SD Card for Spec Version 4.xx\n"));\r
- } else {\r
- DEBUG ((EFI_D_INFO, "Found SD Card for Spec Version 3.0x\n"));\r
- }\r
+ if (Scr.SD_SPEC4 == 1) {\r
+ DEBUG ((DEBUG_INFO, "Found SD Card for Spec Version 4.xx\n"));\r
+ } else {\r
+ DEBUG ((DEBUG_INFO, "Found SD Card for Spec Version 3.0x\n"));\r
+ }\r
} else {\r
- if (Scr.SD_SPEC4 == 0) {\r
- DEBUG ((EFI_D_INFO, "Found SD Card for Spec Version 2.0\n"));\r
- } else {\r
- DEBUG ((EFI_D_ERROR, "Found invalid SD Card\n"));\r
- }\r
+ if (Scr.SD_SPEC4 == 0) {\r
+ DEBUG ((DEBUG_INFO, "Found SD Card for Spec Version 2.0\n"));\r
+ } else {\r
+ DEBUG ((DEBUG_ERROR, "Found invalid SD Card\n"));\r
+ }\r
}\r
} else {\r
if ((Scr.SD_SPEC3 == 0) && (Scr.SD_SPEC4 == 0)) {\r
if (Scr.SD_SPEC == 1) {\r
- DEBUG ((EFI_D_INFO, "Found SD Card for Spec Version 1.10\n"));\r
- } else {\r
- DEBUG ((EFI_D_INFO, "Found SD Card for Spec Version 1.0\n"));\r
- }\r
+ DEBUG ((DEBUG_INFO, "Found SD Card for Spec Version 1.10\n"));\r
+ } else {\r
+ DEBUG ((DEBUG_INFO, "Found SD Card for Spec Version 1.0\n"));\r
+ }\r
} else {\r
- DEBUG ((EFI_D_ERROR, "Found invalid SD Card\n"));\r
+ DEBUG ((DEBUG_ERROR, "Found invalid SD Card\n"));\r
}\r
}\r
}\r
// Initialize the MMC Host HW\r
Status = MmcNotifyState (MmcHostInstance, MmcHwInitializationState);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Error MmcHwInitializationState, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Error MmcHwInitializationState, Status=%r.\n", Status));\r
return Status;\r
}\r
}\r
\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD0, 0);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD0): Error, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode(MMC_CMD0): Error, Status=%r.\n", Status));\r
return Status;\r
}\r
Status = MmcNotifyState (MmcHostInstance, MmcIdleState);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Error MmcIdleState, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Error MmcIdleState, Status=%r.\n", Status));\r
return Status;\r
}\r
\r
break;\r
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_OCR, (UINT32 *)&OcrResponse);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Failed to receive OCR, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Failed to receive OCR, Status=%r.\n", Status));\r
return Status;\r
}\r
Timeout--;\r
} while (!OcrResponse.Ocr.PowerUp && (Timeout > 0));\r
if (Status == EFI_SUCCESS) {\r
if (!OcrResponse.Ocr.PowerUp) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD1): Card initialisation failure, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode(MMC_CMD1): Card initialisation failure, Status=%r.\n", Status));\r
return EFI_DEVICE_ERROR;\r
}\r
OcrResponse.Ocr.PowerUp = 0;\r
// Are we using SDIO ?\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD5, 0);\r
if (Status == EFI_SUCCESS) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD5): Error - SDIO not supported, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode(MMC_CMD5): Error - SDIO not supported, Status=%r.\n", Status));\r
return EFI_UNSUPPORTED;\r
}\r
\r
CmdArg = (0x0UL << 12 | BIT8 | 0xCEUL << 0);\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD8, CmdArg);\r
if (Status == EFI_SUCCESS) {\r
- DEBUG ((EFI_D_ERROR, "Card is SD2.0 => Supports high capacity\n"));\r
+ DEBUG ((DEBUG_ERROR, "Card is SD2.0 => Supports high capacity\n"));\r
IsHCS = TRUE;\r
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R7, Response);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Failed to receive response to CMD8, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Failed to receive response to CMD8, Status=%r.\n", Status));\r
return Status;\r
}\r
PrintResponseR1 (Response[0]);\r
// Check if it is valid response\r
if (Response[0] != CmdArg) {\r
- DEBUG ((EFI_D_ERROR, "The Card is not usable\n"));\r
+ DEBUG ((DEBUG_ERROR, "The Card is not usable\n"));\r
return EFI_UNSUPPORTED;\r
}\r
} else {\r
- DEBUG ((EFI_D_ERROR, "Not a SD2.0 Card\n"));\r
+ DEBUG ((DEBUG_ERROR, "Not a SD2.0 Card\n"));\r
}\r
\r
// We need to wait for the MMC or SD card is ready => (gCardInfo.OCRData.PowerUp == 1)\r
// SD Card or MMC Card ? CMD55 indicates to the card that the next command is an application specific command\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD55, 0);\r
if (Status == EFI_SUCCESS) {\r
- DEBUG ((EFI_D_INFO, "Card should be SD\n"));\r
+ DEBUG ((DEBUG_INFO, "Card should be SD\n"));\r
if (IsHCS) {\r
MmcHostInstance->CardInfo.CardType = SD_CARD_2;\r
} else {\r
if (!EFI_ERROR (Status)) {\r
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_OCR, Response);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Failed to receive OCR, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Failed to receive OCR, Status=%r.\n", Status));\r
return Status;\r
}\r
((UINT32 *) &(MmcHostInstance->CardInfo.OCRData))[0] = Response[0];\r
}\r
} else {\r
- DEBUG ((EFI_D_INFO, "Card should be MMC\n"));\r
+ DEBUG ((DEBUG_INFO, "Card should be MMC\n"));\r
MmcHostInstance->CardInfo.CardType = MMC_CARD;\r
\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD1, 0x800000);\r
if (!EFI_ERROR (Status)) {\r
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_OCR, Response);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Failed to receive OCR, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Failed to receive OCR, Status=%r.\n", Status));\r
return Status;\r
}\r
((UINT32 *) &(MmcHostInstance->CardInfo.OCRData))[0] = Response[0];\r
} else {\r
if ((MmcHostInstance->CardInfo.CardType == SD_CARD_2) && (MmcHostInstance->CardInfo.OCRData.AccessMode & BIT1)) {\r
MmcHostInstance->CardInfo.CardType = SD_CARD_2_HIGH;\r
- DEBUG ((EFI_D_ERROR, "High capacity card.\n"));\r
+ DEBUG ((DEBUG_ERROR, "High capacity card.\n"));\r
}\r
break; // The MMC/SD card is ready. Continue the Identification Mode\r
}\r
}\r
\r
if (Timeout == 0) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode(): No Card\n"));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode(): No Card\n"));\r
return EFI_NO_MEDIA;\r
} else {\r
PrintOCR (Response[0]);\r
\r
Status = MmcNotifyState (MmcHostInstance, MmcReadyState);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Error MmcReadyState\n"));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Error MmcReadyState\n"));\r
return Status;\r
}\r
\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD2, 0);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD2): Error\n"));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode(MMC_CMD2): Error\n"));\r
return Status;\r
}\r
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_CID, Response);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Failed to receive CID, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Failed to receive CID, Status=%r.\n", Status));\r
return Status;\r
}\r
\r
\r
Status = MmcHost->NotifyState (MmcHost, MmcIdentificationState);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Error MmcIdentificationState\n"));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Error MmcIdentificationState\n"));\r
return Status;\r
}\r
\r
CmdArg = 1;\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD3, CmdArg);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD3): Error\n"));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode(MMC_CMD3): Error\n"));\r
return Status;\r
}\r
\r
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_RCA, Response);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Failed to receive RCA, Status=%r.\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Failed to receive RCA, Status=%r.\n", Status));\r
return Status;\r
}\r
PrintRCA (Response[0]);\r
}\r
Status = MmcNotifyState (MmcHostInstance, MmcStandByState);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode() : Error MmcStandByState\n"));\r
+ DEBUG ((DEBUG_ERROR, "MmcIdentificationMode() : Error MmcStandByState\n"));\r
return Status;\r
}\r
\r
\r
Status = MmcIdentificationMode (MmcHostInstance);\r
if (EFI_ERROR (Status)) {\r
- DEBUG((EFI_D_ERROR, "InitializeMmcDevice(): Error in Identification Mode, Status=%r\n", Status));\r
+ DEBUG((DEBUG_ERROR, "InitializeMmcDevice(): Error in Identification Mode, Status=%r\n", Status));\r
return Status;\r
}\r
\r
Status = MmcNotifyState (MmcHostInstance, MmcTransferState);\r
if (EFI_ERROR (Status)) {\r
- DEBUG((EFI_D_ERROR, "InitializeMmcDevice(): Error MmcTransferState, Status=%r\n", Status));\r
+ DEBUG((DEBUG_ERROR, "InitializeMmcDevice(): Error MmcTransferState, Status=%r\n", Status));\r
return Status;\r
}\r
\r
// Set Block Length\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD16, MmcHostInstance->BlockIo.Media->BlockSize);\r
if (EFI_ERROR (Status)) {\r
- DEBUG((EFI_D_ERROR, "InitializeMmcDevice(MMC_CMD16): Error MmcHostInstance->BlockIo.Media->BlockSize: %d and Error = %r\n",\r
+ DEBUG((DEBUG_ERROR, "InitializeMmcDevice(MMC_CMD16): Error MmcHostInstance->BlockIo.Media->BlockSize: %d and Error = %r\n",\r
MmcHostInstance->BlockIo.Media->BlockSize, Status));\r
return Status;\r
}\r
if (MmcHostInstance->CardInfo.CardType == MMC_CARD) {\r
Status = MmcHost->SendCommand (MmcHost, MMC_CMD23, BlockCount);\r
if (EFI_ERROR (Status)) {\r
- DEBUG((EFI_D_ERROR, "InitializeMmcDevice(MMC_CMD23): Error, Status=%r\n", Status));\r
+ DEBUG((DEBUG_ERROR, "InitializeMmcDevice(MMC_CMD23): Error, Status=%r\n", Status));\r
return Status;\r
}\r
}\r