]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/DxePcdLib/DxePcdLib.c
Add PcdDxe and PcdPEIM to all-arch for EdkModulePkg-All-Archs.fpd
[mirror_edk2.git] / MdePkg / Library / DxePcdLib / DxePcdLib.c
1 /** @file
2 Implementation of PcdLib class library for DXE phase.
3
4 Copyright (c) 2006, Intel Corporation<BR>
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
14 Module Name: DxePcdLib.c
15
16 **/
17
18 static PCD_PROTOCOL *mPcd;
19
20 /**
21 The constructor function caches the PCD_PROTOCOL pointer.
22
23 @param[in] ImageHandle The firmware allocated handle for the EFI image.
24 @param[in] SystemTable A pointer to the EFI System Table.
25
26 @retval EFI_SUCCESS The constructor always return EFI_SUCCESS.
27
28 **/
29 EFI_STATUS
30 EFIAPI
31 PcdLibConstructor (
32 IN EFI_HANDLE ImageHandle,
33 IN EFI_SYSTEM_TABLE *SystemTable
34 )
35 {
36 EFI_STATUS Status;
37
38 Status = gBS->LocateProtocol (&gPcdProtocolGuid, NULL, (VOID **)&mPcd);
39 ASSERT_EFI_ERROR (Status);
40
41 return EFI_SUCCESS;
42 }
43
44
45 /**
46 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
47
48 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
49 set values associated with a PCD token.
50
51 @retval SKU_ID Return the SKU ID that just be set.
52
53 **/
54 UINTN
55 EFIAPI
56 LibPcdSetSku (
57 IN UINTN SkuId
58 )
59 {
60 ASSERT (SkuId < 0x100);
61
62 mPcd->SetSku (SkuId);
63
64 return SkuId;
65 }
66
67
68
69 /**
70 Returns the 8-bit value for the token specified by TokenNumber.
71
72 @param[in] The PCD token number to retrieve a current value for.
73
74 @retval UINT8 Returns the 8-bit value for the token specified by TokenNumber.
75
76 **/
77 UINT8
78 EFIAPI
79 LibPcdGet8 (
80 IN UINTN TokenNumber
81 )
82 {
83 return mPcd->Get8 (TokenNumber);
84 }
85
86
87
88 /**
89 Returns the 16-bit value for the token specified by TokenNumber.
90
91 @param[in] The PCD token number to retrieve a current value for.
92
93 @retval UINT16 Returns the 16-bit value for the token specified by TokenNumber.
94
95 **/
96 UINT16
97 EFIAPI
98 LibPcdGet16 (
99 IN UINTN TokenNumber
100 )
101 {
102 return mPcd->Get16 (TokenNumber);
103 }
104
105
106
107 /**
108 Returns the 32-bit value for the token specified by TokenNumber.
109
110 @param[in] TokenNumber The PCD token number to retrieve a current value for.
111
112 @retval UINT32 Returns the 32-bit value for the token specified by TokenNumber.
113
114 **/
115 UINT32
116 EFIAPI
117 LibPcdGet32 (
118 IN UINTN TokenNumber
119 )
120 {
121 return mPcd->Get32 (TokenNumber);
122 }
123
124
125
126 /**
127 Returns the 64-bit value for the token specified by TokenNumber.
128
129 @param[in] TokenNumber The PCD token number to retrieve a current value for.
130
131 @retval UINT64 Returns the 64-bit value for the token specified by TokenNumber.
132
133 **/
134 UINT64
135 EFIAPI
136 LibPcdGet64 (
137 IN UINTN TokenNumber
138 )
139 {
140 return mPcd->Get64 (TokenNumber);
141 }
142
143
144
145 /**
146 Returns the pointer to the buffer of the token specified by TokenNumber.
147
148 @param[in] TokenNumber The PCD token number to retrieve a current value for.
149
150 @retval VOID* Returns the pointer to the token specified by TokenNumber.
151
152 **/
153 VOID *
154 EFIAPI
155 LibPcdGetPtr (
156 IN UINTN TokenNumber
157 )
158 {
159 return mPcd->GetPtr (TokenNumber);
160 }
161
162
163
164 /**
165 Returns the Boolean value of the token specified by TokenNumber.
166
167 @param[in] TokenNumber The PCD token number to retrieve a current value for.
168
169 @retval BOOLEAN Returns the Boolean value of the token specified by TokenNumber.
170
171 **/
172 BOOLEAN
173 EFIAPI
174 LibPcdGetBool (
175 IN UINTN TokenNumber
176 )
177 {
178 return mPcd->GetBool (TokenNumber);
179 }
180
181
182
183 /**
184 Returns the size of the token specified by TokenNumber.
185
186 @param[in] TokenNumber The PCD token number to retrieve a current value for.
187
188 @retval UINTN Returns the size of the token specified by TokenNumber.
189
190 **/
191 UINTN
192 EFIAPI
193 LibPcdGetSize (
194 IN UINTN TokenNumber
195 )
196 {
197 return mPcd->GetSize (TokenNumber);
198 }
199
200
201
202 /**
203 Returns the 8-bit value for the token specified by TokenNumber and Guid.
204 If Guid is NULL, then ASSERT().
205
206 @param[in] Guid Pointer to a 128-bit unique value that designates
207 which namespace to retrieve a value from.
208 @param[in] TokenNumber The PCD token number to retrieve a current value for.
209
210 @retval UINT8 Return the UINT8.
211
212 **/
213 UINT8
214 EFIAPI
215 LibPcdGetEx8 (
216 IN CONST GUID *Guid,
217 IN UINTN TokenNumber
218 )
219 {
220 ASSERT (Guid != NULL);
221
222 return mPcd->Get8Ex (Guid, TokenNumber);
223 }
224
225
226 /**
227 Returns the 16-bit value for the token specified by TokenNumber and Guid.
228 If Guid is NULL, then ASSERT().
229
230 @param[in] Guid Pointer to a 128-bit unique value that designates
231 which namespace to retrieve a value from.
232 @param[in] TokenNumber The PCD token number to retrieve a current value for.
233
234 @retval UINT16 Return the UINT16.
235
236 **/
237 UINT16
238 EFIAPI
239 LibPcdGetEx16 (
240 IN CONST GUID *Guid,
241 IN UINTN TokenNumber
242 )
243 {
244 ASSERT (Guid != NULL);
245
246 return mPcd->Get16Ex (Guid, TokenNumber);
247 }
248
249
250 /**
251 Returns the 32-bit value for the token specified by TokenNumber and Guid.
252 If Guid is NULL, then ASSERT().
253
254 @param[in] Guid Pointer to a 128-bit unique value that designates
255 which namespace to retrieve a value from.
256 @param[in] TokenNumber The PCD token number to retrieve a current value for.
257
258 @retval UINT32 Return the UINT32.
259
260 **/
261 UINT32
262 EFIAPI
263 LibPcdGetEx32 (
264 IN CONST GUID *Guid,
265 IN UINTN TokenNumber
266 )
267 {
268 ASSERT (Guid != NULL);
269
270 return mPcd->Get32Ex (Guid, TokenNumber);
271 }
272
273
274
275 /**
276 Returns the 64-bit value for the token specified by TokenNumber and Guid.
277 If Guid is NULL, then ASSERT().
278
279 @param[in] Guid Pointer to a 128-bit unique value that designates
280 which namespace to retrieve a value from.
281 @param[in] TokenNumber The PCD token number to retrieve a current value for.
282
283 @retval UINT64 Return the UINT64.
284
285 **/
286 UINT64
287 EFIAPI
288 LibPcdGetEx64 (
289 IN CONST GUID *Guid,
290 IN UINTN TokenNumber
291 )
292 {
293 ASSERT (Guid != NULL);
294
295 return mPcd->Get64Ex (Guid, TokenNumber);
296 }
297
298
299
300 /**
301 Returns the pointer to the token specified by TokenNumber and Guid.
302 If Guid is NULL, then ASSERT().
303
304 @param[in] Guid Pointer to a 128-bit unique value that designates
305 which namespace to retrieve a value from.
306 @param[in] TokenNumber The PCD token number to retrieve a current value for.
307
308 @retval VOID* Return the VOID* pointer.
309
310 **/
311 VOID *
312 EFIAPI
313 LibPcdGetExPtr (
314 IN CONST GUID *Guid,
315 IN UINTN TokenNumber
316 )
317 {
318 ASSERT (Guid != NULL);
319
320 return mPcd->GetPtrEx (Guid, TokenNumber);
321 }
322
323
324
325 /**
326 Returns the Boolean value of the token specified by TokenNumber and Guid.
327 If Guid is NULL, then ASSERT().
328
329 @param[in] Guid Pointer to a 128-bit unique value that designates
330 which namespace to retrieve a value from.
331 @param[in] TokenNumber The PCD token number to retrieve a current value for.
332
333 @retval BOOLEAN Return the BOOLEAN.
334
335 **/
336 BOOLEAN
337 EFIAPI
338 LibPcdGetExBool (
339 IN CONST GUID *Guid,
340 IN UINTN TokenNumber
341 )
342 {
343 ASSERT (Guid != NULL);
344
345 return mPcd->GetBoolEx (Guid, TokenNumber);
346 }
347
348
349
350 /**
351 Returns the size of the token specified by TokenNumber and Guid.
352 If Guid is NULL, then ASSERT().
353
354 @param[in] Guid Pointer to a 128-bit unique value that designates
355 which namespace to retrieve a value from.
356 @param[in] TokenNumber The PCD token number to retrieve a current value for.
357
358 @retval UINTN Return the size.
359
360 **/
361 UINTN
362 EFIAPI
363 LibPcdGetExSize (
364 IN CONST GUID *Guid,
365 IN UINTN TokenNumber
366 )
367 {
368 ASSERT (Guid != NULL);
369
370 return mPcd->GetSizeEx (Guid, TokenNumber);
371 }
372
373
374
375 /**
376 Sets the 8-bit value for the token specified by TokenNumber
377 to the value specified by Value. Value is returned.
378
379 @param[in] TokenNumber The PCD token number to set a current value for.
380 @param[in] Value The 8-bit value to set.
381
382 @retval UINT8 Return the value been set.
383
384 **/
385 UINT8
386 EFIAPI
387 LibPcdSet8 (
388 IN UINTN TokenNumber,
389 IN UINT8 Value
390 )
391 {
392 EFI_STATUS Status;
393
394 Status = mPcd->Set8 (TokenNumber, Value);
395
396 ASSERT_EFI_ERROR (Status);
397
398 return Value;
399 }
400
401
402
403 /**
404 Sets the 16-bit value for the token specified by TokenNumber
405 to the value specified by Value. Value is returned.
406
407 @param[in] TokenNumber The PCD token number to set a current value for.
408 @param[in] Value The 16-bit value to set.
409
410 @retval UINT16 Return the value been set.
411
412 **/
413 UINT16
414 EFIAPI
415 LibPcdSet16 (
416 IN UINTN TokenNumber,
417 IN UINT16 Value
418 )
419 {
420 EFI_STATUS Status;
421
422 Status = mPcd->Set16 (TokenNumber, Value);
423
424 ASSERT_EFI_ERROR (Status);
425
426 return Value;
427 }
428
429
430
431 /**
432 Sets the 32-bit value for the token specified by TokenNumber
433 to the value specified by Value. Value is returned.
434
435 @param[in] TokenNumber The PCD token number to set a current value for.
436 @param[in] Value The 32-bit value to set.
437
438 @retval UINT32 Return the value been set.
439
440 **/
441 UINT32
442 EFIAPI
443 LibPcdSet32 (
444 IN UINTN TokenNumber,
445 IN UINT32 Value
446 )
447 {
448 EFI_STATUS Status;
449 Status = mPcd->Set32 (TokenNumber, Value);
450
451 ASSERT_EFI_ERROR (Status);
452
453 return Value;
454 }
455
456
457
458 /**
459 Sets the 64-bit value for the token specified by TokenNumber
460 to the value specified by Value. Value is returned.
461
462 @param[in] TokenNumber The PCD token number to set a current value for.
463 @param[in] Value The 64-bit value to set.
464
465 @retval UINT64 Return the value been set.
466
467 **/
468 UINT64
469 EFIAPI
470 LibPcdSet64 (
471 IN UINTN TokenNumber,
472 IN UINT64 Value
473 )
474 {
475 EFI_STATUS Status;
476
477 Status = mPcd->Set64 (TokenNumber, Value);
478
479 ASSERT_EFI_ERROR (Status);
480
481 return Value;
482 }
483
484
485
486 /**
487 Sets a buffer for the token specified by TokenNumber to
488 the value specified by Buffer and SizeOfValue. Buffer to
489 be set is returned. The content of the buffer could be
490 overwritten if a Callback on SET is registered with this
491 TokenNumber.
492
493 If SizeOfValue is greater than the maximum
494 size support by TokenNumber, then set SizeOfValue to the
495 maximum size supported by TokenNumber and return NULL to
496 indicate that the set operation was not actually performed.
497
498 If SizeOfValue > 0 and Buffer is NULL, then ASSERT().
499
500 @param[in] TokenNumber The PCD token number to set a current value for.
501 @param[in,out] SizeOfBuffer The size, in bytes, of Buffer.
502 @param[in] Value A pointer to the buffer to set.
503
504 @retval VOID* Return the pointer for the buffer been set.
505
506 **/
507
508 VOID *
509 EFIAPI
510 LibPcdSetPtr (
511 IN UINTN TokenNumber,
512 IN OUT UINTN *SizeOfBuffer,
513 IN VOID *Buffer
514 )
515 {
516 EFI_STATUS Status;
517 UINTN Size;
518
519 if (*SizeOfBuffer > 0) {
520 ASSERT (Buffer != NULL);
521 }
522
523 Size = LibPcdGetSize (TokenNumber);
524
525 if (*SizeOfBuffer > Size) {
526 *SizeOfBuffer = Size;
527 return NULL;
528 }
529
530 Status = mPcd->SetPtr (TokenNumber, *SizeOfBuffer, Buffer);
531
532 ASSERT_EFI_ERROR (Status);
533
534 return Buffer;
535 }
536
537
538
539 /**
540 Sets the Boolean value for the token specified by TokenNumber
541 to the value specified by Value. Value is returned.
542
543 @param[in] TokenNumber The PCD token number to set a current value for.
544 @param[in] Value The boolean value to set.
545
546 @retval BOOLEAN Return the value been set.
547
548 **/
549 BOOLEAN
550 EFIAPI
551 LibPcdSetBool (
552 IN UINTN TokenNumber,
553 IN BOOLEAN Value
554 )
555 {
556 EFI_STATUS Status;
557
558 Status = mPcd->SetBool (TokenNumber, Value);
559
560 ASSERT_EFI_ERROR (Status);
561
562 return Value;
563 }
564
565
566
567 /**
568 Sets the 8-bit value for the token specified by TokenNumber and
569 Guid to the value specified by Value. Value is returned.
570 If Guid is NULL, then ASSERT().
571
572 @param[in] Guid Pointer to a 128-bit unique value that
573 designates which namespace to set a value from.
574 @param[in] TokenNumber The PCD token number to set a current value for.
575 @param[in] Value The 8-bit value to set.
576
577 @retval UINT8 Return the value been set.
578
579 **/
580 UINT8
581 EFIAPI
582 LibPcdSetEx8 (
583 IN CONST GUID *Guid,
584 IN UINTN TokenNumber,
585 IN UINT8 Value
586 )
587 {
588 EFI_STATUS Status;
589
590 ASSERT (Guid != NULL);
591
592 Status = mPcd->Set8Ex (Guid, TokenNumber, Value);
593
594 ASSERT_EFI_ERROR (Status);
595
596 return Value;
597 }
598
599
600
601 /**
602 Sets the 16-bit value for the token specified by TokenNumber and
603 Guid to the value specified by Value. Value is returned.
604 If Guid is NULL, then ASSERT().
605
606 @param[in] Guid Pointer to a 128-bit unique value that
607 designates which namespace to set a value from.
608 @param[in] TokenNumber The PCD token number to set a current value for.
609 @param[in] Value The 16-bit value to set.
610
611 @retval UINT8 Return the value been set.
612
613 **/
614 UINT16
615 EFIAPI
616 LibPcdSetEx16 (
617 IN CONST GUID *Guid,
618 IN UINTN TokenNumber,
619 IN UINT16 Value
620 )
621 {
622 EFI_STATUS Status;
623
624 ASSERT (Guid != NULL);
625
626 Status = mPcd->Set16Ex (Guid, TokenNumber, Value);
627
628 ASSERT_EFI_ERROR (Status);
629
630 return Value;
631 }
632
633
634
635 /**
636 Sets the 32-bit value for the token specified by TokenNumber and
637 Guid to the value specified by Value. Value is returned.
638 If Guid is NULL, then ASSERT().
639
640 @param[in] Guid Pointer to a 128-bit unique value that
641 designates which namespace to set a value from.
642 @param[in] TokenNumber The PCD token number to set a current value for.
643 @param[in] Value The 32-bit value to set.
644
645 @retval UINT32 Return the value been set.
646
647 **/
648 UINT32
649 EFIAPI
650 LibPcdSetEx32 (
651 IN CONST GUID *Guid,
652 IN UINTN TokenNumber,
653 IN UINT32 Value
654 )
655 {
656 EFI_STATUS Status;
657
658 ASSERT (Guid != NULL);
659
660 Status = mPcd->Set32Ex (Guid, TokenNumber, Value);
661
662 ASSERT_EFI_ERROR (Status);
663
664 return Value;
665 }
666
667
668
669 /**
670 Sets the 64-bit value for the token specified by TokenNumber and
671 Guid to the value specified by Value. Value is returned.
672 If Guid is NULL, then ASSERT().
673
674 @param[in] Guid Pointer to a 128-bit unique value that
675 designates which namespace to set a value from.
676 @param[in] TokenNumber The PCD token number to set a current value for.
677 @param[in] Value The 64-bit value to set.
678
679 @retval UINT64 Return the value been set.
680
681 **/
682 UINT64
683 EFIAPI
684 LibPcdSetEx64 (
685 IN CONST GUID *Guid,
686 IN UINTN TokenNumber,
687 IN UINT64 Value
688 )
689 {
690 EFI_STATUS Status;
691
692 ASSERT (Guid != NULL);
693
694 Status = mPcd->Set64Ex (Guid, TokenNumber, Value);
695
696 ASSERT_EFI_ERROR (Status);
697
698 return Value;
699 }
700
701
702
703 /**
704 Sets a buffer for the token specified by TokenNumber to the value specified by
705 Buffer and SizeOfValue. Buffer is returned. If SizeOfValue is greater than
706 the maximum size support by TokenNumber, then set SizeOfValue to the maximum size
707 supported by TokenNumber and return NULL to indicate that the set operation
708 was not actually performed.
709
710 If SizeOfValue > 0 and Buffer is NULL, then ASSERT().
711
712 @param[in] Guid Pointer to a 128-bit unique value that
713 designates which namespace to set a value from.
714 @param[in] TokenNumber The PCD token number to set a current value for.
715 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
716 @param[in] Buffer A pointer to the buffer to set.
717
718 @retval VOID * Return the pinter to the buffer been set.
719
720 **/
721 VOID *
722 EFIAPI
723 LibPcdSetExPtr (
724 IN CONST GUID *Guid,
725 IN UINTN TokenNumber,
726 IN OUT UINTN *SizeOfBuffer,
727 IN VOID *Buffer
728 )
729 {
730 EFI_STATUS Status;
731 UINTN Size;
732
733 ASSERT (Guid != NULL);
734
735 ASSERT (SizeOfBuffer != NULL);
736
737 if (*SizeOfBuffer > 0) {
738 ASSERT (Buffer != NULL);
739 }
740
741
742 Size = LibPcdGetExSize (Guid, TokenNumber);
743 if (*SizeOfBuffer > Size) {
744 *SizeOfBuffer = Size;
745 return NULL;
746 }
747
748 Status = mPcd->SetPtrEx (Guid, TokenNumber, *SizeOfBuffer, Buffer);
749
750 ASSERT_EFI_ERROR (Status);
751
752 return Buffer;
753 }
754
755
756
757 /**
758 Sets the Boolean value for the token specified by TokenNumber and
759 Guid to the value specified by Value. Value is returned.
760 If Guid is NULL, then ASSERT().
761
762 @param[in] Guid Pointer to a 128-bit unique value that
763 designates which namespace to set a value from.
764 @param[in] TokenNumber The PCD token number to set a current value for.
765 @param[in] Value The Boolean value to set.
766
767 @retval Boolean Return the value been set.
768
769 **/
770 BOOLEAN
771 EFIAPI
772 LibPcdSetExBool (
773 IN CONST GUID *Guid,
774 IN UINTN TokenNumber,
775 IN BOOLEAN Value
776 )
777 {
778 EFI_STATUS Status;
779
780 ASSERT (Guid != NULL);
781
782 Status = mPcd->SetBoolEx (Guid, TokenNumber, Value);
783
784 ASSERT_EFI_ERROR (Status);
785
786 return Value;
787 }
788
789
790
791 /**
792 When the token specified by TokenNumber and Guid is set,
793 then notification function specified by NotificationFunction is called.
794 If Guid is NULL, then the default token space is used.
795 If NotificationFunction is NULL, then ASSERT().
796
797 @param[in] Guid Pointer to a 128-bit unique value that designates which
798 namespace to set a value from. If NULL, then the default
799 token space is used.
800 @param[in] TokenNumber The PCD token number to monitor.
801 @param[in] NotificationFunction The function to call when the token
802 specified by Guid and TokenNumber is set.
803
804 @retval VOID
805
806 **/
807 VOID
808 EFIAPI
809 LibPcdCallbackOnSet (
810 IN CONST GUID *Guid, OPTIONAL
811 IN UINTN TokenNumber,
812 IN PCD_CALLBACK NotificationFunction
813 )
814 {
815 EFI_STATUS Status;
816
817 ASSERT (NotificationFunction != NULL);
818
819 Status = mPcd->CallbackOnSet (TokenNumber, Guid, NotificationFunction);
820
821 ASSERT_EFI_ERROR (Status);
822
823 return;
824 }
825
826
827
828 /**
829 Disable a notification function that was established with LibPcdCallbackonSet().
830 If NotificationFunction is NULL, then ASSERT().
831
832 @param[in] Guid Specify the GUID token space.
833 @param[in] TokenNumber Specify the token number.
834 @param[in] NotificationFunction The callback function to be unregistered.
835
836 @retval VOID
837
838 **/
839 VOID
840 EFIAPI
841 LibPcdCancelCallback (
842 IN CONST GUID *Guid, OPTIONAL
843 IN UINTN TokenNumber,
844 IN PCD_CALLBACK NotificationFunction
845 )
846 {
847 EFI_STATUS Status;
848
849 ASSERT (NotificationFunction != NULL);
850
851 Status = mPcd->CancelCallback (TokenNumber, Guid, NotificationFunction);
852
853 ASSERT_EFI_ERROR (Status);
854
855 return;
856 }
857
858
859
860 /**
861 Retrieves the next PCD token number from the token space specified by Guid.
862 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
863 then the first token number is returned. Otherwise, the token number that
864 follows TokenNumber in the token space is returned. If TokenNumber is the last
865 token number in the token space, then 0 is returned. If TokenNumber is not 0 and
866 is not in the token space specified by Guid, then ASSERT().
867
868 @param[in] Pointer to a 128-bit unique value that designates which namespace
869 to set a value from. If NULL, then the default token space is used.
870 @param[in] The previous PCD token number. If 0, then retrieves the first PCD
871 token number.
872
873 @retval UINTN The next valid token number.
874
875 **/
876 UINTN
877 EFIAPI
878 LibPcdGetNextToken (
879 IN CONST GUID *Guid, OPTIONAL
880 IN UINTN TokenNumber
881 )
882 {
883 EFI_STATUS Status;
884
885 Status = mPcd->GetNextToken (Guid, &TokenNumber);
886
887 ASSERT_EFI_ERROR (Status);
888
889 return TokenNumber;
890 }
891
892
893
894 /**
895 Retrieves the next PCD token space from a token space specified by Guid.
896 Guid of NULL is reserved to mark the default local token namespace on the current
897 platform. If Guid is NULL, then the GUID of the first non-local token space of the
898 current platform is returned. If Guid is the last non-local token space,
899 then NULL is returned.
900
901 If Guid is not NULL and is not a valid token space in the current platform, then ASSERT().
902
903
904
905 @param[in] Pointer to a 128-bit unique value that designates from which namespace
906 to start the search.
907
908 @retval CONST GUID * The next valid token namespace.
909
910 **/
911 GUID *
912 EFIAPI
913 LibPcdGetNextTokenSpace (
914 IN CONST GUID *Guid
915 )
916 {
917 EFI_STATUS Status;
918
919 Status = mPcd->GetNextTokenSpace (&Guid);
920
921 ASSERT_EFI_ERROR (Status);
922
923 return (GUID *) Guid;
924 }
925