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