3 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
4 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
14 #include <Pi/PiFirmwareVolume.h>
15 #include <Pi/PiFirmwareFile.h>
18 Given the input file pointer, search for the next matching file in the
19 FFS volume as defined by SearchType. The search starts from FileHeader inside
20 the Firmware Volume defined by FwVolHeader.
22 @param SearchType Filter to find only files of this type.
23 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.
24 @param FwVolHeader Pointer to the FV header of the volume to search.
25 This parameter must point to a valid FFS volume.
26 @param FileHeader Pointer to the current file from which to begin searching.
27 This pointer will be updated upon return to reflect the file found.
29 @retval EFI_NOT_FOUND No files matching the search criteria were found
35 IN EFI_FV_FILETYPE SearchType
,
36 IN EFI_FIRMWARE_VOLUME_HEADER
*FwVolHeader
,
37 IN OUT EFI_FFS_FILE_HEADER
**FileHeader
41 Given the input file pointer, search for the next matching section in the
44 @param SearchType Filter to find only sections of this type.
45 @param FfsFileHeader Pointer to the current file to search.
46 @param SectionHeader Pointer to the Section matching SectionType in FfsFileHeader.
47 NULL if section not found
49 @retval EFI_NOT_FOUND No files matching the search criteria were found
54 IN EFI_SECTION_TYPE SectionType
,
55 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
56 IN OUT EFI_COMMON_SECTION_HEADER
**SectionHeader
60 Locates a section within a series of sections
61 with the specified section type.
63 @param[in] Sections The sections to search
64 @param[in] SizeOfSections Total size of all sections
65 @param[in] SectionType The section type to locate
66 @param[out] FoundSection The FFS section if found
68 @retval EFI_SUCCESS The file and section was found
69 @retval EFI_NOT_FOUND The file and section was not found
70 @retval EFI_VOLUME_CORRUPTED The firmware volume was corrupted
74 FindFfsSectionInSections (
76 IN UINTN SizeOfSections
,
77 IN EFI_SECTION_TYPE SectionType
,
78 OUT EFI_COMMON_SECTION_HEADER
**FoundSection
82 Given the input file pointer, search for the next matching section in the
85 @param SearchType Filter to find only sections of this type.
86 @param FfsFileHeader Pointer to the current file to search.
87 @param SectionData Pointer to the Section matching SectionType in FfsFileHeader.
88 NULL if section not found
89 @param SectionDataSize The size of SectionData
91 @retval EFI_NOT_FOUND No files matching the search criteria were found
97 IN EFI_SECTION_TYPE SectionType
,
98 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
99 OUT VOID
**SectionData
,
100 OUT UINTN
*SectionDataSize