TianoCore EDK2 master
Loading...
Searching...
No Matches
FwVolDriver.h
Go to the documentation of this file.
1
10#ifndef __FW_VOL_DRIVER_H_
11#define __FW_VOL_DRIVER_H_
12
13#define FV2_DEVICE_SIGNATURE SIGNATURE_32 ('_', 'F', 'V', '2')
14
15//
16// Used to track all non-deleted files
17//
18typedef struct {
19 LIST_ENTRY Link;
20 EFI_FFS_FILE_HEADER *FfsHeader;
21 UINTN StreamHandle;
22 BOOLEAN FileCached;
24
25typedef struct {
26 UINTN Signature;
28 EFI_HANDLE Handle;
30
31 EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
32 UINT8 *CachedFv;
33 UINT8 *EndOfCachedFv;
34
35 FFS_FILE_LIST_ENTRY *LastKey;
36
37 LIST_ENTRY FfsFileListHeader;
38
39 UINT32 AuthenticationStatus;
40 UINT8 ErasePolarity;
41 BOOLEAN IsFfs3Fv;
42 BOOLEAN IsMemoryMapped;
43} FV_DEVICE;
44
45#define FV_DEVICE_FROM_THIS(a) CR(a, FV_DEVICE, Fv, FV2_DEVICE_SIGNATURE)
46
58EFIAPI
61 OUT EFI_FV_ATTRIBUTES *Attributes
62 );
63
75EFIAPI
78 IN OUT EFI_FV_ATTRIBUTES *Attributes
79 );
80
128EFIAPI
131 IN OUT VOID *Key,
132 IN OUT EFI_FV_FILETYPE *FileType,
133 OUT EFI_GUID *NameGuid,
134 OUT EFI_FV_FILE_ATTRIBUTES *Attributes,
135 OUT UINTN *Size
136 );
137
179EFIAPI
182 IN CONST EFI_GUID *NameGuid,
183 IN OUT VOID **Buffer,
184 IN OUT UINTN *BufferSize,
185 OUT EFI_FV_FILETYPE *FoundType,
186 OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes,
187 OUT UINT32 *AuthenticationStatus
188 );
189
219EFIAPI
222 IN CONST EFI_GUID *NameGuid,
223 IN EFI_SECTION_TYPE SectionType,
224 IN UINTN SectionInstance,
225 IN OUT VOID **Buffer,
226 IN OUT UINTN *BufferSize,
227 OUT UINT32 *AuthenticationStatus
228 );
229
252EFIAPI
255 IN UINT32 NumberOfFiles,
256 IN EFI_FV_WRITE_POLICY WritePolicy,
257 IN EFI_FV_WRITE_FILE_DATA *FileData
258 );
259
274EFIAPI
277 IN CONST EFI_GUID *InformationType,
278 IN OUT UINTN *BufferSize,
279 OUT VOID *Buffer
280 );
281
296EFIAPI
299 IN CONST EFI_GUID *InformationType,
300 IN UINTN BufferSize,
301 IN CONST VOID *Buffer
302 );
303
315BOOLEAN
317 IN UINT8 ErasePolarity,
318 IN VOID *InBuffer,
319 IN UINTN BufferSize
320 );
321
331EFI_FFS_FILE_STATE
333 IN UINT8 ErasePolarity,
334 IN EFI_FFS_FILE_HEADER *FfsHeader
335 );
336
346VOID
348 IN UINT8 State,
349 IN EFI_FFS_FILE_HEADER *FfsHeader
350 );
351
363BOOLEAN
365 IN UINT8 ErasePolarity,
366 IN EFI_FFS_FILE_HEADER *FfsHeader,
367 OUT EFI_FFS_FILE_STATE *FileState
368 );
369
381BOOLEAN
383 IN UINT8 ErasePolarity,
384 IN EFI_FFS_FILE_HEADER *FfsHeader
385 );
386
387#endif
UINT64 UINTN
UINT64 EFI_FV_ATTRIBUTES
UINT32 EFI_FV_WRITE_POLICY
EFI_STATUS EFIAPI FvReadFile(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN CONST EFI_GUID *NameGuid, IN OUT VOID **Buffer, IN OUT UINTN *BufferSize, OUT EFI_FV_FILETYPE *FoundType, OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes, OUT UINT32 *AuthenticationStatus)
Definition: FwVolRead.c:268
EFI_STATUS EFIAPI FvGetVolumeAttributes(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, OUT EFI_FV_ATTRIBUTES *Attributes)
Definition: FwVolAttrib.c:24
EFI_STATUS EFIAPI FvSetVolumeInfo(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN CONST EFI_GUID *InformationType, IN UINTN BufferSize, IN CONST VOID *Buffer)
Definition: FwVolAttrib.c:112
EFI_FFS_FILE_STATE GetFileState(IN UINT8 ErasePolarity, IN EFI_FFS_FILE_HEADER *FfsHeader)
BOOLEAN IsValidFfsHeader(IN UINT8 ErasePolarity, IN EFI_FFS_FILE_HEADER *FfsHeader, OUT EFI_FFS_FILE_STATE *FileState)
Definition: Ffs.c:150
EFI_STATUS EFIAPI FvGetVolumeInfo(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN CONST EFI_GUID *InformationType, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
Definition: FwVolAttrib.c:87
BOOLEAN IsValidFfsFile(IN UINT8 ErasePolarity, IN EFI_FFS_FILE_HEADER *FfsHeader)
Definition: Ffs.c:187
VOID SetFileState(IN UINT8 State, IN EFI_FFS_FILE_HEADER *FfsHeader)
EFI_STATUS EFIAPI FvWriteFile(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN UINT32 NumberOfFiles, IN EFI_FV_WRITE_POLICY WritePolicy, IN EFI_FV_WRITE_FILE_DATA *FileData)
Definition: FwVolWrite.c:35
EFI_STATUS EFIAPI FvGetNextFile(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN OUT VOID *Key, IN OUT EFI_FV_FILETYPE *FileType, OUT EFI_GUID *NameGuid, OUT EFI_FV_FILE_ATTRIBUTES *Attributes, OUT UINTN *Size)
Definition: FwVolRead.c:115
BOOLEAN IsBufferErased(IN UINT8 ErasePolarity, IN VOID *InBuffer, IN UINTN BufferSize)
Definition: Ffs.c:56
EFI_STATUS EFIAPI FvReadFileSection(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN CONST EFI_GUID *NameGuid, IN EFI_SECTION_TYPE SectionType, IN UINTN SectionInstance, IN OUT VOID **Buffer, IN OUT UINTN *BufferSize, OUT UINT32 *AuthenticationStatus)
Definition: FwVolRead.c:432
EFI_STATUS EFIAPI FvSetVolumeAttributes(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN OUT EFI_FV_ATTRIBUTES *Attributes)
Definition: FwVolAttrib.c:64
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT32 EFI_FV_FILE_ATTRIBUTES
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
Definition: Base.h:213