From 586fda4800124351c347d55f7bc186ac6aa15667 Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Tue, 16 Nov 2021 19:21:40 -0800 Subject: SourceLevelDebugPkg: 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 Cc: Leif Lindholm Cc: Michael Kubacki Signed-off-by: Michael D Kinney Reviewed-by: Hao A Wu --- .../Library/DebugAgent/DebugAgentCommon/DebugAgent.c | 5 ++--- .../Library/DebugAgent/DebugAgentCommon/DebugTimer.c | 9 ++++----- .../DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c | 10 +++++----- .../Library/DebugAgent/DxeDebugAgent/SerialIo.c | 2 +- .../SecPeiDebugAgent/SecPeiDebugAgentLib.c | 20 ++++++++++---------- .../DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c | 7 +++---- 6 files changed, 25 insertions(+), 28 deletions(-) (limited to 'SourceLevelDebugPkg/Library/DebugAgent') diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c index 8021437ca9..4a19f37e59 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c @@ -283,8 +283,8 @@ VerifyMailboxChecksum ( // and ToBeCheckSum field to validate the mail box. // if (CheckSum != Mailbox->CheckSum && CheckSum != Mailbox->ToBeCheckSum) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Mailbox checksum error, stack or heap crashed!\n")); - DEBUG ((EFI_D_ERROR, "DebugAgent: CheckSum = %x, Mailbox->CheckSum = %x, Mailbox->ToBeCheckSum = %x\n", CheckSum, Mailbox->CheckSum, Mailbox->ToBeCheckSum)); + DEBUG ((DEBUG_ERROR, "DebugAgent: Mailbox checksum error, stack or heap crashed!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: CheckSum = %x, Mailbox->CheckSum = %x, Mailbox->ToBeCheckSum = %x\n", CheckSum, Mailbox->CheckSum, Mailbox->ToBeCheckSum)); CpuDeadLoop (); } } @@ -2637,4 +2637,3 @@ InterruptProcess ( return; } - diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c index b6ae21e091..eab8e153a1 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c @@ -48,10 +48,10 @@ InitializeDebugTimer ( DisableApicTimerInterrupt (); if (DumpFlag) { - DEBUG ((EFI_D_INFO, "Debug Timer: FSB Clock = %d\n", PcdGet32(PcdFSBClock))); - DEBUG ((EFI_D_INFO, "Debug Timer: Divisor = %d\n", ApicTimerDivisor)); - DEBUG ((EFI_D_INFO, "Debug Timer: Frequency = %d\n", ApicTimerFrequency)); - DEBUG ((EFI_D_INFO, "Debug Timer: InitialCount = %d\n", InitialCount)); + DEBUG ((DEBUG_INFO, "Debug Timer: FSB Clock = %d\n", PcdGet32(PcdFSBClock))); + DEBUG ((DEBUG_INFO, "Debug Timer: Divisor = %d\n", ApicTimerDivisor)); + DEBUG ((DEBUG_INFO, "Debug Timer: Frequency = %d\n", ApicTimerFrequency)); + DEBUG ((DEBUG_INFO, "Debug Timer: InitialCount = %d\n", InitialCount)); } if (TimerFrequency != NULL) { *TimerFrequency = ApicTimerFrequency; @@ -140,4 +140,3 @@ IsDebugTimerTimeout ( return (BOOLEAN) (Delta >= TimeoutTicker); } - diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c index bb37aa99b4..70564ffd53 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c @@ -73,7 +73,7 @@ InternalConstructorWorker ( // Status = gBS->InstallConfigurationTable (&gEfiVectorHandoffTableGuid, (VOID *) &mVectorHandoffInfoDebugAgent[0]); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Cannot install configuration table for persisted vector handoff info!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Cannot install configuration table for persisted vector handoff info!\n")); CpuDeadLoop (); } } @@ -91,7 +91,7 @@ InternalConstructorWorker ( &Address ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Cannot install configuration table for mailbox!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Cannot install configuration table for mailbox!\n")); CpuDeadLoop (); } @@ -115,7 +115,7 @@ InternalConstructorWorker ( Status = gBS->InstallConfigurationTable (&gEfiDebugAgentGuid, (VOID *) mMailboxPointer); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to install configuration for mailbox!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to install configuration for mailbox!\n")); CpuDeadLoop (); } } @@ -402,7 +402,7 @@ InitializeDebugAgent ( // Check if Debug Agent has been initialized before // if (IsDebugAgentInitialzed ()) { - DEBUG ((EFI_D_INFO, "Debug Agent: The former agent will be overwritten by the new one!\n")); + DEBUG ((DEBUG_INFO, "Debug Agent: The former agent will be overwritten by the new one!\n")); } mMultiProcessorDebugSupport = TRUE; @@ -537,7 +537,7 @@ InitializeDebugAgent ( // Only DEBUG_AGENT_INIT_PREMEM_SEC and DEBUG_AGENT_INIT_POSTMEM_SEC are allowed for this // Debug Agent library instance. // - DEBUG ((EFI_D_ERROR, "Debug Agent: The InitFlag value is not allowed!\n")); + DEBUG ((DEBUG_ERROR, "Debug Agent: The InitFlag value is not allowed!\n")); CpuDeadLoop (); break; } diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/SerialIo.c b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/SerialIo.c index 3e64852e90..a2fbf115d5 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/SerialIo.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/SerialIo.c @@ -368,7 +368,7 @@ InstallSerialIo ( NULL ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Debug Agent: Failed to install EFI Serial IO Protocol on Debug Port!\n")); + DEBUG ((DEBUG_ERROR, "Debug Agent: Failed to install EFI Serial IO Protocol on Debug Port!\n")); } } diff --git a/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c b/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c index 51e07f70e7..0f639ecbcd 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c @@ -411,7 +411,7 @@ InitializeDebugAgent ( // // If reaches here, it means Debug Port initialization failed. // - DEBUG ((EFI_D_ERROR, "Debug Agent: Debug port initialization failed.\n")); + DEBUG ((DEBUG_ERROR, "Debug Agent: Debug port initialization failed.\n")); break; @@ -432,7 +432,7 @@ InitializeDebugAgent ( // Status = PeiServicesInstallPpi (&mVectorHandoffInfoPpiList[0]); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to install Vector Handoff Info PPI!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to install Vector Handoff Info PPI!\n")); CpuDeadLoop (); } // @@ -464,7 +464,7 @@ InitializeDebugAgent ( &Address ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to allocate pages!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to allocate pages!\n")); CpuDeadLoop (); } NewMailbox = (DEBUG_AGENT_MAILBOX *) (UINTN) Address; @@ -494,14 +494,14 @@ InitializeDebugAgent ( case DEBUG_AGENT_INIT_PEI: if (Context == NULL) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n")); CpuDeadLoop (); } // // Check if Debug Agent has initialized before // if (IsDebugAgentInitialzed()) { - DEBUG ((EFI_D_WARN, "Debug Agent: It has already initialized in SEC Core!\n")); + DEBUG ((DEBUG_WARN, "Debug Agent: It has already initialized in SEC Core!\n")); break; } // @@ -509,7 +509,7 @@ InitializeDebugAgent ( // Status = PeiServicesInstallPpi (&mVectorHandoffInfoPpiList[0]); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to install Vector Handoff Info PPI!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to install Vector Handoff Info PPI!\n")); CpuDeadLoop (); } // @@ -521,7 +521,7 @@ InitializeDebugAgent ( // Mailbox = AllocateZeroPool (sizeof (DEBUG_AGENT_MAILBOX)); if (Mailbox == NULL) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to allocate memory!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to allocate memory!\n")); CpuDeadLoop (); } else { MailboxLocation = (UINT64)(UINTN)Mailbox; @@ -550,7 +550,7 @@ InitializeDebugAgent ( // Status = PeiServicesNotifyPpi (&mDebugAgentMemoryDiscoveredNotifyList[0]); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to register memory discovered callback function!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Failed to register memory discovered callback function!\n")); CpuDeadLoop (); } // @@ -571,7 +571,7 @@ InitializeDebugAgent ( case DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64: if (Context == NULL) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n")); CpuDeadLoop (); } else { Ia32Idtr = (IA32_DESCRIPTOR *) Context; @@ -604,7 +604,7 @@ InitializeDebugAgent ( // Only DEBUG_AGENT_INIT_PREMEM_SEC and DEBUG_AGENT_INIT_POSTMEM_SEC are allowed for this // Debug Agent library instance. // - DEBUG ((EFI_D_ERROR, "Debug Agent: The InitFlag value is not allowed!\n")); + DEBUG ((DEBUG_ERROR, "Debug Agent: The InitFlag value is not allowed!\n")); CpuDeadLoop (); break; } diff --git a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c index 37b0e8f397..3bdfaa9370 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c @@ -203,7 +203,7 @@ InitializeDebugAgent ( sizeof (EFI_VECTOR_HANDOFF_INFO) * mVectorHandoffInfoCount ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Cannot install configuration table for persisted vector handoff info!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Cannot install configuration table for persisted vector handoff info!\n")); CpuDeadLoop (); } // @@ -336,7 +336,7 @@ InitializeDebugAgent ( case DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64: if (Context == NULL) { - DEBUG ((EFI_D_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n")); + DEBUG ((DEBUG_ERROR, "DebugAgent: Input parameter Context cannot be NULL!\n")); CpuDeadLoop (); } else { Ia32Idtr = (IA32_DESCRIPTOR *) Context; @@ -378,9 +378,8 @@ InitializeDebugAgent ( // Only DEBUG_AGENT_INIT_PREMEM_SEC and DEBUG_AGENT_INIT_POSTMEM_SEC are allowed for this // Debug Agent library instance. // - DEBUG ((EFI_D_ERROR, "Debug Agent: The InitFlag value is not allowed!\n")); + DEBUG ((DEBUG_ERROR, "Debug Agent: The InitFlag value is not allowed!\n")); CpuDeadLoop (); break; } } - -- cgit v1.2.3