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
55 IN EFI_SECTION_TYPE SectionType
,
56 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
57 IN OUT EFI_COMMON_SECTION_HEADER
**SectionHeader
61 Locates a section within a series of sections
62 with the specified section type.
64 @param[in] Sections The sections to search
65 @param[in] SizeOfSections Total size of all sections
66 @param[in] SectionType The section type to locate
67 @param[out] FoundSection The FFS section if found
69 @retval EFI_SUCCESS The file and section was found
70 @retval EFI_NOT_FOUND The file and section was not found
71 @retval EFI_VOLUME_CORRUPTED The firmware volume was corrupted
75 FindFfsSectionInSections (
77 IN UINTN SizeOfSections
,
78 IN EFI_SECTION_TYPE SectionType
,
79 OUT EFI_COMMON_SECTION_HEADER
**FoundSection
83 Given the input file pointer, search for the next matching section in the
86 @param SearchType Filter to find only sections of this type.
87 @param FfsFileHeader Pointer to the current file to search.
88 @param SectionData Pointer to the Section matching SectionType in FfsFileHeader.
89 NULL if section not found
90 @param SectionDataSize The size of SectionData
92 @retval EFI_NOT_FOUND No files matching the search criteria were found
98 IN EFI_SECTION_TYPE SectionType
,
99 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
100 OUT VOID
**SectionData
,
101 OUT UINTN
*SectionDataSize