summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMin M Xu <min.m.xu@intel.com>2023-01-19 09:51:08 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-19 08:35:59 +0000
commit51411435d559c55eaf38c02baf5d76da78bb658d (patch)
tree65244c051ae6ea250a78eb159ea6c9ccf64f6b1c
parent0826808d4f0246f25d25fdf60c0bce8172040f41 (diff)
downloadedk2-51411435d559c55eaf38c02baf5d76da78bb658d.tar.gz
edk2-51411435d559c55eaf38c02baf5d76da78bb658d.tar.bz2
edk2-51411435d559c55eaf38c02baf5d76da78bb658d.zip
EmbeddedPkg: Add back FfsFindSectionData
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. Signed-off-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--EmbeddedPkg/Include/Library/PrePiLib.h20
-rw-r--r--EmbeddedPkg/Library/PrePiLib/FwVol.c23
2 files changed, 43 insertions, 0 deletions
diff --git a/EmbeddedPkg/Include/Library/PrePiLib.h b/EmbeddedPkg/Include/Library/PrePiLib.h
index 0c259864d6..93a9115eac 100644
--- a/EmbeddedPkg/Include/Library/PrePiLib.h
+++ b/EmbeddedPkg/Include/Library/PrePiLib.h
@@ -86,6 +86,26 @@ 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
+ );
+
+/**
Find a file in the volume by name
@param FileName A pointer to the name of the file to
diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c b/EmbeddedPkg/Library/PrePiLib/FwVol.c
index 85dbf5b0ad..7739a5c8aa 100644
--- a/EmbeddedPkg/Library/PrePiLib/FwVol.c
+++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c
@@ -505,6 +505,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.
@param SearchType A filter to find files only of this type.