Skip to content

Commit

Permalink
Replace deprecated EFI_D_* with DEBUG_*
Browse files Browse the repository at this point in the history
Replaced the deprecated EFI_D_{INFO,WARN,ERROR,VERBOSE} usage with
DEBUG_{INFO,WARN,ERROR,VERBOSE}.

Signed-off-by: Rebecca Cran <[email protected]>
  • Loading branch information
bexcran authored and hrw committed Sep 16, 2024
1 parent 3bbb17a commit d690794
Show file tree
Hide file tree
Showing 237 changed files with 1,477 additions and 1,453 deletions.
8 changes: 4 additions & 4 deletions Drivers/OptionRomPkg/Application/BltLibSample/BltLibSample.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Uint32SqRt (
Mask = Mask >> 1
) {
SqRtMask = SqRt | Mask;
//DEBUG ((EFI_D_INFO, "Uint32=0x%x SqRtMask=0x%x\n", Uint32, SqRtMask));
//DEBUG ((DEBUG_INFO, "Uint32=0x%x SqRtMask=0x%x\n", Uint32, SqRtMask));
Squared = (UINT32) (SqRtMask * SqRtMask);
if (Squared > Uint32) {
continue;
Expand Down Expand Up @@ -196,14 +196,14 @@ TestColor (
10000000
);
if (TriWidth > ScreenWidth) {
DEBUG ((EFI_D_INFO, "TriWidth at %d was too big\n", TriWidth));
DEBUG ((DEBUG_INFO, "TriWidth at %d was too big\n", TriWidth));
TriWidth = ScreenWidth;
} else if (TriHeight > ScreenHeight) {
DEBUG ((EFI_D_INFO, "TriHeight at %d was too big\n", TriHeight));
DEBUG ((DEBUG_INFO, "TriHeight at %d was too big\n", TriHeight));
TriHeight = ScreenHeight;
}

DEBUG ((EFI_D_INFO, "Triangle Width: %d; Height: %d\n", TriWidth, TriHeight));
DEBUG ((DEBUG_INFO, "Triangle Width: %d; Height: %d\n", TriWidth, TriHeight));

X1 = (ScreenWidth - TriWidth) / 2;
X3 = X1 + TriWidth - 1;
Expand Down
16 changes: 8 additions & 8 deletions Drivers/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c
Original file line number Diff line number Diff line change
Expand Up @@ -3215,15 +3215,15 @@ Routine Description:

if (StatusRegister & DWF) {
DEBUG (
(EFI_D_BLKIO,
(DEBUG_BLKIO,
"AtapiPassThruCheckErrorStatus()-- %02x : Error : Write Fault\n",
StatusRegister)
);
}

if (StatusRegister & CORR) {
DEBUG (
(EFI_D_BLKIO,
(DEBUG_BLKIO,
"AtapiPassThruCheckErrorStatus()-- %02x : Error : Corrected Data\n",
StatusRegister)
);
Expand All @@ -3235,47 +3235,47 @@ Routine Description:

if (ErrorRegister & BBK_ERR) {
DEBUG (
(EFI_D_BLKIO,
(DEBUG_BLKIO,
"AtapiPassThruCheckErrorStatus()-- %02x : Error : Bad Block Detected\n",
ErrorRegister)
);
}

if (ErrorRegister & UNC_ERR) {
DEBUG (
(EFI_D_BLKIO,
(DEBUG_BLKIO,
"AtapiPassThruCheckErrorStatus()-- %02x : Error : Uncorrectable Data\n",
ErrorRegister)
);
}

if (ErrorRegister & MC_ERR) {
DEBUG (
(EFI_D_BLKIO,
(DEBUG_BLKIO,
"AtapiPassThruCheckErrorStatus()-- %02x : Error : Media Change\n",
ErrorRegister)
);
}

if (ErrorRegister & ABRT_ERR) {
DEBUG (
(EFI_D_BLKIO,
(DEBUG_BLKIO,
"AtapiPassThruCheckErrorStatus()-- %02x : Error : Abort\n",
ErrorRegister)
);
}

if (ErrorRegister & TK0NF_ERR) {
DEBUG (
(EFI_D_BLKIO,
(DEBUG_BLKIO,
"AtapiPassThruCheckErrorStatus()-- %02x : Error : Track 0 Not Found\n",
ErrorRegister)
);
}

if (ErrorRegister & AMNF_ERR) {
DEBUG (
(EFI_D_BLKIO,
(DEBUG_BLKIO,
"AtapiPassThruCheckErrorStatus()-- %02x : Error : Address Mark Not Found\n",
ErrorRegister)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ ConfigurePixelBitMaskFormat (
mPixelShr[Loop] = 0;
}
MergedMasks = (UINT32) (MergedMasks | Masks[Loop]);
DEBUG ((EFI_D_INFO, "%d: shl:%d shr:%d mask:%x\n", Loop, mPixelShl[Loop], mPixelShr[Loop], Masks[Loop]));
DEBUG ((DEBUG_INFO, "%d: shl:%d shr:%d mask:%x\n", Loop, mPixelShl[Loop], mPixelShr[Loop], Masks[Loop]));
}
MergedMasks = (UINT32) (MergedMasks | Masks[3]);

ASSERT (MergedMasks != 0);
mBltLibBytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8);

DEBUG ((EFI_D_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel));
DEBUG ((DEBUG_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel));

CopyMem (&mPixelBitMasks, BitMask, sizeof (*BitMask));
}
Expand Down Expand Up @@ -245,17 +245,17 @@ BltLibVideoFill (
// BltBuffer to Video: Source is BltBuffer, destination is Video
//
if (DestinationY + Height > mBltLibHeight) {
DEBUG ((EFI_D_INFO, "VideoFill: Past screen (Y)\n"));
DEBUG ((DEBUG_INFO, "VideoFill: Past screen (Y)\n"));
return EFI_INVALID_PARAMETER;
}

if (DestinationX + Width > mBltLibWidthInPixels) {
DEBUG ((EFI_D_INFO, "VideoFill: Past screen (X)\n"));
DEBUG ((DEBUG_INFO, "VideoFill: Past screen (X)\n"));
return EFI_INVALID_PARAMETER;
}

if (Width == 0 || Height == 0) {
DEBUG ((EFI_D_INFO, "VideoFill: Width or Height is 0\n"));
DEBUG ((DEBUG_INFO, "VideoFill: Width or Height is 0\n"));
return EFI_INVALID_PARAMETER;
}

Expand All @@ -268,7 +268,7 @@ BltLibVideoFill (
(((Uint32 << mPixelShl[1]) >> mPixelShr[1]) & mPixelBitMasks.GreenMask) |
(((Uint32 << mPixelShl[2]) >> mPixelShr[2]) & mPixelBitMasks.BlueMask)
);
VDEBUG ((EFI_D_INFO, "VideoFill: color=0x%x, wide-fill=0x%x\n", Uint32, WideFill));
VDEBUG ((DEBUG_INFO, "VideoFill: color=0x%x, wide-fill=0x%x\n", Uint32, WideFill));

//
// If the size of the pixel data evenly divides the sizeof
Expand Down Expand Up @@ -299,7 +299,7 @@ BltLibVideoFill (
}

if (UseWideFill && (DestinationX == 0) && (Width == mBltLibWidthInPixels)) {
VDEBUG ((EFI_D_INFO, "VideoFill (wide, one-shot)\n"));
VDEBUG ((DEBUG_INFO, "VideoFill (wide, one-shot)\n"));
Offset = DestinationY * mBltLibWidthInPixels;
Offset = mBltLibBytesPerPixel * Offset;
BltMemDst = (VOID*) (mBltLibFrameBuffer + Offset);
Expand All @@ -319,7 +319,7 @@ BltLibVideoFill (
BltMemDst = (VOID*) (mBltLibFrameBuffer + Offset);

if (UseWideFill && (((UINTN) BltMemDst & 7) == 0)) {
VDEBUG ((EFI_D_INFO, "VideoFill (wide)\n"));
VDEBUG ((DEBUG_INFO, "VideoFill (wide)\n"));
SizeInBytes = WidthInBytes;
if (SizeInBytes >= 8) {
SetMem64 (BltMemDst, SizeInBytes & ~7, WideFill);
Expand All @@ -329,7 +329,7 @@ BltLibVideoFill (
CopyMem (BltMemDst, (VOID*) &WideFill, SizeInBytes);
}
} else {
VDEBUG ((EFI_D_INFO, "VideoFill (not wide)\n"));
VDEBUG ((DEBUG_INFO, "VideoFill (not wide)\n"));
if (!LineBufferReady) {
CopyMem (mBltLibLineBuffer, &WideFill, mBltLibBytesPerPixel);
for (X = 1; X < Width; ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PostCodeStatusCodeReportWorker (

PostCodeValue = GetPostCodeFromStatusCode (CodeType, Value);
if (PostCodeValue != 0) {
DEBUG ((EFI_D_INFO, "POSTCODE=<%02x>\n", PostCodeValue));
DEBUG ((DEBUG_INFO, "POSTCODE=<%02x>\n", PostCodeValue));
PostCode (PostCodeValue);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PostCodeStatusCodeReportWorker (

PostCodeValue = GetPostCodeFromStatusCode (CodeType, Value);
if (PostCodeValue != 0) {
DEBUG ((EFI_D_INFO, "POSTCODE=<%02x>\n", PostCodeValue));
DEBUG ((DEBUG_INFO, "POSTCODE=<%02x>\n", PostCodeValue));
PostCode (PostCodeValue);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PostCodeStatusCodeReportWorker (

PostCodeValue = GetPostCodeFromStatusCode (CodeType, Value);
if (PostCodeValue != 0) {
DEBUG ((EFI_D_INFO, "POSTCODE=<%02x>\n", PostCodeValue));
DEBUG ((DEBUG_INFO, "POSTCODE=<%02x>\n", PostCodeValue));
PostCode (PostCodeValue);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ Routine Description:
&DataSize
);
if (Status == EFI_SUCCESS) {
DEBUG ((EFI_D_INFO, "IPMI: SendCommand success!\n"));
DEBUG ((DEBUG_INFO, "IPMI: SendCommand success!\n"));
break;
} else {
//
// Display message and retry.
//
DEBUG (
(DEBUG_WARN | EFI_D_INFO,
(DEBUG_WARN | DEBUG_INFO,
"IPMI: Waiting for BMC (KCS 0x%x)...\n",
IpmiInstance->IpmiIoBase)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ SmmAccessPeiEntryPoint (
ASSERT_EFI_ERROR (Status);

DEBUG (
(EFI_D_INFO, "SMM Base:Size %08X:%08X\n",
(DEBUG_INFO, "SMM Base:Size %08X:%08X\n",
(UINTN)(SmmAccessPrivate->SmramDesc[SmmAccessPrivate->NumberRegions-1].PhysicalStart),
(UINTN)(SmmAccessPrivate->SmramDesc[SmmAccessPrivate->NumberRegions-1].PhysicalSize)
));
Expand Down
2 changes: 1 addition & 1 deletion Platform/ARM/Drivers/BootMonFs/BootMonFsEntryPoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ BootMonFsEntryPoint (
);
ASSERT_EFI_ERROR (Status);
} else {
DEBUG((EFI_D_ERROR,"Warning: No Device Paths supporting BootMonFs have been defined in the PCD.\n"));
DEBUG((DEBUG_ERROR,"Warning: No Device Paths supporting BootMonFs have been defined in the PCD.\n"));
}

return Status;
Expand Down
2 changes: 1 addition & 1 deletion Platform/ARM/Drivers/BootMonFs/BootMonFsImages.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ BootMonFsDiscoverNextImage (

// If we found a valid image description...
if (BootMonFsIsImageValid (&File->HwDescription, (CurrentLba - Instance->Media->LowestAlignedLba))) {
DEBUG ((EFI_D_ERROR, "Found image: %a in block %d.\n",
DEBUG ((DEBUG_ERROR, "Found image: %a in block %d.\n",
&(File->HwDescription.Footer.Filename),
(UINTN)(CurrentLba - Instance->Media->LowestAlignedLba)
));
Expand Down
18 changes: 9 additions & 9 deletions Platform/ARM/Drivers/FdtPlatformDxe/FdtPlatform.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ InstallFdt (
(VOID **)&EfiDevicePathFromTextProtocol
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "InstallFdt() - Failed to locate EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL protocol\n"));
DEBUG ((DEBUG_ERROR, "InstallFdt() - Failed to locate EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL protocol\n"));
return Status;
}

Expand All @@ -94,7 +94,7 @@ InstallFdt (
//
if (fdt_check_header ((VOID*)(UINTN)FdtBlobBase) != 0 ||
(UINTN)fdt_totalsize ((VOID*)(UINTN)FdtBlobBase) > FdtBlobSize) {
DEBUG ((EFI_D_ERROR, "InstallFdt() - loaded FDT binary image seems corrupt\n"));
DEBUG ((DEBUG_ERROR, "InstallFdt() - loaded FDT binary image seems corrupt\n"));
Status = EFI_LOAD_ERROR;
goto Error;
}
Expand Down Expand Up @@ -210,7 +210,7 @@ FdtPlatformEntryPoint (
}
if (EFI_ERROR (Status)) {
DEBUG ((
EFI_D_WARN,
DEBUG_WARN,
"Unable to install \"setfdt\" EFI Shell command - %r \n",
Status
));
Expand All @@ -236,7 +236,7 @@ FdtPlatformEntryPoint (
}
if (EFI_ERROR (Status)) {
DEBUG ((
EFI_D_WARN,
DEBUG_WARN,
"Unable to install \"dumpfdt\" EFI Shell command - %r \n",
Status
));
Expand Down Expand Up @@ -322,14 +322,14 @@ RunFdtInstallation (
Status = InstallFdt (TextDevicePath);
if (!EFI_ERROR (Status)) {
DEBUG ((
EFI_D_WARN,
DEBUG_WARN,
"Installation of the FDT using the device path <%s> completed.\n",
TextDevicePath
));
goto Done;
}
DEBUG ((
EFI_D_ERROR,
DEBUG_ERROR,
"Installation of the FDT specified by the \"Fdt\" UEFI variable failed - %r\n",
Status
));
Expand Down Expand Up @@ -368,13 +368,13 @@ RunFdtInstallation (

Status = InstallFdt (TextDevicePath);
if (!EFI_ERROR (Status)) {
DEBUG ((EFI_D_WARN, "Installation of the FDT using the device path <%s> completed.\n",
DEBUG ((DEBUG_WARN, "Installation of the FDT using the device path <%s> completed.\n",
TextDevicePath
));
goto Done;
}

DEBUG ((EFI_D_WARN, "Installation of the FDT using the device path <%s> failed - %r.\n",
DEBUG ((DEBUG_WARN, "Installation of the FDT using the device path <%s> failed - %r.\n",
TextDevicePath, Status
));
FreePool (TextDevicePath);
Expand All @@ -389,7 +389,7 @@ RunFdtInstallation (
Done:

if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Failed to install the FDT - %r.\n", Status));
DEBUG ((DEBUG_ERROR, "Failed to install the FDT - %r.\n", Status));
return Status;
}

Expand Down
2 changes: 1 addition & 1 deletion Platform/ARM/Drivers/FdtPlatformDxe/ShellDumpFdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ DumpFdt (
for (i = 0; i < num; i++) {
err = fdt_get_mem_rsv (FdtBlob, i, &addr, &size);
if (err) {
DEBUG ((EFI_D_ERROR, "Error (%d) : Cannot get memreserve section (%d)\n", err, i));
DEBUG ((DEBUG_ERROR, "Error (%d) : Cannot get memreserve section (%d)\n", err, i));
}
else {
Print (L"/memreserve/ \t0x%lx \t0x%lx;\n", addr, size);
Expand Down
4 changes: 2 additions & 2 deletions Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ ArmJunoEntryPoint (
// Install dynamic Shell command to run baremetal binaries.
Status = ShellDynCmdRunAxfInstall (ImageHandle);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "ArmJunoDxe: Failed to install ShellDynCmdRunAxf\n"));
DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to install ShellDynCmdRunAxf\n"));
}

GetJunoRevision(JunoRevision);
Expand Down Expand Up @@ -440,7 +440,7 @@ ArmJunoEntryPoint (

if (EFI_ERROR (Status)) {
DEBUG (
(EFI_D_ERROR,
(DEBUG_ERROR,
"ArmJunoDxe: Setting of FDT device path in PcdFdtDevicePaths failed - %r\n", Status)
);
return Status;
Expand Down
2 changes: 1 addition & 1 deletion Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ SataSiI3132DriverBindingStart (
);
}
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "SataSiI3132DriverBindingStart: failed to enable controller\n"));
DEBUG ((DEBUG_ERROR, "SataSiI3132DriverBindingStart: failed to enable controller\n"));
goto CLOSE_PCIIO;
}

Expand Down
2 changes: 1 addition & 1 deletion Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ typedef struct _SATA_SI3132_INSTANCE {
#define SATA_PORT_READ32(Offset, Value) PciIo->Mem.Read (PciIo, EfiPciIoWidthUint32, 1, Offset, 1, Value)
#define SATA_PORT_WRITE32(Offset, Value) { UINT32 Value32 = Value; PciIo->Mem.Write (PciIo, EfiPciIoWidthUint32, 1, Offset, 1, &Value32); }

#define SATA_TRACE(txt) DEBUG((EFI_D_VERBOSE, "ARM_SATA: " txt "\n"))
#define SATA_TRACE(txt) DEBUG((DEBUG_VERBOSE, "ARM_SATA: " txt "\n"))

extern EFI_COMPONENT_NAME_PROTOCOL gSataSiI3132ComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gSataSiI3132ComponentName2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ SiI3132AtaPassThruCommand (


if ((Packet->Timeout != 0) && (Timeout == 0)) {
DEBUG ((EFI_D_ERROR, "SiI3132AtaPassThru() Err:Timeout\n"));
DEBUG ((DEBUG_ERROR, "SiI3132AtaPassThru() Err:Timeout\n"));
//ASSERT (0);
return EFI_TIMEOUT;
} else if (Value32 & (SII3132_PORT_INT_CMDERR << 16)) {
SATA_PORT_READ32 (SataPort->RegBase + SII3132_PORT_CMDERROR_REG, &Error);
DEBUG ((EFI_D_ERROR, "SiI3132AtaPassThru() CmdErr:0x%X (SiI3132 Err:0x%X)\n", Value32, Error));
DEBUG ((DEBUG_ERROR, "SiI3132AtaPassThru() CmdErr:0x%X (SiI3132 Err:0x%X)\n", Value32, Error));
ASSERT (0);
return EFI_DEVICE_ERROR;
} else if (Value32 & (SII3132_PORT_INT_CMDCOMPL << 16)) {
Expand Down Expand Up @@ -343,7 +343,7 @@ SiI3132AtaPassThru (
}
SataPort = SataDevice->Port;

DEBUG ((EFI_D_INFO, "SiI3132AtaPassThru(%d,%d) : AtaCmd:0x%X Prot:%d\n", Port, PortMultiplierPort,
DEBUG ((DEBUG_INFO, "SiI3132AtaPassThru(%d,%d) : AtaCmd:0x%X Prot:%d\n", Port, PortMultiplierPort,
Packet->Acb->AtaCommand, Packet->Protocol));

return SiI3132AtaPassThruCommand (SataSiI3132Instance, SataPort, PortMultiplierPort, Packet, Event);
Expand Down
Loading

0 comments on commit d690794

Please sign in to comment.