summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Variable/RuntimeDxe
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2021-11-16 19:21:29 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit87000d77082339be464d07855d9fc194c6b4e8a6 (patch)
tree2ac61c88056fa10bf27c2d60515c848293eaa08e /MdeModulePkg/Universal/Variable/RuntimeDxe
parent917e98f3e5268c3754d472f7b20eb9bf8eba169d (diff)
downloadedk2-87000d77082339be464d07855d9fc194c6b4e8a6.tar.gz
edk2-87000d77082339be464d07855d9fc194c6b4e8a6.tar.bz2
edk2-87000d77082339be464d07855d9fc194c6b4e8a6.zip
MdeModulePkg: 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 'MdeModulePkg/Universal/Variable/RuntimeDxe')
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c6
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c35
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c3
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c30
4 files changed, 35 insertions, 39 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
index 75350ca2ef..6f459e9549 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Measurement.c
@@ -121,8 +121,8 @@ MeasureVariable (
);
}
- DEBUG ((EFI_D_INFO, "VariableDxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)7, (UINTN)EV_EFI_VARIABLE_DRIVER_CONFIG));
- DEBUG ((EFI_D_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
+ DEBUG ((DEBUG_INFO, "VariableDxe: MeasureVariable (Pcr - %x, EventType - %x, ", (UINTN)7, (UINTN)EV_EFI_VARIABLE_DRIVER_CONFIG));
+ DEBUG ((DEBUG_INFO, "VariableName - %s, VendorGuid - %g)\n", VarName, VendorGuid));
Status = TpmMeasureAndLogData (
7,
@@ -257,7 +257,7 @@ SecureBootHook (
VariableData,
VariableDataSize
);
- DEBUG ((EFI_D_INFO, "MeasureBootPolicyVariable - %r\n", Status));
+ DEBUG ((DEBUG_INFO, "MeasureBootPolicyVariable - %r\n", Status));
if (VariableData != NULL) {
FreePool (VariableData);
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 41f8ff4ceb..5115bcf816 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -281,15 +281,15 @@ RecordVarErrorFlag (
VAR_ERROR_FLAG TempFlag;
DEBUG_CODE (
- DEBUG ((EFI_D_ERROR, "RecordVarErrorFlag (0x%02x) %s:%g - 0x%08x - 0x%x\n", Flag, VariableName, VendorGuid, Attributes, VariableSize));
+ DEBUG ((DEBUG_ERROR, "RecordVarErrorFlag (0x%02x) %s:%g - 0x%08x - 0x%x\n", Flag, VariableName, VendorGuid, Attributes, VariableSize));
if (Flag == VAR_ERROR_FLAG_SYSTEM_ERROR) {
if (AtRuntime ()) {
- DEBUG ((EFI_D_ERROR, "CommonRuntimeVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonRuntimeVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
+ DEBUG ((DEBUG_ERROR, "CommonRuntimeVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonRuntimeVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
} else {
- DEBUG ((EFI_D_ERROR, "CommonVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
+ DEBUG ((DEBUG_ERROR, "CommonVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
}
} else {
- DEBUG ((EFI_D_ERROR, "CommonMaxUserVariableSpace = 0x%x - CommonUserVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonMaxUserVariableSpace, mVariableModuleGlobal->CommonUserVariableTotalSize));
+ DEBUG ((DEBUG_ERROR, "CommonMaxUserVariableSpace = 0x%x - CommonUserVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonMaxUserVariableSpace, mVariableModuleGlobal->CommonUserVariableTotalSize));
}
);
@@ -369,7 +369,7 @@ InitializeVarErrorFlag (
}
Flag = mCurrentBootVarErrFlag;
- DEBUG ((EFI_D_INFO, "Initialize variable error flag (%02x)\n", Flag));
+ DEBUG ((DEBUG_INFO, "Initialize variable error flag (%02x)\n", Flag));
Status = FindVariable (
VAR_ERROR_FLAG_NAME,
@@ -1532,7 +1532,7 @@ AutoUpdateLangVariable (
ISO_639_2_ENTRY_SIZE + 1, Attributes, 0, 0, &Variable, NULL);
}
- DEBUG ((EFI_D_INFO, "Variable Driver Auto Update PlatformLang, PlatformLang:%a, Lang:%a Status: %r\n", BestPlatformLang, BestLang, Status));
+ DEBUG ((DEBUG_INFO, "Variable Driver Auto Update PlatformLang, PlatformLang:%a, Lang:%a Status: %r\n", BestPlatformLang, BestLang, Status));
}
}
@@ -1581,7 +1581,7 @@ AutoUpdateLangVariable (
AsciiStrSize (BestPlatformLang), Attributes, 0, 0, &Variable, NULL);
}
- DEBUG ((EFI_D_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a Status: %r\n", BestLang, BestPlatformLang, Status));
+ DEBUG ((DEBUG_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a Status: %r\n", BestLang, BestPlatformLang, Status));
}
}
}
@@ -1659,14 +1659,14 @@ UpdateVariable (
//
// Trying to update NV variable prior to the installation of EFI_VARIABLE_WRITE_ARCH_PROTOCOL
//
- DEBUG ((EFI_D_ERROR, "Update NV variable before EFI_VARIABLE_WRITE_ARCH_PROTOCOL ready - %r\n", EFI_NOT_AVAILABLE_YET));
+ DEBUG ((DEBUG_ERROR, "Update NV variable before EFI_VARIABLE_WRITE_ARCH_PROTOCOL ready - %r\n", EFI_NOT_AVAILABLE_YET));
return EFI_NOT_AVAILABLE_YET;
} else if ((Attributes & VARIABLE_ATTRIBUTE_AT_AW) != 0) {
//
// Trying to update volatile authenticated variable prior to the installation of EFI_VARIABLE_WRITE_ARCH_PROTOCOL
// The authenticated variable perhaps is not initialized, just return here.
//
- DEBUG ((EFI_D_ERROR, "Update AUTH variable before EFI_VARIABLE_WRITE_ARCH_PROTOCOL ready - %r\n", EFI_NOT_AVAILABLE_YET));
+ DEBUG ((DEBUG_ERROR, "Update AUTH variable before EFI_VARIABLE_WRITE_ARCH_PROTOCOL ready - %r\n", EFI_NOT_AVAILABLE_YET));
return EFI_NOT_AVAILABLE_YET;
}
}
@@ -2764,7 +2764,7 @@ VariableServiceSetVariable (
// 2. The only attribute differing is EFI_VARIABLE_APPEND_WRITE
//
Status = EFI_INVALID_PARAMETER;
- DEBUG ((EFI_D_INFO, "[Variable]: Rewritten a preexisting variable(0x%08x) with different attributes(0x%08x) - %g:%s\n", Variable.CurrPtr->Attributes, Attributes, VendorGuid, VariableName));
+ DEBUG ((DEBUG_INFO, "[Variable]: Rewritten a preexisting variable(0x%08x) with different attributes(0x%08x) - %g:%s\n", Variable.CurrPtr->Attributes, Attributes, VendorGuid, VariableName));
goto Done;
}
}
@@ -3264,7 +3264,7 @@ FlushHobVariableToFlash (
//
// All HOB variables have been flushed in flash.
//
- DEBUG ((EFI_D_INFO, "Variable driver: all HOB variables have been flushed in flash.\n"));
+ DEBUG ((DEBUG_INFO, "Variable driver: all HOB variables have been flushed in flash.\n"));
if (mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.HobFlushComplete != NULL) {
*(mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.HobFlushComplete) = TRUE;
}
@@ -3333,7 +3333,7 @@ VariableWriteServiceInitialize (
GetVariableHeaderSize (mVariableModuleGlobal->VariableGlobal.AuthFormat);
Status = AuthVariableLibInitialize (&mAuthContextIn, &mAuthContextOut);
if (!EFI_ERROR (Status)) {
- DEBUG ((EFI_D_INFO, "Variable driver will work with auth variable support!\n"));
+ DEBUG ((DEBUG_INFO, "Variable driver will work with auth variable support!\n"));
mVariableModuleGlobal->VariableGlobal.AuthSupport = TRUE;
if (mAuthContextOut.AuthVarEntry != NULL) {
for (Index = 0; Index < mAuthContextOut.AuthVarEntryCount; Index++) {
@@ -3347,8 +3347,8 @@ VariableWriteServiceInitialize (
}
}
} else if (Status == EFI_UNSUPPORTED) {
- DEBUG ((EFI_D_INFO, "NOTICE - AuthVariableLibInitialize() returns %r!\n", Status));
- DEBUG ((EFI_D_INFO, "Variable driver will continue to work without auth variable support!\n"));
+ DEBUG ((DEBUG_INFO, "NOTICE - AuthVariableLibInitialize() returns %r!\n", Status));
+ DEBUG ((DEBUG_INFO, "Variable driver will continue to work without auth variable support!\n"));
mVariableModuleGlobal->VariableGlobal.AuthSupport = FALSE;
Status = EFI_SUCCESS;
}
@@ -3550,7 +3550,7 @@ GetHobVariableStore (
return EFI_OUT_OF_RESOURCES;
}
} else {
- DEBUG ((EFI_D_ERROR, "HOB Variable Store header is corrupted!\n"));
+ DEBUG ((DEBUG_ERROR, "HOB Variable Store header is corrupted!\n"));
}
}
@@ -3598,14 +3598,14 @@ VariableCommonInitialize (
// has been initialized in InitNonVolatileVariableStore().
//
if (mVariableModuleGlobal->VariableGlobal.AuthFormat) {
- DEBUG ((EFI_D_INFO, "Variable driver will work with auth variable format!\n"));
+ DEBUG ((DEBUG_INFO, "Variable driver will work with auth variable format!\n"));
//
// Set AuthSupport to FALSE first, VariableWriteServiceInitialize() will initialize it.
//
mVariableModuleGlobal->VariableGlobal.AuthSupport = FALSE;
VariableGuid = &gEfiAuthenticatedVariableGuid;
} else {
- DEBUG ((EFI_D_INFO, "Variable driver will work without auth variable support!\n"));
+ DEBUG ((DEBUG_INFO, "Variable driver will work without auth variable support!\n"));
mVariableModuleGlobal->VariableGlobal.AuthSupport = FALSE;
VariableGuid = &gEfiVariableGuid;
}
@@ -3750,4 +3750,3 @@ GetFvbInfoByAddress (
return Status;
}
-
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
index 0fca0bb2a9..9f19d73dd6 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
@@ -345,7 +345,7 @@ OnEndOfDxe (
{
EFI_STATUS Status;
- DEBUG ((EFI_D_INFO, "[Variable]END_OF_DXE is signaled\n"));
+ DEBUG ((DEBUG_INFO, "[Variable]END_OF_DXE is signaled\n"));
MorLockInitAtEndOfDxe ();
Status = LockVariablePolicy ();
ASSERT_EFI_ERROR (Status);
@@ -638,4 +638,3 @@ VariableServiceInitialize (
return EFI_SUCCESS;
}
-
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c
index 014aa79850..1ee6d2194e 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c
@@ -489,17 +489,17 @@ SmmVariableHandler (
TempCommBufferSize = *CommBufferSize;
if (TempCommBufferSize < SMM_VARIABLE_COMMUNICATE_HEADER_SIZE) {
- DEBUG ((EFI_D_ERROR, "SmmVariableHandler: SMM communication buffer size invalid!\n"));
+ DEBUG ((DEBUG_ERROR, "SmmVariableHandler: SMM communication buffer size invalid!\n"));
return EFI_SUCCESS;
}
CommBufferPayloadSize = TempCommBufferSize - SMM_VARIABLE_COMMUNICATE_HEADER_SIZE;
if (CommBufferPayloadSize > mVariableBufferPayloadSize) {
- DEBUG ((EFI_D_ERROR, "SmmVariableHandler: SMM communication buffer payload size invalid!\n"));
+ DEBUG ((DEBUG_ERROR, "SmmVariableHandler: SMM communication buffer payload size invalid!\n"));
return EFI_SUCCESS;
}
if (!VariableSmmIsBufferOutsideSmmValid ((UINTN)CommBuffer, TempCommBufferSize)) {
- DEBUG ((EFI_D_ERROR, "SmmVariableHandler: SMM communication buffer in SMRAM or overflow!\n"));
+ DEBUG ((DEBUG_ERROR, "SmmVariableHandler: SMM communication buffer in SMRAM or overflow!\n"));
return EFI_SUCCESS;
}
@@ -507,7 +507,7 @@ SmmVariableHandler (
switch (SmmVariableFunctionHeader->Function) {
case SMM_VARIABLE_FUNCTION_GET_VARIABLE:
if (CommBufferPayloadSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE, Name)) {
- DEBUG ((EFI_D_ERROR, "GetVariable: SMM communication buffer size invalid!\n"));
+ DEBUG ((DEBUG_ERROR, "GetVariable: SMM communication buffer size invalid!\n"));
return EFI_SUCCESS;
}
//
@@ -530,7 +530,7 @@ SmmVariableHandler (
// SMRAM range check already covered before
//
if (InfoSize > CommBufferPayloadSize) {
- DEBUG ((EFI_D_ERROR, "GetVariable: Data size exceed communication buffer size limit!\n"));
+ DEBUG ((DEBUG_ERROR, "GetVariable: Data size exceed communication buffer size limit!\n"));
Status = EFI_ACCESS_DENIED;
goto EXIT;
}
@@ -561,7 +561,7 @@ SmmVariableHandler (
case SMM_VARIABLE_FUNCTION_GET_NEXT_VARIABLE_NAME:
if (CommBufferPayloadSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME, Name)) {
- DEBUG ((EFI_D_ERROR, "GetNextVariableName: SMM communication buffer size invalid!\n"));
+ DEBUG ((DEBUG_ERROR, "GetNextVariableName: SMM communication buffer size invalid!\n"));
return EFI_SUCCESS;
}
//
@@ -582,7 +582,7 @@ SmmVariableHandler (
// SMRAM range check already covered before
//
if (InfoSize > CommBufferPayloadSize) {
- DEBUG ((EFI_D_ERROR, "GetNextVariableName: Data size exceed communication buffer size limit!\n"));
+ DEBUG ((DEBUG_ERROR, "GetNextVariableName: Data size exceed communication buffer size limit!\n"));
Status = EFI_ACCESS_DENIED;
goto EXIT;
}
@@ -606,7 +606,7 @@ SmmVariableHandler (
case SMM_VARIABLE_FUNCTION_SET_VARIABLE:
if (CommBufferPayloadSize < OFFSET_OF(SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE, Name)) {
- DEBUG ((EFI_D_ERROR, "SetVariable: SMM communication buffer size invalid!\n"));
+ DEBUG ((DEBUG_ERROR, "SetVariable: SMM communication buffer size invalid!\n"));
return EFI_SUCCESS;
}
//
@@ -630,7 +630,7 @@ SmmVariableHandler (
// Data buffer should not contain SMM range
//
if (InfoSize > CommBufferPayloadSize) {
- DEBUG ((EFI_D_ERROR, "SetVariable: Data size exceed communication buffer size limit!\n"));
+ DEBUG ((DEBUG_ERROR, "SetVariable: Data size exceed communication buffer size limit!\n"));
Status = EFI_ACCESS_DENIED;
goto EXIT;
}
@@ -660,7 +660,7 @@ SmmVariableHandler (
case SMM_VARIABLE_FUNCTION_QUERY_VARIABLE_INFO:
if (CommBufferPayloadSize < sizeof (SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO)) {
- DEBUG ((EFI_D_ERROR, "QueryVariableInfo: SMM communication buffer size invalid!\n"));
+ DEBUG ((DEBUG_ERROR, "QueryVariableInfo: SMM communication buffer size invalid!\n"));
return EFI_SUCCESS;
}
QueryVariableInfo = (SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO *) SmmVariableFunctionHeader->Data;
@@ -675,7 +675,7 @@ SmmVariableHandler (
case SMM_VARIABLE_FUNCTION_GET_PAYLOAD_SIZE:
if (CommBufferPayloadSize < sizeof (SMM_VARIABLE_COMMUNICATE_GET_PAYLOAD_SIZE)) {
- DEBUG ((EFI_D_ERROR, "GetPayloadSize: SMM communication buffer size invalid!\n"));
+ DEBUG ((DEBUG_ERROR, "GetPayloadSize: SMM communication buffer size invalid!\n"));
return EFI_SUCCESS;
}
GetPayloadSize = (SMM_VARIABLE_COMMUNICATE_GET_PAYLOAD_SIZE *) SmmVariableFunctionHeader->Data;
@@ -752,7 +752,7 @@ SmmVariableHandler (
break;
case SMM_VARIABLE_FUNCTION_VAR_CHECK_VARIABLE_PROPERTY_GET:
if (CommBufferPayloadSize < OFFSET_OF (SMM_VARIABLE_COMMUNICATE_VAR_CHECK_VARIABLE_PROPERTY, Name)) {
- DEBUG ((EFI_D_ERROR, "VarCheckVariablePropertyGet: SMM communication buffer size invalid!\n"));
+ DEBUG ((DEBUG_ERROR, "VarCheckVariablePropertyGet: SMM communication buffer size invalid!\n"));
return EFI_SUCCESS;
}
//
@@ -773,7 +773,7 @@ SmmVariableHandler (
// SMRAM range check already covered before
//
if (InfoSize > CommBufferPayloadSize) {
- DEBUG ((EFI_D_ERROR, "VarCheckVariablePropertyGet: Data size exceed communication buffer size limit!\n"));
+ DEBUG ((DEBUG_ERROR, "VarCheckVariablePropertyGet: Data size exceed communication buffer size limit!\n"));
Status = EFI_ACCESS_DENIED;
goto EXIT;
}
@@ -979,7 +979,7 @@ SmmEndOfDxeCallback (
{
EFI_STATUS Status;
- DEBUG ((EFI_D_INFO, "[Variable]SMM_END_OF_DXE is signaled\n"));
+ DEBUG ((DEBUG_INFO, "[Variable]SMM_END_OF_DXE is signaled\n"));
MorLockInitAtEndOfDxe ();
Status = LockVariablePolicy ();
ASSERT_EFI_ERROR (Status);
@@ -1191,5 +1191,3 @@ MmVariableServiceInitialize (
return EFI_SUCCESS;
}
-
-