]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BasePcdLibNull/PcdLib.c
Synchronize function comment in h file
[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
f73e0ad2 28 @return Return the SKU ID that just be set.\r
bbfaace4 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
f73e0ad2 47 @return Returns the 8-bit value for the token specified by TokenNumber. \r
bbfaace4 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
f73e0ad2 68 @return Returns the 16-bit value for the token specified by TokenNumber. \r
bbfaace4 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
f73e0ad2 89 @return Returns the 32-bit value for the token specified by TokenNumber.\r
bbfaace4 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
f73e0ad2 110 @return Returns the 64-bit value for the token specified by TokenNumber.\r
bbfaace4 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
f73e0ad2 131 @return Returns the pointer to the token specified by TokenNumber.\r
bbfaace4 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
f73e0ad2 152 @return Returns the Boolean value of the token specified by TokenNumber. \r
bbfaace4 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
f73e0ad2 173 @return Returns the size of the token specified by TokenNumber. \r
bbfaace4 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
f73e0ad2 197 @return Return the UINT8.\r
bbfaace4 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
f73e0ad2 222 @return Return the UINT16.\r
bbfaace4 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
f73e0ad2 247 @return Return the UINT32.\r
bbfaace4 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
f73e0ad2 272 @return Return the UINT64.\r
bbfaace4 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
f73e0ad2 297 @return Return the VOID* pointer.\r
bbfaace4 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
f73e0ad2 322 @return Return the BOOLEAN.\r
bbfaace4 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
f73e0ad2 347 @return Return the size.\r
bbfaace4 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
f73e0ad2 371 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 395 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 419 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 443 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 478 @return Return the pointer for the buffer been set.\r
bbfaace4 479\r
480**/\r
481VOID *\r
482EFIAPI\r
483LibPcdSetPtr (\r
64735d24 484 IN UINTN TokenNumber,\r
485 IN OUT UINTN *SizeOfBuffer,\r
486 IN VOID *Buffer\r
bbfaace4 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
f73e0ad2 503 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 530 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 558 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 586 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 614 @return Return the value been set.\r
bbfaace4 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
f73e0ad2 647 @return Return the pinter to the buffer been set.\r
bbfaace4 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
f73e0ad2 676 @return Return the value been set.\r
bbfaace4 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
bbfaace4 707**/\r
708VOID\r
709EFIAPI\r
710LibPcdCallbackOnSet (\r
711 IN CONST GUID *Guid, OPTIONAL\r
712 IN UINTN TokenNumber,\r
713 IN PCD_CALLBACK NotificationFunction\r
714 )\r
715{\r
afa22326 716 ASSERT (FALSE);\r
bbfaace4 717}\r
718\r
719\r
720\r
721/**\r
722 Disable a notification function that was established with LibPcdCallbackonSet().\r
723 If NotificationFunction is NULL, then ASSERT().\r
724\r
725 @param[in] Guid Specify the GUID token space.\r
726 @param[in] TokenNumber Specify the token number.\r
727 @param[in] NotificationFunction The callback function to be unregistered.\r
728\r
bbfaace4 729**/\r
730VOID\r
731EFIAPI\r
732LibPcdCancelCallback (\r
733 IN CONST GUID *Guid, OPTIONAL\r
734 IN UINTN TokenNumber,\r
735 IN PCD_CALLBACK NotificationFunction\r
736 )\r
737{\r
afa22326 738 ASSERT (FALSE);\r
bbfaace4 739}\r
740\r
741\r
742\r
743/**\r
744 Retrieves the next PCD token number from the token space specified by Guid. \r
745 If Guid is NULL, then the default token space is used. If TokenNumber is 0, \r
746 then the first token number is returned. Otherwise, the token number that \r
747 follows TokenNumber in the token space is returned. If TokenNumber is the last \r
748 token number in the token space, then 0 is returned. If TokenNumber is not 0 and \r
749 is not in the token space specified by Guid, then ASSERT().\r
750\r
23a36779 751 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace \r
752 to set a value from. If NULL, then the default token space is used.\r
753 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD \r
754 token number.\r
bbfaace4 755\r
f73e0ad2 756 @return The next valid token number.\r
bbfaace4 757\r
758**/\r
759UINTN \r
760EFIAPI\r
761LibPcdGetNextToken (\r
762 IN CONST GUID *Guid, OPTIONAL\r
763 IN UINTN TokenNumber\r
764 )\r
765{\r
afa22326 766 ASSERT (FALSE);\r
cdebf6c6 767\r
bbfaace4 768 return 0;\r
769}\r
770\r
771\r
772\r
773/**\r
774 Retrieves the next PCD token space from a token space specified by Guid.\r
775 Guid of NULL is reserved to mark the default local token namespace on the current\r
776 platform. If Guid is NULL, then the GUID of the first non-local token space of the \r
777 current platform is returned. If Guid is the last non-local token space, \r
778 then NULL is returned. \r
779\r
780 If Guid is not NULL and is not a valid token space in the current platform, then ASSERT().\r
bbfaace4 781 \r
23a36779 782 @param[in] Guid Pointer to a 128-bit unique value that designates from which namespace \r
783 to start the search.\r
bbfaace4 784\r
f73e0ad2 785 @return The next valid token namespace.\r
bbfaace4 786\r
787**/\r
788GUID * \r
789EFIAPI\r
790LibPcdGetNextTokenSpace (\r
791 IN CONST GUID *Guid\r
792 )\r
793{\r
afa22326 794 ASSERT (FALSE);\r
cdebf6c6 795\r
bbfaace4 796 return NULL;\r
797}\r
798\r
799\r
bbfaace4 800/**\r
9638ba6d 801 Sets a value of a patchable PCD entry that is type pointer.\r
802 \r
bbfaace4 803 Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r
9638ba6d 804 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r
805 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return \r
bbfaace4 806 NULL to indicate that the set operation was not actually performed. \r
9638ba6d 807 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to \r
bbfaace4 808 MaximumDatumSize and NULL must be returned.\r
809 \r
810 If PatchVariable is NULL, then ASSERT().\r
9638ba6d 811 If SizeOfBuffer is NULL, then ASSERT().\r
812 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
bbfaace4 813\r
814 @param[in] PatchVariable A pointer to the global variable in a module that is \r
815 the target of the set operation.\r
816 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
817 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
818 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9638ba6d 819 \r
820 @return Return the pointer to the buffer been set.\r
bbfaace4 821\r
822**/\r
823VOID *\r
824EFIAPI\r
825LibPatchPcdSetPtr (\r
826 IN VOID *PatchVariable,\r
827 IN UINTN MaximumDatumSize,\r
828 IN OUT UINTN *SizeOfBuffer,\r
829 IN CONST VOID *Buffer\r
830 )\r
831{\r
832 ASSERT (PatchVariable != NULL);\r
833 ASSERT (SizeOfBuffer != NULL);\r
834 \r
835 if (*SizeOfBuffer > 0) {\r
836 ASSERT (Buffer != NULL);\r
837 }\r
838\r
839 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
840 (*SizeOfBuffer == MAX_ADDRESS)) {\r
841 *SizeOfBuffer = MaximumDatumSize;\r
842 return NULL;\r
843 }\r
844 \r
845 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
846 \r
847 return (VOID *) Buffer;\r
848}\r
849\r