]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Include/Library/EdkFvbServiceLib.h
Add enumeration type for EfiProcessorFamilyIntelPentiumM, EfiProcessorFamilyIntelCele...
[mirror_edk2.git] / EdkModulePkg / Include / Library / EdkFvbServiceLib.h
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 EdkFvbServiceLib.h\r
15\r
16Abstract:\r
17\r
18--*/\r
19#ifndef __EDK_FVB_SERVICE_LIB_H__\r
20#define __EDK_FVB_SERVICE_LIB_H__\r
21\r
22EFI_STATUS\r
23EfiFvbReadBlock (\r
24 IN UINTN Instance,\r
25 IN EFI_LBA Lba,\r
26 IN UINTN Offset,\r
27 IN OUT UINTN *NumBytes,\r
28 IN UINT8 *Buffer\r
29 )\r
30/*++\r
31\r
32Routine Description:\r
33 Reads specified number of bytes into a buffer from the specified block\r
34\r
35Arguments:\r
36 Instance - The FV instance to be read from\r
37 Lba - The logical block address to be read from\r
38 Offset - Offset into the block at which to begin reading\r
39 NumBytes - Pointer that on input contains the total size of\r
40 the buffer. On output, it contains the total number\r
41 of bytes read\r
42 Buffer - Pointer to a caller allocated buffer that will be\r
43 used to hold the data read\r
44\r
45Returns: \r
46\r
47 Status code\r
48 \r
49 EFI_INVALID_PARAMETER - invalid parameter\r
50\r
51--*/\r
52;\r
53\r
54EFI_STATUS\r
55EfiFvbWriteBlock (\r
56 IN UINTN Instance,\r
57 IN EFI_LBA Lba,\r
58 IN UINTN Offset,\r
59 IN OUT UINTN *NumBytes,\r
60 IN UINT8 *Buffer\r
61 )\r
62/*++\r
63\r
64Routine Description:\r
65 Writes specified number of bytes from the input buffer to the block\r
66\r
67Arguments:\r
68 Instance - The FV instance to be written to\r
69 Lba - The starting logical block index to write to\r
70 Offset - Offset into the block at which to begin writing\r
71 NumBytes - Pointer that on input contains the total size of\r
72 the buffer. On output, it contains the total number\r
73 of bytes actually written\r
74 Buffer - Pointer to a caller allocated buffer that contains\r
75 the source for the write\r
76\r
77Returns: \r
78\r
79 Status code\r
80 \r
81 EFI_INVALID_PARAMETER - invalid parameter\r
82\r
83--*/\r
84;\r
85\r
86EFI_STATUS\r
87EfiFvbEraseBlock (\r
88 IN UINTN Instance,\r
89 IN EFI_LBA Lba\r
90 )\r
91/*++\r
92\r
93Routine Description:\r
94 Erases and initializes a firmware volume block\r
95\r
96Arguments:\r
97 Instance - The FV instance to be erased\r
98 Lba - The logical block index to be erased\r
99 \r
100Returns: \r
101\r
102 Status code\r
103 \r
104 EFI_INVALID_PARAMETER - invalid parameter\r
105\r
106--*/\r
107;\r
108\r
109EFI_STATUS\r
110EfiFvbGetVolumeAttributes (\r
111 IN UINTN Instance,\r
112 OUT EFI_FVB_ATTRIBUTES *Attributes\r
113 )\r
114/*++\r
115\r
116Routine Description:\r
117 Retrieves attributes, insures positive polarity of attribute bits, returns\r
118 resulting attributes in output parameter\r
119\r
120Arguments:\r
121 Instance - The FV instance whose attributes is going to be \r
122 returned\r
123 Attributes - Output buffer which contains attributes\r
124\r
125Returns: \r
126 Status code\r
127 \r
128 EFI_INVALID_PARAMETER - invalid parameter\r
129\r
130--*/\r
131;\r
132\r
133EFI_STATUS\r
134EfiFvbSetVolumeAttributes (\r
135 IN UINTN Instance,\r
136 IN EFI_FVB_ATTRIBUTES Attributes\r
137 )\r
138/*++\r
139\r
140Routine Description:\r
141 Modifies the current settings of the firmware volume according to the \r
142 input parameter, and returns the new setting of the volume\r
143\r
144Arguments:\r
145 Instance - The FV instance whose attributes is going to be \r
146 modified\r
147 Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES \r
148 containing the desired firmware volume settings.\r
149 On successful return, it contains the new settings\r
150 of the firmware volume\r
151\r
152Returns: \r
153 Status code\r
154 \r
155 EFI_INVALID_PARAMETER - invalid parameter\r
156\r
157--*/\r
158;\r
159\r
160EFI_STATUS\r
161EfiFvbGetPhysicalAddress (\r
162 IN UINTN Instance,\r
163 OUT EFI_PHYSICAL_ADDRESS *BaseAddress\r
164 )\r
165/*++\r
166\r
167Routine Description:\r
168 Retrieves the physical address of a memory mapped FV\r
169\r
170Arguments:\r
171 Instance - The FV instance whose base address is going to be\r
172 returned\r
173 BaseAddress - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS \r
174 that on successful return, contains the base address\r
175 of the firmware volume. \r
176\r
177Returns: \r
178\r
179 Status code\r
180 \r
181 EFI_INVALID_PARAMETER - invalid parameter\r
182\r
183--*/\r
184;\r
185\r
186EFI_STATUS\r
187EfiFvbGetBlockSize (\r
188 IN UINTN Instance,\r
189 IN EFI_LBA Lba,\r
190 OUT UINTN *BlockSize,\r
191 OUT UINTN *NumOfBlocks\r
192 )\r
193/*++\r
194\r
195Routine Description:\r
196 Retrieve the size of a logical block\r
197\r
198Arguments:\r
199 Instance - The FV instance whose block size is going to be\r
200 returned\r
201 Lba - Indicates which block to return the size for.\r
202 BlockSize - A pointer to a caller allocated UINTN in which\r
203 the size of the block is returned\r
204 NumOfBlocks - a pointer to a caller allocated UINTN in which the\r
205 number of consecutive blocks starting with Lba is\r
206 returned. All blocks in this range have a size of\r
207 BlockSize\r
208\r
209Returns: \r
210 EFI_SUCCESS - The firmware volume was read successfully and \r
211 contents are in Buffer\r
212 \r
213 EFI_INVALID_PARAMETER - invalid parameter\r
214\r
215--*/\r
216;\r
217\r
218EFI_STATUS\r
219EfiFvbEraseCustomBlockRange (\r
220 IN UINTN Instance,\r
221 IN EFI_LBA StartLba,\r
222 IN UINTN OffsetStartLba,\r
223 IN EFI_LBA LastLba,\r
224 IN UINTN OffsetLastLba\r
225 )\r
226/*++\r
227\r
228Routine Description:\r
229 Erases and initializes a specified range of a firmware volume\r
230\r
231Arguments:\r
232 Instance - The FV instance to be erased\r
233 StartLba - The starting logical block index to be erased\r
234 OffsetStartLba - Offset into the starting block at which to \r
235 begin erasing\r
236 LastLba - The last logical block index to be erased\r
237 OffsetLastLba - Offset into the last block at which to end erasing\r
238\r
239Returns: \r
240\r
241 Status code\r
242 \r
243 EFI_INVALID_PARAMETER - invalid parameter\r
244 \r
245 EFI_UNSUPPORTED - not support\r
246 \r
247--*/\r
248;\r
249\r
250#endif\r