EmbeddedPkg: 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: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Michael D Kinney
2021-11-16 19:21:20 -08:00
committed by mergify[bot]
parent c5b3a56e4f
commit a1878955b2
15 changed files with 170 additions and 179 deletions

View File

@@ -20,12 +20,12 @@ PrintCID (
IN UINT32* Cid
)
{
DEBUG ((EFI_D_ERROR, "- PrintCID\n"));
DEBUG ((EFI_D_ERROR, "\t- Manufacturing date: %d/%d\n", (Cid[0] >> 8) & 0xF, (Cid[0] >> 12) & 0xFF));
DEBUG ((EFI_D_ERROR, "\t- Product serial number: 0x%X%X\n", Cid[1] & 0xFFFFFF, (Cid[0] >> 24) & 0xFF));
DEBUG ((EFI_D_ERROR, "\t- Product revision: %d\n", Cid[1] >> 24));
//DEBUG ((EFI_D_ERROR, "\t- Product name: %s\n", (char*)(Cid + 2)));
DEBUG ((EFI_D_ERROR, "\t- OEM ID: %c%c\n", (Cid[3] >> 8) & 0xFF, (Cid[3] >> 16) & 0xFF));
DEBUG ((DEBUG_ERROR, "- PrintCID\n"));
DEBUG ((DEBUG_ERROR, "\t- Manufacturing date: %d/%d\n", (Cid[0] >> 8) & 0xF, (Cid[0] >> 12) & 0xFF));
DEBUG ((DEBUG_ERROR, "\t- Product serial number: 0x%X%X\n", Cid[1] & 0xFFFFFF, (Cid[0] >> 24) & 0xFF));
DEBUG ((DEBUG_ERROR, "\t- Product revision: %d\n", Cid[1] >> 24));
//DEBUG ((DEBUG_ERROR, "\t- Product name: %s\n", (char*)(Cid + 2)));
DEBUG ((DEBUG_ERROR, "\t- OEM ID: %c%c\n", (Cid[3] >> 8) & 0xFF, (Cid[3] >> 16) & 0xFF));
}
@@ -37,31 +37,31 @@ PrintCSD (
UINTN Value;
if (((Csd[2] >> 30) & 0x3) == 0) {
DEBUG ((EFI_D_ERROR, "- PrintCSD Version 1.01-1.10/Version 2.00/Standard Capacity\n"));
DEBUG ((DEBUG_ERROR, "- PrintCSD Version 1.01-1.10/Version 2.00/Standard Capacity\n"));
} else if (((Csd[2] >> 30) & 0x3) == 1) {
DEBUG ((EFI_D_ERROR, "- PrintCSD Version 2.00/High Capacity\n"));
DEBUG ((DEBUG_ERROR, "- PrintCSD Version 2.00/High Capacity\n"));
} else {
DEBUG ((EFI_D_ERROR, "- PrintCSD Version Higher than v3.3\n"));
DEBUG ((DEBUG_ERROR, "- PrintCSD Version Higher than v3.3\n"));
}
DEBUG ((EFI_D_ERROR, "\t- Supported card command class: 0x%X\n", MMC_CSD_GET_CCC (Csd)));
DEBUG ((EFI_D_ERROR, "\t- Speed: %a %a\n",mStrValue[(MMC_CSD_GET_TRANSPEED (Csd) >> 3) & 0xF],mStrUnit[MMC_CSD_GET_TRANSPEED (Csd) & 7]));
DEBUG ((EFI_D_ERROR, "\t- Maximum Read Data Block: %d\n",2 << (MMC_CSD_GET_READBLLEN (Csd)-1)));
DEBUG ((EFI_D_ERROR, "\t- Maximum Write Data Block: %d\n",2 << (MMC_CSD_GET_WRITEBLLEN (Csd)-1)));
DEBUG ((DEBUG_ERROR, "\t- Supported card command class: 0x%X\n", MMC_CSD_GET_CCC (Csd)));
DEBUG ((DEBUG_ERROR, "\t- Speed: %a %a\n",mStrValue[(MMC_CSD_GET_TRANSPEED (Csd) >> 3) & 0xF],mStrUnit[MMC_CSD_GET_TRANSPEED (Csd) & 7]));
DEBUG ((DEBUG_ERROR, "\t- Maximum Read Data Block: %d\n",2 << (MMC_CSD_GET_READBLLEN (Csd)-1)));
DEBUG ((DEBUG_ERROR, "\t- Maximum Write Data Block: %d\n",2 << (MMC_CSD_GET_WRITEBLLEN (Csd)-1)));
if (!MMC_CSD_GET_FILEFORMATGRP (Csd)) {
Value = MMC_CSD_GET_FILEFORMAT (Csd);
if (Value == 0) {
DEBUG ((EFI_D_ERROR, "\t- Format (0): Hard disk-like file system with partition table\n"));
DEBUG ((DEBUG_ERROR, "\t- Format (0): Hard disk-like file system with partition table\n"));
} else if (Value == 1) {
DEBUG ((EFI_D_ERROR, "\t- Format (1): DOS FAT (floppy-like) with boot sector only (no partition table)\n"));
DEBUG ((DEBUG_ERROR, "\t- Format (1): DOS FAT (floppy-like) with boot sector only (no partition table)\n"));
} else if (Value == 2) {
DEBUG ((EFI_D_ERROR, "\t- Format (2): Universal File Format\n"));
DEBUG ((DEBUG_ERROR, "\t- Format (2): Universal File Format\n"));
} else {
DEBUG ((EFI_D_ERROR, "\t- Format (3): Others/Unknown\n"));
DEBUG ((DEBUG_ERROR, "\t- Format (3): Others/Unknown\n"));
}
} else {
DEBUG ((EFI_D_ERROR, "\t- Format: Reserved\n"));
DEBUG ((DEBUG_ERROR, "\t- Format: Reserved\n"));
}
}
@@ -70,9 +70,9 @@ PrintRCA (
IN UINT32 Rca
)
{
DEBUG ((EFI_D_ERROR, "- PrintRCA: 0x%X\n", Rca));
DEBUG ((EFI_D_ERROR, "\t- Status: 0x%X\n", Rca & 0xFFFF));
DEBUG ((EFI_D_ERROR, "\t- RCA: 0x%X\n", (Rca >> 16) & 0xFFFF));
DEBUG ((DEBUG_ERROR, "- PrintRCA: 0x%X\n", Rca));
DEBUG ((DEBUG_ERROR, "\t- Status: 0x%X\n", Rca & 0xFFFF));
DEBUG ((DEBUG_ERROR, "\t- RCA: 0x%X\n", (Rca >> 16) & 0xFFFF));
}
VOID
@@ -102,18 +102,18 @@ PrintOCR (
Volts++;
}
DEBUG ((EFI_D_ERROR, "- PrintOCR Ocr (0x%X)\n",Ocr));
DEBUG ((EFI_D_ERROR, "\t- Card operating voltage: %d.%d to %d.%d\n", MinV/10, MinV % 10, MaxV/10, MaxV % 10));
DEBUG ((DEBUG_ERROR, "- PrintOCR Ocr (0x%X)\n",Ocr));
DEBUG ((DEBUG_ERROR, "\t- Card operating voltage: %d.%d to %d.%d\n", MinV/10, MinV % 10, MaxV/10, MaxV % 10));
if (((Ocr >> 29) & 3) == 0) {
DEBUG ((EFI_D_ERROR, "\t- AccessMode: Byte Mode\n"));
DEBUG ((DEBUG_ERROR, "\t- AccessMode: Byte Mode\n"));
} else {
DEBUG ((EFI_D_ERROR, "\t- AccessMode: Block Mode (0x%X)\n", ((Ocr >> 29) & 3)));
DEBUG ((DEBUG_ERROR, "\t- AccessMode: Block Mode (0x%X)\n", ((Ocr >> 29) & 3)));
}
if (Ocr & MMC_OCR_POWERUP) {
DEBUG ((EFI_D_ERROR, "\t- PowerUp\n"));
DEBUG ((DEBUG_ERROR, "\t- PowerUp\n"));
} else {
DEBUG ((EFI_D_ERROR, "\t- Voltage Not Supported\n"));
DEBUG ((DEBUG_ERROR, "\t- Voltage Not Supported\n"));
}
}
@@ -122,41 +122,41 @@ PrintResponseR1 (
IN UINT32 Response
)
{
DEBUG ((EFI_D_INFO, "Response: 0x%X\n", Response));
DEBUG ((DEBUG_INFO, "Response: 0x%X\n", Response));
if (Response & MMC_R0_READY_FOR_DATA) {
DEBUG ((EFI_D_INFO, "\t- READY_FOR_DATA\n"));
DEBUG ((DEBUG_INFO, "\t- READY_FOR_DATA\n"));
}
switch ((Response >> 9) & 0xF) {
case 0:
DEBUG ((EFI_D_INFO, "\t- State: Idle\n"));
DEBUG ((DEBUG_INFO, "\t- State: Idle\n"));
break;
case 1:
DEBUG ((EFI_D_INFO, "\t- State: Ready\n"));
DEBUG ((DEBUG_INFO, "\t- State: Ready\n"));
break;
case 2:
DEBUG ((EFI_D_INFO, "\t- State: Ident\n"));
DEBUG ((DEBUG_INFO, "\t- State: Ident\n"));
break;
case 3:
DEBUG ((EFI_D_INFO, "\t- State: StandBy\n"));
DEBUG ((DEBUG_INFO, "\t- State: StandBy\n"));
break;
case 4:
DEBUG ((EFI_D_INFO, "\t- State: Tran\n"));
DEBUG ((DEBUG_INFO, "\t- State: Tran\n"));
break;
case 5:
DEBUG ((EFI_D_INFO, "\t- State: Data\n"));
DEBUG ((DEBUG_INFO, "\t- State: Data\n"));
break;
case 6:
DEBUG ((EFI_D_INFO, "\t- State: Rcv\n"));
DEBUG ((DEBUG_INFO, "\t- State: Rcv\n"));
break;
case 7:
DEBUG ((EFI_D_INFO, "\t- State: Prg\n"));
DEBUG ((DEBUG_INFO, "\t- State: Prg\n"));
break;
case 8:
DEBUG ((EFI_D_INFO, "\t- State: Dis\n"));
DEBUG ((DEBUG_INFO, "\t- State: Dis\n"));
break;
default:
DEBUG ((EFI_D_INFO, "\t- State: Reserved\n"));
DEBUG ((DEBUG_INFO, "\t- State: Reserved\n"));
break;
}
}