2 Firmeware Volume BLock Service Library
4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __EDK_FVB_SERVICE_LIB_H__
16 #define __EDK_FVB_SERVICE_LIB_H__
23 IN OUT UINTN
*NumBytes
,
29 Reads specified number of bytes into a buffer from the specified block
32 Instance - The FV instance to be read from
33 Lba - The logical block address to be read from
34 Offset - Offset into the block at which to begin reading
35 NumBytes - Pointer that on input contains the total size of
36 the buffer. On output, it contains the total number
38 Buffer - Pointer to a caller allocated buffer that will be
39 used to hold the data read
45 EFI_INVALID_PARAMETER - invalid parameter
55 IN OUT UINTN
*NumBytes
,
61 Writes specified number of bytes from the input buffer to the block
64 Instance - The FV instance to be written to
65 Lba - The starting logical block index to write to
66 Offset - Offset into the block at which to begin writing
67 NumBytes - Pointer that on input contains the total size of
68 the buffer. On output, it contains the total number
69 of bytes actually written
70 Buffer - Pointer to a caller allocated buffer that contains
71 the source for the write
77 EFI_INVALID_PARAMETER - invalid parameter
90 Erases and initializes a firmware volume block
93 Instance - The FV instance to be erased
94 Lba - The logical block index to be erased
100 EFI_INVALID_PARAMETER - invalid parameter
106 EfiFvbGetVolumeAttributes (
108 OUT EFI_FVB_ATTRIBUTES
*Attributes
113 Retrieves attributes, insures positive polarity of attribute bits, returns
114 resulting attributes in output parameter
117 Instance - The FV instance whose attributes is going to be
119 Attributes - Output buffer which contains attributes
124 EFI_INVALID_PARAMETER - invalid parameter
130 EfiFvbSetVolumeAttributes (
132 IN EFI_FVB_ATTRIBUTES Attributes
137 Modifies the current settings of the firmware volume according to the
138 input parameter, and returns the new setting of the volume
141 Instance - The FV instance whose attributes is going to be
143 Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES
144 containing the desired firmware volume settings.
145 On successful return, it contains the new settings
146 of the firmware volume
151 EFI_INVALID_PARAMETER - invalid parameter
157 EfiFvbGetPhysicalAddress (
159 OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
164 Retrieves the physical address of a memory mapped FV
167 Instance - The FV instance whose base address is going to be
169 BaseAddress - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS
170 that on successful return, contains the base address
171 of the firmware volume.
177 EFI_INVALID_PARAMETER - invalid parameter
186 OUT UINTN
*BlockSize
,
187 OUT UINTN
*NumOfBlocks
192 Retrieve the size of a logical block
195 Instance - The FV instance whose block size is going to be
197 Lba - Indicates which block to return the size for.
198 BlockSize - A pointer to a caller allocated UINTN in which
199 the size of the block is returned
200 NumOfBlocks - a pointer to a caller allocated UINTN in which the
201 number of consecutive blocks starting with Lba is
202 returned. All blocks in this range have a size of
206 EFI_SUCCESS - The firmware volume was read successfully and
207 contents are in Buffer
209 EFI_INVALID_PARAMETER - invalid parameter
215 EfiFvbEraseCustomBlockRange (
218 IN UINTN OffsetStartLba
,
220 IN UINTN OffsetLastLba
225 Erases and initializes a specified range of a firmware volume
228 Instance - The FV instance to be erased
229 StartLba - The starting logical block index to be erased
230 OffsetStartLba - Offset into the starting block at which to
232 LastLba - The last logical block index to be erased
233 OffsetLastLba - Offset into the last block at which to end erasing
239 EFI_INVALID_PARAMETER - invalid parameter
241 EFI_UNSUPPORTED - not support