From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web09.19862.1664940955753006549 for ; Tue, 04 Oct 2022 20:35:55 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=kmi5Gtdh; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id 8C9EA20E6F55; Tue, 4 Oct 2022 20:35:54 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8C9EA20E6F55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1664940955; bh=ns54WLhsnMmvnQvLOfZ62VWCnVxmaEwLyEheeS9y5Rw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kmi5GtdhtCIosL22MXZ5WNWFk2p14ddxunJfAhAKWWZSdtEBCoUMPSpDHxwVb1rbR /vfN53nR4W4ClQYMFCEu8+asUIMWnm/faOgdSf6kGsYmDUC2BxjV8J/XHHgK89RcjO Mw8dN/ZFCPNecSivG+/jHHNY27777FOWf3MIOm/E= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Isaac Oram , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v1 1/3] MinPlatformPkg: Fix invalid debug macros Date: Tue, 4 Oct 2022 23:35:29 -0400 Message-Id: <20221005033531.3994-2-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20221005033531.3994-1-mikuback@linux.microsoft.com> References: <20221005033531.3994-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4094 Updates several debug macros in MinPlatformPkg to correctly match print specifiers to actual arguments. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckPci= .c | 4 ++-- Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckSmi= HandlerInstrument.c | 4 ++-- Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiCheckFvI= nfo.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/TestPointChec= kLib/DxeCheckPci.c index 575284ccc727..3259dae757fe 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChe= ckPci.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChe= ckPci.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/Libr= ary/TestPointCheckLib/DxeCheckSmiHandlerInstrument.c index 80e8d26f4e1d..3a0e4ff90b7f 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChe= ckSmiHandlerInstrument.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChe= ckSmiHandlerInstrument.c @@ -596,12 +596,12 @@ DumpSmiHandler( if (ImageStruct !=3D NULL) { DEBUG ((DEBUG_INFO, " 0x%x\n", (UINTN) (Smi= HandlerStruct->Handler - ImageStruct->ImageBase))); } - DEBUG ((DEBUG_INFO, " \n", SmiHandlerStruct->Hand= ler)); + DEBUG ((DEBUG_INFO, " \n")); DEBUG ((DEBUG_INFO, " \n", SmiH= andlerStruct->CallerAddr)); if (ImageStruct !=3D NULL) { DEBUG ((DEBUG_INFO, " 0x%x\n", (UINTN) (Smi= HandlerStruct->CallerAddr - ImageStruct->ImageBase))); } - DEBUG ((DEBUG_INFO, " \n", SmiHandlerStruct->Handl= er)); + DEBUG ((DEBUG_INFO, " \n")); SmiHandlerStruct =3D (VOID *)((UINTN)SmiHandlerStruct + SmiHandl= erStruct->Length); DEBUG ((DEBUG_INFO, " \n")); } diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib= /PeiCheckFvInfo.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointC= heckLib/PeiCheckFvInfo.c index 571743448eac..f8a651ee7222 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiChe= ckFvInfo.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiChe= ckFvInfo.c @@ -44,7 +44,7 @@ TestPointCheckFvInfo ( EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI *FvInfo2; UINTN Index; UINTN Index2; - =20 + DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D TestPointCheckFvInfo - Enter\n")); DEBUG ((DEBUG_INFO, "FV Info PPI\n")); for (Index =3D 0; ; Index++) { @@ -61,9 +61,7 @@ TestPointCheckFvInfo ( " BA=3D%08x L=3D%08x Format=3D{%g}", (UINT32)(UINTN)FvInfo->FvInfo, FvInfo->FvInfoSize, - &FvInfo->FvFormat, - FvInfo->ParentFvName, - FvInfo->ParentFileName + &FvInfo->FvFormat )); if (FvInfo->ParentFvName !=3D NULL) { DEBUG ((DEBUG_INFO, @@ -79,7 +77,7 @@ TestPointCheckFvInfo ( } DEBUG ((DEBUG_INFO, "\n")); } - =20 + DEBUG ((DEBUG_INFO, "FV Info2 PPI\n")); for (Index2 =3D 0; ; Index2++) { Status =3D PeiServicesLocatePpi ( @@ -95,10 +93,7 @@ TestPointCheckFvInfo ( " BA=3D%08x L=3D%08x Format=3D{%g}", (UINT32)(UINTN)FvInfo2->FvInfo, FvInfo2->FvInfoSize, - &FvInfo2->FvFormat, - FvInfo2->ParentFvName, - FvInfo2->ParentFileName, - FvInfo2->AuthenticationStatus + &FvInfo2->FvFormat )); if (FvInfo2->ParentFvName !=3D NULL) { DEBUG ((DEBUG_INFO, diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib= /PeiCheckHob.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointChec= kLib/PeiCheckHob.c index b05f7ebab67f..92a14d7f40ae 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiChe= ckHob.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiChe= ckHob.c @@ -91,7 +91,7 @@ DumpPhitHob ( ) { EFI_HOB_HANDOFF_INFO_TABLE *PhitHob; - =20 + PhitHob =3D HobList; ASSERT(GET_HOB_TYPE(HobList) =3D=3D 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; - =20 + DEBUG ((DEBUG_INFO, "Resource Descriptor HOBs\n")); for (Hob.Raw =3D HobList; !END_OF_HOB_LIST (Hob); Hob.Raw =3D GET_NEXT= _HOB (Hob)) { =20 @@ -180,7 +180,7 @@ DumpFvHob ( EFI_PEI_HOB_POINTERS Hob; EFI_HOB_FIRMWARE_VOLUME *FirmwareVolumeHob; EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2Hob; - =20 + DEBUG ((DEBUG_INFO, "FV HOBs\n")); for (Hob.Raw =3D HobList; !END_OF_HOB_LIST (Hob); Hob.Raw =3D GET_NEXT= _HOB (Hob)) { if (GET_HOB_TYPE (Hob) =3D=3D EFI_HOB_TYPE_FV) { @@ -234,15 +234,9 @@ DumpMemoryAllocationHob ( DEBUG ((DEBUG_INFO, ShortNameOfMemoryType(MemoryHob->AllocDescript= or.MemoryType))); if (!IsZeroGuid(&MemoryHob->AllocDescriptor.Name)) { if (CompareGuid(&gEfiHobMemoryAllocStackGuid, &MemoryHob->AllocD= escriptor.Name)) { - DEBUG ((DEBUG_INFO, - " {Stack}", - &MemoryHob->AllocDescriptor.Name - )); + DEBUG ((DEBUG_INFO, " {%g}", &MemoryHob->AllocDescriptor.Name= )); } else if (CompareGuid(&gEfiHobMemoryAllocBspStoreGuid, &MemoryH= ob->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=3D%g,Entry=3D0x%lx}", @@ -290,13 +284,13 @@ TestPointDumpHob ( ) { VOID *HobList; - =20 + DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D TestPointDumpHob - Enter\n")); // // Get Hob list // HobList =3D GetHobList (); - =20 + DumpPhitHob (HobList); =20 if (PhitHobOnly) { @@ -329,7 +323,7 @@ TestPointCheckMemoryResource ( EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob; EFI_PEI_HOB_POINTERS Hob2; EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob2; - =20 + HobList =3D GetHobList (); =20 // --=20 2.28.0.windows.1