From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web11.25123.1664170073520567576 for ; Sun, 25 Sep 2022 22:27:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=cOIS8rMu; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 01449CD1F6FA for ; Mon, 26 Sep 2022 13:27:51 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1664170071; bh=wnRuV3xsLBa/fWb1t8aQ2Y62ahi2DHNLKUhs7en2hTc=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=cOIS8rMuJxzM4XIQ7Q3yTWNSQU15NDkj8YxbOv+T2X1Eg2ti7cpEYdkWRzFPu01SU ueVxghrx4w5KlX8G55XdDjPuaHd58mQ3LzO8J8t3RPRyyayPSDxduCYcsAn1ETJKv2 844EOp7WjGF1iN5wkZ3z/MiOUBArVvQUhBc5WmI0= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id F21C2CD1F6F8 for ; Mon, 26 Sep 2022 13:27:50 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id C3804CD1F6DC for ; Mon, 26 Sep 2022 13:27:50 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 57BDDCD1F7A7 for ; Mon, 26 Sep 2022 13:27:48 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Mon, 26 Sep 2022 13:27:47 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: , References: <20220830101445.18110-1-aladyshev22@gmail.com> <20220830101445.18110-5-aladyshev22@gmail.com> In-Reply-To: <20220830101445.18110-5-aladyshev22@gmail.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIDUvNl0gQmFzZVRvb2xzL1ZvbEluZm86IFBhcnNlIGFwcmlvcmkgZmlsZXM=?= Date: Mon, 26 Sep 2022 13:27:47 +0800 Message-ID: <008701d8d168$b68568b0$23903a10$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHf+CdSH0LadR4kzkTaUnpF39v2rAGNyYmWrdZyz/A= Sender: "gaoliming" Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io = =B4=FA=B1=ED Konstantin > Aladyshev > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA8=D4=C230=C8=D5 18:15 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: bob.c.feng@intel.com; gaoliming@byosoft.com.cn; > yuwei.chen@intel.com; Konstantin Aladyshev > =D6=F7=CC=E2: [edk2-devel] [PATCH 5/6] BaseTools/VolInfo: Parse = apriori files >=20 > Output file GUIDs from the DXE and PEI apriori files. >=20 > Signed-off-by: Konstantin Aladyshev > --- > BaseTools/Source/C/VolInfo/VolInfo.c | 74 > ++++++++++++++++++++++++++++ > 1 file changed, 74 insertions(+) >=20 > diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c > b/BaseTools/Source/C/VolInfo/VolInfo.c > index 2d7c6212b3..28c6806cf0 100644 > --- a/BaseTools/Source/C/VolInfo/VolInfo.c > +++ b/BaseTools/Source/C/VolInfo/VolInfo.c > @@ -43,6 +43,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > // >=20 >=20 >=20 > EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid =3D > EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID; >=20 > +EFI_GUID gPeiAprioriFileNameGuid =3D { 0x1b45cc0a, 0x156a, 0x428a, > { 0XAF, 0x62, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6 }}; >=20 > +EFI_GUID gAprioriGuid =3D { 0xFC510EE7, 0xFFDC, 0x11D4, { 0xBD, = 0x41, > 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}; >=20 >=20 >=20 > #define UTILITY_MAJOR_VERSION 1 >=20 > #define UTILITY_MINOR_VERSION 0 >=20 > @@ -107,6 +109,12 @@ ReadHeader ( > OUT BOOLEAN *ErasePolarity >=20 > ); >=20 >=20 >=20 > +STATIC >=20 > +EFI_STATUS >=20 > +PrintAprioriFile ( >=20 > + EFI_FFS_FILE_HEADER *FileHeader >=20 > + ); >=20 > + >=20 > STATIC >=20 > EFI_STATUS >=20 > PrintFileInfo ( >=20 > @@ -1083,6 +1091,53 @@ Returns: > return EFI_SUCCESS; >=20 > } >=20 >=20 >=20 > +STATIC >=20 > +EFI_STATUS >=20 > +PrintAprioriFile ( >=20 > + EFI_FFS_FILE_HEADER *FileHeader >=20 > + ) >=20 > +/*++ >=20 > + >=20 > +Routine Description: >=20 > + >=20 > + Print GUIDs from the APRIORI file >=20 > + >=20 > +Arguments: >=20 > + >=20 > + FileHeader - The file header >=20 > + >=20 > +Returns: >=20 > + >=20 > + EFI_SUCCESS - The APRIORI file was parsed correctly >=20 > + EFI_SECTION_ERROR - Problem with file parsing >=20 > + >=20 > +--*/ >=20 > +{ >=20 > + UINT8 GuidBuffer[PRINTED_GUID_BUFFER_SIZE]; >=20 > + UINT32 HeaderSize; >=20 > + >=20 > + HeaderSize =3D FvBufGetFfsHeaderSize (FileHeader); >=20 > + >=20 > + if (FileHeader->Type !=3D EFI_FV_FILETYPE_FREEFORM) >=20 > + return EFI_SECTION_ERROR; >=20 > + >=20 > + EFI_COMMON_SECTION_HEADER* SectionHeader =3D > (EFI_COMMON_SECTION_HEADER *) ((UINTN) FileHeader + HeaderSize); >=20 > + if (SectionHeader->Type !=3D EFI_SECTION_RAW) >=20 > + return EFI_SECTION_ERROR; >=20 > + >=20 > + UINT32 SectionLength =3D GetSectionFileLength (SectionHeader); >=20 > + EFI_GUID* FileName =3D (EFI_GUID *) ((UINT8 *) SectionHeader + = sizeof > (EFI_COMMON_SECTION_HEADER)); >=20 > + while (((UINT8 *) FileName) < ((UINT8 *) SectionHeader + SectionLength)) > { >=20 > + PrintGuidToBuffer (FileName, GuidBuffer, sizeof (GuidBuffer), = TRUE); >=20 > + printf ("%s ", GuidBuffer); >=20 > + PrintGuidName (GuidBuffer); >=20 > + printf ("\n"); >=20 > + FileName++; >=20 > + } >=20 > + >=20 > + return EFI_SUCCESS; >=20 > +} >=20 > + >=20 > STATIC >=20 > EFI_STATUS >=20 > PrintFileInfo ( >=20 > @@ -1339,6 +1394,25 @@ Returns: > break; >=20 > } >=20 >=20 >=20 > + if (!CompareGuid ( >=20 > + &FileHeader->Name, >=20 > + &gPeiAprioriFileNameGuid >=20 > + )) >=20 > + { >=20 > + printf("\n"); >=20 > + printf("PEI APRIORI FILE:\n"); >=20 > + return PrintAprioriFile (FileHeader); >=20 > + } >=20 > + if (!CompareGuid ( >=20 > + &FileHeader->Name, >=20 > + &gAprioriGuid >=20 > + )) >=20 > + { >=20 > + printf("\n"); >=20 > + printf("DXE APRIORI FILE:\n"); >=20 > + return PrintAprioriFile (FileHeader); >=20 > + } >=20 > + >=20 > return EFI_SUCCESS; >=20 > } >=20 >=20 >=20 > -- > 2.25.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#92972): = https://edk2.groups.io/g/devel/message/92972 > Mute This Topic: https://groups.io/mt/93345661/4905953 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [gaoliming@byosoft.com.cn] > -=3D-=3D-=3D-=3D-=3D-=3D >=20