]> git.proxmox.com Git - mirror_edk2.git/blame - StandaloneMmPkg/Include/Library/FvLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / StandaloneMmPkg / Include / Library / FvLib.h
CommitLineData
e85162ac
SV
1/** @file\r
2\r
3Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
4Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>\r
5\r
86094561 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
e85162ac
SV
7\r
8**/\r
9\r
10#ifndef _FV_LIB_H_\r
11#define _FV_LIB_H_\r
12\r
13#include <Uefi.h>\r
14#include <Pi/PiFirmwareVolume.h>\r
15#include <Pi/PiFirmwareFile.h>\r
16\r
17/**\r
18 Given the input file pointer, search for the next matching file in the\r
19 FFS volume as defined by SearchType. The search starts from FileHeader inside\r
20 the Firmware Volume defined by FwVolHeader.\r
21\r
22 @param SearchType Filter to find only files of this type.\r
23 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
24 @param FwVolHeader Pointer to the FV header of the volume to search.\r
25 This parameter must point to a valid FFS volume.\r
26 @param FileHeader Pointer to the current file from which to begin searching.\r
27 This pointer will be updated upon return to reflect the file found.\r
28\r
29 @retval EFI_NOT_FOUND No files matching the search criteria were found\r
30 @retval EFI_SUCCESS\r
31**/\r
32EFI_STATUS\r
33EFIAPI\r
34FfsFindNextFile (\r
35 IN EFI_FV_FILETYPE SearchType,\r
36 IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,\r
37 IN OUT EFI_FFS_FILE_HEADER **FileHeader\r
38 );\r
39\r
40/**\r
41 Given the input file pointer, search for the next matching section in the\r
42 FFS volume.\r
43\r
44 @param SearchType Filter to find only sections of this type.\r
45 @param FfsFileHeader Pointer to the current file to search.\r
46 @param SectionHeader Pointer to the Section matching SectionType in FfsFileHeader.\r
47 NULL if section not found\r
48\r
49 @retval EFI_NOT_FOUND No files matching the search criteria were found\r
50 @retval EFI_SUCCESS\r
51**/\r
52EFI_STATUS\r
71cd84ac 53EFIAPI\r
e85162ac 54FfsFindSection (\r
91415a36
MK
55 IN EFI_SECTION_TYPE SectionType,\r
56 IN EFI_FFS_FILE_HEADER *FfsFileHeader,\r
57 IN OUT EFI_COMMON_SECTION_HEADER **SectionHeader\r
e85162ac
SV
58 );\r
59\r
60/**\r
61 Locates a section within a series of sections\r
62 with the specified section type.\r
63\r
64 @param[in] Sections The sections to search\r
65 @param[in] SizeOfSections Total size of all sections\r
66 @param[in] SectionType The section type to locate\r
67 @param[out] FoundSection The FFS section if found\r
68\r
69 @retval EFI_SUCCESS The file and section was found\r
70 @retval EFI_NOT_FOUND The file and section was not found\r
71 @retval EFI_VOLUME_CORRUPTED The firmware volume was corrupted\r
72**/\r
73EFI_STATUS\r
74EFIAPI\r
75FindFfsSectionInSections (\r
91415a36
MK
76 IN VOID *Sections,\r
77 IN UINTN SizeOfSections,\r
78 IN EFI_SECTION_TYPE SectionType,\r
79 OUT EFI_COMMON_SECTION_HEADER **FoundSection\r
e85162ac
SV
80 );\r
81\r
82/**\r
83 Given the input file pointer, search for the next matching section in the\r
84 FFS volume.\r
85\r
86 @param SearchType Filter to find only sections of this type.\r
87 @param FfsFileHeader Pointer to the current file to search.\r
88 @param SectionData Pointer to the Section matching SectionType in FfsFileHeader.\r
89 NULL if section not found\r
90 @param SectionDataSize The size of SectionData\r
91\r
92 @retval EFI_NOT_FOUND No files matching the search criteria were found\r
93 @retval EFI_SUCCESS\r
94**/\r
95EFI_STATUS\r
96EFIAPI\r
97FfsFindSectionData (\r
91415a36
MK
98 IN EFI_SECTION_TYPE SectionType,\r
99 IN EFI_FFS_FILE_HEADER *FfsFileHeader,\r
100 OUT VOID **SectionData,\r
101 OUT UINTN *SectionDataSize\r
e85162ac
SV
102 );\r
103\r
104#endif\r