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