From: Min M Xu <[email protected]>

In commit c673216f53 a new input parameter is added in FfsFindSectionData.
That change breaks the build of ArmVirtPkg. In this patch
FfsFindSectionData is added back. It calls FfsFindSectionDataWithHook with
a NULL hook.

Cc: Leif Lindholm <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Abner Chang <[email protected]>
Cc: Daniel Schaefer <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Erdem Aktas <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Min Xu <[email protected]>
---
 EmbeddedPkg/Include/Library/PrePiLib.h | 20 ++++++++++++++++++++
 EmbeddedPkg/Library/PrePiLib/FwVol.c   | 23 +++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/EmbeddedPkg/Include/Library/PrePiLib.h 
b/EmbeddedPkg/Include/Library/PrePiLib.h
index 0c259864d612..93a9115eac2d 100644
--- a/EmbeddedPkg/Include/Library/PrePiLib.h
+++ b/EmbeddedPkg/Include/Library/PrePiLib.h
@@ -85,6 +85,26 @@ FfsFindSectionDataWithHook (
   OUT VOID                   **SectionData
   );
 
+/**
+  This service enables discovery sections of a given type within a valid FFS 
file.
+
+  @param  SectionType           The value of the section type to find.
+  @param  FileHandle            A pointer to the file header that contains the 
set of sections to
+                                be searched.
+  @param  SectionData           A pointer to the discovered section, if 
successful.
+
+  @retval EFI_SUCCESS           The section was found.
+  @retval EFI_NOT_FOUND         The section was not found.
+
+**/
+EFI_STATUS
+EFIAPI
+FfsFindSectionData (
+  IN EFI_SECTION_TYPE     SectionType,
+  IN EFI_PEI_FILE_HANDLE  FileHandle,
+  OUT VOID                **SectionData
+  );
+
 /**
   Find a file in the volume by name
 
diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c 
b/EmbeddedPkg/Library/PrePiLib/FwVol.c
index 85dbf5b0adb3..7739a5c8aae7 100644
--- a/EmbeddedPkg/Library/PrePiLib/FwVol.c
+++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c
@@ -504,6 +504,29 @@ FfsFindSectionDataWithHook (
            );
 }
 
+/**
+  This service enables discovery sections of a given type within a valid FFS 
file.
+
+  @param  SectionType           The value of the section type to find.
+  @param  FileHandle            A pointer to the file header that contains the 
set of sections to
+                                be searched.
+  @param  SectionData           A pointer to the discovered section, if 
successful.
+
+  @retval EFI_SUCCESS           The section was found.
+  @retval EFI_NOT_FOUND         The section was not found.
+
+**/
+EFI_STATUS
+EFIAPI
+FfsFindSectionData (
+  IN EFI_SECTION_TYPE     SectionType,
+  IN EFI_PEI_FILE_HANDLE  FileHandle,
+  OUT VOID                **SectionData
+  )
+{
+  return FfsFindSectionDataWithHook (SectionType, NULL, FileHandle, 
SectionData);
+}
+
 /**
   This service enables discovery of additional firmware files.
 
-- 
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98843): https://edk2.groups.io/g/devel/message/98843
Mute This Topic: https://groups.io/mt/96369501/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to