TianoCore EDK2 master
Loading...
Searching...
No Matches
FwVolBlock.h
Go to the documentation of this file.
1
10#ifndef _FWVOL_BLOCK_H_
11#define _FWVOL_BLOCK_H_
12
13#define FVB_DEVICE_SIGNATURE SIGNATURE_32('_','F','V','B')
14
15typedef struct {
16 UINTN Base;
17 UINTN Length;
18} LBA_CACHE;
19
20typedef struct {
21 MEMMAP_DEVICE_PATH MemMapDevPath;
22 EFI_DEVICE_PATH_PROTOCOL EndDevPath;
24
25//
26// UEFI Specification define FV device path format if FV provide name guid in extension header
27//
28typedef struct {
30 EFI_DEVICE_PATH_PROTOCOL EndDevPath;
32
33typedef struct {
34 UINTN Signature;
35 EFI_HANDLE Handle;
36 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
37 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL FwVolBlockInstance;
38 UINTN NumBlocks;
39 LBA_CACHE *LbaCache;
40 UINT32 FvbAttributes;
41 EFI_PHYSICAL_ADDRESS BaseAddress;
42 UINT32 AuthenticationStatus;
44
45#define FVB_DEVICE_FROM_THIS(a) \
46 CR(a, EFI_FW_VOL_BLOCK_DEVICE, FwVolBlockInstance, FVB_DEVICE_SIGNATURE)
47
58EFIAPI
61 OUT EFI_FVB_ATTRIBUTES_2 *Attributes
62 );
63
78EFIAPI
81 IN CONST EFI_FVB_ATTRIBUTES_2 *Attributes
82 );
83
108EFIAPI
111 ...
112 );
113
135EFIAPI
138 IN CONST EFI_LBA Lba,
139 IN CONST UINTN Offset,
140 IN OUT UINTN *NumBytes,
141 IN OUT UINT8 *Buffer
142 );
143
169EFIAPI
172 IN EFI_LBA Lba,
173 IN UINTN Offset,
174 IN OUT UINTN *NumBytes,
175 IN UINT8 *Buffer
176 );
177
189EFIAPI
193 );
194
213EFIAPI
216 IN CONST EFI_LBA Lba,
217 IN OUT UINTN *BlockSize,
218 IN OUT UINTN *NumberOfBlocks
219 );
220
221#endif
UINT64 UINTN
EFI_STATUS EFIAPI FwVolBlockGetBlockSize(IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, IN CONST EFI_LBA Lba, IN OUT UINTN *BlockSize, IN OUT UINTN *NumberOfBlocks)
Definition: FwVolBlock.c:339
EFI_STATUS EFIAPI FwVolBlockGetPhysicalAddress(IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, OUT EFI_PHYSICAL_ADDRESS *Address)
Definition: FwVolBlock.c:303
EFI_STATUS EFIAPI FwVolBlockSetAttributes(IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, IN CONST EFI_FVB_ATTRIBUTES_2 *Attributes)
Definition: FwVolBlock.c:125
EFI_STATUS EFIAPI FwVolBlockWriteBlock(IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, IN EFI_LBA Lba, IN UINTN Offset, IN OUT UINTN *NumBytes, IN UINT8 *Buffer)
Definition: FwVolBlock.c:280
EFI_STATUS EFIAPI FwVolBlockReadBlock(IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, IN CONST EFI_LBA Lba, IN CONST UINTN Offset, IN OUT UINTN *NumBytes, IN OUT UINT8 *Buffer)
Definition: FwVolBlock.c:188
EFI_STATUS EFIAPI FwVolBlockGetAttributes(IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, OUT EFI_FVB_ATTRIBUTES_2 *Attributes)
Definition: FwVolBlock.c:93
EFI_STATUS EFIAPI FwVolBlockEraseBlock(IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,...)
Definition: FwVolBlock.c:158
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT32 EFI_FVB_ATTRIBUTES_2
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
UINT64 EFI_LBA
Definition: UefiBaseType.h:45
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33