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