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