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