summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2021-11-16 19:21:31 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit5f289f3ae3e9fbe6ff5b82d0e25e87bfb7899766 (patch)
tree61fc1ff6c5de5d9728fe902331a81369d8a45627 /MdePkg
parent87000d77082339be464d07855d9fc194c6b4e8a6 (diff)
downloadedk2-5f289f3ae3e9fbe6ff5b82d0e25e87bfb7899766.tar.gz
edk2-5f289f3ae3e9fbe6ff5b82d0e25e87bfb7899766.tar.bz2
edk2-5f289f3ae3e9fbe6ff5b82d0e25e87bfb7899766.zip
MdePkg: 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: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Library/DebugLib.h2
-rw-r--r--MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c3
-rw-r--r--MdePkg/Library/BasePostCodeLibDebug/PostCode.c4
-rw-r--r--MdePkg/Library/DxeHstiLib/HstiDxe.c22
-rw-r--r--MdePkg/Library/SmmMemLib/SmmMemLib.c24
-rw-r--r--MdePkg/Library/UefiLib/UefiNotTiano.c5
6 files changed, 29 insertions, 31 deletions
diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h
index 7fb75f956c..056ceb63ad 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -448,7 +448,7 @@ UnitTestDebugAssert (
do { \
if (DebugAssertEnabled ()) { \
if (EFI_ERROR (StatusParameter)) { \
- DEBUG ((EFI_D_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", StatusParameter)); \
+ DEBUG ((DEBUG_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", StatusParameter)); \
_ASSERT (!EFI_ERROR (StatusParameter)); \
} \
} \
diff --git a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
index 7e868db895..a851a448d6 100644
--- a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
@@ -235,10 +235,9 @@ PeHotRelocateImageEx (
ASSERT (FALSE);
// break omitted - ARM instruction encoding not implemented
default:
- DEBUG ((EFI_D_ERROR, "PeHotRelocateEx:unknown fixed type\n"));
+ DEBUG ((DEBUG_ERROR, "PeHotRelocateEx:unknown fixed type\n"));
return RETURN_UNSUPPORTED;
}
return RETURN_SUCCESS;
}
-
diff --git a/MdePkg/Library/BasePostCodeLibDebug/PostCode.c b/MdePkg/Library/BasePostCodeLibDebug/PostCode.c
index b9254fa332..1bb4ed5e93 100644
--- a/MdePkg/Library/BasePostCodeLibDebug/PostCode.c
+++ b/MdePkg/Library/BasePostCodeLibDebug/PostCode.c
@@ -36,7 +36,7 @@ PostCode (
IN UINT32 Value
)
{
- DEBUG((EFI_D_INFO, "POST %08x\n", Value));
+ DEBUG((DEBUG_INFO, "POST %08x\n", Value));
return Value;
}
@@ -72,7 +72,7 @@ PostCodeWithDescription (
IN CONST CHAR8 *Description OPTIONAL
)
{
- DEBUG((EFI_D_INFO, "POST %08x - %s\n", Value, Description));
+ DEBUG((DEBUG_INFO, "POST %08x - %s\n", Value, Description));
return Value;
}
diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c
index 4e1c67616b..262413266c 100644
--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
+++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
@@ -161,15 +161,15 @@ InternalHstiIsValidTable (
// basic check for header
//
if (HstiData == NULL) {
- DEBUG ((EFI_D_ERROR, "HstiData == NULL\n"));
+ DEBUG ((DEBUG_ERROR, "HstiData == NULL\n"));
return FALSE;
}
if (HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) {
- DEBUG ((EFI_D_ERROR, "HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)\n"));
+ DEBUG ((DEBUG_ERROR, "HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)\n"));
return FALSE;
}
if (((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < Hsti->SecurityFeaturesSize) {
- DEBUG ((EFI_D_ERROR, "((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < SecurityFeaturesSize\n"));
+ DEBUG ((DEBUG_ERROR, "((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < SecurityFeaturesSize\n"));
return FALSE;
}
@@ -177,7 +177,7 @@ InternalHstiIsValidTable (
// Check Version
//
if (Hsti->Version != PLATFORM_SECURITY_VERSION_VNEXTCS) {
- DEBUG ((EFI_D_ERROR, "Version != PLATFORM_SECURITY_VERSION_VNEXTCS\n"));
+ DEBUG ((DEBUG_ERROR, "Version != PLATFORM_SECURITY_VERSION_VNEXTCS\n"));
return FALSE;
}
@@ -186,8 +186,8 @@ InternalHstiIsValidTable (
//
if ((Hsti->Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE) ||
(Hsti->Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM)) {
- DEBUG ((EFI_D_ERROR, "Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE ||\n"));
- DEBUG ((EFI_D_ERROR, "Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM\n"));
+ DEBUG ((DEBUG_ERROR, "Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE ||\n"));
+ DEBUG ((DEBUG_ERROR, "Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM\n"));
return FALSE;
}
@@ -200,7 +200,7 @@ InternalHstiIsValidTable (
}
}
if (Index == sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0])) {
- DEBUG ((EFI_D_ERROR, "ImplementationID has no NUL CHAR\n"));
+ DEBUG ((DEBUG_ERROR, "ImplementationID has no NUL CHAR\n"));
return FALSE;
}
@@ -211,11 +211,11 @@ InternalHstiIsValidTable (
// basic check for ErrorString
//
if (ErrorStringSize == 0) {
- DEBUG ((EFI_D_ERROR, "ErrorStringSize == 0\n"));
+ DEBUG ((DEBUG_ERROR, "ErrorStringSize == 0\n"));
return FALSE;
}
if ((ErrorStringSize & BIT0) != 0) {
- DEBUG ((EFI_D_ERROR, "(ErrorStringSize & BIT0) != 0\n"));
+ DEBUG ((DEBUG_ERROR, "(ErrorStringSize & BIT0) != 0\n"));
return FALSE;
}
@@ -232,11 +232,11 @@ InternalHstiIsValidTable (
// check the length of ErrorString
//
if (ErrorChar != 0) {
- DEBUG ((EFI_D_ERROR, "ErrorString has no NUL CHAR\n"));
+ DEBUG ((DEBUG_ERROR, "ErrorString has no NUL CHAR\n"));
return FALSE;
}
if (ErrorStringLength == (ErrorStringSize/2)) {
- DEBUG ((EFI_D_ERROR, "ErrorString Length incorrect\n"));
+ DEBUG ((DEBUG_ERROR, "ErrorString Length incorrect\n"));
return FALSE;
}
diff --git a/MdePkg/Library/SmmMemLib/SmmMemLib.c b/MdePkg/Library/SmmMemLib/SmmMemLib.c
index 63a4ff7a97..d1fc9e3e46 100644
--- a/MdePkg/Library/SmmMemLib/SmmMemLib.c
+++ b/MdePkg/Library/SmmMemLib/SmmMemLib.c
@@ -97,7 +97,7 @@ SmmMemLibInternalCalculateMaximumSupportAddress (
// Save the maximum support address in one global variable
//
mSmmMemLibInternalMaximumSupportAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)(LShiftU64 (1, PhysicalAddressBits) - 1);
- DEBUG ((EFI_D_INFO, "mSmmMemLibInternalMaximumSupportAddress = 0x%lx\n", mSmmMemLibInternalMaximumSupportAddress));
+ DEBUG ((DEBUG_INFO, "mSmmMemLibInternalMaximumSupportAddress = 0x%lx\n", mSmmMemLibInternalMaximumSupportAddress));
}
/**
@@ -129,7 +129,7 @@ SmmIsBufferOutsideSmmValid (
// Overflow happen
//
DEBUG ((
- EFI_D_ERROR,
+ DEBUG_ERROR,
"SmmIsBufferOutsideSmmValid: Overflow: Buffer (0x%lx) - Length (0x%lx), MaximumSupportAddress (0x%lx)\n",
Buffer,
Length,
@@ -142,13 +142,13 @@ SmmIsBufferOutsideSmmValid (
if (((Buffer >= mSmmMemLibInternalSmramRanges[Index].CpuStart) && (Buffer < mSmmMemLibInternalSmramRanges[Index].CpuStart + mSmmMemLibInternalSmramRanges[Index].PhysicalSize)) ||
((mSmmMemLibInternalSmramRanges[Index].CpuStart >= Buffer) && (mSmmMemLibInternalSmramRanges[Index].CpuStart < Buffer + Length))) {
DEBUG ((
- EFI_D_ERROR,
+ DEBUG_ERROR,
"SmmIsBufferOutsideSmmValid: Overlap: Buffer (0x%lx) - Length (0x%lx), ",
Buffer,
Length
));
DEBUG ((
- EFI_D_ERROR,
+ DEBUG_ERROR,
"CpuStart (0x%lx) - PhysicalSize (0x%lx)\n",
mSmmMemLibInternalSmramRanges[Index].CpuStart,
mSmmMemLibInternalSmramRanges[Index].PhysicalSize
@@ -176,7 +176,7 @@ SmmIsBufferOutsideSmmValid (
if (!InValidCommunicationRegion) {
DEBUG ((
- EFI_D_ERROR,
+ DEBUG_ERROR,
"SmmIsBufferOutsideSmmValid: Not in ValidCommunicationRegion: Buffer (0x%lx) - Length (0x%lx)\n",
Buffer,
Length
@@ -191,7 +191,7 @@ SmmIsBufferOutsideSmmValid (
if (((Buffer >= mSmmMemLibGcdMemSpace[Index].BaseAddress) && (Buffer < mSmmMemLibGcdMemSpace[Index].BaseAddress + mSmmMemLibGcdMemSpace[Index].Length)) ||
((mSmmMemLibGcdMemSpace[Index].BaseAddress >= Buffer) && (mSmmMemLibGcdMemSpace[Index].BaseAddress < Buffer + Length))) {
DEBUG ((
- EFI_D_ERROR,
+ DEBUG_ERROR,
"SmmIsBufferOutsideSmmValid: In Untested Memory Region: Buffer (0x%lx) - Length (0x%lx)\n",
Buffer,
Length
@@ -213,7 +213,7 @@ SmmIsBufferOutsideSmmValid (
if (((Buffer >= Entry->PhysicalStart) && (Buffer < Entry->PhysicalStart + LShiftU64 (Entry->NumberOfPages, EFI_PAGE_SHIFT))) ||
((Entry->PhysicalStart >= Buffer) && (Entry->PhysicalStart < Buffer + Length))) {
DEBUG ((
- EFI_D_ERROR,
+ DEBUG_ERROR,
"SmmIsBufferOutsideSmmValid: In RuntimeCode Region: Buffer (0x%lx) - Length (0x%lx)\n",
Buffer,
Length
@@ -255,7 +255,7 @@ SmmCopyMemToSmram (
)
{
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) {
- DEBUG ((EFI_D_ERROR, "SmmCopyMemToSmram: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));
+ DEBUG ((DEBUG_ERROR, "SmmCopyMemToSmram: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));
return EFI_SECURITY_VIOLATION;
}
CopyMem (DestinationBuffer, SourceBuffer, Length);
@@ -288,7 +288,7 @@ SmmCopyMemFromSmram (
)
{
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationBuffer, Length)) {
- DEBUG ((EFI_D_ERROR, "SmmCopyMemFromSmram: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));
+ DEBUG ((DEBUG_ERROR, "SmmCopyMemFromSmram: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));
return EFI_SECURITY_VIOLATION;
}
CopyMem (DestinationBuffer, SourceBuffer, Length);
@@ -322,11 +322,11 @@ SmmCopyMem (
)
{
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationBuffer, Length)) {
- DEBUG ((EFI_D_ERROR, "SmmCopyMem: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));
+ DEBUG ((DEBUG_ERROR, "SmmCopyMem: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));
return EFI_SECURITY_VIOLATION;
}
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) {
- DEBUG ((EFI_D_ERROR, "SmmCopyMem: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));
+ DEBUG ((DEBUG_ERROR, "SmmCopyMem: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));
return EFI_SECURITY_VIOLATION;
}
CopyMem (DestinationBuffer, SourceBuffer, Length);
@@ -358,7 +358,7 @@ SmmSetMem (
)
{
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Length)) {
- DEBUG ((EFI_D_ERROR, "SmmSetMem: Security Violation: Source (0x%x), Length (0x%x)\n", Buffer, Length));
+ DEBUG ((DEBUG_ERROR, "SmmSetMem: Security Violation: Source (0x%x), Length (0x%x)\n", Buffer, Length));
return EFI_SECURITY_VIOLATION;
}
SetMem (Buffer, Length, Value);
diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c
index 5e32f4abf4..c614b1ea1a 100644
--- a/MdePkg/Library/UefiLib/UefiNotTiano.c
+++ b/MdePkg/Library/UefiLib/UefiNotTiano.c
@@ -80,7 +80,7 @@ EfiCreateEventLegacyBootEx (
ASSERT (LegacyBootEvent != NULL);
if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {
- DEBUG ((EFI_D_ERROR, "EFI1.1 can't support LegacyBootEvent!"));
+ DEBUG ((DEBUG_ERROR, "EFI1.1 can't support LegacyBootEvent!"));
ASSERT (FALSE);
return EFI_UNSUPPORTED;
@@ -175,7 +175,7 @@ EfiCreateEventReadyToBootEx (
ASSERT (ReadyToBootEvent != NULL);
if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {
- DEBUG ((EFI_D_ERROR, "EFI1.1 can't support ReadyToBootEvent!"));
+ DEBUG ((DEBUG_ERROR, "EFI1.1 can't support ReadyToBootEvent!"));
ASSERT (FALSE);
return EFI_UNSUPPORTED;
@@ -327,4 +327,3 @@ EfiInitializeFwVolDevicepathNode (
CopyGuid (&FvDevicePathNode->FvFileName, NameGuid);
}
-