]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/BasePcdLibNull/PcdLib.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Library / BasePcdLibNull / PcdLib.c
... / ...
CommitLineData
1/** @file\r
2 A emptry template implementation of PCD Library.\r
3\r
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#include <Base.h>\r
10\r
11#include <Library/DebugLib.h>\r
12#include <Library/PcdLib.h>\r
13#include <Library/BaseMemoryLib.h>\r
14\r
15/**\r
16 This function provides a means by which SKU support can be established in the PCD infrastructure.\r
17\r
18 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r
19\r
20 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and\r
21 set values associated with a PCD token.\r
22\r
23 @return Return the SKU ID that just be set.\r
24\r
25**/\r
26UINTN\r
27EFIAPI\r
28LibPcdSetSku (\r
29 IN UINTN SkuId\r
30 )\r
31{\r
32 ASSERT (FALSE);\r
33\r
34 return 0;\r
35}\r
36\r
37/**\r
38 This function provides a means by which to retrieve a value for a given PCD token.\r
39\r
40 Returns the 8-bit value for the token specified by TokenNumber.\r
41\r
42 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
43\r
44 @return Returns the 8-bit value for the token specified by TokenNumber.\r
45\r
46**/\r
47UINT8\r
48EFIAPI\r
49LibPcdGet8 (\r
50 IN UINTN TokenNumber\r
51 )\r
52{\r
53 ASSERT (FALSE);\r
54\r
55 return 0;\r
56}\r
57\r
58/**\r
59 This function provides a means by which to retrieve a value for a given PCD token.\r
60\r
61 Returns the 16-bit value for the token specified by TokenNumber.\r
62\r
63 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
64\r
65 @return Returns the 16-bit value for the token specified by TokenNumber.\r
66\r
67**/\r
68UINT16\r
69EFIAPI\r
70LibPcdGet16 (\r
71 IN UINTN TokenNumber\r
72 )\r
73{\r
74 ASSERT (FALSE);\r
75\r
76 return 0;\r
77}\r
78\r
79/**\r
80 This function provides a means by which to retrieve a value for a given PCD token.\r
81\r
82 Returns the 32-bit value for the token specified by TokenNumber.\r
83\r
84 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
85\r
86 @return Returns the 32-bit value for the token specified by TokenNumber.\r
87\r
88**/\r
89UINT32\r
90EFIAPI\r
91LibPcdGet32 (\r
92 IN UINTN TokenNumber\r
93 )\r
94{\r
95 ASSERT (FALSE);\r
96\r
97 return 0;\r
98}\r
99\r
100/**\r
101 This function provides a means by which to retrieve a value for a given PCD token.\r
102\r
103 Returns the 64-bit value for the token specified by TokenNumber.\r
104\r
105 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
106\r
107 @return Returns the 64-bit value for the token specified by TokenNumber.\r
108\r
109**/\r
110UINT64\r
111EFIAPI\r
112LibPcdGet64 (\r
113 IN UINTN TokenNumber\r
114 )\r
115{\r
116 ASSERT (FALSE);\r
117\r
118 return 0;\r
119}\r
120\r
121/**\r
122 This function provides a means by which to retrieve a value for a given PCD token.\r
123\r
124 Returns the pointer to the buffer of the token specified by TokenNumber.\r
125\r
126 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
127\r
128 @return Returns the pointer to the token specified by TokenNumber.\r
129\r
130**/\r
131VOID *\r
132EFIAPI\r
133LibPcdGetPtr (\r
134 IN UINTN TokenNumber\r
135 )\r
136{\r
137 ASSERT (FALSE);\r
138\r
139 return 0;\r
140}\r
141\r
142/**\r
143 This function provides a means by which to retrieve a value for a given PCD token.\r
144\r
145 Returns the Boolean value of the token specified by TokenNumber.\r
146\r
147 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
148\r
149 @return Returns the Boolean value of the token specified by TokenNumber.\r
150\r
151**/\r
152BOOLEAN\r
153EFIAPI\r
154LibPcdGetBool (\r
155 IN UINTN TokenNumber\r
156 )\r
157{\r
158 ASSERT (FALSE);\r
159\r
160 return 0;\r
161}\r
162\r
163/**\r
164 This function provides a means by which to retrieve the size of a given PCD token.\r
165\r
166 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
167\r
168 @return Returns the size of the token specified by TokenNumber.\r
169\r
170**/\r
171UINTN\r
172EFIAPI\r
173LibPcdGetSize (\r
174 IN UINTN TokenNumber\r
175 )\r
176{\r
177 ASSERT (FALSE);\r
178\r
179 return 0;\r
180}\r
181\r
182/**\r
183 This function provides a means by which to retrieve a value for a given PCD token.\r
184\r
185 Returns the 8-bit value for the token specified by TokenNumber and Guid.\r
186\r
187 If Guid is NULL, then ASSERT().\r
188\r
189 @param[in] Guid The pointer to a 128-bit unique value that designates\r
190 which namespace to retrieve a value from.\r
191 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
192\r
193 @return Return the UINT8.\r
194\r
195**/\r
196UINT8\r
197EFIAPI\r
198LibPcdGetEx8 (\r
199 IN CONST GUID *Guid,\r
200 IN UINTN TokenNumber\r
201 )\r
202{\r
203 ASSERT (FALSE);\r
204\r
205 return 0;\r
206}\r
207\r
208/**\r
209 This function provides a means by which to retrieve a value for a given PCD token.\r
210\r
211 Returns the 16-bit value for the token specified by TokenNumber and Guid.\r
212\r
213 If Guid is NULL, then ASSERT().\r
214\r
215 @param[in] Guid The pointer to a 128-bit unique value that designates\r
216 which namespace to retrieve a value from.\r
217 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
218\r
219 @return Return the UINT16.\r
220\r
221**/\r
222UINT16\r
223EFIAPI\r
224LibPcdGetEx16 (\r
225 IN CONST GUID *Guid,\r
226 IN UINTN TokenNumber\r
227 )\r
228{\r
229 ASSERT (FALSE);\r
230\r
231 return 0;\r
232}\r
233\r
234/**\r
235 Returns the 32-bit value for the token specified by TokenNumber and Guid.\r
236 If Guid is NULL, then ASSERT().\r
237\r
238 @param[in] Guid The pointer to a 128-bit unique value that designates\r
239 which namespace to retrieve a value from.\r
240 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
241\r
242 @return Return the UINT32.\r
243\r
244**/\r
245UINT32\r
246EFIAPI\r
247LibPcdGetEx32 (\r
248 IN CONST GUID *Guid,\r
249 IN UINTN TokenNumber\r
250 )\r
251{\r
252 ASSERT (FALSE);\r
253\r
254 return 0;\r
255}\r
256\r
257/**\r
258 This function provides a means by which to retrieve a value for a given PCD token.\r
259\r
260 Returns the 64-bit value for the token specified by TokenNumber and Guid.\r
261\r
262 If Guid is NULL, then ASSERT().\r
263\r
264 @param[in] Guid The pointer to a 128-bit unique value that designates\r
265 which namespace to retrieve a value from.\r
266 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
267\r
268 @return Return the UINT64.\r
269\r
270**/\r
271UINT64\r
272EFIAPI\r
273LibPcdGetEx64 (\r
274 IN CONST GUID *Guid,\r
275 IN UINTN TokenNumber\r
276 )\r
277{\r
278 ASSERT (FALSE);\r
279\r
280 return 0;\r
281}\r
282\r
283/**\r
284 This function provides a means by which to retrieve a value for a given PCD token.\r
285\r
286 Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r
287\r
288 If Guid is NULL, then ASSERT().\r
289\r
290 @param[in] Guid The pointer to a 128-bit unique value that designates\r
291 which namespace to retrieve a value from.\r
292 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
293\r
294 @return Return the VOID* pointer.\r
295\r
296**/\r
297VOID *\r
298EFIAPI\r
299LibPcdGetExPtr (\r
300 IN CONST GUID *Guid,\r
301 IN UINTN TokenNumber\r
302 )\r
303{\r
304 ASSERT (FALSE);\r
305\r
306 return 0;\r
307}\r
308\r
309/**\r
310 This function provides a means by which to retrieve a value for a given PCD token.\r
311\r
312 Returns the Boolean value of the token specified by TokenNumber and Guid.\r
313\r
314 If Guid is NULL, then ASSERT().\r
315\r
316 @param[in] Guid The pointer to a 128-bit unique value that designates\r
317 which namespace to retrieve a value from.\r
318 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
319\r
320 @return Return the BOOLEAN.\r
321\r
322**/\r
323BOOLEAN\r
324EFIAPI\r
325LibPcdGetExBool (\r
326 IN CONST GUID *Guid,\r
327 IN UINTN TokenNumber\r
328 )\r
329{\r
330 ASSERT (FALSE);\r
331\r
332 return 0;\r
333}\r
334\r
335/**\r
336 This function provides a means by which to retrieve the size of a given PCD token.\r
337\r
338 Returns the size of the token specified by TokenNumber and Guid.\r
339\r
340 If Guid is NULL, then ASSERT().\r
341\r
342 @param[in] Guid The pointer to a 128-bit unique value that designates\r
343 which namespace to retrieve a value from.\r
344 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
345\r
346 @return Return the size.\r
347\r
348**/\r
349UINTN\r
350EFIAPI\r
351LibPcdGetExSize (\r
352 IN CONST GUID *Guid,\r
353 IN UINTN TokenNumber\r
354 )\r
355{\r
356 ASSERT (FALSE);\r
357\r
358 return 0;\r
359}\r
360\r
361/**\r
362 This function provides a means by which to set a value for a given PCD token.\r
363\r
364 Sets the 8-bit value for the token specified by TokenNumber\r
365 to the value specified by Value.\r
366\r
367 @param[in] TokenNumber The PCD token number to set a current value for.\r
368 @param[in] Value The 8-bit value to set.\r
369\r
370 @return The status of the set operation.\r
371\r
372**/\r
373RETURN_STATUS\r
374EFIAPI\r
375LibPcdSet8S (\r
376 IN UINTN TokenNumber,\r
377 IN UINT8 Value\r
378 )\r
379{\r
380 ASSERT (FALSE);\r
381\r
382 return RETURN_INVALID_PARAMETER;\r
383}\r
384\r
385/**\r
386 This function provides a means by which to set a value for a given PCD token.\r
387\r
388 Sets the 16-bit value for the token specified by TokenNumber\r
389 to the value specified by Value.\r
390\r
391 @param[in] TokenNumber The PCD token number to set a current value for.\r
392 @param[in] Value The 16-bit value to set.\r
393\r
394 @return The status of the set operation.\r
395\r
396**/\r
397RETURN_STATUS\r
398EFIAPI\r
399LibPcdSet16S (\r
400 IN UINTN TokenNumber,\r
401 IN UINT16 Value\r
402 )\r
403{\r
404 ASSERT (FALSE);\r
405\r
406 return RETURN_INVALID_PARAMETER;\r
407}\r
408\r
409/**\r
410 This function provides a means by which to set a value for a given PCD token.\r
411\r
412 Sets the 32-bit value for the token specified by TokenNumber\r
413 to the value specified by Value.\r
414\r
415 @param[in] TokenNumber The PCD token number to set a current value for.\r
416 @param[in] Value The 32-bit value to set.\r
417\r
418 @return The status of the set operation.\r
419\r
420**/\r
421RETURN_STATUS\r
422EFIAPI\r
423LibPcdSet32S (\r
424 IN UINTN TokenNumber,\r
425 IN UINT32 Value\r
426 )\r
427{\r
428 ASSERT (FALSE);\r
429\r
430 return RETURN_INVALID_PARAMETER;\r
431}\r
432\r
433/**\r
434 This function provides a means by which to set a value for a given PCD token.\r
435\r
436 Sets the 64-bit value for the token specified by TokenNumber\r
437 to the value specified by Value.\r
438\r
439 @param[in] TokenNumber The PCD token number to set a current value for.\r
440 @param[in] Value The 64-bit value to set.\r
441\r
442 @return The status of the set operation.\r
443\r
444**/\r
445RETURN_STATUS\r
446EFIAPI\r
447LibPcdSet64S (\r
448 IN UINTN TokenNumber,\r
449 IN UINT64 Value\r
450 )\r
451{\r
452 ASSERT (FALSE);\r
453\r
454 return RETURN_INVALID_PARAMETER;\r
455}\r
456\r
457/**\r
458 This function provides a means by which to set a value for a given PCD token.\r
459\r
460 Sets a buffer for the token specified by TokenNumber to the value specified\r
461 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r
462 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r
463 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation\r
464 was not actually performed.\r
465\r
466 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the\r
467 maximum size supported by TokenName and EFI_INVALID_PARAMETER must be returned.\r
468\r
469 If SizeOfBuffer is NULL, then ASSERT().\r
470 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
471\r
472 @param[in] TokenNumber The PCD token number to set a current value for.\r
473 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
474 @param[in] Buffer A pointer to the buffer to set.\r
475\r
476 @return The status of the set operation.\r
477\r
478**/\r
479RETURN_STATUS\r
480EFIAPI\r
481LibPcdSetPtrS (\r
482 IN UINTN TokenNumber,\r
483 IN OUT UINTN *SizeOfBuffer,\r
484 IN CONST VOID *Buffer\r
485 )\r
486{\r
487 ASSERT (FALSE);\r
488\r
489 return RETURN_INVALID_PARAMETER;\r
490}\r
491\r
492/**\r
493 This function provides a means by which to set a value for a given PCD token.\r
494\r
495 Sets the boolean value for the token specified by TokenNumber\r
496 to the value specified by Value.\r
497\r
498 @param[in] TokenNumber The PCD token number to set a current value for.\r
499 @param[in] Value The boolean value to set.\r
500\r
501 @return The status of the set operation.\r
502\r
503**/\r
504RETURN_STATUS\r
505EFIAPI\r
506LibPcdSetBoolS (\r
507 IN UINTN TokenNumber,\r
508 IN BOOLEAN Value\r
509 )\r
510{\r
511 ASSERT (FALSE);\r
512\r
513 return RETURN_INVALID_PARAMETER;\r
514}\r
515\r
516/**\r
517 This function provides a means by which to set a value for a given PCD token.\r
518\r
519 Sets the 8-bit value for the token specified by TokenNumber\r
520 to the value specified by Value.\r
521\r
522 If Guid is NULL, then ASSERT().\r
523\r
524 @param[in] Guid The pointer to a 128-bit unique value that\r
525 designates which namespace to set a value from.\r
526 @param[in] TokenNumber The PCD token number to set a current value for.\r
527 @param[in] Value The 8-bit value to set.\r
528\r
529 @return The status of the set operation.\r
530\r
531**/\r
532RETURN_STATUS\r
533EFIAPI\r
534LibPcdSetEx8S (\r
535 IN CONST GUID *Guid,\r
536 IN UINTN TokenNumber,\r
537 IN UINT8 Value\r
538 )\r
539{\r
540 ASSERT (FALSE);\r
541\r
542 return RETURN_INVALID_PARAMETER;\r
543}\r
544\r
545/**\r
546 This function provides a means by which to set a value for a given PCD token.\r
547\r
548 Sets the 16-bit value for the token specified by TokenNumber\r
549 to the value specified by Value.\r
550\r
551 If Guid is NULL, then ASSERT().\r
552\r
553 @param[in] Guid The pointer to a 128-bit unique value that\r
554 designates which namespace to set a value from.\r
555 @param[in] TokenNumber The PCD token number to set a current value for.\r
556 @param[in] Value The 16-bit value to set.\r
557\r
558 @return The status of the set operation.\r
559\r
560**/\r
561RETURN_STATUS\r
562EFIAPI\r
563LibPcdSetEx16S (\r
564 IN CONST GUID *Guid,\r
565 IN UINTN TokenNumber,\r
566 IN UINT16 Value\r
567 )\r
568{\r
569 ASSERT (FALSE);\r
570\r
571 return RETURN_INVALID_PARAMETER;\r
572}\r
573\r
574/**\r
575 This function provides a means by which to set a value for a given PCD token.\r
576\r
577 Sets the 32-bit value for the token specified by TokenNumber\r
578 to the value specified by Value.\r
579\r
580 If Guid is NULL, then ASSERT().\r
581\r
582 @param[in] Guid The pointer to a 128-bit unique value that\r
583 designates which namespace to set a value from.\r
584 @param[in] TokenNumber The PCD token number to set a current value for.\r
585 @param[in] Value The 32-bit value to set.\r
586\r
587 @return The status of the set operation.\r
588\r
589**/\r
590RETURN_STATUS\r
591EFIAPI\r
592LibPcdSetEx32S (\r
593 IN CONST GUID *Guid,\r
594 IN UINTN TokenNumber,\r
595 IN UINT32 Value\r
596 )\r
597{\r
598 ASSERT (FALSE);\r
599\r
600 return RETURN_INVALID_PARAMETER;\r
601}\r
602\r
603/**\r
604 This function provides a means by which to set a value for a given PCD token.\r
605\r
606 Sets the 64-bit value for the token specified by TokenNumber\r
607 to the value specified by Value.\r
608\r
609 If Guid is NULL, then ASSERT().\r
610\r
611 @param[in] Guid The pointer to a 128-bit unique value that\r
612 designates which namespace to set a value from.\r
613 @param[in] TokenNumber The PCD token number to set a current value for.\r
614 @param[in] Value The 64-bit value to set.\r
615\r
616 @return The status of the set operation.\r
617\r
618**/\r
619RETURN_STATUS\r
620EFIAPI\r
621LibPcdSetEx64S (\r
622 IN CONST GUID *Guid,\r
623 IN UINTN TokenNumber,\r
624 IN UINT64 Value\r
625 )\r
626{\r
627 ASSERT (FALSE);\r
628\r
629 return RETURN_INVALID_PARAMETER;\r
630}\r
631\r
632/**\r
633 This function provides a means by which to set a value for a given PCD token.\r
634\r
635 Sets a buffer for the token specified by TokenNumber to the value specified by\r
636 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r
637 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r
638 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation\r
639 was not actually performed.\r
640\r
641 If Guid is NULL, then ASSERT().\r
642 If SizeOfBuffer is NULL, then ASSERT().\r
643 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
644\r
645 @param[in] Guid Pointer to a 128-bit unique value that\r
646 designates which namespace to set a value from.\r
647 @param[in] TokenNumber The PCD token number to set a current value for.\r
648 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
649 @param[in] Buffer A pointer to the buffer to set.\r
650\r
651 @return The status of the set operation.\r
652\r
653**/\r
654RETURN_STATUS\r
655EFIAPI\r
656LibPcdSetExPtrS (\r
657 IN CONST GUID *Guid,\r
658 IN UINTN TokenNumber,\r
659 IN OUT UINTN *SizeOfBuffer,\r
660 IN VOID *Buffer\r
661 )\r
662{\r
663 ASSERT (FALSE);\r
664\r
665 return RETURN_INVALID_PARAMETER;\r
666}\r
667\r
668/**\r
669 This function provides a means by which to set a value for a given PCD token.\r
670\r
671 Sets the boolean value for the token specified by TokenNumber\r
672 to the value specified by Value.\r
673\r
674 If Guid is NULL, then ASSERT().\r
675\r
676 @param[in] Guid The pointer to a 128-bit unique value that\r
677 designates which namespace to set a value from.\r
678 @param[in] TokenNumber The PCD token number to set a current value for.\r
679 @param[in] Value The boolean value to set.\r
680\r
681 @return The status of the set operation.\r
682\r
683**/\r
684RETURN_STATUS\r
685EFIAPI\r
686LibPcdSetExBoolS (\r
687 IN CONST GUID *Guid,\r
688 IN UINTN TokenNumber,\r
689 IN BOOLEAN Value\r
690 )\r
691{\r
692 ASSERT (FALSE);\r
693\r
694 return RETURN_INVALID_PARAMETER;\r
695}\r
696\r
697/**\r
698 Set up a notification function that is called when a specified token is set.\r
699\r
700 When the token specified by TokenNumber and Guid is set,\r
701 then notification function specified by NotificationFunction is called.\r
702 If Guid is NULL, then the default token space is used.\r
703\r
704 If NotificationFunction is NULL, then ASSERT().\r
705\r
706 @param[in] Guid The pointer to a 128-bit unique value that designates which\r
707 namespace to set a value from. If NULL, then the default\r
708 token space is used.\r
709 @param[in] TokenNumber The PCD token number to monitor.\r
710 @param[in] NotificationFunction The function to call when the token\r
711 specified by Guid and TokenNumber is set.\r
712\r
713**/\r
714VOID\r
715EFIAPI\r
716LibPcdCallbackOnSet (\r
717 IN CONST GUID *Guid OPTIONAL,\r
718 IN UINTN TokenNumber,\r
719 IN PCD_CALLBACK NotificationFunction\r
720 )\r
721{\r
722 ASSERT (FALSE);\r
723}\r
724\r
725/**\r
726 Disable a notification function that was established with LibPcdCallbackonSet().\r
727\r
728 Disable a notification function that was previously established with LibPcdCallbackOnSet().\r
729\r
730 If NotificationFunction is NULL, then ASSERT().\r
731 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,\r
732 and NotificationFunction, then ASSERT().\r
733\r
734 @param[in] Guid Specify the GUID token space.\r
735 @param[in] TokenNumber Specify the token number.\r
736 @param[in] NotificationFunction The callback function to be unregistered.\r
737\r
738**/\r
739VOID\r
740EFIAPI\r
741LibPcdCancelCallback (\r
742 IN CONST GUID *Guid OPTIONAL,\r
743 IN UINTN TokenNumber,\r
744 IN PCD_CALLBACK NotificationFunction\r
745 )\r
746{\r
747 ASSERT (FALSE);\r
748}\r
749\r
750/**\r
751 Retrieves the next token in a token space.\r
752\r
753 Retrieves the next PCD token number from the token space specified by Guid.\r
754 If Guid is NULL, then the default token space is used. If TokenNumber is 0,\r
755 then the first token number is returned. Otherwise, the token number that\r
756 follows TokenNumber in the token space is returned. If TokenNumber is the last\r
757 token number in the token space, then 0 is returned.\r
758\r
759 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r
760\r
761 @param[in] Guid The pointer to a 128-bit unique value that designates which namespace\r
762 to set a value from. If NULL, then the default token space is used.\r
763 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD\r
764 token number.\r
765\r
766 @return The next valid token number.\r
767\r
768**/\r
769UINTN\r
770EFIAPI\r
771LibPcdGetNextToken (\r
772 IN CONST GUID *Guid OPTIONAL,\r
773 IN UINTN TokenNumber\r
774 )\r
775{\r
776 ASSERT (FALSE);\r
777\r
778 return 0;\r
779}\r
780\r
781/**\r
782 Used to retrieve the list of available PCD token space GUIDs.\r
783\r
784 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces\r
785 in the platform.\r
786 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.\r
787 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.\r
788\r
789 @param TokenSpaceGuid The pointer to a PCD token space GUID.\r
790\r
791 @return The next valid token namespace.\r
792\r
793**/\r
794GUID *\r
795EFIAPI\r
796LibPcdGetNextTokenSpace (\r
797 IN CONST GUID *TokenSpaceGuid\r
798 )\r
799{\r
800 ASSERT (FALSE);\r
801\r
802 return NULL;\r
803}\r
804\r
805/**\r
806 Sets a value of a patchable PCD entry that is type pointer.\r
807\r
808 Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r
809 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
810 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r
811 NULL to indicate that the set operation was not actually performed.\r
812 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
813 MaximumDatumSize and NULL must be returned.\r
814\r
815 If PatchVariable is NULL, then ASSERT().\r
816 If SizeOfBuffer is NULL, then ASSERT().\r
817 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
818\r
819 @param[out] PatchVariable A pointer to the global variable in a module that is\r
820 the target of the set operation.\r
821 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
822 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
823 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
824\r
825 @return Return the pointer to the buffer that was set.\r
826\r
827**/\r
828VOID *\r
829EFIAPI\r
830LibPatchPcdSetPtr (\r
831 OUT VOID *PatchVariable,\r
832 IN UINTN MaximumDatumSize,\r
833 IN OUT UINTN *SizeOfBuffer,\r
834 IN CONST VOID *Buffer\r
835 )\r
836{\r
837 ASSERT (PatchVariable != NULL);\r
838 ASSERT (SizeOfBuffer != NULL);\r
839\r
840 if (*SizeOfBuffer > 0) {\r
841 ASSERT (Buffer != NULL);\r
842 }\r
843\r
844 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
845 (*SizeOfBuffer == MAX_ADDRESS))\r
846 {\r
847 *SizeOfBuffer = MaximumDatumSize;\r
848 return NULL;\r
849 }\r
850\r
851 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
852\r
853 return (VOID *)Buffer;\r
854}\r
855\r
856/**\r
857 Sets a value of a patchable PCD entry that is type pointer.\r
858\r
859 Sets the PCD entry specified by PatchVariable to the value specified\r
860 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r
861 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r
862 to indicate that the set operation was not actually performed.\r
863 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
864 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r
865\r
866 If PatchVariable is NULL, then ASSERT().\r
867 If SizeOfBuffer is NULL, then ASSERT().\r
868 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
869\r
870 @param[out] PatchVariable A pointer to the global variable in a module that is\r
871 the target of the set operation.\r
872 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
873 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
874 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
875\r
876 @return The status of the set operation.\r
877\r
878**/\r
879RETURN_STATUS\r
880EFIAPI\r
881LibPatchPcdSetPtrS (\r
882 OUT VOID *PatchVariable,\r
883 IN UINTN MaximumDatumSize,\r
884 IN OUT UINTN *SizeOfBuffer,\r
885 IN CONST VOID *Buffer\r
886 )\r
887{\r
888 ASSERT (PatchVariable != NULL);\r
889 ASSERT (SizeOfBuffer != NULL);\r
890\r
891 if (*SizeOfBuffer > 0) {\r
892 ASSERT (Buffer != NULL);\r
893 }\r
894\r
895 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
896 (*SizeOfBuffer == MAX_ADDRESS))\r
897 {\r
898 *SizeOfBuffer = MaximumDatumSize;\r
899 return RETURN_INVALID_PARAMETER;\r
900 }\r
901\r
902 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
903\r
904 return RETURN_SUCCESS;\r
905}\r
906\r
907/**\r
908 Sets a value and size of a patchable PCD entry that is type pointer.\r
909\r
910 Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r
911 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
912 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r
913 NULL to indicate that the set operation was not actually performed.\r
914 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
915 MaximumDatumSize and NULL must be returned.\r
916\r
917 If PatchVariable is NULL, then ASSERT().\r
918 If SizeOfPatchVariable is NULL, then ASSERT().\r
919 If SizeOfBuffer is NULL, then ASSERT().\r
920 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
921\r
922 @param[out] PatchVariable A pointer to the global variable in a module that is\r
923 the target of the set operation.\r
924 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r
925 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
926 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
927 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
928\r
929 @return Return the pointer to the buffer been set.\r
930\r
931**/\r
932VOID *\r
933EFIAPI\r
934LibPatchPcdSetPtrAndSize (\r
935 OUT VOID *PatchVariable,\r
936 OUT UINTN *SizeOfPatchVariable,\r
937 IN UINTN MaximumDatumSize,\r
938 IN OUT UINTN *SizeOfBuffer,\r
939 IN CONST VOID *Buffer\r
940 )\r
941{\r
942 ASSERT (PatchVariable != NULL);\r
943 ASSERT (SizeOfPatchVariable != NULL);\r
944 ASSERT (SizeOfBuffer != NULL);\r
945\r
946 if (*SizeOfBuffer > 0) {\r
947 ASSERT (Buffer != NULL);\r
948 }\r
949\r
950 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
951 (*SizeOfBuffer == MAX_ADDRESS))\r
952 {\r
953 *SizeOfBuffer = MaximumDatumSize;\r
954 return NULL;\r
955 }\r
956\r
957 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
958 *SizeOfPatchVariable = *SizeOfBuffer;\r
959\r
960 return (VOID *)Buffer;\r
961}\r
962\r
963/**\r
964 Sets a value and size of a patchable PCD entry that is type pointer.\r
965\r
966 Sets the PCD entry specified by PatchVariable to the value specified\r
967 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r
968 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r
969 to indicate that the set operation was not actually performed.\r
970 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
971 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r
972\r
973 If PatchVariable is NULL, then ASSERT().\r
974 If SizeOfPatchVariable is NULL, then ASSERT().\r
975 If SizeOfBuffer is NULL, then ASSERT().\r
976 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
977\r
978 @param[out] PatchVariable A pointer to the global variable in a module that is\r
979 the target of the set operation.\r
980 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r
981 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
982 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
983 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
984\r
985 @return The status of the set operation.\r
986\r
987**/\r
988RETURN_STATUS\r
989EFIAPI\r
990LibPatchPcdSetPtrAndSizeS (\r
991 OUT VOID *PatchVariable,\r
992 OUT UINTN *SizeOfPatchVariable,\r
993 IN UINTN MaximumDatumSize,\r
994 IN OUT UINTN *SizeOfBuffer,\r
995 IN CONST VOID *Buffer\r
996 )\r
997{\r
998 ASSERT (PatchVariable != NULL);\r
999 ASSERT (SizeOfPatchVariable != NULL);\r
1000 ASSERT (SizeOfBuffer != NULL);\r
1001\r
1002 if (*SizeOfBuffer > 0) {\r
1003 ASSERT (Buffer != NULL);\r
1004 }\r
1005\r
1006 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
1007 (*SizeOfBuffer == MAX_ADDRESS))\r
1008 {\r
1009 *SizeOfBuffer = MaximumDatumSize;\r
1010 return RETURN_INVALID_PARAMETER;\r
1011 }\r
1012\r
1013 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
1014 *SizeOfPatchVariable = *SizeOfBuffer;\r
1015\r
1016 return RETURN_SUCCESS;\r
1017}\r
1018\r
1019/**\r
1020 Retrieve additional information associated with a PCD token.\r
1021\r
1022 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
1023 human readable name that is associated with the token.\r
1024\r
1025 If TokenNumber is not in the default token space specified, then ASSERT().\r
1026\r
1027 @param[in] TokenNumber The PCD token number.\r
1028 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
1029 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
1030**/\r
1031VOID\r
1032EFIAPI\r
1033LibPcdGetInfo (\r
1034 IN UINTN TokenNumber,\r
1035 OUT PCD_INFO *PcdInfo\r
1036 )\r
1037{\r
1038 ASSERT (FALSE);\r
1039}\r
1040\r
1041/**\r
1042 Retrieve additional information associated with a PCD token.\r
1043\r
1044 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
1045 human readable name that is associated with the token.\r
1046\r
1047 If TokenNumber is not in the token space specified by Guid, then ASSERT().\r
1048\r
1049 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
1050 @param[in] TokenNumber The PCD token number.\r
1051 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
1052 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
1053**/\r
1054VOID\r
1055EFIAPI\r
1056LibPcdGetInfoEx (\r
1057 IN CONST GUID *Guid,\r
1058 IN UINTN TokenNumber,\r
1059 OUT PCD_INFO *PcdInfo\r
1060 )\r
1061{\r
1062 ASSERT (FALSE);\r
1063}\r
1064\r
1065/**\r
1066 Retrieve the currently set SKU Id.\r
1067\r
1068 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the\r
1069 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU\r
1070 Id is returned.\r
1071**/\r
1072UINTN\r
1073EFIAPI\r
1074LibPcdGetSku (\r
1075 VOID\r
1076 )\r
1077{\r
1078 ASSERT (FALSE);\r
1079\r
1080 return 0;\r
1081}\r