]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BasePcdLibNull/PcdLib.c
MdeModulePkg: Add ATTRIBUTE (+/-RT, RO) support in PCD declaration in DSC 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
0befb08d 4 Copyright (c) 2006 - 2014, 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
0befb08d
SZ
403\r
404 If the set operation was not correctly performed, then ASSERT().\r
405\r
efb23117 406 @param[in] TokenNumber The PCD token number to set a current value for.\r
407 @param[in] Value The 8-bit value to set.\r
bbfaace4 408\r
58380e9c 409 @return Return the value that was set.\r
bbfaace4 410\r
411**/\r
412UINT8\r
413EFIAPI\r
414LibPcdSet8 (\r
415 IN UINTN TokenNumber,\r
416 IN UINT8 Value\r
417 )\r
418{\r
afa22326 419 ASSERT (FALSE);\r
cdebf6c6 420\r
421 return 0;\r
bbfaace4 422}\r
423\r
424\r
425\r
426/**\r
efb23117 427 This function provides a means by which to set a value for a given PCD token.\r
428 \r
bbfaace4 429 Sets the 16-bit value for the token specified by TokenNumber \r
430 to the value specified by Value. Value is returned.\r
0befb08d
SZ
431\r
432 If the set operation was not correctly performed, then ASSERT().\r
433\r
efb23117 434 @param[in] TokenNumber The PCD token number to set a current value for.\r
435 @param[in] Value The 16-bit value to set.\r
bbfaace4 436\r
58380e9c 437 @return Return the value that was set.\r
bbfaace4 438\r
439**/\r
440UINT16\r
441EFIAPI\r
442LibPcdSet16 (\r
443 IN UINTN TokenNumber,\r
444 IN UINT16 Value\r
445 )\r
446{\r
afa22326 447 ASSERT (FALSE);\r
cdebf6c6 448\r
449 return 0;\r
bbfaace4 450}\r
451\r
452\r
453\r
454/**\r
efb23117 455 This function provides a means by which to set a value for a given PCD token.\r
456 \r
bbfaace4 457 Sets the 32-bit value for the token specified by TokenNumber \r
458 to the value specified by Value. Value is returned.\r
0befb08d
SZ
459\r
460 If the set operation was not correctly performed, then ASSERT().\r
461\r
efb23117 462 @param[in] TokenNumber The PCD token number to set a current value for.\r
463 @param[in] Value The 32-bit value to set.\r
bbfaace4 464\r
58380e9c 465 @return Return the value that was set.\r
bbfaace4 466\r
467**/\r
468UINT32\r
469EFIAPI\r
470LibPcdSet32 (\r
efb23117 471 IN UINTN TokenNumber,\r
472 IN UINT32 Value\r
bbfaace4 473 )\r
474{\r
afa22326 475 ASSERT (FALSE);\r
cdebf6c6 476\r
477 return 0;\r
bbfaace4 478}\r
479\r
480\r
481\r
482/**\r
efb23117 483 This function provides a means by which to set a value for a given PCD token.\r
484 \r
bbfaace4 485 Sets the 64-bit value for the token specified by TokenNumber \r
486 to the value specified by Value. Value is returned.\r
0befb08d
SZ
487\r
488 If the set operation was not correctly performed, then ASSERT().\r
489\r
efb23117 490 @param[in] TokenNumber The PCD token number to set a current value for.\r
491 @param[in] Value The 64-bit value to set.\r
bbfaace4 492\r
58380e9c 493 @return Return the value that was set.\r
bbfaace4 494\r
495**/\r
496UINT64\r
497EFIAPI\r
498LibPcdSet64 (\r
efb23117 499 IN UINTN TokenNumber,\r
500 IN UINT64 Value\r
bbfaace4 501 )\r
502{\r
afa22326 503 ASSERT (FALSE);\r
cdebf6c6 504\r
505 return 0;\r
bbfaace4 506}\r
507\r
508\r
509\r
510/**\r
efb23117 511 This function provides a means by which to set a value for a given PCD token.\r
bbfaace4 512 \r
efb23117 513 Sets a buffer for the token specified by TokenNumber to the value \r
514 specified by Buffer and SizeOfBuffer. Buffer is returned. \r
515 If SizeOfBuffer is greater than the maximum size support by TokenNumber, \r
516 then set SizeOfBuffer to the maximum size supported by TokenNumber and \r
0befb08d
SZ
517 return NULL to indicate that the set operation was not actually performed,\r
518 or ASSERT() if the set operation was not corretly performed.\r
efb23117 519\r
520 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the \r
521 maximum size supported by TokenName and NULL must be returned.\r
bbfaace4 522 \r
efb23117 523 If SizeOfBuffer is NULL, then ASSERT().\r
524 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
bbfaace4 525 \r
efb23117 526 @param[in] TokenNumber The PCD token number to set a current value for.\r
527 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
528 @param[in] Buffer A pointer to the buffer to set.\r
bbfaace4 529\r
f73e0ad2 530 @return Return the pointer for the buffer been set.\r
bbfaace4 531\r
532**/\r
533VOID *\r
534EFIAPI\r
535LibPcdSetPtr (\r
efb23117 536 IN UINTN TokenNumber,\r
537 IN OUT UINTN *SizeOfBuffer,\r
538 IN CONST VOID *Buffer\r
bbfaace4 539 )\r
540{\r
afa22326 541 ASSERT (FALSE);\r
bbfaace4 542\r
cdebf6c6 543 return NULL;\r
bbfaace4 544}\r
545\r
546\r
547\r
548/**\r
efb23117 549 This function provides a means by which to set a value for a given PCD token.\r
550 \r
bbfaace4 551 Sets the Boolean value for the token specified by TokenNumber \r
552 to the value specified by Value. Value is returned.\r
0befb08d
SZ
553\r
554 If the set operation was not correctly performed, then ASSERT().\r
555\r
efb23117 556 @param[in] TokenNumber The PCD token number to set a current value for.\r
557 @param[in] Value The boolean value to set.\r
bbfaace4 558\r
58380e9c 559 @return Return the value that was set.\r
bbfaace4 560\r
561**/\r
562BOOLEAN\r
563EFIAPI\r
564LibPcdSetBool (\r
565 IN UINTN TokenNumber,\r
566 IN BOOLEAN Value\r
567 )\r
568{\r
afa22326 569 ASSERT (FALSE);\r
cdebf6c6 570\r
571 return FALSE;\r
bbfaace4 572}\r
573\r
574\r
575\r
576/**\r
efb23117 577 This function provides a means by which to set a value for a given PCD token.\r
578 \r
bbfaace4 579 Sets the 8-bit value for the token specified by TokenNumber and \r
580 Guid to the value specified by Value. Value is returned.\r
0befb08d 581\r
bbfaace4 582 If Guid is NULL, then ASSERT().\r
0befb08d
SZ
583 If the set operation was not correctly performed, then ASSERT().\r
584\r
2fc59a00 585 @param[in] Guid The pointer to a 128-bit unique value that \r
efb23117 586 designates which namespace to set a value from.\r
587 @param[in] TokenNumber The PCD token number to set a current value for.\r
588 @param[in] Value The 8-bit value to set.\r
bbfaace4 589\r
58380e9c 590 @return Return the value that was set.\r
bbfaace4 591\r
592**/\r
593UINT8\r
594EFIAPI\r
595LibPcdSetEx8 (\r
596 IN CONST GUID *Guid,\r
597 IN UINTN TokenNumber,\r
598 IN UINT8 Value\r
599 )\r
600{\r
afa22326 601 ASSERT (FALSE);\r
bbfaace4 602\r
cdebf6c6 603 return 0;\r
bbfaace4 604}\r
605\r
606\r
607\r
608/**\r
efb23117 609 This function provides a means by which to set a value for a given PCD token.\r
610 \r
bbfaace4 611 Sets the 16-bit value for the token specified by TokenNumber and \r
612 Guid to the value specified by Value. Value is returned.\r
0befb08d 613\r
bbfaace4 614 If Guid is NULL, then ASSERT().\r
0befb08d
SZ
615 If the set operation was not correctly performed, then ASSERT().\r
616\r
2fc59a00 617 @param[in] Guid The pointer to a 128-bit unique value that \r
efb23117 618 designates which namespace to set a value from.\r
619 @param[in] TokenNumber The PCD token number to set a current value for.\r
620 @param[in] Value The 16-bit value to set.\r
bbfaace4 621\r
58380e9c 622 @return Return the value that was set.\r
bbfaace4 623\r
624**/\r
625UINT16\r
626EFIAPI\r
627LibPcdSetEx16 (\r
628 IN CONST GUID *Guid,\r
629 IN UINTN TokenNumber,\r
630 IN UINT16 Value\r
631 )\r
632{\r
afa22326 633 ASSERT (FALSE);\r
bbfaace4 634\r
cdebf6c6 635 return 0;\r
bbfaace4 636}\r
637\r
638\r
639\r
640/**\r
efb23117 641 This function provides a means by which to set a value for a given PCD token.\r
642 \r
bbfaace4 643 Sets the 32-bit value for the token specified by TokenNumber and \r
644 Guid to the value specified by Value. Value is returned.\r
0befb08d 645\r
bbfaace4 646 If Guid is NULL, then ASSERT().\r
0befb08d
SZ
647 If the set operation was not correctly performed, then ASSERT().\r
648\r
2fc59a00 649 @param[in] Guid The pointer to a 128-bit unique value that \r
efb23117 650 designates which namespace to set a value from.\r
651 @param[in] TokenNumber The PCD token number to set a current value for.\r
652 @param[in] Value The 32-bit value to set.\r
bbfaace4 653\r
58380e9c 654 @return Return the value that was set.\r
bbfaace4 655\r
656**/\r
657UINT32\r
658EFIAPI\r
659LibPcdSetEx32 (\r
660 IN CONST GUID *Guid,\r
661 IN UINTN TokenNumber,\r
662 IN UINT32 Value\r
663 )\r
664{\r
afa22326 665 ASSERT (FALSE);\r
bbfaace4 666\r
cdebf6c6 667 return 0;\r
bbfaace4 668}\r
669\r
670\r
671\r
672/**\r
efb23117 673 This function provides a means by which to set a value for a given PCD token.\r
674 \r
bbfaace4 675 Sets the 64-bit value for the token specified by TokenNumber and \r
676 Guid to the value specified by Value. Value is returned.\r
0befb08d 677\r
bbfaace4 678 If Guid is NULL, then ASSERT().\r
0befb08d
SZ
679 If the set operation was not correctly performed, then ASSERT().\r
680\r
2fc59a00 681 @param[in] Guid The pointer to a 128-bit unique value that \r
efb23117 682 designates which namespace to set a value from.\r
683 @param[in] TokenNumber The PCD token number to set a current value for.\r
684 @param[in] Value The 64-bit value to set.\r
bbfaace4 685\r
58380e9c 686 @return Return the value that was set.\r
bbfaace4 687\r
688**/\r
689UINT64\r
690EFIAPI\r
691LibPcdSetEx64 (\r
692 IN CONST GUID *Guid,\r
693 IN UINTN TokenNumber,\r
694 IN UINT64 Value\r
695 )\r
696{\r
afa22326 697 ASSERT (FALSE);\r
bbfaace4 698\r
cdebf6c6 699 return 0;\r
bbfaace4 700}\r
701\r
702\r
703\r
704/**\r
efb23117 705 This function provides a means by which to set a value for a given PCD token.\r
706 \r
bbfaace4 707 Sets a buffer for the token specified by TokenNumber to the value specified by \r
efb23117 708 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r
709 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size \r
bbfaace4 710 supported by TokenNumber and return NULL to indicate that the set operation \r
0befb08d 711 was not actually performed, or ASSERT() if the set operation was not corretly performed.\r
bbfaace4 712 \r
efb23117 713 If Guid is NULL, then ASSERT().\r
714 If SizeOfBuffer is NULL, then ASSERT().\r
715 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
bbfaace4 716 \r
2fc59a00 717 @param[in] Guid The pointer to a 128-bit unique value that \r
efb23117 718 designates which namespace to set a value from.\r
719 @param[in] TokenNumber The PCD token number to set a current value for.\r
720 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
721 @param[in] Buffer A pointer to the buffer to set.\r
bbfaace4 722\r
f73e0ad2 723 @return Return the pinter to the buffer been set.\r
bbfaace4 724\r
725**/\r
726VOID *\r
727EFIAPI\r
728LibPcdSetExPtr (\r
729 IN CONST GUID *Guid,\r
730 IN UINTN TokenNumber,\r
731 IN OUT UINTN *SizeOfBuffer,\r
732 IN VOID *Buffer\r
733 )\r
734{\r
afa22326 735 ASSERT (FALSE);\r
bbfaace4 736\r
cdebf6c6 737 return NULL;\r
bbfaace4 738}\r
739\r
740\r
741\r
742/**\r
efb23117 743 This function provides a means by which to set a value for a given PCD token.\r
744 \r
bbfaace4 745 Sets the Boolean value for the token specified by TokenNumber and \r
746 Guid to the value specified by Value. Value is returned.\r
0befb08d 747\r
bbfaace4 748 If Guid is NULL, then ASSERT().\r
0befb08d
SZ
749 If the set operation was not correctly performed, then ASSERT().\r
750\r
2fc59a00 751 @param[in] Guid The pointer to a 128-bit unique value that \r
efb23117 752 designates which namespace to set a value from.\r
753 @param[in] TokenNumber The PCD token number to set a current value for.\r
754 @param[in] Value The Boolean value to set.\r
bbfaace4 755\r
58380e9c 756 @return Return the value that was set.\r
bbfaace4 757\r
758**/\r
759BOOLEAN\r
760EFIAPI\r
761LibPcdSetExBool (\r
762 IN CONST GUID *Guid,\r
763 IN UINTN TokenNumber,\r
764 IN BOOLEAN Value\r
765 )\r
766{\r
afa22326 767 ASSERT (FALSE);\r
bbfaace4 768\r
cdebf6c6 769 return FALSE;\r
bbfaace4 770}\r
771\r
772\r
773\r
774/**\r
efb23117 775 Set up a notification function that is called when a specified token is set.\r
776 \r
bbfaace4 777 When the token specified by TokenNumber and Guid is set, \r
778 then notification function specified by NotificationFunction is called. \r
779 If Guid is NULL, then the default token space is used. \r
efb23117 780 \r
bbfaace4 781 If NotificationFunction is NULL, then ASSERT().\r
782\r
2fc59a00 783 @param[in] Guid The pointer to a 128-bit unique value that designates which \r
efb23117 784 namespace to set a value from. If NULL, then the default \r
785 token space is used.\r
786 @param[in] TokenNumber The PCD token number to monitor.\r
787 @param[in] NotificationFunction The function to call when the token \r
788 specified by Guid and TokenNumber is set.\r
bbfaace4 789\r
bbfaace4 790**/\r
791VOID\r
792EFIAPI\r
793LibPcdCallbackOnSet (\r
794 IN CONST GUID *Guid, OPTIONAL\r
795 IN UINTN TokenNumber,\r
796 IN PCD_CALLBACK NotificationFunction\r
797 )\r
798{\r
afa22326 799 ASSERT (FALSE);\r
bbfaace4 800}\r
801\r
802\r
803\r
804/**\r
805 Disable a notification function that was established with LibPcdCallbackonSet().\r
efb23117 806 \r
807 Disable a notification function that was previously established with LibPcdCallbackOnSet(). \r
808 \r
bbfaace4 809 If NotificationFunction is NULL, then ASSERT().\r
efb23117 810 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, \r
811 and NotificationFunction, then ASSERT().\r
812 \r
813 @param[in] Guid Specify the GUID token space.\r
814 @param[in] TokenNumber Specify the token number.\r
bbfaace4 815 @param[in] NotificationFunction The callback function to be unregistered.\r
816\r
bbfaace4 817**/\r
818VOID\r
819EFIAPI\r
820LibPcdCancelCallback (\r
821 IN CONST GUID *Guid, OPTIONAL\r
822 IN UINTN TokenNumber,\r
823 IN PCD_CALLBACK NotificationFunction\r
824 )\r
825{\r
afa22326 826 ASSERT (FALSE);\r
bbfaace4 827}\r
828\r
829\r
830\r
831/**\r
efb23117 832 Retrieves the next token in a token space.\r
833 \r
bbfaace4 834 Retrieves the next PCD token number from the token space specified by Guid. \r
835 If Guid is NULL, then the default token space is used. If TokenNumber is 0, \r
836 then the first token number is returned. Otherwise, the token number that \r
837 follows TokenNumber in the token space is returned. If TokenNumber is the last \r
efb23117 838 token number in the token space, then 0 is returned. \r
839 \r
840 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r
bbfaace4 841\r
2fc59a00 842 @param[in] Guid The pointer to a 128-bit unique value that designates which namespace \r
efb23117 843 to set a value from. If NULL, then the default token space is used.\r
844 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD \r
845 token number.\r
bbfaace4 846\r
f73e0ad2 847 @return The next valid token number.\r
bbfaace4 848\r
849**/\r
850UINTN \r
851EFIAPI\r
852LibPcdGetNextToken (\r
efb23117 853 IN CONST GUID *Guid, OPTIONAL\r
854 IN UINTN TokenNumber\r
bbfaace4 855 )\r
856{\r
afa22326 857 ASSERT (FALSE);\r
cdebf6c6 858\r
bbfaace4 859 return 0;\r
860}\r
861\r
862\r
863\r
864/**\r
efb23117 865 Used to retrieve the list of available PCD token space GUIDs.\r
866 \r
8f0dd97e 867 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces\r
868 in the platform.\r
869 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.\r
870 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.\r
bbfaace4 871 \r
2fc59a00 872 @param TokenSpaceGuid The pointer to a PCD token space GUID.\r
bbfaace4 873\r
f73e0ad2 874 @return The next valid token namespace.\r
bbfaace4 875\r
876**/\r
877GUID * \r
878EFIAPI\r
879LibPcdGetNextTokenSpace (\r
efb23117 880 IN CONST GUID *TokenSpaceGuid\r
bbfaace4 881 )\r
882{\r
afa22326 883 ASSERT (FALSE);\r
cdebf6c6 884\r
bbfaace4 885 return NULL;\r
886}\r
887\r
888\r
bbfaace4 889/**\r
9638ba6d 890 Sets a value of a patchable PCD entry that is type pointer.\r
891 \r
bbfaace4 892 Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r
9638ba6d 893 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than \r
894 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return \r
bbfaace4 895 NULL to indicate that the set operation was not actually performed. \r
9638ba6d 896 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to \r
bbfaace4 897 MaximumDatumSize and NULL must be returned.\r
898 \r
899 If PatchVariable is NULL, then ASSERT().\r
9638ba6d 900 If SizeOfBuffer is NULL, then ASSERT().\r
901 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
bbfaace4 902\r
903 @param[in] PatchVariable A pointer to the global variable in a module that is \r
904 the target of the set operation.\r
905 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
906 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
907 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9638ba6d 908 \r
2fc59a00 909 @return Return the pointer to the buffer that was set.\r
bbfaace4 910\r
911**/\r
912VOID *\r
913EFIAPI\r
914LibPatchPcdSetPtr (\r
915 IN VOID *PatchVariable,\r
916 IN UINTN MaximumDatumSize,\r
917 IN OUT UINTN *SizeOfBuffer,\r
918 IN CONST VOID *Buffer\r
919 )\r
920{\r
921 ASSERT (PatchVariable != NULL);\r
922 ASSERT (SizeOfBuffer != NULL);\r
923 \r
924 if (*SizeOfBuffer > 0) {\r
925 ASSERT (Buffer != NULL);\r
926 }\r
927\r
928 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
929 (*SizeOfBuffer == MAX_ADDRESS)) {\r
930 *SizeOfBuffer = MaximumDatumSize;\r
931 return NULL;\r
932 }\r
933 \r
934 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
935 \r
936 return (VOID *) Buffer;\r
937}\r
938\r
96d6d004
SZ
939/**\r
940 Retrieve additional information associated with a PCD token.\r
941\r
942 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
943 human readable name that is associated with the token.\r
944\r
945 If TokenNumber is not in the default token space specified, then ASSERT().\r
946\r
947 @param[in] TokenNumber The PCD token number.\r
948 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
949 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
950**/\r
951VOID\r
952EFIAPI\r
953LibPcdGetInfo (\r
954 IN UINTN TokenNumber,\r
955 OUT PCD_INFO *PcdInfo\r
956 )\r
957{\r
958 ASSERT (FALSE);\r
959}\r
960\r
961/**\r
962 Retrieve additional information associated with a PCD token.\r
963\r
964 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
965 human readable name that is associated with the token.\r
966\r
967 If TokenNumber is not in the token space specified by Guid, then ASSERT().\r
968\r
969 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
970 @param[in] TokenNumber The PCD token number.\r
971 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
972 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
973**/\r
974VOID\r
975EFIAPI\r
976LibPcdGetInfoEx (\r
977 IN CONST GUID *Guid,\r
978 IN UINTN TokenNumber,\r
979 OUT PCD_INFO *PcdInfo\r
980 )\r
981{\r
982 ASSERT (FALSE);\r
983}\r
984\r
985/**\r
986 Retrieve the currently set SKU Id.\r
987\r
988 If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().\r
989\r
990 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the\r
991 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU\r
992 Id is returned.\r
993**/\r
994UINTN\r
995EFIAPI\r
996LibPcdGetSku (\r
997 VOID\r
998 )\r
999{\r
1000 ASSERT (FALSE);\r
1001\r
1002 return 0;\r
1003}\r
1004\r