]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | Platform Configuration Database (PCD) Protocol\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation \r | |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
13 | Module Name: Pcd.h\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __PCD_H__\r | |
18 | #define __PCD_H__\r | |
19 | \r | |
20 | extern EFI_GUID gPcdPpiGuid;\r | |
21 | \r | |
22 | #define PCD_PPI_GUID \\r | |
2a505eac | 23 | { 0x6e81c58, 0x4ad7, 0x44bc, { 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80 } }\r |
878ddf1f | 24 | \r |
58f1099f | 25 | #define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0)\r |
8a43e8dd | 26 | \r |
a7c5092f | 27 | \r |
28 | \r | |
29 | /**\r | |
30 | Sets the SKU value for subsequent calls to set or get PCD token values.\r | |
31 | \r | |
32 | SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. \r | |
33 | SetSku() is normally called only once by the system.\r | |
34 | \r | |
35 | For each item (token), the database can hold a single value that applies to all SKUs, \r | |
36 | or multiple values, where each value is associated with a specific SKU Id. Items with multiple, \r | |
37 | SKU-specific values are called SKU enabled. \r | |
38 | \r | |
39 | The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255. \r | |
40 | For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the \r | |
41 | single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the \r | |
42 | last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, \r | |
43 | the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been \r | |
44 | set for that Id, the results are unpredictable.\r | |
45 | \r | |
2a870f53 | 46 | @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and \r |
a7c5092f | 47 | set values associated with a PCD token.\r |
48 | \r | |
49 | @retval VOID\r | |
50 | \r | |
51 | **/\r | |
878ddf1f | 52 | typedef \r |
b16ef805 | 53 | VOID\r |
878ddf1f | 54 | (EFIAPI *PCD_PPI_SET_SKU) (\r |
8a43e8dd | 55 | IN UINTN SkuId\r |
878ddf1f | 56 | );\r |
57 | \r | |
a7c5092f | 58 | \r |
59 | \r | |
60 | /**\r | |
61 | Retrieves an 8-bit value for a given PCD token.\r | |
62 | \r | |
63 | Retrieves the current byte-sized value for a PCD token number. \r | |
64 | If the TokenNumber is invalid, the results are unpredictable.\r | |
65 | \r | |
2a870f53 | 66 | @param[in] TokenNumber The PCD token number. \r |
a7c5092f | 67 | \r |
68 | @return The UINT8 value.\r | |
69 | \r | |
70 | **/\r | |
878ddf1f | 71 | typedef\r |
72 | UINT8\r | |
73 | (EFIAPI *PCD_PPI_GET8) (\r | |
8a43e8dd | 74 | IN UINTN TokenNumber\r |
878ddf1f | 75 | );\r |
76 | \r | |
a7c5092f | 77 | \r |
78 | \r | |
79 | /**\r | |
80 | Retrieves an 16-bit value for a given PCD token.\r | |
81 | \r | |
82 | Retrieves the current 16-bits value for a PCD token number. \r | |
83 | If the TokenNumber is invalid, the results are unpredictable.\r | |
84 | \r | |
2a870f53 | 85 | @param[in] TokenNumber The PCD token number. \r |
a7c5092f | 86 | \r |
87 | @return The UINT16 value.\r | |
88 | \r | |
89 | **/\r | |
878ddf1f | 90 | typedef\r |
91 | UINT16\r | |
92 | (EFIAPI *PCD_PPI_GET16) (\r | |
8a43e8dd | 93 | IN UINTN TokenNumber\r |
878ddf1f | 94 | );\r |
95 | \r | |
a7c5092f | 96 | \r |
97 | \r | |
98 | /**\r | |
99 | Retrieves an 32-bit value for a given PCD token.\r | |
100 | \r | |
101 | Retrieves the current 32-bits value for a PCD token number. \r | |
102 | If the TokenNumber is invalid, the results are unpredictable.\r | |
103 | \r | |
2a870f53 | 104 | @param[in] TokenNumber The PCD token number. \r |
a7c5092f | 105 | \r |
106 | @return The UINT32 value.\r | |
107 | \r | |
108 | **/\r | |
878ddf1f | 109 | typedef\r |
110 | UINT32\r | |
111 | (EFIAPI *PCD_PPI_GET32) (\r | |
8a43e8dd | 112 | IN UINTN TokenNumber\r |
878ddf1f | 113 | );\r |
114 | \r | |
a7c5092f | 115 | \r |
116 | \r | |
117 | /**\r | |
118 | Retrieves an 64-bit value for a given PCD token.\r | |
119 | \r | |
120 | Retrieves the current 64-bits value for a PCD token number. \r | |
121 | If the TokenNumber is invalid, the results are unpredictable.\r | |
122 | \r | |
2a870f53 | 123 | @param[in] TokenNumber The PCD token number. \r |
a7c5092f | 124 | \r |
125 | @return The UINT64 value.\r | |
126 | \r | |
127 | **/\r | |
878ddf1f | 128 | typedef\r |
129 | UINT64\r | |
130 | (EFIAPI *PCD_PPI_GET64) (\r | |
8a43e8dd | 131 | IN UINTN TokenNumber\r |
878ddf1f | 132 | );\r |
133 | \r | |
a7c5092f | 134 | \r |
135 | \r | |
136 | /**\r | |
137 | Retrieves a pointer to a value for a given PCD token.\r | |
138 | \r | |
139 | Retrieves the current pointer to the buffer for a PCD token number. \r | |
140 | Do not make any assumptions about the alignment of the pointer that \r | |
141 | is returned by this function call. If the TokenNumber is invalid, \r | |
142 | the results are unpredictable.\r | |
143 | \r | |
2a870f53 | 144 | @param[in] TokenNumber The PCD token number. \r |
a7c5092f | 145 | \r |
146 | @return The pointer to the buffer to be retrived.\r | |
147 | \r | |
148 | **/\r | |
878ddf1f | 149 | typedef\r |
150 | VOID *\r | |
151 | (EFIAPI *PCD_PPI_GET_POINTER) (\r | |
8a43e8dd | 152 | IN UINTN TokenNumber\r |
878ddf1f | 153 | );\r |
154 | \r | |
a7c5092f | 155 | \r |
156 | \r | |
157 | /**\r | |
158 | Retrieves a Boolean value for a given PCD token.\r | |
159 | \r | |
160 | Retrieves the current boolean value for a PCD token number. \r | |
161 | Do not make any assumptions about the alignment of the pointer that \r | |
162 | is returned by this function call. If the TokenNumber is invalid, \r | |
163 | the results are unpredictable.\r | |
164 | \r | |
2a870f53 | 165 | @param[in] TokenNumber The PCD token number. \r |
a7c5092f | 166 | \r |
167 | @return The Boolean value.\r | |
168 | \r | |
169 | **/\r | |
878ddf1f | 170 | typedef\r |
171 | BOOLEAN\r | |
172 | (EFIAPI *PCD_PPI_GET_BOOLEAN) (\r | |
8a43e8dd | 173 | IN UINTN TokenNumber\r |
878ddf1f | 174 | );\r |
175 | \r | |
a7c5092f | 176 | \r |
177 | \r | |
178 | /**\r | |
179 | Retrieves the size of the value for a given PCD token.\r | |
180 | \r | |
181 | Retrieves the current size of a particular PCD token. \r | |
182 | If the TokenNumber is invalid, the results are unpredictable.\r | |
183 | \r | |
2a870f53 | 184 | @param[in] TokenNumber The PCD token number. \r |
a7c5092f | 185 | \r |
186 | @return The size of the value for the PCD token.\r | |
187 | \r | |
188 | **/\r | |
878ddf1f | 189 | typedef\r |
190 | UINTN\r | |
191 | (EFIAPI *PCD_PPI_GET_SIZE) (\r | |
8a43e8dd | 192 | IN UINTN TokenNumber\r |
878ddf1f | 193 | );\r |
194 | \r | |
a7c5092f | 195 | \r |
196 | \r | |
197 | /**\r | |
198 | Retrieves an 8-bit value for a given PCD token.\r | |
199 | \r | |
200 | Retrieves the 8-bit value of a particular PCD token. \r | |
201 | If the TokenNumber is invalid or the token space\r | |
202 | specified by Guid does not exist, the results are \r | |
203 | unpredictable.\r | |
204 | \r | |
2a870f53 | 205 | @param[in] Guid The token space for the token number.\r |
206 | @param[in] TokenNumber The PCD token number. \r | |
a7c5092f | 207 | \r |
208 | @return The size 8-bit value for the PCD token.\r | |
209 | \r | |
210 | **/\r | |
878ddf1f | 211 | typedef\r |
212 | UINT8\r | |
213 | (EFIAPI *PCD_PPI_GET_EX_8) (\r | |
214 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 215 | IN UINTN TokenNumber\r |
878ddf1f | 216 | );\r |
217 | \r | |
a7c5092f | 218 | \r |
219 | \r | |
220 | /**\r | |
221 | Retrieves an 16-bit value for a given PCD token.\r | |
222 | \r | |
223 | Retrieves the 16-bit value of a particular PCD token. \r | |
224 | If the TokenNumber is invalid or the token space\r | |
225 | specified by Guid does not exist, the results are \r | |
226 | unpredictable.\r | |
227 | \r | |
2a870f53 | 228 | @param[in] Guid The token space for the token number.\r |
229 | @param[in] TokenNumber The PCD token number. \r | |
a7c5092f | 230 | \r |
231 | @return The size 16-bit value for the PCD token.\r | |
232 | \r | |
233 | **/\r | |
878ddf1f | 234 | typedef\r |
235 | UINT16\r | |
236 | (EFIAPI *PCD_PPI_GET_EX_16) (\r | |
237 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 238 | IN UINTN TokenNumber\r |
878ddf1f | 239 | );\r |
240 | \r | |
a7c5092f | 241 | \r |
242 | \r | |
243 | /**\r | |
244 | Retrieves an 32-bit value for a given PCD token.\r | |
245 | \r | |
246 | Retrieves the 32-bit value of a particular PCD token. \r | |
247 | If the TokenNumber is invalid or the token space\r | |
248 | specified by Guid does not exist, the results are \r | |
249 | unpredictable.\r | |
250 | \r | |
2a870f53 | 251 | @param[in] Guid The token space for the token number.\r |
252 | @param[in] TokenNumber The PCD token number. \r | |
a7c5092f | 253 | \r |
254 | @return The size 32-bit value for the PCD token.\r | |
255 | \r | |
256 | **/\r | |
878ddf1f | 257 | typedef\r |
258 | UINT32\r | |
259 | (EFIAPI *PCD_PPI_GET_EX_32) (\r | |
260 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 261 | IN UINTN TokenNumber\r |
878ddf1f | 262 | );\r |
263 | \r | |
a7c5092f | 264 | \r |
265 | \r | |
266 | /**\r | |
267 | Retrieves an 64-bit value for a given PCD token.\r | |
268 | \r | |
269 | Retrieves the 64-bit value of a particular PCD token. \r | |
270 | If the TokenNumber is invalid or the token space\r | |
271 | specified by Guid does not exist, the results are \r | |
272 | unpredictable.\r | |
273 | \r | |
2a870f53 | 274 | @param[in] Guid The token space for the token number.\r |
275 | @param[in] TokenNumber The PCD token number. \r | |
a7c5092f | 276 | \r |
277 | @return The size 64-bit value for the PCD token.\r | |
278 | \r | |
279 | **/\r | |
878ddf1f | 280 | typedef\r |
281 | UINT64\r | |
282 | (EFIAPI *PCD_PPI_GET_EX_64) (\r | |
283 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 284 | IN UINTN TokenNumber\r |
878ddf1f | 285 | );\r |
286 | \r | |
a7c5092f | 287 | \r |
288 | \r | |
289 | /**\r | |
290 | Retrieves a pointer to a value for a given PCD token.\r | |
291 | \r | |
292 | Retrieves the current pointer to the buffer for a PCD token number. \r | |
293 | Do not make any assumptions about the alignment of the pointer that \r | |
294 | is returned by this function call. If the TokenNumber is invalid, \r | |
295 | the results are unpredictable.\r | |
296 | \r | |
2a870f53 | 297 | @param[in] Guid The token space for the token number.\r |
298 | @param[in] TokenNumber The PCD token number. \r | |
a7c5092f | 299 | \r |
300 | @return The pointer to the buffer to be retrived.\r | |
301 | \r | |
302 | **/\r | |
878ddf1f | 303 | typedef\r |
304 | VOID *\r | |
305 | (EFIAPI *PCD_PPI_GET_EX_POINTER) (\r | |
306 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 307 | IN UINTN TokenNumber\r |
878ddf1f | 308 | );\r |
309 | \r | |
a7c5092f | 310 | \r |
311 | \r | |
312 | /**\r | |
313 | Retrieves an Boolean value for a given PCD token.\r | |
314 | \r | |
315 | Retrieves the Boolean value of a particular PCD token. \r | |
316 | If the TokenNumber is invalid or the token space\r | |
317 | specified by Guid does not exist, the results are \r | |
318 | unpredictable.\r | |
319 | \r | |
2a870f53 | 320 | @param[in] Guid The token space for the token number.\r |
321 | @param[in] TokenNumber The PCD token number. \r | |
a7c5092f | 322 | \r |
323 | @return The size Boolean value for the PCD token.\r | |
324 | \r | |
325 | **/\r | |
878ddf1f | 326 | typedef\r |
327 | BOOLEAN\r | |
328 | (EFIAPI *PCD_PPI_GET_EX_BOOLEAN) (\r | |
329 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 330 | IN UINTN TokenNumber\r |
878ddf1f | 331 | );\r |
332 | \r | |
a7c5092f | 333 | \r |
334 | \r | |
335 | /**\r | |
336 | Retrieves the size of the value for a given PCD token.\r | |
337 | \r | |
338 | Retrieves the current size of a particular PCD token. \r | |
339 | If the TokenNumber is invalid, the results are unpredictable.\r | |
340 | \r | |
2a870f53 | 341 | @param[in] Guid The token space for the token number.\r |
342 | @param[in] TokenNumber The PCD token number. \r | |
a7c5092f | 343 | \r |
344 | @return The size of the value for the PCD token.\r | |
345 | \r | |
346 | **/\r | |
878ddf1f | 347 | typedef\r |
348 | UINTN\r | |
349 | (EFIAPI *PCD_PPI_GET_EX_SIZE) (\r | |
350 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 351 | IN UINTN TokenNumber\r |
878ddf1f | 352 | );\r |
353 | \r | |
a7c5092f | 354 | \r |
355 | \r | |
356 | /**\r | |
357 | Sets an 8-bit value for a given PCD token.\r | |
358 | \r | |
359 | When the PCD service sets a value, it will check to ensure that the \r | |
360 | size of the value being set is compatible with the Token's existing definition. \r | |
361 | If it is not, an error will be returned.\r | |
362 | \r | |
2a870f53 | 363 | @param[in] TokenNumber The PCD token number. \r |
364 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 365 | \r |
366 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
367 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
368 | being set was incompatible with a call to this function. \r | |
369 | Use GetSize() to retrieve the size of the target data.\r | |
370 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
371 | \r | |
372 | **/\r | |
878ddf1f | 373 | typedef\r |
374 | EFI_STATUS\r | |
375 | (EFIAPI *PCD_PPI_SET8) (\r | |
8a43e8dd | 376 | IN UINTN TokenNumber,\r |
878ddf1f | 377 | IN UINT8 Value\r |
378 | );\r | |
379 | \r | |
a7c5092f | 380 | \r |
381 | \r | |
382 | /**\r | |
383 | Sets an 16-bit value for a given PCD token.\r | |
384 | \r | |
385 | When the PCD service sets a value, it will check to ensure that the \r | |
386 | size of the value being set is compatible with the Token's existing definition. \r | |
387 | If it is not, an error will be returned.\r | |
388 | \r | |
2a870f53 | 389 | @param[in] TokenNumber The PCD token number. \r |
390 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 391 | \r |
392 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
393 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
394 | being set was incompatible with a call to this function. \r | |
395 | Use GetSize() to retrieve the size of the target data.\r | |
396 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
397 | \r | |
398 | **/\r | |
878ddf1f | 399 | typedef\r |
400 | EFI_STATUS\r | |
401 | (EFIAPI *PCD_PPI_SET16) (\r | |
8a43e8dd | 402 | IN UINTN TokenNumber,\r |
878ddf1f | 403 | IN UINT16 Value\r |
404 | );\r | |
405 | \r | |
a7c5092f | 406 | \r |
407 | \r | |
408 | /**\r | |
409 | Sets an 32-bit value for a given PCD token.\r | |
410 | \r | |
411 | When the PCD service sets a value, it will check to ensure that the \r | |
412 | size of the value being set is compatible with the Token's existing definition. \r | |
413 | If it is not, an error will be returned.\r | |
414 | \r | |
2a870f53 | 415 | @param[in] TokenNumber The PCD token number. \r |
416 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 417 | \r |
418 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
419 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
420 | being set was incompatible with a call to this function. \r | |
421 | Use GetSize() to retrieve the size of the target data.\r | |
422 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
423 | \r | |
424 | **/\r | |
878ddf1f | 425 | typedef\r |
426 | EFI_STATUS\r | |
427 | (EFIAPI *PCD_PPI_SET32) (\r | |
8a43e8dd | 428 | IN UINTN TokenNumber,\r |
878ddf1f | 429 | IN UINT32 Value\r |
430 | );\r | |
431 | \r | |
a7c5092f | 432 | \r |
433 | \r | |
434 | /**\r | |
435 | Sets an 64-bit value for a given PCD token.\r | |
436 | \r | |
437 | When the PCD service sets a value, it will check to ensure that the \r | |
438 | size of the value being set is compatible with the Token's existing definition. \r | |
439 | If it is not, an error will be returned.\r | |
440 | \r | |
2a870f53 | 441 | @param[in] TokenNumber The PCD token number. \r |
442 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 443 | \r |
444 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
445 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
446 | being set was incompatible with a call to this function. \r | |
447 | Use GetSize() to retrieve the size of the target data.\r | |
448 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
449 | \r | |
450 | **/\r | |
878ddf1f | 451 | typedef\r |
452 | EFI_STATUS\r | |
453 | (EFIAPI *PCD_PPI_SET64) (\r | |
8a43e8dd | 454 | IN UINTN TokenNumber,\r |
878ddf1f | 455 | IN UINT64 Value\r |
456 | );\r | |
457 | \r | |
a7c5092f | 458 | \r |
459 | \r | |
460 | \r | |
461 | /**\r | |
462 | Sets a value of a specified size for a given PCD token.\r | |
463 | \r | |
464 | When the PCD service sets a value, it will check to ensure that the \r | |
465 | size of the value being set is compatible with the Token's existing definition. \r | |
466 | If it is not, an error will be returned.\r | |
467 | \r | |
2a870f53 | 468 | @param[in] TokenNumber The PCD token number. \r |
469 | @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. \r | |
a7c5092f | 470 | On input, if the SizeOfValue is greater than the maximum size supported \r |
471 | for this TokenNumber then the output value of SizeOfValue will reflect \r | |
472 | the maximum size supported for this TokenNumber.\r | |
2a870f53 | 473 | @param[in] Buffer The buffer to set for the PCD token.\r |
a7c5092f | 474 | \r |
475 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
476 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
477 | being set was incompatible with a call to this function. \r | |
478 | Use GetSize() to retrieve the size of the target data.\r | |
479 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
480 | \r | |
481 | **/\r | |
878ddf1f | 482 | typedef\r |
483 | EFI_STATUS\r | |
484 | (EFIAPI *PCD_PPI_SET_POINTER) (\r | |
1de04b4f | 485 | IN UINTN TokenNumber,\r |
486 | IN OUT UINTN *SizeOfBuffer,\r | |
487 | IN VOID *Buffer\r | |
878ddf1f | 488 | );\r |
489 | \r | |
a7c5092f | 490 | \r |
491 | \r | |
492 | /**\r | |
493 | Sets an Boolean value for a given PCD token.\r | |
494 | \r | |
495 | When the PCD service sets a value, it will check to ensure that the \r | |
496 | size of the value being set is compatible with the Token's existing definition. \r | |
497 | If it is not, an error will be returned.\r | |
498 | \r | |
2a870f53 | 499 | @param[in] TokenNumber The PCD token number. \r |
500 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 501 | \r |
502 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
503 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
504 | being set was incompatible with a call to this function. \r | |
505 | Use GetSize() to retrieve the size of the target data.\r | |
506 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
507 | \r | |
508 | **/\r | |
878ddf1f | 509 | typedef\r |
510 | EFI_STATUS\r | |
511 | (EFIAPI *PCD_PPI_SET_BOOLEAN) (\r | |
8a43e8dd | 512 | IN UINTN TokenNumber,\r |
878ddf1f | 513 | IN BOOLEAN Value\r |
514 | );\r | |
515 | \r | |
a7c5092f | 516 | \r |
517 | \r | |
518 | /**\r | |
519 | Sets an 8-bit value for a given PCD token.\r | |
520 | \r | |
521 | When the PCD service sets a value, it will check to ensure that the \r | |
522 | size of the value being set is compatible with the Token's existing definition. \r | |
523 | If it is not, an error will be returned.\r | |
524 | \r | |
2a870f53 | 525 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r |
526 | @param[in] TokenNumber The PCD token number. \r | |
527 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 528 | \r |
529 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
530 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
531 | being set was incompatible with a call to this function. \r | |
532 | Use GetSize() to retrieve the size of the target data.\r | |
533 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
534 | \r | |
535 | **/\r | |
878ddf1f | 536 | typedef\r |
537 | EFI_STATUS\r | |
538 | (EFIAPI *PCD_PPI_SET_EX_8) (\r | |
539 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 540 | IN UINTN TokenNumber,\r |
878ddf1f | 541 | IN UINT8 Value\r |
542 | );\r | |
543 | \r | |
a7c5092f | 544 | \r |
545 | \r | |
546 | /**\r | |
547 | Sets an 16-bit value for a given PCD token.\r | |
548 | \r | |
549 | When the PCD service sets a value, it will check to ensure that the \r | |
550 | size of the value being set is compatible with the Token's existing definition. \r | |
551 | If it is not, an error will be returned.\r | |
552 | \r | |
2a870f53 | 553 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r |
554 | @param[in] TokenNumber The PCD token number. \r | |
555 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 556 | \r |
557 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
558 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
559 | being set was incompatible with a call to this function. \r | |
560 | Use GetSize() to retrieve the size of the target data.\r | |
561 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
562 | \r | |
563 | **/\r | |
878ddf1f | 564 | typedef\r |
565 | EFI_STATUS\r | |
566 | (EFIAPI *PCD_PPI_SET_EX_16) (\r | |
567 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 568 | IN UINTN TokenNumber,\r |
878ddf1f | 569 | IN UINT16 Value\r |
570 | );\r | |
571 | \r | |
a7c5092f | 572 | \r |
573 | \r | |
574 | /**\r | |
575 | Sets an 32-bit value for a given PCD token.\r | |
576 | \r | |
577 | When the PCD service sets a value, it will check to ensure that the \r | |
578 | size of the value being set is compatible with the Token's existing definition. \r | |
579 | If it is not, an error will be returned.\r | |
580 | \r | |
2a870f53 | 581 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r |
582 | @param[in] TokenNumber The PCD token number. \r | |
583 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 584 | \r |
585 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
586 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
587 | being set was incompatible with a call to this function. \r | |
588 | Use GetSize() to retrieve the size of the target data.\r | |
589 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
590 | \r | |
591 | **/\r | |
878ddf1f | 592 | typedef\r |
593 | EFI_STATUS\r | |
594 | (EFIAPI *PCD_PPI_SET_EX_32) (\r | |
595 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 596 | IN UINTN TokenNumber,\r |
878ddf1f | 597 | IN UINT32 Value\r |
598 | );\r | |
599 | \r | |
a7c5092f | 600 | \r |
601 | \r | |
602 | /**\r | |
603 | Sets an 64-bit value for a given PCD token.\r | |
604 | \r | |
605 | When the PCD service sets a value, it will check to ensure that the \r | |
606 | size of the value being set is compatible with the Token's existing definition. \r | |
607 | If it is not, an error will be returned.\r | |
608 | \r | |
2a870f53 | 609 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r |
610 | @param[in] TokenNumber The PCD token number. \r | |
611 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 612 | \r |
613 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
614 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
615 | being set was incompatible with a call to this function. \r | |
616 | Use GetSize() to retrieve the size of the target data.\r | |
617 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
618 | \r | |
619 | **/\r | |
878ddf1f | 620 | typedef\r |
621 | EFI_STATUS\r | |
622 | (EFIAPI *PCD_PPI_SET_EX_64) (\r | |
623 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 624 | IN UINTN TokenNumber,\r |
878ddf1f | 625 | IN UINT64 Value\r |
626 | );\r | |
627 | \r | |
a7c5092f | 628 | \r |
629 | \r | |
630 | /**\r | |
631 | Sets a value of a specified size for a given PCD token.\r | |
632 | \r | |
633 | When the PCD service sets a value, it will check to ensure that the \r | |
634 | size of the value being set is compatible with the Token's existing definition. \r | |
635 | If it is not, an error will be returned.\r | |
636 | \r | |
2a870f53 | 637 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r |
638 | @param[in] TokenNumber The PCD token number. \r | |
639 | @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. \r | |
a7c5092f | 640 | On input, if the SizeOfValue is greater than the maximum size supported \r |
641 | for this TokenNumber then the output value of SizeOfValue will reflect \r | |
642 | the maximum size supported for this TokenNumber.\r | |
2a870f53 | 643 | @param[in] Buffer The buffer to set for the PCD token.\r |
a7c5092f | 644 | \r |
645 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
646 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
647 | being set was incompatible with a call to this function. \r | |
648 | Use GetSize() to retrieve the size of the target data.\r | |
649 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
650 | \r | |
651 | **/\r | |
878ddf1f | 652 | typedef\r |
653 | EFI_STATUS\r | |
654 | (EFIAPI *PCD_PPI_SET_EX_POINTER) (\r | |
1de04b4f | 655 | IN CONST EFI_GUID *Guid,\r |
656 | IN UINTN TokenNumber,\r | |
657 | IN OUT UINTN *SizeOfBuffer,\r | |
658 | IN VOID *Buffer\r | |
878ddf1f | 659 | );\r |
660 | \r | |
a7c5092f | 661 | \r |
662 | \r | |
663 | /**\r | |
664 | Sets an Boolean value for a given PCD token.\r | |
665 | \r | |
666 | When the PCD service sets a value, it will check to ensure that the \r | |
667 | size of the value being set is compatible with the Token's existing definition. \r | |
668 | If it is not, an error will be returned.\r | |
669 | \r | |
2a870f53 | 670 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r |
671 | @param[in] TokenNumber The PCD token number. \r | |
672 | @param[in] Value The value to set for the PCD token.\r | |
a7c5092f | 673 | \r |
674 | @retval EFI_SUCCESS Procedure returned successfully.\r | |
675 | @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data \r | |
676 | being set was incompatible with a call to this function. \r | |
677 | Use GetSize() to retrieve the size of the target data.\r | |
678 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number.\r | |
679 | \r | |
680 | **/\r | |
878ddf1f | 681 | typedef\r |
682 | EFI_STATUS\r | |
683 | (EFIAPI *PCD_PPI_SET_EX_BOOLEAN) (\r | |
684 | IN CONST EFI_GUID *Guid,\r | |
8a43e8dd | 685 | IN UINTN TokenNumber,\r |
878ddf1f | 686 | IN BOOLEAN Value\r |
687 | );\r | |
688 | \r | |
a7c5092f | 689 | \r |
690 | \r | |
878ddf1f | 691 | /**\r |
692 | Callback on SET function prototype definition.\r | |
693 | \r | |
2a870f53 | 694 | This notification function serves two purposes. Firstly, it notifies the module \r |
695 | which did the registration that the value of this PCD token has been set. Secondly, \r | |
696 | it provides a mechanism for the module which did the registration to intercept the set \r | |
697 | operation and override the value been set if necessary. After the invocation of the \r | |
698 | callback function, TokenData will be used by PCD service PEIM to modify the internal data \r | |
699 | in PCD database.\r | |
700 | \r | |
701 | @param[in] CallBackGuid The PCD token GUID being set.\r | |
702 | @param[in] CallBackToken The PCD token number being set.\r | |
703 | @param[in, out] TokenData A pointer to the token data being set.\r | |
704 | @param[in] TokenDataSize The size, in bytes, of the data being set.\r | |
878ddf1f | 705 | \r |
706 | @retval VOID\r | |
707 | \r | |
a7c5092f | 708 | **/\r |
878ddf1f | 709 | typedef\r |
710 | VOID\r | |
711 | (EFIAPI *PCD_PPI_CALLBACK) (\r | |
b16ef805 | 712 | IN CONST EFI_GUID *CallBackGuid, OPTIONAL\r |
8a43e8dd | 713 | IN UINTN CallBackToken,\r |
b16ef805 | 714 | IN OUT VOID *TokenData,\r |
715 | IN UINTN TokenDataSize\r | |
878ddf1f | 716 | );\r |
717 | \r | |
a7c5092f | 718 | \r |
719 | \r | |
720 | /**\r | |
721 | Specifies a function to be called anytime the value of a designated token is changed.\r | |
722 | \r | |
2a870f53 | 723 | @param[in] TokenNumber The PCD token number. \r |
724 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r | |
725 | @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. \r | |
a7c5092f | 726 | \r |
727 | @retval EFI_SUCCESS The PCD service has successfully established a call event \r | |
728 | for the CallBackToken requested.\r | |
729 | @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.\r | |
730 | \r | |
731 | **/\r | |
878ddf1f | 732 | typedef\r |
733 | EFI_STATUS\r | |
734 | (EFIAPI *PCD_PPI_CALLBACK_ONSET) (\r | |
878ddf1f | 735 | IN CONST EFI_GUID *Guid, OPTIONAL\r |
2a870f53 | 736 | IN UINTN TokenNumber,\r |
878ddf1f | 737 | IN PCD_PPI_CALLBACK CallBackFunction\r |
738 | );\r | |
739 | \r | |
a7c5092f | 740 | \r |
741 | \r | |
742 | /**\r | |
743 | Cancels a previously set callback function for a particular PCD token number.\r | |
744 | \r | |
2a870f53 | 745 | @param[in] TokenNumber The PCD token number. \r |
746 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r | |
747 | @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. \r | |
a7c5092f | 748 | \r |
749 | @retval EFI_SUCCESS The PCD service has successfully established a call event \r | |
750 | for the CallBackToken requested.\r | |
751 | @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.\r | |
752 | \r | |
753 | **/\r | |
878ddf1f | 754 | typedef\r |
755 | EFI_STATUS\r | |
756 | (EFIAPI *PCD_PPI_CANCEL_CALLBACK) (\r | |
878ddf1f | 757 | IN CONST EFI_GUID *Guid, OPTIONAL\r |
2a870f53 | 758 | IN UINTN TokenNumber,\r |
878ddf1f | 759 | IN PCD_PPI_CALLBACK CallBackFunction\r |
760 | );\r | |
761 | \r | |
a7c5092f | 762 | \r |
763 | \r | |
764 | /**\r | |
765 | Retrieves the next valid PCD token for a given namespace.\r | |
766 | \r | |
2a870f53 | 767 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r |
768 | @param[in, out] TokenNumber A pointer to the PCD token number to use to find the subsequent token number.\r | |
769 | If the input token namespace or token number does not exist on the platform, an error is \r | |
511710d6 | 770 | returned and the value of *TokenNumber is undefined. To retrieve the "first" token, \r |
2a870f53 | 771 | have the pointer reference a TokenNumber value of 0. If the input token number is 0 \r |
772 | and there is no valid token number for this token namespace, *TokenNumber will be \r | |
773 | assigned to 0 and the function return EFI_SUCCESS. If the token number is the last valid \r | |
774 | token number, *TokenNumber will be assigned to 0 and the function return EFI_SUCCESS.\r | |
a7c5092f | 775 | \r |
2a870f53 | 776 | @retval EFI_SUCCESS The PCD service has retrieved the next valid token number. \r |
777 | Or the input token number is already the last valid token number in the PCD database. \r | |
778 | In the later case, *TokenNumber is updated with the value of 0.\r | |
779 | @retval EFI_NOT_FOUND If this input token number and token namespace does not exist on the platform.\r | |
a7c5092f | 780 | \r |
781 | **/\r | |
878ddf1f | 782 | typedef \r |
783 | EFI_STATUS\r | |
784 | (EFIAPI *PCD_PPI_GET_NEXT_TOKEN) (\r | |
785 | IN CONST EFI_GUID *Guid, OPTIONAL\r | |
8a43e8dd | 786 | IN OUT UINTN *TokenNumber\r |
878ddf1f | 787 | );\r |
788 | \r | |
a7c5092f | 789 | \r |
790 | \r | |
791 | /**\r | |
792 | Retrieves the next valid PCD token namespace for a given namespace.\r | |
793 | \r | |
2a870f53 | 794 | @param[in, out] Guid An indirect pointer to EFI_GUID. On input it designates a known \r |
795 | token namespace from which the search will start. On output, it designates \r | |
796 | the next valid token namespace on the platform. If the input token namespace \r | |
797 | does not exist on the platform, an error is returned and the value of *Guid is \r | |
798 | undefined. If *Guid is NULL, then the GUID of the first token space of the \r | |
799 | current platform is assigned to *Guid the function return EFI_SUCCESS. \r | |
800 | If *Guid is NULL and there is no namespace exist in the platform other than the default \r | |
801 | (NULL) tokennamespace, *Guid is unchanged and the function return EFI_SUCCESS. \r | |
802 | If this input token namespace is the last namespace on the platform, \r | |
a7c5092f | 803 | *Guid will be assigned to NULL and the function return EFI_SUCCESS.\r |
a7c5092f | 804 | \r |
2a870f53 | 805 | @retval EFI_SUCCESS The PCD service has retrieved the next valid token namespace. \r |
806 | Or the input token namespace is already the last valid token \r | |
807 | number in the PCD database. In the later case, *Guid is updated \r | |
808 | with the value of NULL. Or the input token name space is NULL and there \r | |
809 | is no valid token namespace other than the default namespace (NULL).\r | |
810 | @retval EFI_NOT_FOUND If the input token namespace does not exist on the platform.\r | |
a7c5092f | 811 | \r |
812 | **/\r | |
4276d5da | 813 | typedef\r |
814 | EFI_STATUS\r | |
815 | (EFIAPI *PCD_PPI_GET_NEXT_TOKENSPACE) (\r | |
816 | IN OUT CONST EFI_GUID **Guid\r | |
817 | );\r | |
818 | \r | |
a7c5092f | 819 | \r |
820 | \r | |
821 | //\r | |
822 | // Interface structure for the PCD PPI\r | |
823 | //\r | |
878ddf1f | 824 | typedef struct {\r |
825 | PCD_PPI_SET_SKU SetSku;\r | |
826 | \r | |
827 | PCD_PPI_GET8 Get8;\r | |
828 | PCD_PPI_GET16 Get16;\r | |
829 | PCD_PPI_GET32 Get32;\r | |
830 | PCD_PPI_GET64 Get64;\r | |
831 | PCD_PPI_GET_POINTER GetPtr;\r | |
832 | PCD_PPI_GET_BOOLEAN GetBool;\r | |
833 | PCD_PPI_GET_SIZE GetSize;\r | |
834 | \r | |
835 | PCD_PPI_GET_EX_8 Get8Ex;\r | |
836 | PCD_PPI_GET_EX_16 Get16Ex;\r | |
837 | PCD_PPI_GET_EX_32 Get32Ex;\r | |
838 | PCD_PPI_GET_EX_64 Get64Ex;\r | |
839 | PCD_PPI_GET_EX_POINTER GetPtrEx;\r | |
840 | PCD_PPI_GET_EX_BOOLEAN GetBoolEx;\r | |
841 | PCD_PPI_GET_EX_SIZE GetSizeEx;\r | |
842 | \r | |
843 | PCD_PPI_SET8 Set8;\r | |
844 | PCD_PPI_SET16 Set16;\r | |
845 | PCD_PPI_SET32 Set32;\r | |
846 | PCD_PPI_SET64 Set64;\r | |
847 | PCD_PPI_SET_POINTER SetPtr;\r | |
848 | PCD_PPI_SET_BOOLEAN SetBool;\r | |
849 | \r | |
850 | PCD_PPI_SET_EX_8 Set8Ex;\r | |
851 | PCD_PPI_SET_EX_16 Set16Ex;\r | |
852 | PCD_PPI_SET_EX_32 Set32Ex;\r | |
853 | PCD_PPI_SET_EX_64 Set64Ex;\r | |
854 | PCD_PPI_SET_EX_POINTER SetPtrEx;\r | |
855 | PCD_PPI_SET_EX_BOOLEAN SetBoolEx;\r | |
856 | \r | |
857 | PCD_PPI_CALLBACK_ONSET CallbackOnSet;\r | |
858 | PCD_PPI_CANCEL_CALLBACK CancelCallback;\r | |
859 | PCD_PPI_GET_NEXT_TOKEN GetNextToken;\r | |
4276d5da | 860 | PCD_PPI_GET_NEXT_TOKENSPACE GetNextTokenSpace;\r |
878ddf1f | 861 | } PCD_PPI;\r |
862 | \r | |
863 | \r | |
864 | #endif\r |