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>
do { \\r
if (DebugAssertEnabled ()) { \\r
if (EFI_ERROR (StatusParameter)) { \\r
do { \\r
if (DebugAssertEnabled ()) { \\r
if (EFI_ERROR (StatusParameter)) { \\r
- DEBUG ((EFI_D_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", StatusParameter)); \\r
+ DEBUG ((DEBUG_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", StatusParameter)); \\r
_ASSERT (!EFI_ERROR (StatusParameter)); \\r
} \\r
} \\r
_ASSERT (!EFI_ERROR (StatusParameter)); \\r
} \\r
} \\r
ASSERT (FALSE);\r
// break omitted - ARM instruction encoding not implemented\r
default:\r
ASSERT (FALSE);\r
// break omitted - ARM instruction encoding not implemented\r
default:\r
- DEBUG ((EFI_D_ERROR, "PeHotRelocateEx:unknown fixed type\n"));\r
+ DEBUG ((DEBUG_ERROR, "PeHotRelocateEx:unknown fixed type\n"));\r
return RETURN_UNSUPPORTED;\r
}\r
\r
return RETURN_SUCCESS;\r
}\r
return RETURN_UNSUPPORTED;\r
}\r
\r
return RETURN_SUCCESS;\r
}\r
IN UINT32 Value\r
)\r
{\r
IN UINT32 Value\r
)\r
{\r
- DEBUG((EFI_D_INFO, "POST %08x\n", Value));\r
+ DEBUG((DEBUG_INFO, "POST %08x\n", Value));\r
IN CONST CHAR8 *Description OPTIONAL\r
)\r
{\r
IN CONST CHAR8 *Description OPTIONAL\r
)\r
{\r
- DEBUG((EFI_D_INFO, "POST %08x - %s\n", Value, Description));\r
+ DEBUG((DEBUG_INFO, "POST %08x - %s\n", Value, Description));\r
// basic check for header\r
//\r
if (HstiData == NULL) {\r
// basic check for header\r
//\r
if (HstiData == NULL) {\r
- DEBUG ((EFI_D_ERROR, "HstiData == NULL\n"));\r
+ DEBUG ((DEBUG_ERROR, "HstiData == NULL\n"));\r
return FALSE;\r
}\r
if (HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) {\r
return FALSE;\r
}\r
if (HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) {\r
- DEBUG ((EFI_D_ERROR, "HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)\n"));\r
+ DEBUG ((DEBUG_ERROR, "HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)\n"));\r
return FALSE;\r
}\r
if (((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < Hsti->SecurityFeaturesSize) {\r
return FALSE;\r
}\r
if (((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < Hsti->SecurityFeaturesSize) {\r
- DEBUG ((EFI_D_ERROR, "((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < SecurityFeaturesSize\n"));\r
+ DEBUG ((DEBUG_ERROR, "((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < SecurityFeaturesSize\n"));\r
// Check Version\r
//\r
if (Hsti->Version != PLATFORM_SECURITY_VERSION_VNEXTCS) {\r
// Check Version\r
//\r
if (Hsti->Version != PLATFORM_SECURITY_VERSION_VNEXTCS) {\r
- DEBUG ((EFI_D_ERROR, "Version != PLATFORM_SECURITY_VERSION_VNEXTCS\n"));\r
+ DEBUG ((DEBUG_ERROR, "Version != PLATFORM_SECURITY_VERSION_VNEXTCS\n"));\r
//\r
if ((Hsti->Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE) ||\r
(Hsti->Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM)) {\r
//\r
if ((Hsti->Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE) ||\r
(Hsti->Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM)) {\r
- DEBUG ((EFI_D_ERROR, "Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE ||\n"));\r
- DEBUG ((EFI_D_ERROR, "Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM\n"));\r
+ DEBUG ((DEBUG_ERROR, "Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE ||\n"));\r
+ DEBUG ((DEBUG_ERROR, "Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM\n"));\r
}\r
}\r
if (Index == sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0])) {\r
}\r
}\r
if (Index == sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0])) {\r
- DEBUG ((EFI_D_ERROR, "ImplementationID has no NUL CHAR\n"));\r
+ DEBUG ((DEBUG_ERROR, "ImplementationID has no NUL CHAR\n"));\r
// basic check for ErrorString\r
//\r
if (ErrorStringSize == 0) {\r
// basic check for ErrorString\r
//\r
if (ErrorStringSize == 0) {\r
- DEBUG ((EFI_D_ERROR, "ErrorStringSize == 0\n"));\r
+ DEBUG ((DEBUG_ERROR, "ErrorStringSize == 0\n"));\r
return FALSE;\r
}\r
if ((ErrorStringSize & BIT0) != 0) {\r
return FALSE;\r
}\r
if ((ErrorStringSize & BIT0) != 0) {\r
- DEBUG ((EFI_D_ERROR, "(ErrorStringSize & BIT0) != 0\n"));\r
+ DEBUG ((DEBUG_ERROR, "(ErrorStringSize & BIT0) != 0\n"));\r
// check the length of ErrorString\r
//\r
if (ErrorChar != 0) {\r
// check the length of ErrorString\r
//\r
if (ErrorChar != 0) {\r
- DEBUG ((EFI_D_ERROR, "ErrorString has no NUL CHAR\n"));\r
+ DEBUG ((DEBUG_ERROR, "ErrorString has no NUL CHAR\n"));\r
return FALSE;\r
}\r
if (ErrorStringLength == (ErrorStringSize/2)) {\r
return FALSE;\r
}\r
if (ErrorStringLength == (ErrorStringSize/2)) {\r
- DEBUG ((EFI_D_ERROR, "ErrorString Length incorrect\n"));\r
+ DEBUG ((DEBUG_ERROR, "ErrorString Length incorrect\n"));\r
// Save the maximum support address in one global variable\r
//\r
mSmmMemLibInternalMaximumSupportAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)(LShiftU64 (1, PhysicalAddressBits) - 1);\r
// Save the maximum support address in one global variable\r
//\r
mSmmMemLibInternalMaximumSupportAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)(LShiftU64 (1, PhysicalAddressBits) - 1);\r
- DEBUG ((EFI_D_INFO, "mSmmMemLibInternalMaximumSupportAddress = 0x%lx\n", mSmmMemLibInternalMaximumSupportAddress));\r
+ DEBUG ((DEBUG_INFO, "mSmmMemLibInternalMaximumSupportAddress = 0x%lx\n", mSmmMemLibInternalMaximumSupportAddress));\r
// Overflow happen\r
//\r
DEBUG ((\r
// Overflow happen\r
//\r
DEBUG ((\r
"SmmIsBufferOutsideSmmValid: Overflow: Buffer (0x%lx) - Length (0x%lx), MaximumSupportAddress (0x%lx)\n",\r
Buffer,\r
Length,\r
"SmmIsBufferOutsideSmmValid: Overflow: Buffer (0x%lx) - Length (0x%lx), MaximumSupportAddress (0x%lx)\n",\r
Buffer,\r
Length,\r
if (((Buffer >= mSmmMemLibInternalSmramRanges[Index].CpuStart) && (Buffer < mSmmMemLibInternalSmramRanges[Index].CpuStart + mSmmMemLibInternalSmramRanges[Index].PhysicalSize)) ||\r
((mSmmMemLibInternalSmramRanges[Index].CpuStart >= Buffer) && (mSmmMemLibInternalSmramRanges[Index].CpuStart < Buffer + Length))) {\r
DEBUG ((\r
if (((Buffer >= mSmmMemLibInternalSmramRanges[Index].CpuStart) && (Buffer < mSmmMemLibInternalSmramRanges[Index].CpuStart + mSmmMemLibInternalSmramRanges[Index].PhysicalSize)) ||\r
((mSmmMemLibInternalSmramRanges[Index].CpuStart >= Buffer) && (mSmmMemLibInternalSmramRanges[Index].CpuStart < Buffer + Length))) {\r
DEBUG ((\r
"SmmIsBufferOutsideSmmValid: Overlap: Buffer (0x%lx) - Length (0x%lx), ",\r
Buffer,\r
Length\r
));\r
DEBUG ((\r
"SmmIsBufferOutsideSmmValid: Overlap: Buffer (0x%lx) - Length (0x%lx), ",\r
Buffer,\r
Length\r
));\r
DEBUG ((\r
"CpuStart (0x%lx) - PhysicalSize (0x%lx)\n",\r
mSmmMemLibInternalSmramRanges[Index].CpuStart,\r
mSmmMemLibInternalSmramRanges[Index].PhysicalSize\r
"CpuStart (0x%lx) - PhysicalSize (0x%lx)\n",\r
mSmmMemLibInternalSmramRanges[Index].CpuStart,\r
mSmmMemLibInternalSmramRanges[Index].PhysicalSize\r
\r
if (!InValidCommunicationRegion) {\r
DEBUG ((\r
\r
if (!InValidCommunicationRegion) {\r
DEBUG ((\r
"SmmIsBufferOutsideSmmValid: Not in ValidCommunicationRegion: Buffer (0x%lx) - Length (0x%lx)\n",\r
Buffer,\r
Length\r
"SmmIsBufferOutsideSmmValid: Not in ValidCommunicationRegion: Buffer (0x%lx) - Length (0x%lx)\n",\r
Buffer,\r
Length\r
if (((Buffer >= mSmmMemLibGcdMemSpace[Index].BaseAddress) && (Buffer < mSmmMemLibGcdMemSpace[Index].BaseAddress + mSmmMemLibGcdMemSpace[Index].Length)) ||\r
((mSmmMemLibGcdMemSpace[Index].BaseAddress >= Buffer) && (mSmmMemLibGcdMemSpace[Index].BaseAddress < Buffer + Length))) {\r
DEBUG ((\r
if (((Buffer >= mSmmMemLibGcdMemSpace[Index].BaseAddress) && (Buffer < mSmmMemLibGcdMemSpace[Index].BaseAddress + mSmmMemLibGcdMemSpace[Index].Length)) ||\r
((mSmmMemLibGcdMemSpace[Index].BaseAddress >= Buffer) && (mSmmMemLibGcdMemSpace[Index].BaseAddress < Buffer + Length))) {\r
DEBUG ((\r
"SmmIsBufferOutsideSmmValid: In Untested Memory Region: Buffer (0x%lx) - Length (0x%lx)\n",\r
Buffer,\r
Length\r
"SmmIsBufferOutsideSmmValid: In Untested Memory Region: Buffer (0x%lx) - Length (0x%lx)\n",\r
Buffer,\r
Length\r
if (((Buffer >= Entry->PhysicalStart) && (Buffer < Entry->PhysicalStart + LShiftU64 (Entry->NumberOfPages, EFI_PAGE_SHIFT))) ||\r
((Entry->PhysicalStart >= Buffer) && (Entry->PhysicalStart < Buffer + Length))) {\r
DEBUG ((\r
if (((Buffer >= Entry->PhysicalStart) && (Buffer < Entry->PhysicalStart + LShiftU64 (Entry->NumberOfPages, EFI_PAGE_SHIFT))) ||\r
((Entry->PhysicalStart >= Buffer) && (Entry->PhysicalStart < Buffer + Length))) {\r
DEBUG ((\r
"SmmIsBufferOutsideSmmValid: In RuntimeCode Region: Buffer (0x%lx) - Length (0x%lx)\n",\r
Buffer,\r
Length\r
"SmmIsBufferOutsideSmmValid: In RuntimeCode Region: Buffer (0x%lx) - Length (0x%lx)\n",\r
Buffer,\r
Length\r
)\r
{\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) {\r
)\r
{\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) {\r
- DEBUG ((EFI_D_ERROR, "SmmCopyMemToSmram: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));\r
+ DEBUG ((DEBUG_ERROR, "SmmCopyMemToSmram: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));\r
return EFI_SECURITY_VIOLATION;\r
}\r
CopyMem (DestinationBuffer, SourceBuffer, Length);\r
return EFI_SECURITY_VIOLATION;\r
}\r
CopyMem (DestinationBuffer, SourceBuffer, Length);\r
)\r
{\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationBuffer, Length)) {\r
)\r
{\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationBuffer, Length)) {\r
- DEBUG ((EFI_D_ERROR, "SmmCopyMemFromSmram: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));\r
+ DEBUG ((DEBUG_ERROR, "SmmCopyMemFromSmram: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));\r
return EFI_SECURITY_VIOLATION;\r
}\r
CopyMem (DestinationBuffer, SourceBuffer, Length);\r
return EFI_SECURITY_VIOLATION;\r
}\r
CopyMem (DestinationBuffer, SourceBuffer, Length);\r
)\r
{\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationBuffer, Length)) {\r
)\r
{\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationBuffer, Length)) {\r
- DEBUG ((EFI_D_ERROR, "SmmCopyMem: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));\r
+ DEBUG ((DEBUG_ERROR, "SmmCopyMem: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length));\r
return EFI_SECURITY_VIOLATION;\r
}\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) {\r
return EFI_SECURITY_VIOLATION;\r
}\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) {\r
- DEBUG ((EFI_D_ERROR, "SmmCopyMem: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));\r
+ DEBUG ((DEBUG_ERROR, "SmmCopyMem: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length));\r
return EFI_SECURITY_VIOLATION;\r
}\r
CopyMem (DestinationBuffer, SourceBuffer, Length);\r
return EFI_SECURITY_VIOLATION;\r
}\r
CopyMem (DestinationBuffer, SourceBuffer, Length);\r
)\r
{\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Length)) {\r
)\r
{\r
if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Length)) {\r
- DEBUG ((EFI_D_ERROR, "SmmSetMem: Security Violation: Source (0x%x), Length (0x%x)\n", Buffer, Length));\r
+ DEBUG ((DEBUG_ERROR, "SmmSetMem: Security Violation: Source (0x%x), Length (0x%x)\n", Buffer, Length));\r
return EFI_SECURITY_VIOLATION;\r
}\r
SetMem (Buffer, Length, Value);\r
return EFI_SECURITY_VIOLATION;\r
}\r
SetMem (Buffer, Length, Value);\r
ASSERT (LegacyBootEvent != NULL);\r
\r
if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {\r
ASSERT (LegacyBootEvent != NULL);\r
\r
if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {\r
- DEBUG ((EFI_D_ERROR, "EFI1.1 can't support LegacyBootEvent!"));\r
+ DEBUG ((DEBUG_ERROR, "EFI1.1 can't support LegacyBootEvent!"));\r
ASSERT (FALSE);\r
\r
return EFI_UNSUPPORTED;\r
ASSERT (FALSE);\r
\r
return EFI_UNSUPPORTED;\r
ASSERT (ReadyToBootEvent != NULL);\r
\r
if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {\r
ASSERT (ReadyToBootEvent != NULL);\r
\r
if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {\r
- DEBUG ((EFI_D_ERROR, "EFI1.1 can't support ReadyToBootEvent!"));\r
+ DEBUG ((DEBUG_ERROR, "EFI1.1 can't support ReadyToBootEvent!"));\r
ASSERT (FALSE);\r
\r
return EFI_UNSUPPORTED;\r
ASSERT (FALSE);\r
\r
return EFI_UNSUPPORTED;\r
\r
CopyGuid (&FvDevicePathNode->FvFileName, NameGuid);\r
}\r
\r
CopyGuid (&FvDevicePathNode->FvFileName, NameGuid);\r
}\r