[PATCH] BaseTools/VolInfo: Parse apriori files


Konstantin Aladyshev
 

Output file GUIDs from the DXE and PEI apriori files.

Signed-off-by: Konstantin Aladyshev <aladyshev22@...>
---
BaseTools/Source/C/VolInfo/VolInfo.c | 74 ++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolI=
nfo/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
//=0D
=0D
EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid =3D EFI_CRC32_GUIDE=
D_SECTION_EXTRACTION_PROTOCOL_GUID;=0D
+EFI_GUID gPeiAprioriFileNameGuid =3D { 0x1b45cc0a, 0x156a, 0x428a, { 0XAF=
, 0x62, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6 }};=0D
+EFI_GUID gAprioriGuid =3D { 0xFC510EE7, 0xFFDC, 0x11D4, { 0xBD, 0x41, 0x0=
0, 0x80, 0xC7, 0x3C, 0x88, 0x81 }};=0D
=0D
#define UTILITY_MAJOR_VERSION 1=0D
#define UTILITY_MINOR_VERSION 0=0D
@@ -107,6 +109,12 @@ ReadHeader (
OUT BOOLEAN *ErasePolarity=0D
);=0D
=0D
+STATIC=0D
+EFI_STATUS=0D
+PrintAprioriFile (=0D
+ EFI_FFS_FILE_HEADER *FileHeader=0D
+ );=0D
+=0D
STATIC=0D
EFI_STATUS=0D
PrintFileInfo (=0D
@@ -1083,6 +1091,53 @@ Returns:
return EFI_SUCCESS;=0D
}=0D
=0D
+STATIC=0D
+EFI_STATUS=0D
+PrintAprioriFile (=0D
+ EFI_FFS_FILE_HEADER *FileHeader=0D
+ )=0D
+/*++=0D
+=0D
+Routine Description:=0D
+=0D
+ Print GUIDs from the APRIORI file=0D
+=0D
+Arguments:=0D
+=0D
+ FileHeader - The file header=0D
+=0D
+Returns:=0D
+=0D
+ EFI_SUCCESS - The APRIORI file was parsed correctly=0D
+ EFI_SECTION_ERROR - Problem with file parsing=0D
+=0D
+--*/=0D
+{=0D
+ UINT8 GuidBuffer[PRINTED_GUID_BUFFER_SIZE];=0D
+ UINT32 HeaderSize;=0D
+=0D
+ HeaderSize =3D FvBufGetFfsHeaderSize (FileHeader);=0D
+=0D
+ if (FileHeader->Type !=3D EFI_FV_FILETYPE_FREEFORM)=0D
+ return EFI_SECTION_ERROR;=0D
+=0D
+ EFI_COMMON_SECTION_HEADER* SectionHeader =3D (EFI_COMMON_SECTION_HEADER =
*) ((UINTN) FileHeader + HeaderSize);=0D
+ if (SectionHeader->Type !=3D EFI_SECTION_RAW)=0D
+ return EFI_SECTION_ERROR;=0D
+=0D
+ UINT32 SectionLength =3D GetSectionFileLength (SectionHeader);=0D
+ EFI_GUID* FileName =3D (EFI_GUID *) ((UINT8 *) SectionHeader + sizeof (E=
FI_COMMON_SECTION_HEADER));=0D
+ while (((UINT8 *) FileName) < ((UINT8 *) SectionHeader + SectionLength))=
{=0D
+ PrintGuidToBuffer (FileName, GuidBuffer, sizeof (GuidBuffer), TRUE);=0D
+ printf ("%s ", GuidBuffer);=0D
+ PrintGuidName (GuidBuffer);=0D
+ printf ("\n");=0D
+ FileName++;=0D
+ }=0D
+=0D
+ return EFI_SUCCESS;=0D
+}=0D
+=0D
STATIC=0D
EFI_STATUS=0D
PrintFileInfo (=0D
@@ -1339,6 +1394,25 @@ Returns:
break;=0D
}=0D
=0D
+ if (!CompareGuid (=0D
+ &FileHeader->Name,=0D
+ &gPeiAprioriFileNameGuid=0D
+ ))=0D
+ {=0D
+ printf("\n");=0D
+ printf("PEI APRIORI FILE:\n");=0D
+ return PrintAprioriFile (FileHeader);=0D
+ }=0D
+ if (!CompareGuid (=0D
+ &FileHeader->Name,=0D
+ &gAprioriGuid=0D
+ ))=0D
+ {=0D
+ printf("\n");=0D
+ printf("DXE APRIORI FILE:\n");=0D
+ return PrintAprioriFile (FileHeader);=0D
+ }=0D
+=0D
return EFI_SUCCESS;=0D
}=0D
=0D
--=20
2.25.1


Bob Feng
 

Hi Konstantin,

Could you update the copyright in VolInfo.c?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Konstantin Aladyshev
Sent: Friday, July 22, 2022 11:38 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@...>; Gao, Liming <gaoliming@...>; Chen, Christine <yuwei.chen@...>; Konstantin Aladyshev <aladyshev22@...>
Subject: [edk2-devel] [PATCH] BaseTools/VolInfo: Parse apriori files

Output file GUIDs from the DXE and PEI apriori files.

Signed-off-by: Konstantin Aladyshev <aladyshev22@...>
---
BaseTools/Source/C/VolInfo/VolInfo.c | 74 ++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

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
// EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid = EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID;+EFI_GUID gPeiAprioriFileNameGuid = { 0x1b45cc0a, 0x156a, 0x428a, { 0XAF, 0x62, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6 }};+EFI_GUID gAprioriGuid = { 0xFC510EE7, 0xFFDC, 0x11D4, { 0xBD, 0x41, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}; #define UTILITY_MAJOR_VERSION 1 #define UTILITY_MINOR_VERSION 0@@ -107,6 +109,12 @@ ReadHeader (
OUT BOOLEAN *ErasePolarity ); +STATIC+EFI_STATUS+PrintAprioriFile (+ EFI_FFS_FILE_HEADER *FileHeader+ );+ STATIC EFI_STATUS PrintFileInfo (@@ -1083,6 +1091,53 @@ Returns:
return EFI_SUCCESS; } +STATIC+EFI_STATUS+PrintAprioriFile (+ EFI_FFS_FILE_HEADER *FileHeader+ )+/*++++Routine Description:++ Print GUIDs from the APRIORI file++Arguments:++ FileHeader - The file header++Returns:++ EFI_SUCCESS - The APRIORI file was parsed correctly+ EFI_SECTION_ERROR - Problem with file parsing++--*/+{+ UINT8 GuidBuffer[PRINTED_GUID_BUFFER_SIZE];+ UINT32 HeaderSize;++ HeaderSize = FvBufGetFfsHeaderSize (FileHeader);++ if (FileHeader->Type != EFI_FV_FILETYPE_FREEFORM)+ return EFI_SECTION_ERROR;++ EFI_COMMON_SECTION_HEADER* SectionHeader = (EFI_COMMON_SECTION_HEADER *) ((UINTN) FileHeader + HeaderSize);+ if (SectionHeader->Type != EFI_SECTION_RAW)+ return EFI_SECTION_ERROR;++ UINT32 SectionLength = GetSectionFileLength (SectionHeader);+ EFI_GUID* FileName = (EFI_GUID *) ((UINT8 *) SectionHeader + sizeof (EFI_COMMON_SECTION_HEADER));+ while (((UINT8 *) FileName) < ((UINT8 *) SectionHeader + SectionLength)) {+ PrintGuidToBuffer (FileName, GuidBuffer, sizeof (GuidBuffer), TRUE);+ printf ("%s ", GuidBuffer);+ PrintGuidName (GuidBuffer);+ printf ("\n");+ FileName++;+ }++ return EFI_SUCCESS;+}+ STATIC EFI_STATUS PrintFileInfo (@@ -1339,6 +1394,25 @@ Returns:
break; } + if (!CompareGuid (+ &FileHeader->Name,+ &gPeiAprioriFileNameGuid+ ))+ {+ printf("\n");+ printf("PEI APRIORI FILE:\n");+ return PrintAprioriFile (FileHeader);+ }+ if (!CompareGuid (+ &FileHeader->Name,+ &gAprioriGuid+ ))+ {+ printf("\n");+ printf("DXE APRIORI FILE:\n");+ return PrintAprioriFile (FileHeader);+ }+ return EFI_SUCCESS; } --
2.25.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91722): https://edk2.groups.io/g/devel/message/91722
Mute This Topic: https://groups.io/mt/92550206/1768742
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [bob.c.feng@...] -=-=-=-=-=-=


Konstantin Aladyshev
 

Hi, Bob!

How should I update it?

Should I increase a year for the Intel Corporation like this
```
Copyright (c) 1999 - 2022, Intel Corporation. All rights reserved.<BR>
```
Or should I enter my name on another string?
```
Copyright (c) 2022, Konstantin Aladyshev <aladyshev22@...><BR>
```

Best regards,
Konstantin Aladyshev

On Sun, Jul 24, 2022 at 9:10 AM Feng, Bob C <bob.c.feng@...> wrote:

Hi Konstantin,

Could you update the copyright in VolInfo.c?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Konstantin Aladyshev
Sent: Friday, July 22, 2022 11:38 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@...>; Gao, Liming <gaoliming@...>; Chen, Christine <yuwei.chen@...>; Konstantin Aladyshev <aladyshev22@...>
Subject: [edk2-devel] [PATCH] BaseTools/VolInfo: Parse apriori files

Output file GUIDs from the DXE and PEI apriori files.

Signed-off-by: Konstantin Aladyshev <aladyshev22@...>
---
BaseTools/Source/C/VolInfo/VolInfo.c | 74 ++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

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
// EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid = EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID;+EFI_GUID gPeiAprioriFileNameGuid = { 0x1b45cc0a, 0x156a, 0x428a, { 0XAF, 0x62, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6 }};+EFI_GUID gAprioriGuid = { 0xFC510EE7, 0xFFDC, 0x11D4, { 0xBD, 0x41, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}; #define UTILITY_MAJOR_VERSION 1 #define UTILITY_MINOR_VERSION 0@@ -107,6 +109,12 @@ ReadHeader (
OUT BOOLEAN *ErasePolarity ); +STATIC+EFI_STATUS+PrintAprioriFile (+ EFI_FFS_FILE_HEADER *FileHeader+ );+ STATIC EFI_STATUS PrintFileInfo (@@ -1083,6 +1091,53 @@ Returns:
return EFI_SUCCESS; } +STATIC+EFI_STATUS+PrintAprioriFile (+ EFI_FFS_FILE_HEADER *FileHeader+ )+/*++++Routine Description:++ Print GUIDs from the APRIORI file++Arguments:++ FileHeader - The file header++Returns:++ EFI_SUCCESS - The APRIORI file was parsed correctly+ EFI_SECTION_ERROR - Problem with file parsing++--*/+{+ UINT8 GuidBuffer[PRINTED_GUID_BUFFER_SIZE];+ UINT32 HeaderSize;++ HeaderSize = FvBufGetFfsHeaderSize (FileHeader);++ if (FileHeader->Type != EFI_FV_FILETYPE_FREEFORM)+ return EFI_SECTION_ERROR;++ EFI_COMMON_SECTION_HEADER* SectionHeader = (EFI_COMMON_SECTION_HEADER *) ((UINTN) FileHeader + HeaderSize);+ if (SectionHeader->Type != EFI_SECTION_RAW)+ return EFI_SECTION_ERROR;++ UINT32 SectionLength = GetSectionFileLength (SectionHeader);+ EFI_GUID* FileName = (EFI_GUID *) ((UINT8 *) SectionHeader + sizeof (EFI_COMMON_SECTION_HEADER));+ while (((UINT8 *) FileName) < ((UINT8 *) SectionHeader + SectionLength)) {+ PrintGuidToBuffer (FileName, GuidBuffer, sizeof (GuidBuffer), TRUE);+ printf ("%s ", GuidBuffer);+ PrintGuidName (GuidBuffer);+ printf ("\n");+ FileName++;+ }++ return EFI_SUCCESS;+}+ STATIC EFI_STATUS PrintFileInfo (@@ -1339,6 +1394,25 @@ Returns:
break; } + if (!CompareGuid (+ &FileHeader->Name,+ &gPeiAprioriFileNameGuid+ ))+ {+ printf("\n");+ printf("PEI APRIORI FILE:\n");+ return PrintAprioriFile (FileHeader);+ }+ if (!CompareGuid (+ &FileHeader->Name,+ &gAprioriGuid+ ))+ {+ printf("\n");+ printf("DXE APRIORI FILE:\n");+ return PrintAprioriFile (FileHeader);+ }+ return EFI_SUCCESS; } --
2.25.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91722): https://edk2.groups.io/g/devel/message/91722
Mute This Topic: https://groups.io/mt/92550206/1768742
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [bob.c.feng@...] -=-=-=-=-=-=


Bob Feng
 

Copyright (c) 2022, Konstantin Aladyshev <aladyshev22@...><BR>
Will be fine.

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Konstantin Aladyshev
Sent: Sunday, July 24, 2022 4:34 PM
To: Feng, Bob C <bob.c.feng@...>
Cc: devel@edk2.groups.io; Gao, Liming <gaoliming@...>; Chen, Christine <yuwei.chen@...>
Subject: Re: [edk2-devel] [PATCH] BaseTools/VolInfo: Parse apriori files

Hi, Bob!

How should I update it?

Should I increase a year for the Intel Corporation like this ``` Copyright (c) 1999 - 2022, Intel Corporation. All rights reserved.<BR> ``` Or should I enter my name on another string?
```
Copyright (c) 2022, Konstantin Aladyshev <aladyshev22@...><BR> ```

Best regards,
Konstantin Aladyshev

On Sun, Jul 24, 2022 at 9:10 AM Feng, Bob C <bob.c.feng@...> wrote:

Hi Konstantin,

Could you update the copyright in VolInfo.c?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
Konstantin Aladyshev
Sent: Friday, July 22, 2022 11:38 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@...>; Gao, Liming
<gaoliming@...>; Chen, Christine <yuwei.chen@...>;
Konstantin Aladyshev <aladyshev22@...>
Subject: [edk2-devel] [PATCH] BaseTools/VolInfo: Parse apriori files

Output file GUIDs from the DXE and PEI apriori files.

Signed-off-by: Konstantin Aladyshev <aladyshev22@...>
---
BaseTools/Source/C/VolInfo/VolInfo.c | 74
++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

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
// EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid = EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID;+EFI_GUID gPeiAprioriFileNameGuid = { 0x1b45cc0a, 0x156a, 0x428a, { 0XAF, 0x62, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6 }};+EFI_GUID gAprioriGuid = { 0xFC510EE7, 0xFFDC, 0x11D4, { 0xBD, 0x41, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}; #define UTILITY_MAJOR_VERSION 1 #define UTILITY_MINOR_VERSION 0@@ -107,6 +109,12 @@ ReadHeader (
OUT BOOLEAN *ErasePolarity ); +STATIC+EFI_STATUS+PrintAprioriFile (+ EFI_FFS_FILE_HEADER *FileHeader+ );+ STATIC EFI_STATUS PrintFileInfo (@@ -1083,6 +1091,53 @@ Returns:
return EFI_SUCCESS; } +STATIC+EFI_STATUS+PrintAprioriFile (+ EFI_FFS_FILE_HEADER *FileHeader+ )+/*++++Routine Description:++ Print GUIDs from the APRIORI file++Arguments:++ FileHeader - The file header++Returns:++ EFI_SUCCESS - The APRIORI file was parsed correctly+ EFI_SECTION_ERROR - Problem with file parsing++--*/+{+ UINT8 GuidBuffer[PRINTED_GUID_BUFFER_SIZE];+ UINT32 HeaderSize;++ HeaderSize = FvBufGetFfsHeaderSize (FileHeader);++ if (FileHeader->Type != EFI_FV_FILETYPE_FREEFORM)+ return EFI_SECTION_ERROR;++ EFI_COMMON_SECTION_HEADER* SectionHeader = (EFI_COMMON_SECTION_HEADER *) ((UINTN) FileHeader + HeaderSize);+ if (SectionHeader->Type != EFI_SECTION_RAW)+ return EFI_SECTION_ERROR;++ UINT32 SectionLength = GetSectionFileLength (SectionHeader);+ EFI_GUID* FileName = (EFI_GUID *) ((UINT8 *) SectionHeader + sizeof (EFI_COMMON_SECTION_HEADER));+ while (((UINT8 *) FileName) < ((UINT8 *) SectionHeader + SectionLength)) {+ PrintGuidToBuffer (FileName, GuidBuffer, sizeof (GuidBuffer), TRUE);+ printf ("%s ", GuidBuffer);+ PrintGuidName (GuidBuffer);+ printf ("\n");+ FileName++;+ }++ return EFI_SUCCESS;+}+ STATIC EFI_STATUS PrintFileInfo (@@ -1339,6 +1394,25 @@ Returns:
break; } + if (!CompareGuid (+ &FileHeader->Name,+ &gPeiAprioriFileNameGuid+ ))+ {+ printf("\n");+ printf("PEI APRIORI FILE:\n");+ return PrintAprioriFile (FileHeader);+ }+ if (!CompareGuid (+ &FileHeader->Name,+ &gAprioriGuid+ ))+ {+ printf("\n");+ printf("DXE APRIORI FILE:\n");+ return PrintAprioriFile (FileHeader);+ }+ return EFI_SUCCESS; } --
2.25.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91722):
https://edk2.groups.io/g/devel/message/91722
Mute This Topic: https://groups.io/mt/92550206/1768742
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub
[bob.c.feng@...] -=-=-=-=-=-=


Bob Feng
 

Reviewed-by: Bob Feng <bob.c.feng@...>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Konstantin Aladyshev
Sent: Friday, July 22, 2022 11:38 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@...>; Gao, Liming <gaoliming@...>; Chen, Christine <yuwei.chen@...>; Konstantin Aladyshev <aladyshev22@...>
Subject: [edk2-devel] [PATCH] BaseTools/VolInfo: Parse apriori files

Output file GUIDs from the DXE and PEI apriori files.

Signed-off-by: Konstantin Aladyshev <aladyshev22@...>
---
BaseTools/Source/C/VolInfo/VolInfo.c | 74 ++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

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
// EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid = EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID;+EFI_GUID gPeiAprioriFileNameGuid = { 0x1b45cc0a, 0x156a, 0x428a, { 0XAF, 0x62, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6 }};+EFI_GUID gAprioriGuid = { 0xFC510EE7, 0xFFDC, 0x11D4, { 0xBD, 0x41, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}; #define UTILITY_MAJOR_VERSION 1 #define UTILITY_MINOR_VERSION 0@@ -107,6 +109,12 @@ ReadHeader (
OUT BOOLEAN *ErasePolarity ); +STATIC+EFI_STATUS+PrintAprioriFile (+ EFI_FFS_FILE_HEADER *FileHeader+ );+ STATIC EFI_STATUS PrintFileInfo (@@ -1083,6 +1091,53 @@ Returns:
return EFI_SUCCESS; } +STATIC+EFI_STATUS+PrintAprioriFile (+ EFI_FFS_FILE_HEADER *FileHeader+ )+/*++++Routine Description:++ Print GUIDs from the APRIORI file++Arguments:++ FileHeader - The file header++Returns:++ EFI_SUCCESS - The APRIORI file was parsed correctly+ EFI_SECTION_ERROR - Problem with file parsing++--*/+{+ UINT8 GuidBuffer[PRINTED_GUID_BUFFER_SIZE];+ UINT32 HeaderSize;++ HeaderSize = FvBufGetFfsHeaderSize (FileHeader);++ if (FileHeader->Type != EFI_FV_FILETYPE_FREEFORM)+ return EFI_SECTION_ERROR;++ EFI_COMMON_SECTION_HEADER* SectionHeader = (EFI_COMMON_SECTION_HEADER *) ((UINTN) FileHeader + HeaderSize);+ if (SectionHeader->Type != EFI_SECTION_RAW)+ return EFI_SECTION_ERROR;++ UINT32 SectionLength = GetSectionFileLength (SectionHeader);+ EFI_GUID* FileName = (EFI_GUID *) ((UINT8 *) SectionHeader + sizeof (EFI_COMMON_SECTION_HEADER));+ while (((UINT8 *) FileName) < ((UINT8 *) SectionHeader + SectionLength)) {+ PrintGuidToBuffer (FileName, GuidBuffer, sizeof (GuidBuffer), TRUE);+ printf ("%s ", GuidBuffer);+ PrintGuidName (GuidBuffer);+ printf ("\n");+ FileName++;+ }++ return EFI_SUCCESS;+}+ STATIC EFI_STATUS PrintFileInfo (@@ -1339,6 +1394,25 @@ Returns:
break; } + if (!CompareGuid (+ &FileHeader->Name,+ &gPeiAprioriFileNameGuid+ ))+ {+ printf("\n");+ printf("PEI APRIORI FILE:\n");+ return PrintAprioriFile (FileHeader);+ }+ if (!CompareGuid (+ &FileHeader->Name,+ &gAprioriGuid+ ))+ {+ printf("\n");+ printf("DXE APRIORI FILE:\n");+ return PrintAprioriFile (FileHeader);+ }+ return EFI_SUCCESS; } --
2.25.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91722): https://edk2.groups.io/g/devel/message/91722
Mute This Topic: https://groups.io/mt/92550206/1768742
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [bob.c.feng@...] -=-=-=-=-=-=