3 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
4 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 #include <Pi/PiFirmwareVolume.h>
21 #include <Pi/PiFirmwareFile.h>
24 Given the input file pointer, search for the next matching file in the
25 FFS volume as defined by SearchType. The search starts from FileHeader inside
26 the Firmware Volume defined by FwVolHeader.
28 @param SearchType Filter to find only files of this type.
29 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.
30 @param FwVolHeader Pointer to the FV header of the volume to search.
31 This parameter must point to a valid FFS volume.
32 @param FileHeader Pointer to the current file from which to begin searching.
33 This pointer will be updated upon return to reflect the file found.
35 @retval EFI_NOT_FOUND No files matching the search criteria were found
41 IN EFI_FV_FILETYPE SearchType
,
42 IN EFI_FIRMWARE_VOLUME_HEADER
*FwVolHeader
,
43 IN OUT EFI_FFS_FILE_HEADER
**FileHeader
47 Given the input file pointer, search for the next matching section in the
50 @param SearchType Filter to find only sections of this type.
51 @param FfsFileHeader Pointer to the current file to search.
52 @param SectionHeader Pointer to the Section matching SectionType in FfsFileHeader.
53 NULL if section not found
55 @retval EFI_NOT_FOUND No files matching the search criteria were found
60 IN EFI_SECTION_TYPE SectionType
,
61 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
62 IN OUT EFI_COMMON_SECTION_HEADER
**SectionHeader
66 Locates a section within a series of sections
67 with the specified section type.
69 @param[in] Sections The sections to search
70 @param[in] SizeOfSections Total size of all sections
71 @param[in] SectionType The section type to locate
72 @param[out] FoundSection The FFS section if found
74 @retval EFI_SUCCESS The file and section was found
75 @retval EFI_NOT_FOUND The file and section was not found
76 @retval EFI_VOLUME_CORRUPTED The firmware volume was corrupted
80 FindFfsSectionInSections (
82 IN UINTN SizeOfSections
,
83 IN EFI_SECTION_TYPE SectionType
,
84 OUT EFI_COMMON_SECTION_HEADER
**FoundSection
88 Given the input file pointer, search for the next matching section in the
91 @param SearchType Filter to find only sections of this type.
92 @param FfsFileHeader Pointer to the current file to search.
93 @param SectionData Pointer to the Section matching SectionType in FfsFileHeader.
94 NULL if section not found
95 @param SectionDataSize The size of SectionData
97 @retval EFI_NOT_FOUND No files matching the search criteria were found
103 IN EFI_SECTION_TYPE SectionType
,
104 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
105 OUT VOID
**SectionData
,
106 OUT UINTN
*SectionDataSize