TianoCore EDK2 master
Loading...
Searching...
No Matches
FirmwareVolume2.h
Go to the documentation of this file.
1
16#ifndef __FIRMWARE_VOLUME2_H__
17#define __FIRMWARE_VOLUME2_H__
18
19#define EFI_FIRMWARE_VOLUME2_PROTOCOL_GUID \
20 { 0x220e73b6, 0x6bdb, 0x4413, { 0x84, 0x5, 0xb9, 0x74, 0xb1, 0x8, 0x61, 0x9a } }
21
23
27typedef UINT64 EFI_FV_ATTRIBUTES;
28
29//
30// EFI_FV_ATTRIBUTES bit definitions
31//
32// EFI_FV_ATTRIBUTES bit semantics
33#define EFI_FV2_READ_DISABLE_CAP 0x0000000000000001ULL
34#define EFI_FV2_READ_ENABLE_CAP 0x0000000000000002ULL
35#define EFI_FV2_READ_STATUS 0x0000000000000004ULL
36#define EFI_FV2_WRITE_DISABLE_CAP 0x0000000000000008ULL
37#define EFI_FV2_WRITE_ENABLE_CAP 0x0000000000000010ULL
38#define EFI_FV2_WRITE_STATUS 0x0000000000000020ULL
39#define EFI_FV2_LOCK_CAP 0x0000000000000040ULL
40#define EFI_FV2_LOCK_STATUS 0x0000000000000080ULL
41#define EFI_FV2_WRITE_POLICY_RELIABLE 0x0000000000000100ULL
42#define EFI_FV2_READ_LOCK_CAP 0x0000000000001000ULL
43#define EFI_FV2_READ_LOCK_STATUS 0x0000000000002000ULL
44#define EFI_FV2_WRITE_LOCK_CAP 0x0000000000004000ULL
45#define EFI_FV2_WRITE_LOCK_STATUS 0x0000000000008000ULL
46#define EFI_FV2_ALIGNMENT 0x00000000001F0000ULL
47#define EFI_FV2_ALIGNMENT_1 0x0000000000000000ULL
48#define EFI_FV2_ALIGNMENT_2 0x0000000000010000ULL
49#define EFI_FV2_ALIGNMENT_4 0x0000000000020000ULL
50#define EFI_FV2_ALIGNMENT_8 0x0000000000030000ULL
51#define EFI_FV2_ALIGNMENT_16 0x0000000000040000ULL
52#define EFI_FV2_ALIGNMENT_32 0x0000000000050000ULL
53#define EFI_FV2_ALIGNMENT_64 0x0000000000060000ULL
54#define EFI_FV2_ALIGNMENT_128 0x0000000000070000ULL
55#define EFI_FV2_ALIGNMENT_256 0x0000000000080000ULL
56#define EFI_FV2_ALIGNMENT_512 0x0000000000090000ULL
57#define EFI_FV2_ALIGNMENT_1K 0x00000000000A0000ULL
58#define EFI_FV2_ALIGNMENT_2K 0x00000000000B0000ULL
59#define EFI_FV2_ALIGNMENT_4K 0x00000000000C0000ULL
60#define EFI_FV2_ALIGNMENT_8K 0x00000000000D0000ULL
61#define EFI_FV2_ALIGNMENT_16K 0x00000000000E0000ULL
62#define EFI_FV2_ALIGNMENT_32K 0x00000000000F0000ULL
63#define EFI_FV2_ALIGNMENT_64K 0x0000000000100000ULL
64#define EFI_FV2_ALIGNMENT_128K 0x0000000000110000ULL
65#define EFI_FV2_ALIGNMENT_256K 0x0000000000120000ULL
66#define EFI_FV2_ALIGNMENT_512K 0x0000000000130000ULL
67#define EFI_FV2_ALIGNMENT_1M 0x0000000000140000ULL
68#define EFI_FV2_ALIGNMENT_2M 0x0000000000150000ULL
69#define EFI_FV2_ALIGNMENT_4M 0x0000000000160000ULL
70#define EFI_FV2_ALIGNMENT_8M 0x0000000000170000ULL
71#define EFI_FV2_ALIGNMENT_16M 0x0000000000180000ULL
72#define EFI_FV2_ALIGNMENT_32M 0x0000000000190000ULL
73#define EFI_FV2_ALIGNMENT_64M 0x00000000001A0000ULL
74#define EFI_FV2_ALIGNMENT_128M 0x00000000001B0000ULL
75#define EFI_FV2_ALIGNMENT_256M 0x00000000001C0000ULL
76#define EFI_FV2_ALIGNMENT_512M 0x00000000001D0000ULL
77#define EFI_FV2_ALIGNMENT_1G 0x00000000001E0000ULL
78#define EFI_FV2_ALIGNMENT_2G 0x00000000001F0000ULL
79
104typedef
106(EFIAPI *EFI_FV_GET_ATTRIBUTES)(
108 OUT EFI_FV_ATTRIBUTES *FvAttributes
109 );
110
198typedef
200(EFIAPI *EFI_FV_SET_ATTRIBUTES)(
202 IN OUT EFI_FV_ATTRIBUTES *FvAttributes
203 );
204
292typedef
294(EFIAPI *EFI_FV_READ_FILE)(
296 IN CONST EFI_GUID *NameGuid,
297 IN OUT VOID **Buffer,
298 IN OUT UINTN *BufferSize,
299 OUT EFI_FV_FILETYPE *FoundType,
300 OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes,
301 OUT UINT32 *AuthenticationStatus
302 );
303
398typedef
400(EFIAPI *EFI_FV_READ_SECTION)(
402 IN CONST EFI_GUID *NameGuid,
403 IN EFI_SECTION_TYPE SectionType,
404 IN UINTN SectionInstance,
405 IN OUT VOID **Buffer,
406 IN OUT UINTN *BufferSize,
407 OUT UINT32 *AuthenticationStatus
408 );
409
413typedef UINT32 EFI_FV_WRITE_POLICY;
414#define EFI_FV_UNRELIABLE_WRITE 0x00000000
415#define EFI_FV_RELIABLE_WRITE 0x00000001
416
417//
418// EFI_FV_WRITE_FILE_DATA
419//
420typedef struct {
428 EFI_FV_FILETYPE Type;
436 VOID *Buffer;
442
509typedef
511(EFIAPI *EFI_FV_WRITE_FILE)(
513 IN UINT32 NumberOfFiles,
514 IN EFI_FV_WRITE_POLICY WritePolicy,
515 IN EFI_FV_WRITE_FILE_DATA *FileData
516 );
517
593typedef
595(EFIAPI *EFI_FV_GET_NEXT_FILE)(
597 IN OUT VOID *Key,
598 IN OUT EFI_FV_FILETYPE *FileType,
599 OUT EFI_GUID *NameGuid,
600 OUT EFI_FV_FILE_ATTRIBUTES *Attributes,
601 OUT UINTN *Size
602 );
603
651typedef
653(EFIAPI *EFI_FV_GET_INFO)(
655 IN CONST EFI_GUID *InformationType,
656 IN OUT UINTN *BufferSize,
657 OUT VOID *Buffer
658 );
659
700typedef
702(EFIAPI *EFI_FV_SET_INFO)(
704 IN CONST EFI_GUID *InformationType,
705 IN UINTN BufferSize,
706 IN CONST VOID *Buffer
707 );
708
723 EFI_FV_GET_ATTRIBUTES GetVolumeAttributes;
724 EFI_FV_SET_ATTRIBUTES SetVolumeAttributes;
725 EFI_FV_READ_FILE ReadFile;
726 EFI_FV_READ_SECTION ReadSection;
727 EFI_FV_WRITE_FILE WriteFile;
728 EFI_FV_GET_NEXT_FILE GetNextFile;
729
735 UINT32 KeySize;
736
741 EFI_FV_GET_INFO GetInfo;
742 EFI_FV_SET_INFO SetInfo;
743};
744
745extern EFI_GUID gEfiFirmwareVolume2ProtocolGuid;
746
747#endif
UINT64 UINTN
EFI_STATUS(EFIAPI * EFI_FV_SET_ATTRIBUTES)(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN OUT EFI_FV_ATTRIBUTES *FvAttributes)
UINT64 EFI_FV_ATTRIBUTES
EFI_STATUS(EFIAPI * EFI_FV_GET_NEXT_FILE)(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)
EFI_STATUS(EFIAPI * EFI_FV_WRITE_FILE)(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN UINT32 NumberOfFiles, IN EFI_FV_WRITE_POLICY WritePolicy, IN EFI_FV_WRITE_FILE_DATA *FileData)
UINT32 EFI_FV_WRITE_POLICY
EFI_STATUS(EFIAPI * EFI_FV_READ_FILE)(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)
EFI_STATUS(EFIAPI * EFI_FV_GET_INFO)(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN CONST EFI_GUID *InformationType, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
EFI_STATUS(EFIAPI * EFI_FV_SET_INFO)(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN CONST EFI_GUID *InformationType, IN UINTN BufferSize, IN CONST VOID *Buffer)
EFI_STATUS(EFIAPI * EFI_FV_GET_ATTRIBUTES)(IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, OUT EFI_FV_ATTRIBUTES *FvAttributes)
EFI_STATUS(EFIAPI * EFI_FV_READ_SECTION)(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)
#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
EFI_FV_FILE_ATTRIBUTES FileAttributes
Definition: Base.h:213