From: Michael Kubacki <michael.kubacki@microsoft.com>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4094
Updates several debug macros in MinPlatformPkg to correctly match
print specifiers to actual arguments.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckPci.c | 4 ++--
Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckSmiHandlerInstrument.c | 4 ++--
Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckFvInfo.c | 13 ++++--------
Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckHob.c | 22 +++++++-------------
4 files changed, 16 insertions(+), 27 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckPci.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckPci.c
index 575284ccc727..3259dae757fe 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckPci.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckPci.c
@@ -114,7 +114,7 @@ DumpPciBridge (
PciData->Bridge.SecondaryBus,
PciData->Bridge.SubordinateBus
));
- DEBUG ((DEBUG_INFO, " [00:00] [0000:0000] [0000:0000]",
+ DEBUG ((DEBUG_INFO, " [%02x:%02x] [%04x:%04x] [%04x:%04x]",
PciData->Bridge.IoBase,
PciData->Bridge.IoLimit,
PciData->Bridge.MemoryBase,
@@ -122,7 +122,7 @@ DumpPciBridge (
PciData->Bridge.PrefetchableMemoryBase,
PciData->Bridge.PrefetchableMemoryLimit
));
- DEBUG ((DEBUG_INFO, " [00000000:00000000] [0000:0000]",
+ DEBUG ((DEBUG_INFO, " [%08x:%08x] [%04x:%04x]",
PciData->Bridge.PrefetchableBaseUpper32,
PciData->Bridge.PrefetchableLimitUpper32,
PciData->Bridge.IoBaseUpper16,
diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckSmiHandlerInstrument.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckSmiHandlerInstrument.c
index 80e8d26f4e1d..3a0e4ff90b7f 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckSmiHandlerInstrument.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckSmiHandlerInstrument.c
@@ -596,12 +596,12 @@ DumpSmiHandler(
if (ImageStruct != NULL) {
DEBUG ((DEBUG_INFO, " <RVA>0x%x</RVA>\n", (UINTN) (SmiHandlerStruct->Handler - ImageStruct->ImageBase)));
}
- DEBUG ((DEBUG_INFO, " </Handler>\n", SmiHandlerStruct->Handler));
+ DEBUG ((DEBUG_INFO, " </Handler>\n"));
DEBUG ((DEBUG_INFO, " <Caller Address=\"0x%lx\">\n", SmiHandlerStruct->CallerAddr));
if (ImageStruct != NULL) {
DEBUG ((DEBUG_INFO, " <RVA>0x%x</RVA>\n", (UINTN) (SmiHandlerStruct->CallerAddr - ImageStruct->ImageBase)));
}
- DEBUG ((DEBUG_INFO, " </Caller>\n", SmiHandlerStruct->Handler));
+ DEBUG ((DEBUG_INFO, " </Caller>\n"));
SmiHandlerStruct = (VOID *)((UINTN)SmiHandlerStruct + SmiHandlerStruct->Length);
DEBUG ((DEBUG_INFO, " </SmiHandler>\n"));
}
diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckFvInfo.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckFvInfo.c
index 571743448eac..f8a651ee7222 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckFvInfo.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckFvInfo.c
@@ -44,7 +44,7 @@ TestPointCheckFvInfo (
EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI *FvInfo2;
UINTN Index;
UINTN Index2;
-
+
DEBUG ((DEBUG_INFO, "==== TestPointCheckFvInfo - Enter\n"));
DEBUG ((DEBUG_INFO, "FV Info PPI\n"));
for (Index = 0; ; Index++) {
@@ -61,9 +61,7 @@ TestPointCheckFvInfo (
" BA=%08x L=%08x Format={%g}",
(UINT32)(UINTN)FvInfo->FvInfo,
FvInfo->FvInfoSize,
- &FvInfo->FvFormat,
- FvInfo->ParentFvName,
- FvInfo->ParentFileName
+ &FvInfo->FvFormat
));
if (FvInfo->ParentFvName != NULL) {
DEBUG ((DEBUG_INFO,
@@ -79,7 +77,7 @@ TestPointCheckFvInfo (
}
DEBUG ((DEBUG_INFO, "\n"));
}
-
+
DEBUG ((DEBUG_INFO, "FV Info2 PPI\n"));
for (Index2 = 0; ; Index2++) {
Status = PeiServicesLocatePpi (
@@ -95,10 +93,7 @@ TestPointCheckFvInfo (
" BA=%08x L=%08x Format={%g}",
(UINT32)(UINTN)FvInfo2->FvInfo,
FvInfo2->FvInfoSize,
- &FvInfo2->FvFormat,
- FvInfo2->ParentFvName,
- FvInfo2->ParentFileName,
- FvInfo2->AuthenticationStatus
+ &FvInfo2->FvFormat
));
if (FvInfo2->ParentFvName != NULL) {
DEBUG ((DEBUG_INFO,
diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckHob.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckHob.c
index b05f7ebab67f..92a14d7f40ae 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckHob.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckHob.c
@@ -91,7 +91,7 @@ DumpPhitHob (
)
{
EFI_HOB_HANDOFF_INFO_TABLE *PhitHob;
-
+
PhitHob = HobList;
ASSERT(GET_HOB_TYPE(HobList) == EFI_HOB_TYPE_HANDOFF);
DEBUG ((DEBUG_INFO, "PHIT HOB\n"));
@@ -132,7 +132,7 @@ DumpResourceHob (
{
EFI_PEI_HOB_POINTERS Hob;
EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob;
-
+
DEBUG ((DEBUG_INFO, "Resource Descriptor HOBs\n"));
for (Hob.Raw = HobList; !END_OF_HOB_LIST (Hob); Hob.Raw = GET_NEXT_HOB (Hob)) {
@@ -180,7 +180,7 @@ DumpFvHob (
EFI_PEI_HOB_POINTERS Hob;
EFI_HOB_FIRMWARE_VOLUME *FirmwareVolumeHob;
EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2Hob;
-
+
DEBUG ((DEBUG_INFO, "FV HOBs\n"));
for (Hob.Raw = HobList; !END_OF_HOB_LIST (Hob); Hob.Raw = GET_NEXT_HOB (Hob)) {
if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_FV) {
@@ -234,15 +234,9 @@ DumpMemoryAllocationHob (
DEBUG ((DEBUG_INFO, ShortNameOfMemoryType(MemoryHob->AllocDescriptor.MemoryType)));
if (!IsZeroGuid(&MemoryHob->AllocDescriptor.Name)) {
if (CompareGuid(&gEfiHobMemoryAllocStackGuid, &MemoryHob->AllocDescriptor.Name)) {
- DEBUG ((DEBUG_INFO,
- " {Stack}",
- &MemoryHob->AllocDescriptor.Name
- ));
+ DEBUG ((DEBUG_INFO, " {%g}", &MemoryHob->AllocDescriptor.Name));
} else if (CompareGuid(&gEfiHobMemoryAllocBspStoreGuid, &MemoryHob->AllocDescriptor.Name)) {
- DEBUG ((DEBUG_INFO,
- " {BspStore}",
- &MemoryHob->AllocDescriptor.Name
- ));
+ DEBUG ((DEBUG_INFO, " {%g}", &MemoryHob->AllocDescriptor.Name));
} else if (CompareGuid(&gEfiHobMemoryAllocModuleGuid, &MemoryHob->AllocDescriptor.Name)) {
DEBUG ((DEBUG_INFO,
" {Module=%g,Entry=0x%lx}",
@@ -290,13 +284,13 @@ TestPointDumpHob (
)
{
VOID *HobList;
-
+
DEBUG ((DEBUG_INFO, "==== TestPointDumpHob - Enter\n"));
//
// Get Hob list
//
HobList = GetHobList ();
-
+
DumpPhitHob (HobList);
if (PhitHobOnly) {
@@ -329,7 +323,7 @@ TestPointCheckMemoryResource (
EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob;
EFI_PEI_HOB_POINTERS Hob2;
EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob2;
-
+
HobList = GetHobList ();
//
--
2.28.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#94734): https://edk2.groups.io/g/devel/message/94734
Mute This Topic: https://groups.io/mt/94129230/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.