2 These functions assist in parsing and manipulating a Firmware Volume.
4 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
17 #include <Common/UefiBaseTypes.h>
18 #include <Common/PiFirmwareFile.h>
19 #include <Common/PiFirmwareVolume.h>
30 OUT EFI_FIRMWARE_VOLUME_HEADER
**FvHeader
,
37 IN EFI_FFS_FILE_HEADER
*CurrentFile
,
38 OUT EFI_FFS_FILE_HEADER
**NextFile
44 IN EFI_GUID
*FileName
,
45 OUT EFI_FFS_FILE_HEADER
**File
51 IN EFI_FV_FILETYPE FileType
,
53 OUT EFI_FFS_FILE_HEADER
**File
59 IN EFI_FFS_FILE_HEADER
*File
,
60 IN EFI_SECTION_TYPE SectionType
,
62 OUT EFI_FILE_SECTION_POINTER
*Section
66 // will not parse compressed sections
70 IN EFI_FIRMWARE_VOLUME_HEADER
*FvHeader
76 IN EFI_FFS_FILE_HEADER
*FfsHeader
82 EFI_FFS_FILE_HEADER
*FfsHeader
87 GetSectionFileLength (
88 EFI_COMMON_SECTION_HEADER
*SectionHeader
94 IN EFI_FFS_FILE_HEADER
*FfsHeader
99 GetSectionHeaderLength(
100 IN EFI_COMMON_SECTION_HEADER
*SectionHeader
108 Verify the current pointer points to a FFS file header.
112 FfsHeader Pointer to an alleged FFS file.
116 EFI_SUCCESS The Ffs header is valid.
117 EFI_NOT_FOUND This "file" is the beginning of free space.
118 EFI_VOLUME_CORRUPTED The Ffs header is not valid.
123 UINT8
*ThreeByteLength
131 Converts a three byte length value into a UINT32.
135 ThreeByteLength Pointer to the first of the 3 byte length.
139 UINT32 Size of the section
144 OUT BOOLEAN
*ErasePolarity
152 This function returns with the FV erase polarity. If the erase polarity
153 for a bit is 1, the function return TRUE.
157 ErasePolarity A pointer to the erase polarity.
161 EFI_SUCCESS The function completed successfully.
162 EFI_INVALID_PARAMETER One of the input parameters was invalid.
167 IN BOOLEAN ErasePolarity
,
168 IN EFI_FFS_FILE_HEADER
*FfsHeader
176 This function returns a the highest state bit in the FFS that is set.
177 It in no way validate the FFS file.
181 ErasePolarity The erase polarity for the file state bits.
182 FfsHeader Pointer to a FFS file.
186 UINT8 The hightest set state of the file.