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