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