3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #ifndef __EDK_FVB_SERVICE_LIB_H__
20 #define __EDK_FVB_SERVICE_LIB_H__
27 IN OUT UINTN
*NumBytes
,
33 Reads specified number of bytes into a buffer from the specified block
36 Instance - The FV instance to be read from
37 Lba - The logical block address to be read from
38 Offset - Offset into the block at which to begin reading
39 NumBytes - Pointer that on input contains the total size of
40 the buffer. On output, it contains the total number
42 Buffer - Pointer to a caller allocated buffer that will be
43 used to hold the data read
49 EFI_INVALID_PARAMETER - invalid parameter
59 IN OUT UINTN
*NumBytes
,
65 Writes specified number of bytes from the input buffer to the block
68 Instance - The FV instance to be written to
69 Lba - The starting logical block index to write to
70 Offset - Offset into the block at which to begin writing
71 NumBytes - Pointer that on input contains the total size of
72 the buffer. On output, it contains the total number
73 of bytes actually written
74 Buffer - Pointer to a caller allocated buffer that contains
75 the source for the write
81 EFI_INVALID_PARAMETER - invalid parameter
94 Erases and initializes a firmware volume block
97 Instance - The FV instance to be erased
98 Lba - The logical block index to be erased
104 EFI_INVALID_PARAMETER - invalid parameter
110 EfiFvbGetVolumeAttributes (
112 OUT EFI_FVB_ATTRIBUTES
*Attributes
117 Retrieves attributes, insures positive polarity of attribute bits, returns
118 resulting attributes in output parameter
121 Instance - The FV instance whose attributes is going to be
123 Attributes - Output buffer which contains attributes
128 EFI_INVALID_PARAMETER - invalid parameter
134 EfiFvbSetVolumeAttributes (
136 IN EFI_FVB_ATTRIBUTES Attributes
141 Modifies the current settings of the firmware volume according to the
142 input parameter, and returns the new setting of the volume
145 Instance - The FV instance whose attributes is going to be
147 Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES
148 containing the desired firmware volume settings.
149 On successful return, it contains the new settings
150 of the firmware volume
155 EFI_INVALID_PARAMETER - invalid parameter
161 EfiFvbGetPhysicalAddress (
163 OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
168 Retrieves the physical address of a memory mapped FV
171 Instance - The FV instance whose base address is going to be
173 BaseAddress - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS
174 that on successful return, contains the base address
175 of the firmware volume.
181 EFI_INVALID_PARAMETER - invalid parameter
190 OUT UINTN
*BlockSize
,
191 OUT UINTN
*NumOfBlocks
196 Retrieve the size of a logical block
199 Instance - The FV instance whose block size is going to be
201 Lba - Indicates which block to return the size for.
202 BlockSize - A pointer to a caller allocated UINTN in which
203 the size of the block is returned
204 NumOfBlocks - a pointer to a caller allocated UINTN in which the
205 number of consecutive blocks starting with Lba is
206 returned. All blocks in this range have a size of
210 EFI_SUCCESS - The firmware volume was read successfully and
211 contents are in Buffer
213 EFI_INVALID_PARAMETER - invalid parameter
219 EfiFvbEraseCustomBlockRange (
222 IN UINTN OffsetStartLba
,
224 IN UINTN OffsetLastLba
229 Erases and initializes a specified range of a firmware volume
232 Instance - The FV instance to be erased
233 StartLba - The starting logical block index to be erased
234 OffsetStartLba - Offset into the starting block at which to
236 LastLba - The last logical block index to be erased
237 OffsetLastLba - Offset into the last block at which to end erasing
243 EFI_INVALID_PARAMETER - invalid parameter
245 EFI_UNSUPPORTED - not support