]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Ppi/Pcd.h
Add in function description and comments.
[mirror_edk2.git] / MdePkg / Include / Ppi / Pcd.h
... / ...
CommitLineData
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
20extern EFI_GUID gPcdPpiGuid;\r
21\r
22#define PCD_PPI_GUID \\r
23 { 0x6e81c58, 0x4ad7, 0x44bc, { 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80 } }\r
24\r
25#define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0)\r
26\r
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
46 @param SkuId The SKU value that will be used when the PCD service will retrieve and \r
47 set values associated with a PCD token.\r
48\r
49 @retval VOID\r
50\r
51**/\r
52typedef \r
53VOID\r
54(EFIAPI *PCD_PPI_SET_SKU) (\r
55 IN UINTN SkuId\r
56 );\r
57\r
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
66 @param TokenNumber The PCD token number. \r
67\r
68 @return The UINT8 value.\r
69 \r
70**/\r
71typedef\r
72UINT8\r
73(EFIAPI *PCD_PPI_GET8) (\r
74 IN UINTN TokenNumber\r
75 );\r
76\r
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
85 @param TokenNumber The PCD token number. \r
86\r
87 @return The UINT16 value.\r
88 \r
89**/\r
90typedef\r
91UINT16\r
92(EFIAPI *PCD_PPI_GET16) (\r
93 IN UINTN TokenNumber\r
94 );\r
95\r
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
104 @param TokenNumber The PCD token number. \r
105\r
106 @return The UINT32 value.\r
107 \r
108**/\r
109typedef\r
110UINT32\r
111(EFIAPI *PCD_PPI_GET32) (\r
112 IN UINTN TokenNumber\r
113 );\r
114\r
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
123 @param TokenNumber The PCD token number. \r
124\r
125 @return The UINT64 value.\r
126 \r
127**/\r
128typedef\r
129UINT64\r
130(EFIAPI *PCD_PPI_GET64) (\r
131 IN UINTN TokenNumber\r
132 );\r
133\r
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
144 @param TokenNumber The PCD token number. \r
145\r
146 @return The pointer to the buffer to be retrived.\r
147 \r
148**/\r
149typedef\r
150VOID *\r
151(EFIAPI *PCD_PPI_GET_POINTER) (\r
152 IN UINTN TokenNumber\r
153 );\r
154\r
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
165 @param TokenNumber The PCD token number. \r
166\r
167 @return The Boolean value.\r
168 \r
169**/\r
170typedef\r
171BOOLEAN\r
172(EFIAPI *PCD_PPI_GET_BOOLEAN) (\r
173 IN UINTN TokenNumber\r
174 );\r
175\r
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
184 @param TokenNumber The PCD token number. \r
185\r
186 @return The size of the value for the PCD token.\r
187 \r
188**/\r
189typedef\r
190UINTN\r
191(EFIAPI *PCD_PPI_GET_SIZE) (\r
192 IN UINTN TokenNumber\r
193 );\r
194\r
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
205 @param Guid The token space for the token number.\r
206 @param TokenNumber The PCD token number. \r
207\r
208 @return The size 8-bit value for the PCD token.\r
209 \r
210**/\r
211typedef\r
212UINT8\r
213(EFIAPI *PCD_PPI_GET_EX_8) (\r
214 IN CONST EFI_GUID *Guid,\r
215 IN UINTN TokenNumber\r
216 );\r
217\r
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
228 @param Guid The token space for the token number.\r
229 @param TokenNumber The PCD token number. \r
230\r
231 @return The size 16-bit value for the PCD token.\r
232 \r
233**/\r
234typedef\r
235UINT16\r
236(EFIAPI *PCD_PPI_GET_EX_16) (\r
237 IN CONST EFI_GUID *Guid,\r
238 IN UINTN TokenNumber\r
239 );\r
240\r
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
251 @param Guid The token space for the token number.\r
252 @param TokenNumber The PCD token number. \r
253\r
254 @return The size 32-bit value for the PCD token.\r
255 \r
256**/\r
257typedef\r
258UINT32\r
259(EFIAPI *PCD_PPI_GET_EX_32) (\r
260 IN CONST EFI_GUID *Guid,\r
261 IN UINTN TokenNumber\r
262 );\r
263\r
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
274 @param Guid The token space for the token number.\r
275 @param TokenNumber The PCD token number. \r
276\r
277 @return The size 64-bit value for the PCD token.\r
278 \r
279**/\r
280typedef\r
281UINT64\r
282(EFIAPI *PCD_PPI_GET_EX_64) (\r
283 IN CONST EFI_GUID *Guid,\r
284 IN UINTN TokenNumber\r
285 );\r
286\r
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
297 @param Guid The token space for the token number.\r
298 @param TokenNumber The PCD token number. \r
299\r
300 @return The pointer to the buffer to be retrived.\r
301 \r
302**/\r
303typedef\r
304VOID *\r
305(EFIAPI *PCD_PPI_GET_EX_POINTER) (\r
306 IN CONST EFI_GUID *Guid,\r
307 IN UINTN TokenNumber\r
308 );\r
309\r
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
320 @param Guid The token space for the token number.\r
321 @param TokenNumber The PCD token number. \r
322\r
323 @return The size Boolean value for the PCD token.\r
324 \r
325**/\r
326typedef\r
327BOOLEAN\r
328(EFIAPI *PCD_PPI_GET_EX_BOOLEAN) (\r
329 IN CONST EFI_GUID *Guid,\r
330 IN UINTN TokenNumber\r
331 );\r
332\r
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
341 @param Guid The token space for the token number.\r
342 @param TokenNumber The PCD token number. \r
343\r
344 @return The size of the value for the PCD token.\r
345 \r
346**/\r
347typedef\r
348UINTN\r
349(EFIAPI *PCD_PPI_GET_EX_SIZE) (\r
350 IN CONST EFI_GUID *Guid,\r
351 IN UINTN TokenNumber\r
352 );\r
353\r
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
363 @param TokenNumber The PCD token number. \r
364 @param Value The value to set for the PCD token.\r
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
373typedef\r
374EFI_STATUS\r
375(EFIAPI *PCD_PPI_SET8) (\r
376 IN UINTN TokenNumber,\r
377 IN UINT8 Value\r
378 );\r
379\r
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
389 @param TokenNumber The PCD token number. \r
390 @param Value The value to set for the PCD token.\r
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
399typedef\r
400EFI_STATUS\r
401(EFIAPI *PCD_PPI_SET16) (\r
402 IN UINTN TokenNumber,\r
403 IN UINT16 Value\r
404 );\r
405\r
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
415 @param TokenNumber The PCD token number. \r
416 @param Value The value to set for the PCD token.\r
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
425typedef\r
426EFI_STATUS\r
427(EFIAPI *PCD_PPI_SET32) (\r
428 IN UINTN TokenNumber,\r
429 IN UINT32 Value\r
430 );\r
431\r
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
441 @param TokenNumber The PCD token number. \r
442 @param Value The value to set for the PCD token.\r
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
451typedef\r
452EFI_STATUS\r
453(EFIAPI *PCD_PPI_SET64) (\r
454 IN UINTN TokenNumber,\r
455 IN UINT64 Value\r
456 );\r
457\r
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
468 @param TokenNumber The PCD token number. \r
469 @param SizeOfBuffer A pointer to the length of the value being set for the PCD token. \r
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
473 @param Buffer The buffer to set for the PCD token.\r
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
482typedef\r
483EFI_STATUS\r
484(EFIAPI *PCD_PPI_SET_POINTER) (\r
485 IN UINTN TokenNumber,\r
486 IN OUT UINTN *SizeOfBuffer,\r
487 IN VOID *Buffer\r
488 );\r
489\r
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
499 @param TokenNumber The PCD token number. \r
500 @param Value The value to set for the PCD token.\r
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
509typedef\r
510EFI_STATUS\r
511(EFIAPI *PCD_PPI_SET_BOOLEAN) (\r
512 IN UINTN TokenNumber,\r
513 IN BOOLEAN Value\r
514 );\r
515\r
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
525 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
526 @param TokenNumber The PCD token number. \r
527 @param Value The value to set for the PCD token.\r
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
536typedef\r
537EFI_STATUS\r
538(EFIAPI *PCD_PPI_SET_EX_8) (\r
539 IN CONST EFI_GUID *Guid,\r
540 IN UINTN TokenNumber,\r
541 IN UINT8 Value\r
542 );\r
543\r
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
553 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
554 @param TokenNumber The PCD token number. \r
555 @param Value The value to set for the PCD token.\r
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
564typedef\r
565EFI_STATUS\r
566(EFIAPI *PCD_PPI_SET_EX_16) (\r
567 IN CONST EFI_GUID *Guid,\r
568 IN UINTN TokenNumber,\r
569 IN UINT16 Value\r
570 );\r
571\r
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
581 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
582 @param TokenNumber The PCD token number. \r
583 @param Value The value to set for the PCD token.\r
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
592typedef\r
593EFI_STATUS\r
594(EFIAPI *PCD_PPI_SET_EX_32) (\r
595 IN CONST EFI_GUID *Guid,\r
596 IN UINTN TokenNumber,\r
597 IN UINT32 Value\r
598 );\r
599\r
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
609 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
610 @param TokenNumber The PCD token number. \r
611 @param Value The value to set for the PCD token.\r
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
620typedef\r
621EFI_STATUS\r
622(EFIAPI *PCD_PPI_SET_EX_64) (\r
623 IN CONST EFI_GUID *Guid,\r
624 IN UINTN TokenNumber,\r
625 IN UINT64 Value\r
626 );\r
627\r
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
637 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
638 @param TokenNumber The PCD token number. \r
639 @param SizeOfBuffer A pointer to the length of the value being set for the PCD token. \r
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
643 @param Buffer The buffer to set for the PCD token.\r
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
652typedef\r
653EFI_STATUS\r
654(EFIAPI *PCD_PPI_SET_EX_POINTER) (\r
655 IN CONST EFI_GUID *Guid,\r
656 IN UINTN TokenNumber,\r
657 IN OUT UINTN *SizeOfBuffer,\r
658 IN VOID *Buffer\r
659 );\r
660\r
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
670 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
671 @param TokenNumber The PCD token number. \r
672 @param Value The value to set for the PCD token.\r
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
681typedef\r
682EFI_STATUS\r
683(EFIAPI *PCD_PPI_SET_EX_BOOLEAN) (\r
684 IN CONST EFI_GUID *Guid,\r
685 IN UINTN TokenNumber,\r
686 IN BOOLEAN Value\r
687 );\r
688\r
689\r
690\r
691/**\r
692 Callback on SET function prototype definition.\r
693\r
694 @param CallBackGuid The PCD token GUID being set.\r
695 @param CallBackToken The PCD token number being set.\r
696 @param TokenData A pointer to the token data being set.\r
697 @param TokenDataSize The size, in bytes, of the data being set.\r
698\r
699 @retval VOID\r
700\r
701**/\r
702typedef\r
703VOID\r
704(EFIAPI *PCD_PPI_CALLBACK) (\r
705 IN CONST EFI_GUID *CallBackGuid, OPTIONAL\r
706 IN UINTN CallBackToken,\r
707 IN OUT VOID *TokenData,\r
708 IN UINTN TokenDataSize\r
709 );\r
710\r
711\r
712\r
713/**\r
714 Specifies a function to be called anytime the value of a designated token is changed.\r
715\r
716 @param TokenNumber The PCD token number. \r
717 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
718 @param CallBackFunction The function prototype called when the value associated with the CallBackToken is set. \r
719\r
720 @retval EFI_SUCCESS The PCD service has successfully established a call event \r
721 for the CallBackToken requested.\r
722 @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.\r
723\r
724**/\r
725typedef\r
726EFI_STATUS\r
727(EFIAPI *PCD_PPI_CALLBACK_ONSET) (\r
728 IN UINTN TokenNumber,\r
729 IN CONST EFI_GUID *Guid, OPTIONAL\r
730 IN PCD_PPI_CALLBACK CallBackFunction\r
731 );\r
732\r
733\r
734\r
735/**\r
736 Cancels a previously set callback function for a particular PCD token number.\r
737\r
738 @param TokenNumber The PCD token number. \r
739 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
740 @param CallBackFunction The function prototype called when the value associated with the CallBackToken is set. \r
741\r
742 @retval EFI_SUCCESS The PCD service has successfully established a call event \r
743 for the CallBackToken requested.\r
744 @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.\r
745\r
746**/\r
747typedef\r
748EFI_STATUS\r
749(EFIAPI *PCD_PPI_CANCEL_CALLBACK) (\r
750 IN UINTN TokenNumber,\r
751 IN CONST EFI_GUID *Guid, OPTIONAL\r
752 IN PCD_PPI_CALLBACK CallBackFunction\r
753 );\r
754\r
755\r
756\r
757/**\r
758 Retrieves the next valid PCD token for a given namespace.\r
759\r
760 @param Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
761 @param TokenNumber A pointer to the PCD token number to use to find the subsequent token number. \r
762 To retrieve the "first" token, have the pointer reference a TokenNumber value of 0.\r
763\r
764 @retval EFI_SUCCESS The PCD service retrieved the value requested.\r
765 @retval EFI_NOT_FOUND The PCD service could not find data from the requested token number.\r
766\r
767**/\r
768typedef \r
769EFI_STATUS\r
770(EFIAPI *PCD_PPI_GET_NEXT_TOKEN) (\r
771 IN CONST EFI_GUID *Guid, OPTIONAL\r
772 IN OUT UINTN *TokenNumber\r
773 );\r
774\r
775\r
776\r
777/**\r
778 Retrieves the next valid PCD token namespace for a given namespace.\r
779\r
780 @param Guid An indirect pointer to EFI_GUID. On input it designates a known \r
781 token namespace from which the search will start. On output, \r
782 it designates the next valid token namespace on the platform. \r
783 If *Guid is NULL, then the GUID of the first token space of the current platform is returned.\r
784 If this input token namespace is the last tokenspace on the platform,\r
785 *Guid will be assigned to NULL and the function return EFI_SUCCESS.\r
786 If the search cannot locate the input token namespace, an error is returned and \r
787 the value of *Guid is undefined. \r
788\r
789 @retval EFI_SUCCESS The PCD service retrieved the value requested.\r
790 @retval EFI_NOT_FOUND The PCD service could not find the input token namespace.\r
791\r
792**/\r
793typedef\r
794EFI_STATUS\r
795(EFIAPI *PCD_PPI_GET_NEXT_TOKENSPACE) (\r
796 IN OUT CONST EFI_GUID **Guid\r
797 );\r
798\r
799\r
800\r
801//\r
802// Interface structure for the PCD PPI\r
803//\r
804typedef struct {\r
805 PCD_PPI_SET_SKU SetSku;\r
806\r
807 PCD_PPI_GET8 Get8;\r
808 PCD_PPI_GET16 Get16;\r
809 PCD_PPI_GET32 Get32;\r
810 PCD_PPI_GET64 Get64;\r
811 PCD_PPI_GET_POINTER GetPtr;\r
812 PCD_PPI_GET_BOOLEAN GetBool;\r
813 PCD_PPI_GET_SIZE GetSize;\r
814\r
815 PCD_PPI_GET_EX_8 Get8Ex;\r
816 PCD_PPI_GET_EX_16 Get16Ex;\r
817 PCD_PPI_GET_EX_32 Get32Ex;\r
818 PCD_PPI_GET_EX_64 Get64Ex;\r
819 PCD_PPI_GET_EX_POINTER GetPtrEx;\r
820 PCD_PPI_GET_EX_BOOLEAN GetBoolEx;\r
821 PCD_PPI_GET_EX_SIZE GetSizeEx;\r
822\r
823 PCD_PPI_SET8 Set8;\r
824 PCD_PPI_SET16 Set16;\r
825 PCD_PPI_SET32 Set32;\r
826 PCD_PPI_SET64 Set64;\r
827 PCD_PPI_SET_POINTER SetPtr;\r
828 PCD_PPI_SET_BOOLEAN SetBool;\r
829\r
830 PCD_PPI_SET_EX_8 Set8Ex;\r
831 PCD_PPI_SET_EX_16 Set16Ex;\r
832 PCD_PPI_SET_EX_32 Set32Ex;\r
833 PCD_PPI_SET_EX_64 Set64Ex;\r
834 PCD_PPI_SET_EX_POINTER SetPtrEx;\r
835 PCD_PPI_SET_EX_BOOLEAN SetBoolEx;\r
836\r
837 PCD_PPI_CALLBACK_ONSET CallbackOnSet;\r
838 PCD_PPI_CANCEL_CALLBACK CancelCallback;\r
839 PCD_PPI_GET_NEXT_TOKEN GetNextToken;\r
840 PCD_PPI_GET_NEXT_TOKENSPACE GetNextTokenSpace;\r
841} PCD_PPI;\r
842\r
843\r
844#endif\r