]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BasePcdLibNull/PcdLib.c
MdePkg: Update Base.h to fix compilation issues with ICC.
[mirror_edk2.git] / MdePkg / Library / BasePcdLibNull / PcdLib.c
1 /** @file
2 A emptry template implementation of PCD Library.
3
4 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 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
15 #include <Base.h>
16
17 #include <Library/DebugLib.h>
18 #include <Library/PcdLib.h>
19 #include <Library/BaseMemoryLib.h>
20
21
22 /**
23 This function provides a means by which SKU support can be established in the PCD infrastructure.
24
25 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
26
27 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
28 set values associated with a PCD token.
29
30 If SkuId >= 0x100, then ASSERT().
31
32 @return Return the SKU ID that just be set.
33
34 **/
35 UINTN
36 EFIAPI
37 LibPcdSetSku (
38 IN UINTN SkuId
39 )
40 {
41 ASSERT (FALSE);
42
43 return 0;
44 }
45
46 /**
47 This function provides a means by which to retrieve a value for a given PCD token.
48
49 Returns the 8-bit value for the token specified by TokenNumber.
50
51 @param[in] TokenNumber The PCD token number to retrieve a current value for.
52
53 @return Returns the 8-bit value for the token specified by TokenNumber.
54
55 **/
56 UINT8
57 EFIAPI
58 LibPcdGet8 (
59 IN UINTN TokenNumber
60 )
61 {
62 ASSERT (FALSE);
63
64 return 0;
65 }
66
67
68
69 /**
70 This function provides a means by which to retrieve a value for a given PCD token.
71
72 Returns the 16-bit value for the token specified by TokenNumber.
73
74 @param[in] TokenNumber The PCD token number to retrieve a current value for.
75
76 @return Returns the 16-bit value for the token specified by TokenNumber.
77
78 **/
79 UINT16
80 EFIAPI
81 LibPcdGet16 (
82 IN UINTN TokenNumber
83 )
84 {
85 ASSERT (FALSE);
86
87 return 0;
88 }
89
90
91
92 /**
93 This function provides a means by which to retrieve a value for a given PCD token.
94
95 Returns the 32-bit value for the token specified by TokenNumber.
96
97 @param[in] TokenNumber The PCD token number to retrieve a current value for.
98
99 @return Returns the 32-bit value for the token specified by TokenNumber.
100
101 **/
102 UINT32
103 EFIAPI
104 LibPcdGet32 (
105 IN UINTN TokenNumber
106 )
107 {
108 ASSERT (FALSE);
109
110 return 0;
111 }
112
113
114
115 /**
116 This function provides a means by which to retrieve a value for a given PCD token.
117
118 Returns the 64-bit value for the token specified by TokenNumber.
119
120 @param[in] TokenNumber The PCD token number to retrieve a current value for.
121
122 @return Returns the 64-bit value for the token specified by TokenNumber.
123
124 **/
125 UINT64
126 EFIAPI
127 LibPcdGet64 (
128 IN UINTN TokenNumber
129 )
130 {
131 ASSERT (FALSE);
132
133 return 0;
134 }
135
136
137
138 /**
139 This function provides a means by which to retrieve a value for a given PCD token.
140
141 Returns the pointer to the buffer of the token specified by TokenNumber.
142
143 @param[in] TokenNumber The PCD token number to retrieve a current value for.
144
145 @return Returns the pointer to the token specified by TokenNumber.
146
147 **/
148 VOID *
149 EFIAPI
150 LibPcdGetPtr (
151 IN UINTN TokenNumber
152 )
153 {
154 ASSERT (FALSE);
155
156 return 0;
157 }
158
159
160
161 /**
162 This function provides a means by which to retrieve a value for a given PCD token.
163
164 Returns the Boolean value of the token specified by TokenNumber.
165
166 @param[in] TokenNumber The PCD token number to retrieve a current value for.
167
168 @return Returns the Boolean value of the token specified by TokenNumber.
169
170 **/
171 BOOLEAN
172 EFIAPI
173 LibPcdGetBool (
174 IN UINTN TokenNumber
175 )
176 {
177 ASSERT (FALSE);
178
179 return 0;
180 }
181
182
183
184 /**
185 This function provides a means by which to retrieve the size of a given PCD token.
186
187 @param[in] TokenNumber The PCD token number to retrieve a current value for.
188
189 @return Returns the size of the token specified by TokenNumber.
190
191 **/
192 UINTN
193 EFIAPI
194 LibPcdGetSize (
195 IN UINTN TokenNumber
196 )
197 {
198 ASSERT (FALSE);
199
200 return 0;
201 }
202
203
204
205 /**
206 This function provides a means by which to retrieve a value for a given PCD token.
207
208 Returns the 8-bit value for the token specified by TokenNumber and Guid.
209
210 If Guid is NULL, then ASSERT().
211
212 @param[in] Guid The pointer to a 128-bit unique value that designates
213 which namespace to retrieve a value from.
214 @param[in] TokenNumber The PCD token number to retrieve a current value for.
215
216 @return Return the UINT8.
217
218 **/
219 UINT8
220 EFIAPI
221 LibPcdGetEx8 (
222 IN CONST GUID *Guid,
223 IN UINTN TokenNumber
224 )
225 {
226 ASSERT (FALSE);
227
228 return 0;
229 }
230
231
232
233 /**
234 This function provides a means by which to retrieve a value for a given PCD token.
235
236 Returns the 16-bit value for the token specified by TokenNumber and Guid.
237
238 If Guid is NULL, then ASSERT().
239
240 @param[in] Guid The pointer to a 128-bit unique value that designates
241 which namespace to retrieve a value from.
242 @param[in] TokenNumber The PCD token number to retrieve a current value for.
243
244 @return Return the UINT16.
245
246 **/
247 UINT16
248 EFIAPI
249 LibPcdGetEx16 (
250 IN CONST GUID *Guid,
251 IN UINTN TokenNumber
252 )
253 {
254 ASSERT (FALSE);
255
256 return 0;
257 }
258
259
260
261 /**
262 Returns the 32-bit value for the token specified by TokenNumber and Guid.
263 If Guid is NULL, then ASSERT().
264
265 @param[in] Guid The pointer to a 128-bit unique value that designates
266 which namespace to retrieve a value from.
267 @param[in] TokenNumber The PCD token number to retrieve a current value for.
268
269 @return Return the UINT32.
270
271 **/
272 UINT32
273 EFIAPI
274 LibPcdGetEx32 (
275 IN CONST GUID *Guid,
276 IN UINTN TokenNumber
277 )
278 {
279 ASSERT (FALSE);
280
281 return 0;
282 }
283
284
285
286 /**
287 This function provides a means by which to retrieve a value for a given PCD token.
288
289 Returns the 64-bit value for the token specified by TokenNumber and Guid.
290
291 If Guid is NULL, then ASSERT().
292
293 @param[in] Guid The pointer to a 128-bit unique value that designates
294 which namespace to retrieve a value from.
295 @param[in] TokenNumber The PCD token number to retrieve a current value for.
296
297 @return Return the UINT64.
298
299 **/
300 UINT64
301 EFIAPI
302 LibPcdGetEx64 (
303 IN CONST GUID *Guid,
304 IN UINTN TokenNumber
305 )
306 {
307 ASSERT (FALSE);
308
309 return 0;
310 }
311
312
313
314 /**
315 This function provides a means by which to retrieve a value for a given PCD token.
316
317 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
318
319 If Guid is NULL, then ASSERT().
320
321 @param[in] Guid The pointer to a 128-bit unique value that designates
322 which namespace to retrieve a value from.
323 @param[in] TokenNumber The PCD token number to retrieve a current value for.
324
325 @return Return the VOID* pointer.
326
327 **/
328 VOID *
329 EFIAPI
330 LibPcdGetExPtr (
331 IN CONST GUID *Guid,
332 IN UINTN TokenNumber
333 )
334 {
335 ASSERT (FALSE);
336
337 return 0;
338 }
339
340
341
342 /**
343 This function provides a means by which to retrieve a value for a given PCD token.
344
345 Returns the Boolean value of the token specified by TokenNumber and Guid.
346
347 If Guid is NULL, then ASSERT().
348
349 @param[in] Guid The pointer to a 128-bit unique value that designates
350 which namespace to retrieve a value from.
351 @param[in] TokenNumber The PCD token number to retrieve a current value for.
352
353 @return Return the BOOLEAN.
354
355 **/
356 BOOLEAN
357 EFIAPI
358 LibPcdGetExBool (
359 IN CONST GUID *Guid,
360 IN UINTN TokenNumber
361 )
362 {
363 ASSERT (FALSE);
364
365 return 0;
366 }
367
368
369
370 /**
371 This function provides a means by which to retrieve the size of a given PCD token.
372
373 Returns the size of the token specified by TokenNumber and Guid.
374
375 If Guid is NULL, then ASSERT().
376
377 @param[in] Guid The pointer to a 128-bit unique value that designates
378 which namespace to retrieve a value from.
379 @param[in] TokenNumber The PCD token number to retrieve a current value for.
380
381 @return Return the size.
382
383 **/
384 UINTN
385 EFIAPI
386 LibPcdGetExSize (
387 IN CONST GUID *Guid,
388 IN UINTN TokenNumber
389 )
390 {
391 ASSERT (FALSE);
392
393 return 0;
394 }
395
396
397
398 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
399 /**
400 This function provides a means by which to set a value for a given PCD token.
401
402 Sets the 8-bit value for the token specified by TokenNumber
403 to the value specified by Value. Value is returned.
404
405 @param[in] TokenNumber The PCD token number to set a current value for.
406 @param[in] Value The 8-bit value to set.
407
408 @return Return the value that was set.
409
410 **/
411 UINT8
412 EFIAPI
413 LibPcdSet8 (
414 IN UINTN TokenNumber,
415 IN UINT8 Value
416 )
417 {
418 ASSERT (FALSE);
419
420 return 0;
421 }
422
423
424
425 /**
426 This function provides a means by which to set a value for a given PCD token.
427
428 Sets the 16-bit value for the token specified by TokenNumber
429 to the value specified by Value. Value is returned.
430
431 @param[in] TokenNumber The PCD token number to set a current value for.
432 @param[in] Value The 16-bit value to set.
433
434 @return Return the value that was set.
435
436 **/
437 UINT16
438 EFIAPI
439 LibPcdSet16 (
440 IN UINTN TokenNumber,
441 IN UINT16 Value
442 )
443 {
444 ASSERT (FALSE);
445
446 return 0;
447 }
448
449
450
451 /**
452 This function provides a means by which to set a value for a given PCD token.
453
454 Sets the 32-bit value for the token specified by TokenNumber
455 to the value specified by Value. Value is returned.
456
457 @param[in] TokenNumber The PCD token number to set a current value for.
458 @param[in] Value The 32-bit value to set.
459
460 @return Return the value that was set.
461
462 **/
463 UINT32
464 EFIAPI
465 LibPcdSet32 (
466 IN UINTN TokenNumber,
467 IN UINT32 Value
468 )
469 {
470 ASSERT (FALSE);
471
472 return 0;
473 }
474
475
476
477 /**
478 This function provides a means by which to set a value for a given PCD token.
479
480 Sets the 64-bit value for the token specified by TokenNumber
481 to the value specified by Value. Value is returned.
482
483 @param[in] TokenNumber The PCD token number to set a current value for.
484 @param[in] Value The 64-bit value to set.
485
486 @return Return the value that was set.
487
488 **/
489 UINT64
490 EFIAPI
491 LibPcdSet64 (
492 IN UINTN TokenNumber,
493 IN UINT64 Value
494 )
495 {
496 ASSERT (FALSE);
497
498 return 0;
499 }
500
501
502
503 /**
504 This function provides a means by which to set a value for a given PCD token.
505
506 Sets a buffer for the token specified by TokenNumber to the value
507 specified by Buffer and SizeOfBuffer. Buffer is returned.
508 If SizeOfBuffer is greater than the maximum size support by TokenNumber,
509 then set SizeOfBuffer to the maximum size supported by TokenNumber and
510 return NULL to indicate that the set operation was not actually performed.
511
512 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
513 maximum size supported by TokenName and NULL must be returned.
514
515 If SizeOfBuffer is NULL, then ASSERT().
516 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
517
518 @param[in] TokenNumber The PCD token number to set a current value for.
519 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
520 @param[in] Buffer A pointer to the buffer to set.
521
522 @return Return the pointer for the buffer been set.
523
524 **/
525 VOID *
526 EFIAPI
527 LibPcdSetPtr (
528 IN UINTN TokenNumber,
529 IN OUT UINTN *SizeOfBuffer,
530 IN CONST VOID *Buffer
531 )
532 {
533 ASSERT (FALSE);
534
535 return NULL;
536 }
537
538
539
540 /**
541 This function provides a means by which to set a value for a given PCD token.
542
543 Sets the Boolean value for the token specified by TokenNumber
544 to the value specified by Value. Value is returned.
545
546 @param[in] TokenNumber The PCD token number to set a current value for.
547 @param[in] Value The boolean value to set.
548
549 @return Return the value that was set.
550
551 **/
552 BOOLEAN
553 EFIAPI
554 LibPcdSetBool (
555 IN UINTN TokenNumber,
556 IN BOOLEAN Value
557 )
558 {
559 ASSERT (FALSE);
560
561 return FALSE;
562 }
563
564
565
566 /**
567 This function provides a means by which to set a value for a given PCD token.
568
569 Sets the 8-bit value for the token specified by TokenNumber and
570 Guid to the value specified by Value. Value is returned.
571
572 If Guid is NULL, then ASSERT().
573
574 @param[in] Guid The pointer to a 128-bit unique value that
575 designates which namespace to set a value from.
576 @param[in] TokenNumber The PCD token number to set a current value for.
577 @param[in] Value The 8-bit value to set.
578
579 @return Return the value that was set.
580
581 **/
582 UINT8
583 EFIAPI
584 LibPcdSetEx8 (
585 IN CONST GUID *Guid,
586 IN UINTN TokenNumber,
587 IN UINT8 Value
588 )
589 {
590 ASSERT (FALSE);
591
592 return 0;
593 }
594
595
596
597 /**
598 This function provides a means by which to set a value for a given PCD token.
599
600 Sets the 16-bit value for the token specified by TokenNumber and
601 Guid to the value specified by Value. Value is returned.
602
603 If Guid is NULL, then ASSERT().
604
605 @param[in] Guid The pointer to a 128-bit unique value that
606 designates which namespace to set a value from.
607 @param[in] TokenNumber The PCD token number to set a current value for.
608 @param[in] Value The 16-bit value to set.
609
610 @return Return the value that was set.
611
612 **/
613 UINT16
614 EFIAPI
615 LibPcdSetEx16 (
616 IN CONST GUID *Guid,
617 IN UINTN TokenNumber,
618 IN UINT16 Value
619 )
620 {
621 ASSERT (FALSE);
622
623 return 0;
624 }
625
626
627
628 /**
629 This function provides a means by which to set a value for a given PCD token.
630
631 Sets the 32-bit value for the token specified by TokenNumber and
632 Guid to the value specified by Value. Value is returned.
633
634 If Guid is NULL, then ASSERT().
635
636 @param[in] Guid The pointer to a 128-bit unique value that
637 designates which namespace to set a value from.
638 @param[in] TokenNumber The PCD token number to set a current value for.
639 @param[in] Value The 32-bit value to set.
640
641 @return Return the value that was set.
642
643 **/
644 UINT32
645 EFIAPI
646 LibPcdSetEx32 (
647 IN CONST GUID *Guid,
648 IN UINTN TokenNumber,
649 IN UINT32 Value
650 )
651 {
652 ASSERT (FALSE);
653
654 return 0;
655 }
656
657
658
659 /**
660 This function provides a means by which to set a value for a given PCD token.
661
662 Sets the 64-bit value for the token specified by TokenNumber and
663 Guid to the value specified by Value. Value is returned.
664
665 If Guid is NULL, then ASSERT().
666
667 @param[in] Guid The pointer to a 128-bit unique value that
668 designates which namespace to set a value from.
669 @param[in] TokenNumber The PCD token number to set a current value for.
670 @param[in] Value The 64-bit value to set.
671
672 @return Return the value that was set.
673
674 **/
675 UINT64
676 EFIAPI
677 LibPcdSetEx64 (
678 IN CONST GUID *Guid,
679 IN UINTN TokenNumber,
680 IN UINT64 Value
681 )
682 {
683 ASSERT (FALSE);
684
685 return 0;
686 }
687
688
689
690 /**
691 This function provides a means by which to set a value for a given PCD token.
692
693 Sets a buffer for the token specified by TokenNumber to the value specified by
694 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
695 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
696 supported by TokenNumber and return NULL to indicate that the set operation
697 was not actually performed.
698
699 If Guid is NULL, then ASSERT().
700 If SizeOfBuffer is NULL, then ASSERT().
701 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
702
703 @param[in] Guid The pointer to a 128-bit unique value that
704 designates which namespace to set a value from.
705 @param[in] TokenNumber The PCD token number to set a current value for.
706 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
707 @param[in] Buffer A pointer to the buffer to set.
708
709 @return Return the pinter to the buffer been set.
710
711 **/
712 VOID *
713 EFIAPI
714 LibPcdSetExPtr (
715 IN CONST GUID *Guid,
716 IN UINTN TokenNumber,
717 IN OUT UINTN *SizeOfBuffer,
718 IN VOID *Buffer
719 )
720 {
721 ASSERT (FALSE);
722
723 return NULL;
724 }
725
726
727
728 /**
729 This function provides a means by which to set a value for a given PCD token.
730
731 Sets the Boolean value for the token specified by TokenNumber and
732 Guid to the value specified by Value. Value is returned.
733
734 If Guid is NULL, then ASSERT().
735
736 @param[in] Guid The pointer to a 128-bit unique value that
737 designates which namespace to set a value from.
738 @param[in] TokenNumber The PCD token number to set a current value for.
739 @param[in] Value The Boolean value to set.
740
741 @return Return the value that was set.
742
743 **/
744 BOOLEAN
745 EFIAPI
746 LibPcdSetExBool (
747 IN CONST GUID *Guid,
748 IN UINTN TokenNumber,
749 IN BOOLEAN Value
750 )
751 {
752 ASSERT (FALSE);
753
754 return FALSE;
755 }
756 #endif
757
758 /**
759 This function provides a means by which to set a value for a given PCD token.
760
761 Sets the 8-bit value for the token specified by TokenNumber
762 to the value specified by Value.
763
764 @param[in] TokenNumber The PCD token number to set a current value for.
765 @param[in] Value The 8-bit value to set.
766
767 @return The status of the set operation.
768
769 **/
770 RETURN_STATUS
771 EFIAPI
772 LibPcdSet8S (
773 IN UINTN TokenNumber,
774 IN UINT8 Value
775 )
776 {
777 ASSERT (FALSE);
778
779 return RETURN_INVALID_PARAMETER;
780 }
781
782 /**
783 This function provides a means by which to set a value for a given PCD token.
784
785 Sets the 16-bit value for the token specified by TokenNumber
786 to the value specified by Value.
787
788 @param[in] TokenNumber The PCD token number to set a current value for.
789 @param[in] Value The 16-bit value to set.
790
791 @return The status of the set operation.
792
793 **/
794 RETURN_STATUS
795 EFIAPI
796 LibPcdSet16S (
797 IN UINTN TokenNumber,
798 IN UINT16 Value
799 )
800 {
801 ASSERT (FALSE);
802
803 return RETURN_INVALID_PARAMETER;
804 }
805
806 /**
807 This function provides a means by which to set a value for a given PCD token.
808
809 Sets the 32-bit value for the token specified by TokenNumber
810 to the value specified by Value.
811
812 @param[in] TokenNumber The PCD token number to set a current value for.
813 @param[in] Value The 32-bit value to set.
814
815 @return The status of the set operation.
816
817 **/
818 RETURN_STATUS
819 EFIAPI
820 LibPcdSet32S (
821 IN UINTN TokenNumber,
822 IN UINT32 Value
823 )
824 {
825 ASSERT (FALSE);
826
827 return RETURN_INVALID_PARAMETER;
828 }
829
830 /**
831 This function provides a means by which to set a value for a given PCD token.
832
833 Sets the 64-bit value for the token specified by TokenNumber
834 to the value specified by Value.
835
836 @param[in] TokenNumber The PCD token number to set a current value for.
837 @param[in] Value The 64-bit value to set.
838
839 @return The status of the set operation.
840
841 **/
842 RETURN_STATUS
843 EFIAPI
844 LibPcdSet64S (
845 IN UINTN TokenNumber,
846 IN UINT64 Value
847 )
848 {
849 ASSERT (FALSE);
850
851 return RETURN_INVALID_PARAMETER;
852 }
853
854 /**
855 This function provides a means by which to set a value for a given PCD token.
856
857 Sets a buffer for the token specified by TokenNumber to the value specified
858 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
859 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
860 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation
861 was not actually performed.
862
863 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
864 maximum size supported by TokenName and EFI_INVALID_PARAMETER must be returned.
865
866 If SizeOfBuffer is NULL, then ASSERT().
867 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
868
869 @param[in] TokenNumber The PCD token number to set a current value for.
870 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
871 @param[in] Buffer A pointer to the buffer to set.
872
873 @return The status of the set operation.
874
875 **/
876 RETURN_STATUS
877 EFIAPI
878 LibPcdSetPtrS (
879 IN UINTN TokenNumber,
880 IN OUT UINTN *SizeOfBuffer,
881 IN CONST VOID *Buffer
882 )
883 {
884 ASSERT (FALSE);
885
886 return RETURN_INVALID_PARAMETER;
887 }
888
889 /**
890 This function provides a means by which to set a value for a given PCD token.
891
892 Sets the boolean value for the token specified by TokenNumber
893 to the value specified by Value.
894
895 @param[in] TokenNumber The PCD token number to set a current value for.
896 @param[in] Value The boolean value to set.
897
898 @return The status of the set operation.
899
900 **/
901 RETURN_STATUS
902 EFIAPI
903 LibPcdSetBoolS (
904 IN UINTN TokenNumber,
905 IN BOOLEAN Value
906 )
907 {
908 ASSERT (FALSE);
909
910 return RETURN_INVALID_PARAMETER;
911 }
912
913 /**
914 This function provides a means by which to set a value for a given PCD token.
915
916 Sets the 8-bit value for the token specified by TokenNumber
917 to the value specified by Value.
918
919 If Guid is NULL, then ASSERT().
920
921 @param[in] Guid The pointer to a 128-bit unique value that
922 designates which namespace to set a value from.
923 @param[in] TokenNumber The PCD token number to set a current value for.
924 @param[in] Value The 8-bit value to set.
925
926 @return The status of the set operation.
927
928 **/
929 RETURN_STATUS
930 EFIAPI
931 LibPcdSetEx8S (
932 IN CONST GUID *Guid,
933 IN UINTN TokenNumber,
934 IN UINT8 Value
935 )
936 {
937 ASSERT (FALSE);
938
939 return RETURN_INVALID_PARAMETER;
940 }
941
942 /**
943 This function provides a means by which to set a value for a given PCD token.
944
945 Sets the 16-bit value for the token specified by TokenNumber
946 to the value specified by Value.
947
948 If Guid is NULL, then ASSERT().
949
950 @param[in] Guid The pointer to a 128-bit unique value that
951 designates which namespace to set a value from.
952 @param[in] TokenNumber The PCD token number to set a current value for.
953 @param[in] Value The 16-bit value to set.
954
955 @return The status of the set operation.
956
957 **/
958 RETURN_STATUS
959 EFIAPI
960 LibPcdSetEx16S (
961 IN CONST GUID *Guid,
962 IN UINTN TokenNumber,
963 IN UINT16 Value
964 )
965 {
966 ASSERT (FALSE);
967
968 return RETURN_INVALID_PARAMETER;
969 }
970
971 /**
972 This function provides a means by which to set a value for a given PCD token.
973
974 Sets the 32-bit value for the token specified by TokenNumber
975 to the value specified by Value.
976
977 If Guid is NULL, then ASSERT().
978
979 @param[in] Guid The pointer to a 128-bit unique value that
980 designates which namespace to set a value from.
981 @param[in] TokenNumber The PCD token number to set a current value for.
982 @param[in] Value The 32-bit value to set.
983
984 @return The status of the set operation.
985
986 **/
987 RETURN_STATUS
988 EFIAPI
989 LibPcdSetEx32S (
990 IN CONST GUID *Guid,
991 IN UINTN TokenNumber,
992 IN UINT32 Value
993 )
994 {
995 ASSERT (FALSE);
996
997 return RETURN_INVALID_PARAMETER;
998 }
999
1000 /**
1001 This function provides a means by which to set a value for a given PCD token.
1002
1003 Sets the 64-bit value for the token specified by TokenNumber
1004 to the value specified by Value.
1005
1006 If Guid is NULL, then ASSERT().
1007
1008 @param[in] Guid The pointer to a 128-bit unique value that
1009 designates which namespace to set a value from.
1010 @param[in] TokenNumber The PCD token number to set a current value for.
1011 @param[in] Value The 64-bit value to set.
1012
1013 @return The status of the set operation.
1014
1015 **/
1016 RETURN_STATUS
1017 EFIAPI
1018 LibPcdSetEx64S (
1019 IN CONST GUID *Guid,
1020 IN UINTN TokenNumber,
1021 IN UINT64 Value
1022 )
1023 {
1024 ASSERT (FALSE);
1025
1026 return RETURN_INVALID_PARAMETER;
1027 }
1028
1029 /**
1030 This function provides a means by which to set a value for a given PCD token.
1031
1032 Sets a buffer for the token specified by TokenNumber to the value specified by
1033 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1034 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1035 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation
1036 was not actually performed.
1037
1038 If Guid is NULL, then ASSERT().
1039 If SizeOfBuffer is NULL, then ASSERT().
1040 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1041
1042 @param[in] Guid Pointer to a 128-bit unique value that
1043 designates which namespace to set a value from.
1044 @param[in] TokenNumber The PCD token number to set a current value for.
1045 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1046 @param[in] Buffer A pointer to the buffer to set.
1047
1048 @return The status of the set operation.
1049
1050 **/
1051 RETURN_STATUS
1052 EFIAPI
1053 LibPcdSetExPtrS (
1054 IN CONST GUID *Guid,
1055 IN UINTN TokenNumber,
1056 IN OUT UINTN *SizeOfBuffer,
1057 IN VOID *Buffer
1058 )
1059 {
1060 ASSERT (FALSE);
1061
1062 return RETURN_INVALID_PARAMETER;
1063 }
1064
1065 /**
1066 This function provides a means by which to set a value for a given PCD token.
1067
1068 Sets the boolean value for the token specified by TokenNumber
1069 to the value specified by Value.
1070
1071 If Guid is NULL, then ASSERT().
1072
1073 @param[in] Guid The pointer to a 128-bit unique value that
1074 designates which namespace to set a value from.
1075 @param[in] TokenNumber The PCD token number to set a current value for.
1076 @param[in] Value The boolean value to set.
1077
1078 @return The status of the set operation.
1079
1080 **/
1081 RETURN_STATUS
1082 EFIAPI
1083 LibPcdSetExBoolS (
1084 IN CONST GUID *Guid,
1085 IN UINTN TokenNumber,
1086 IN BOOLEAN Value
1087 )
1088 {
1089 ASSERT (FALSE);
1090
1091 return RETURN_INVALID_PARAMETER;
1092 }
1093
1094 /**
1095 Set up a notification function that is called when a specified token is set.
1096
1097 When the token specified by TokenNumber and Guid is set,
1098 then notification function specified by NotificationFunction is called.
1099 If Guid is NULL, then the default token space is used.
1100
1101 If NotificationFunction is NULL, then ASSERT().
1102
1103 @param[in] Guid The pointer to a 128-bit unique value that designates which
1104 namespace to set a value from. If NULL, then the default
1105 token space is used.
1106 @param[in] TokenNumber The PCD token number to monitor.
1107 @param[in] NotificationFunction The function to call when the token
1108 specified by Guid and TokenNumber is set.
1109
1110 **/
1111 VOID
1112 EFIAPI
1113 LibPcdCallbackOnSet (
1114 IN CONST GUID *Guid, OPTIONAL
1115 IN UINTN TokenNumber,
1116 IN PCD_CALLBACK NotificationFunction
1117 )
1118 {
1119 ASSERT (FALSE);
1120 }
1121
1122
1123
1124 /**
1125 Disable a notification function that was established with LibPcdCallbackonSet().
1126
1127 Disable a notification function that was previously established with LibPcdCallbackOnSet().
1128
1129 If NotificationFunction is NULL, then ASSERT().
1130 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
1131 and NotificationFunction, then ASSERT().
1132
1133 @param[in] Guid Specify the GUID token space.
1134 @param[in] TokenNumber Specify the token number.
1135 @param[in] NotificationFunction The callback function to be unregistered.
1136
1137 **/
1138 VOID
1139 EFIAPI
1140 LibPcdCancelCallback (
1141 IN CONST GUID *Guid, OPTIONAL
1142 IN UINTN TokenNumber,
1143 IN PCD_CALLBACK NotificationFunction
1144 )
1145 {
1146 ASSERT (FALSE);
1147 }
1148
1149
1150
1151 /**
1152 Retrieves the next token in a token space.
1153
1154 Retrieves the next PCD token number from the token space specified by Guid.
1155 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
1156 then the first token number is returned. Otherwise, the token number that
1157 follows TokenNumber in the token space is returned. If TokenNumber is the last
1158 token number in the token space, then 0 is returned.
1159
1160 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
1161
1162 @param[in] Guid The pointer to a 128-bit unique value that designates which namespace
1163 to set a value from. If NULL, then the default token space is used.
1164 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
1165 token number.
1166
1167 @return The next valid token number.
1168
1169 **/
1170 UINTN
1171 EFIAPI
1172 LibPcdGetNextToken (
1173 IN CONST GUID *Guid, OPTIONAL
1174 IN UINTN TokenNumber
1175 )
1176 {
1177 ASSERT (FALSE);
1178
1179 return 0;
1180 }
1181
1182
1183
1184 /**
1185 Used to retrieve the list of available PCD token space GUIDs.
1186
1187 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
1188 in the platform.
1189 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
1190 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
1191
1192 @param TokenSpaceGuid The pointer to a PCD token space GUID.
1193
1194 @return The next valid token namespace.
1195
1196 **/
1197 GUID *
1198 EFIAPI
1199 LibPcdGetNextTokenSpace (
1200 IN CONST GUID *TokenSpaceGuid
1201 )
1202 {
1203 ASSERT (FALSE);
1204
1205 return NULL;
1206 }
1207
1208
1209 /**
1210 Sets a value of a patchable PCD entry that is type pointer.
1211
1212 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
1213 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1214 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
1215 NULL to indicate that the set operation was not actually performed.
1216 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1217 MaximumDatumSize and NULL must be returned.
1218
1219 If PatchVariable is NULL, then ASSERT().
1220 If SizeOfBuffer is NULL, then ASSERT().
1221 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1222
1223 @param[out] PatchVariable A pointer to the global variable in a module that is
1224 the target of the set operation.
1225 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1226 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1227 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1228
1229 @return Return the pointer to the buffer that was set.
1230
1231 **/
1232 VOID *
1233 EFIAPI
1234 LibPatchPcdSetPtr (
1235 OUT VOID *PatchVariable,
1236 IN UINTN MaximumDatumSize,
1237 IN OUT UINTN *SizeOfBuffer,
1238 IN CONST VOID *Buffer
1239 )
1240 {
1241 ASSERT (PatchVariable != NULL);
1242 ASSERT (SizeOfBuffer != NULL);
1243
1244 if (*SizeOfBuffer > 0) {
1245 ASSERT (Buffer != NULL);
1246 }
1247
1248 if ((*SizeOfBuffer > MaximumDatumSize) ||
1249 (*SizeOfBuffer == MAX_ADDRESS)) {
1250 *SizeOfBuffer = MaximumDatumSize;
1251 return NULL;
1252 }
1253
1254 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
1255
1256 return (VOID *) Buffer;
1257 }
1258
1259 /**
1260 Sets a value of a patchable PCD entry that is type pointer.
1261
1262 Sets the PCD entry specified by PatchVariable to the value specified
1263 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
1264 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
1265 to indicate that the set operation was not actually performed.
1266 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1267 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
1268
1269 If PatchVariable is NULL, then ASSERT().
1270 If SizeOfBuffer is NULL, then ASSERT().
1271 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1272
1273 @param[out] PatchVariable A pointer to the global variable in a module that is
1274 the target of the set operation.
1275 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1276 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1277 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1278
1279 @return The status of the set operation.
1280
1281 **/
1282 RETURN_STATUS
1283 EFIAPI
1284 LibPatchPcdSetPtrS (
1285 OUT VOID *PatchVariable,
1286 IN UINTN MaximumDatumSize,
1287 IN OUT UINTN *SizeOfBuffer,
1288 IN CONST VOID *Buffer
1289 )
1290 {
1291 ASSERT (PatchVariable != NULL);
1292 ASSERT (SizeOfBuffer != NULL);
1293
1294 if (*SizeOfBuffer > 0) {
1295 ASSERT (Buffer != NULL);
1296 }
1297
1298 if ((*SizeOfBuffer > MaximumDatumSize) ||
1299 (*SizeOfBuffer == MAX_ADDRESS)) {
1300 *SizeOfBuffer = MaximumDatumSize;
1301 return RETURN_INVALID_PARAMETER;
1302 }
1303
1304 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
1305
1306 return RETURN_SUCCESS;
1307 }
1308
1309 /**
1310 Sets a value and size of a patchable PCD entry that is type pointer.
1311
1312 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
1313 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1314 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
1315 NULL to indicate that the set operation was not actually performed.
1316 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1317 MaximumDatumSize and NULL must be returned.
1318
1319 If PatchVariable is NULL, then ASSERT().
1320 If SizeOfPatchVariable is NULL, then ASSERT().
1321 If SizeOfBuffer is NULL, then ASSERT().
1322 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1323
1324 @param[out] PatchVariable A pointer to the global variable in a module that is
1325 the target of the set operation.
1326 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
1327 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1328 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1329 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1330
1331 @return Return the pointer to the buffer been set.
1332
1333 **/
1334 VOID *
1335 EFIAPI
1336 LibPatchPcdSetPtrAndSize (
1337 OUT VOID *PatchVariable,
1338 OUT UINTN *SizeOfPatchVariable,
1339 IN UINTN MaximumDatumSize,
1340 IN OUT UINTN *SizeOfBuffer,
1341 IN CONST VOID *Buffer
1342 )
1343 {
1344 ASSERT (PatchVariable != NULL);
1345 ASSERT (SizeOfPatchVariable != NULL);
1346 ASSERT (SizeOfBuffer != NULL);
1347
1348 if (*SizeOfBuffer > 0) {
1349 ASSERT (Buffer != NULL);
1350 }
1351
1352 if ((*SizeOfBuffer > MaximumDatumSize) ||
1353 (*SizeOfBuffer == MAX_ADDRESS)) {
1354 *SizeOfBuffer = MaximumDatumSize;
1355 return NULL;
1356 }
1357
1358 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
1359 *SizeOfPatchVariable = *SizeOfBuffer;
1360
1361 return (VOID *) Buffer;
1362 }
1363
1364 /**
1365 Sets a value and size of a patchable PCD entry that is type pointer.
1366
1367 Sets the PCD entry specified by PatchVariable to the value specified
1368 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
1369 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
1370 to indicate that the set operation was not actually performed.
1371 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1372 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
1373
1374 If PatchVariable is NULL, then ASSERT().
1375 If SizeOfPatchVariable is NULL, then ASSERT().
1376 If SizeOfBuffer is NULL, then ASSERT().
1377 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1378
1379 @param[out] PatchVariable A pointer to the global variable in a module that is
1380 the target of the set operation.
1381 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
1382 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1383 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1384 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1385
1386 @return The status of the set operation.
1387
1388 **/
1389 RETURN_STATUS
1390 EFIAPI
1391 LibPatchPcdSetPtrAndSizeS (
1392 OUT VOID *PatchVariable,
1393 OUT UINTN *SizeOfPatchVariable,
1394 IN UINTN MaximumDatumSize,
1395 IN OUT UINTN *SizeOfBuffer,
1396 IN CONST VOID *Buffer
1397 )
1398 {
1399 ASSERT (PatchVariable != NULL);
1400 ASSERT (SizeOfPatchVariable != NULL);
1401 ASSERT (SizeOfBuffer != NULL);
1402
1403 if (*SizeOfBuffer > 0) {
1404 ASSERT (Buffer != NULL);
1405 }
1406
1407 if ((*SizeOfBuffer > MaximumDatumSize) ||
1408 (*SizeOfBuffer == MAX_ADDRESS)) {
1409 *SizeOfBuffer = MaximumDatumSize;
1410 return RETURN_INVALID_PARAMETER;
1411 }
1412
1413 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
1414 *SizeOfPatchVariable = *SizeOfBuffer;
1415
1416 return RETURN_SUCCESS;
1417 }
1418
1419 /**
1420 Retrieve additional information associated with a PCD token.
1421
1422 This includes information such as the type of value the TokenNumber is associated with as well as possible
1423 human readable name that is associated with the token.
1424
1425 If TokenNumber is not in the default token space specified, then ASSERT().
1426
1427 @param[in] TokenNumber The PCD token number.
1428 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
1429 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
1430 **/
1431 VOID
1432 EFIAPI
1433 LibPcdGetInfo (
1434 IN UINTN TokenNumber,
1435 OUT PCD_INFO *PcdInfo
1436 )
1437 {
1438 ASSERT (FALSE);
1439 }
1440
1441 /**
1442 Retrieve additional information associated with a PCD token.
1443
1444 This includes information such as the type of value the TokenNumber is associated with as well as possible
1445 human readable name that is associated with the token.
1446
1447 If TokenNumber is not in the token space specified by Guid, then ASSERT().
1448
1449 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
1450 @param[in] TokenNumber The PCD token number.
1451 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
1452 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
1453 **/
1454 VOID
1455 EFIAPI
1456 LibPcdGetInfoEx (
1457 IN CONST GUID *Guid,
1458 IN UINTN TokenNumber,
1459 OUT PCD_INFO *PcdInfo
1460 )
1461 {
1462 ASSERT (FALSE);
1463 }
1464
1465 /**
1466 Retrieve the currently set SKU Id.
1467
1468 If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
1469
1470 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
1471 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
1472 Id is returned.
1473 **/
1474 UINTN
1475 EFIAPI
1476 LibPcdGetSku (
1477 VOID
1478 )
1479 {
1480 ASSERT (FALSE);
1481
1482 return 0;
1483 }
1484