]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg: Rename FfsFindSectionData as FfsFindSectionDataWithHook
authorMin M Xu <min.m.xu@intel.com>
Thu, 19 Jan 2023 01:51:07 +0000 (09:51 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 19 Jan 2023 08:35:59 +0000 (08:35 +0000)
Commit c673216f53 introduces FFS_CHECK_SECTION_HOOK and add it as the
second input parameter in FfsFindSectionData. This change breaks the build
of ArmVirtPkg. To fix this issue, the new version of FfsFindSectionData
is renamed as FfsFindSectionDataWithHook in this patch. In the following
patch the original FfsFindSectionData will be added back.

FfsFindSectionData is renamed as FfsFindSectionDataWithHook. Accordingly
PeilessStartupLib in OvmfPkg should be updated as well. To prevent the
build from being broken, the changes in OvmfPkg are in this patch.

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>
EmbeddedPkg/Include/Library/PrePiLib.h
EmbeddedPkg/Library/PrePiLib/FwVol.c
EmbeddedPkg/Library/PrePiLib/PrePiLib.c
OvmfPkg/Library/PeilessStartupLib/DxeLoad.c

index f60b6678185ac11dad8625aec038d896ad1a6168..0c259864d6121638598bc38a998b87f392d9b021 100644 (file)
@@ -78,7 +78,7 @@ EFI_STATUS
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-FfsFindSectionData (\r
+FfsFindSectionDataWithHook (\r
   IN EFI_SECTION_TYPE        SectionType,\r
   IN FFS_CHECK_SECTION_HOOK  SectionCheckHook,\r
   IN EFI_PEI_FILE_HANDLE     FileHandle,\r
index 778d8b13c33b100392280b4da3d9236017e3a07d..85dbf5b0adb3b6b0111d68f25e8854d53d1edb4c 100644 (file)
@@ -459,9 +459,11 @@ CheckNextSection:
 \r
 /**\r
   This service enables discovery sections of a given type within a valid FFS file.\r
+  Caller also can provide a SectionCheckHook to do additional checking.\r
 \r
-  @param  SearchType            The value of the section type to find.\r
-  @param  FfsFileHeader         A pointer to the file header that contains the set of sections to\r
+  @param  SectionType           The value of the section type to find.\r
+  @param  SectionCheckHook      A hook which can check if the section is the target one.\r
+  @param  FileHandle            A pointer to the file header that contains the set of sections to\r
                                 be searched.\r
   @param  SectionData           A pointer to the discovered section, if successful.\r
 \r
@@ -471,7 +473,7 @@ CheckNextSection:
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-FfsFindSectionData (\r
+FfsFindSectionDataWithHook (\r
   IN EFI_SECTION_TYPE        SectionType,\r
   IN FFS_CHECK_SECTION_HOOK  SectionCheckHook,\r
   IN EFI_PEI_FILE_HANDLE     FileHandle,\r
@@ -817,7 +819,7 @@ FfsProcessFvFile (
   //\r
   // Find FvImage in FvFile\r
   //\r
-  Status = FfsFindSectionData (EFI_SECTION_FIRMWARE_VOLUME_IMAGE, NULL, FvFileHandle, (VOID **)&FvImageHandle);\r
+  Status = FfsFindSectionDataWithHook (EFI_SECTION_FIRMWARE_VOLUME_IMAGE, NULL, FvFileHandle, (VOID **)&FvImageHandle);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
index 3b6fc4f0eba86b4b754dfb234800f1e81284c4ac..3cf866dab248ea542c40d23387ceb710a1d0d9d4 100644 (file)
@@ -131,7 +131,7 @@ LoadDxeCoreFromFfsFile (
   VOID                  *Hob;\r
   EFI_FV_FILE_INFO      FvFileInfo;\r
 \r
-  Status = FfsFindSectionData (EFI_SECTION_PE32, NULL, FileHandle, &PeCoffImage);\r
+  Status = FfsFindSectionDataWithHook (EFI_SECTION_PE32, NULL, FileHandle, &PeCoffImage);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
index 4b1fefd452dc05fc30197c6ad25ab3e2ae416a59..d34690eb8a0bc062ebdcaade48059cc39d97a75d 100644 (file)
@@ -209,7 +209,7 @@ FindDxeNonCc (
   //\r
   // Find FvImage in FvFile\r
   //\r
-  Status = FfsFindSectionData (EFI_SECTION_FIRMWARE_VOLUME_IMAGE, CheckSectionHookForDxeNonCc, FileHandle, (VOID **)&FvImageHandle);\r
+  Status = FfsFindSectionDataWithHook (EFI_SECTION_FIRMWARE_VOLUME_IMAGE, CheckSectionHookForDxeNonCc, FileHandle, (VOID **)&FvImageHandle);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
@@ -303,7 +303,7 @@ DxeLoadCore (
   //\r
   // Load the DXE Core from a Firmware Volume.\r
   //\r
-  Status = FfsFindSectionData (EFI_SECTION_PE32, NULL, FileHandle, &PeCoffImage);\r
+  Status = FfsFindSectionDataWithHook (EFI_SECTION_PE32, NULL, FileHandle, &PeCoffImage);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r