]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BasePcdLibNull/PcdLib.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BasePcdLibNull / PcdLib.c
CommitLineData
bbfaace4 1/** @file\r
2 A emptry template implementation of PCD Library.\r
3\r
9095d37b 4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
bbfaace4 6\r
7**/\r
8\r
afa22326 9#include <Base.h>\r
10\r
bbfaace4 11#include <Library/DebugLib.h>\r
12#include <Library/PcdLib.h>\r
13#include <Library/BaseMemoryLib.h>\r
14\r
15\r
16/**\r
efb23117 17 This function provides a means by which SKU support can be established in the PCD infrastructure.\r
18\r
bbfaace4 19 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r
20\r
9095d37b 21 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and\r
efb23117 22 set values associated with a PCD token.\r
bbfaace4 23\r
f73e0ad2 24 @return Return the SKU ID that just be set.\r
bbfaace4 25\r
26**/\r
efb23117 27UINTN\r
bbfaace4 28EFIAPI\r
29LibPcdSetSku (\r
efb23117 30 IN UINTN SkuId\r
bbfaace4 31 )\r
32{\r
afa22326 33 ASSERT (FALSE);\r
bbfaace4 34\r
cdebf6c6 35 return 0;\r
bbfaace4 36}\r
37\r
bbfaace4 38/**\r
efb23117 39 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
40\r
41 Returns the 8-bit value for the token specified by TokenNumber.\r
bbfaace4 42\r
23a36779 43 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
bbfaace4 44\r
9095d37b 45 @return Returns the 8-bit value for the token specified by TokenNumber.\r
bbfaace4 46\r
47**/\r
48UINT8\r
49EFIAPI\r
50LibPcdGet8 (\r
51 IN UINTN TokenNumber\r
52 )\r
53{\r
afa22326 54 ASSERT (FALSE);\r
cdebf6c6 55\r
bbfaace4 56 return 0;\r
57}\r
58\r
59\r
60\r
61/**\r
efb23117 62 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
63\r
64 Returns the 16-bit value for the token specified by TokenNumber.\r
bbfaace4 65\r
efb23117 66 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
bbfaace4 67\r
9095d37b 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
efb23117 85 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
86\r
87 Returns the 32-bit value for the token specified by TokenNumber.\r
bbfaace4 88\r
89 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
90\r
f73e0ad2 91 @return Returns the 32-bit value for the token specified by TokenNumber.\r
bbfaace4 92\r
93**/\r
94UINT32\r
95EFIAPI\r
96LibPcdGet32 (\r
97 IN UINTN TokenNumber\r
98 )\r
99{\r
afa22326 100 ASSERT (FALSE);\r
cdebf6c6 101\r
bbfaace4 102 return 0;\r
103}\r
104\r
105\r
106\r
107/**\r
efb23117 108 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 109\r
bbfaace4 110 Returns the 64-bit value for the token specified by TokenNumber.\r
111\r
112 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
113\r
f73e0ad2 114 @return Returns the 64-bit value for the token specified by TokenNumber.\r
bbfaace4 115\r
116**/\r
117UINT64\r
118EFIAPI\r
119LibPcdGet64 (\r
120 IN UINTN TokenNumber\r
121 )\r
122{\r
afa22326 123 ASSERT (FALSE);\r
cdebf6c6 124\r
bbfaace4 125 return 0;\r
126}\r
127\r
128\r
129\r
130/**\r
efb23117 131 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 132\r
bbfaace4 133 Returns the pointer to the buffer of the token specified by TokenNumber.\r
134\r
135 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
136\r
f73e0ad2 137 @return Returns the pointer to the token specified by TokenNumber.\r
bbfaace4 138\r
139**/\r
140VOID *\r
141EFIAPI\r
142LibPcdGetPtr (\r
143 IN UINTN TokenNumber\r
144 )\r
145{\r
afa22326 146 ASSERT (FALSE);\r
cdebf6c6 147\r
bbfaace4 148 return 0;\r
149}\r
150\r
151\r
152\r
153/**\r
efb23117 154 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
155\r
156 Returns the Boolean value of the token specified by TokenNumber.\r
bbfaace4 157\r
158 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
159\r
9095d37b 160 @return Returns the Boolean value of the token specified by TokenNumber.\r
bbfaace4 161\r
162**/\r
9095d37b 163BOOLEAN\r
bbfaace4 164EFIAPI\r
165LibPcdGetBool (\r
166 IN UINTN TokenNumber\r
167 )\r
168{\r
afa22326 169 ASSERT (FALSE);\r
cdebf6c6 170\r
bbfaace4 171 return 0;\r
172}\r
173\r
174\r
175\r
176/**\r
efb23117 177 This function provides a means by which to retrieve the size of a given PCD token.\r
bbfaace4 178\r
179 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
180\r
9095d37b 181 @return Returns the size of the token specified by TokenNumber.\r
bbfaace4 182\r
183**/\r
184UINTN\r
185EFIAPI\r
186LibPcdGetSize (\r
187 IN UINTN TokenNumber\r
188 )\r
189{\r
afa22326 190 ASSERT (FALSE);\r
cdebf6c6 191\r
bbfaace4 192 return 0;\r
193}\r
194\r
195\r
196\r
197/**\r
efb23117 198 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 199\r
bbfaace4 200 Returns the 8-bit value for the token specified by TokenNumber and Guid.\r
bbfaace4 201\r
9095d37b
LG
202 If Guid is NULL, then ASSERT().\r
203\r
204 @param[in] Guid The pointer to a 128-bit unique value that designates\r
bbfaace4 205 which namespace to retrieve a value from.\r
206 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
207\r
f73e0ad2 208 @return Return the UINT8.\r
bbfaace4 209\r
210**/\r
211UINT8\r
212EFIAPI\r
213LibPcdGetEx8 (\r
214 IN CONST GUID *Guid,\r
215 IN UINTN TokenNumber\r
216 )\r
217{\r
afa22326 218 ASSERT (FALSE);\r
bbfaace4 219\r
220 return 0;\r
221}\r
222\r
223\r
224\r
225/**\r
efb23117 226 This function provides a means by which to retrieve a value for a given PCD token.\r
227\r
bbfaace4 228 Returns the 16-bit value for the token specified by TokenNumber and Guid.\r
bbfaace4 229\r
9095d37b
LG
230 If Guid is NULL, then ASSERT().\r
231\r
232 @param[in] Guid The pointer to a 128-bit unique value that designates\r
bbfaace4 233 which namespace to retrieve a value from.\r
234 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
235\r
f73e0ad2 236 @return Return the UINT16.\r
bbfaace4 237\r
238**/\r
239UINT16\r
240EFIAPI\r
241LibPcdGetEx16 (\r
242 IN CONST GUID *Guid,\r
243 IN UINTN TokenNumber\r
244 )\r
245{\r
afa22326 246 ASSERT (FALSE);\r
bbfaace4 247\r
248 return 0;\r
249}\r
250\r
251\r
252\r
253/**\r
254 Returns the 32-bit value for the token specified by TokenNumber and Guid.\r
9095d37b 255 If Guid is NULL, then ASSERT().\r
bbfaace4 256\r
9095d37b 257 @param[in] Guid The pointer to a 128-bit unique value that designates\r
bbfaace4 258 which namespace to retrieve a value from.\r
259 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
260\r
f73e0ad2 261 @return Return the UINT32.\r
bbfaace4 262\r
263**/\r
264UINT32\r
265EFIAPI\r
266LibPcdGetEx32 (\r
267 IN CONST GUID *Guid,\r
268 IN UINTN TokenNumber\r
269 )\r
270{\r
afa22326 271 ASSERT (FALSE);\r
bbfaace4 272\r
273 return 0;\r
274}\r
275\r
276\r
277\r
278/**\r
efb23117 279 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 280\r
bbfaace4 281 Returns the 64-bit value for the token specified by TokenNumber and Guid.\r
bbfaace4 282\r
9095d37b
LG
283 If Guid is NULL, then ASSERT().\r
284\r
285 @param[in] Guid The pointer to a 128-bit unique value that designates\r
efb23117 286 which namespace to retrieve a value from.\r
287 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
bbfaace4 288\r
f73e0ad2 289 @return Return the UINT64.\r
bbfaace4 290\r
291**/\r
292UINT64\r
293EFIAPI\r
294LibPcdGetEx64 (\r
295 IN CONST GUID *Guid,\r
296 IN UINTN TokenNumber\r
297 )\r
298{\r
afa22326 299 ASSERT (FALSE);\r
bbfaace4 300\r
301 return 0;\r
302}\r
303\r
304\r
305\r
306/**\r
efb23117 307 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 308\r
efb23117 309 Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r
bbfaace4 310\r
9095d37b
LG
311 If Guid is NULL, then ASSERT().\r
312\r
313 @param[in] Guid The pointer to a 128-bit unique value that designates\r
efb23117 314 which namespace to retrieve a value from.\r
315 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
bbfaace4 316\r
f73e0ad2 317 @return Return the VOID* pointer.\r
bbfaace4 318\r
319**/\r
320VOID *\r
321EFIAPI\r
322LibPcdGetExPtr (\r
323 IN CONST GUID *Guid,\r
324 IN UINTN TokenNumber\r
325 )\r
326{\r
afa22326 327 ASSERT (FALSE);\r
bbfaace4 328\r
329 return 0;\r
330}\r
331\r
332\r
333\r
334/**\r
efb23117 335 This function provides a means by which to retrieve a value for a given PCD token.\r
bbfaace4 336\r
9095d37b
LG
337 Returns the Boolean value of the token specified by TokenNumber and Guid.\r
338\r
339 If Guid is NULL, then ASSERT().\r
340\r
341 @param[in] Guid The pointer to a 128-bit unique value that designates\r
efb23117 342 which namespace to retrieve a value from.\r
343 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
bbfaace4 344\r
f73e0ad2 345 @return Return the BOOLEAN.\r
bbfaace4 346\r
347**/\r
348BOOLEAN\r
349EFIAPI\r
350LibPcdGetExBool (\r
351 IN CONST GUID *Guid,\r
352 IN UINTN TokenNumber\r
353 )\r
354{\r
afa22326 355 ASSERT (FALSE);\r
bbfaace4 356\r
357 return 0;\r
358}\r
359\r
360\r
361\r
362/**\r
efb23117 363 This function provides a means by which to retrieve the size of a given PCD token.\r
bbfaace4 364\r
9095d37b
LG
365 Returns the size of the token specified by TokenNumber and Guid.\r
366\r
367 If Guid is NULL, then ASSERT().\r
368\r
369 @param[in] Guid The pointer to a 128-bit unique value that designates\r
efb23117 370 which namespace to retrieve a value from.\r
371 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
bbfaace4 372\r
f73e0ad2 373 @return Return the size.\r
bbfaace4 374\r
375**/\r
376UINTN\r
377EFIAPI\r
378LibPcdGetExSize (\r
379 IN CONST GUID *Guid,\r
380 IN UINTN TokenNumber\r
381 )\r
382{\r
afa22326 383 ASSERT (FALSE);\r
bbfaace4 384\r
385 return 0;\r
386}\r
387\r
388\r
389\r
9a355841 390#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
bbfaace4 391/**\r
efb23117 392 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
393\r
394 Sets the 8-bit value for the token specified by TokenNumber\r
bbfaace4 395 to the value specified by Value. Value is returned.\r
0befb08d 396\r
efb23117 397 @param[in] TokenNumber The PCD token number to set a current value for.\r
398 @param[in] Value The 8-bit value to set.\r
bbfaace4 399\r
58380e9c 400 @return Return the value that was set.\r
bbfaace4 401\r
402**/\r
403UINT8\r
404EFIAPI\r
405LibPcdSet8 (\r
406 IN UINTN TokenNumber,\r
407 IN UINT8 Value\r
408 )\r
409{\r
afa22326 410 ASSERT (FALSE);\r
cdebf6c6 411\r
412 return 0;\r
bbfaace4 413}\r
414\r
415\r
416\r
417/**\r
efb23117 418 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
419\r
420 Sets the 16-bit value for the token specified by TokenNumber\r
bbfaace4 421 to the value specified by Value. Value is returned.\r
0befb08d 422\r
efb23117 423 @param[in] TokenNumber The PCD token number to set a current value for.\r
424 @param[in] Value The 16-bit value to set.\r
bbfaace4 425\r
58380e9c 426 @return Return the value that was set.\r
bbfaace4 427\r
428**/\r
429UINT16\r
430EFIAPI\r
431LibPcdSet16 (\r
432 IN UINTN TokenNumber,\r
433 IN UINT16 Value\r
434 )\r
435{\r
afa22326 436 ASSERT (FALSE);\r
cdebf6c6 437\r
438 return 0;\r
bbfaace4 439}\r
440\r
441\r
442\r
443/**\r
efb23117 444 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
445\r
446 Sets the 32-bit value for the token specified by TokenNumber\r
bbfaace4 447 to the value specified by Value. Value is returned.\r
0befb08d 448\r
efb23117 449 @param[in] TokenNumber The PCD token number to set a current value for.\r
450 @param[in] Value The 32-bit value to set.\r
bbfaace4 451\r
58380e9c 452 @return Return the value that was set.\r
bbfaace4 453\r
454**/\r
455UINT32\r
456EFIAPI\r
457LibPcdSet32 (\r
efb23117 458 IN UINTN TokenNumber,\r
459 IN UINT32 Value\r
bbfaace4 460 )\r
461{\r
afa22326 462 ASSERT (FALSE);\r
cdebf6c6 463\r
464 return 0;\r
bbfaace4 465}\r
466\r
467\r
468\r
469/**\r
efb23117 470 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
471\r
472 Sets the 64-bit value for the token specified by TokenNumber\r
bbfaace4 473 to the value specified by Value. Value is returned.\r
0befb08d 474\r
efb23117 475 @param[in] TokenNumber The PCD token number to set a current value for.\r
476 @param[in] Value The 64-bit value to set.\r
bbfaace4 477\r
58380e9c 478 @return Return the value that was set.\r
bbfaace4 479\r
480**/\r
481UINT64\r
482EFIAPI\r
483LibPcdSet64 (\r
efb23117 484 IN UINTN TokenNumber,\r
485 IN UINT64 Value\r
bbfaace4 486 )\r
487{\r
afa22326 488 ASSERT (FALSE);\r
cdebf6c6 489\r
490 return 0;\r
bbfaace4 491}\r
492\r
493\r
494\r
495/**\r
efb23117 496 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
497\r
498 Sets a buffer for the token specified by TokenNumber to the value\r
499 specified by Buffer and SizeOfBuffer. Buffer is returned.\r
500 If SizeOfBuffer is greater than the maximum size support by TokenNumber,\r
501 then set SizeOfBuffer to the maximum size supported by TokenNumber and\r
9a355841 502 return NULL to indicate that the set operation was not actually performed.\r
efb23117 503\r
9095d37b 504 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the\r
efb23117 505 maximum size supported by TokenName and NULL must be returned.\r
9095d37b 506\r
efb23117 507 If SizeOfBuffer is NULL, then ASSERT().\r
508 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
9095d37b 509\r
efb23117 510 @param[in] TokenNumber The PCD token number to set a current value for.\r
511 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
512 @param[in] Buffer A pointer to the buffer to set.\r
bbfaace4 513\r
f73e0ad2 514 @return Return the pointer for the buffer been set.\r
bbfaace4 515\r
516**/\r
517VOID *\r
518EFIAPI\r
519LibPcdSetPtr (\r
efb23117 520 IN UINTN TokenNumber,\r
521 IN OUT UINTN *SizeOfBuffer,\r
522 IN CONST VOID *Buffer\r
bbfaace4 523 )\r
524{\r
afa22326 525 ASSERT (FALSE);\r
bbfaace4 526\r
cdebf6c6 527 return NULL;\r
bbfaace4 528}\r
529\r
530\r
531\r
532/**\r
efb23117 533 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
534\r
535 Sets the Boolean value for the token specified by TokenNumber\r
bbfaace4 536 to the value specified by Value. Value is returned.\r
0befb08d 537\r
efb23117 538 @param[in] TokenNumber The PCD token number to set a current value for.\r
539 @param[in] Value The boolean value to set.\r
bbfaace4 540\r
58380e9c 541 @return Return the value that was set.\r
bbfaace4 542\r
543**/\r
544BOOLEAN\r
545EFIAPI\r
546LibPcdSetBool (\r
547 IN UINTN TokenNumber,\r
548 IN BOOLEAN Value\r
549 )\r
550{\r
afa22326 551 ASSERT (FALSE);\r
cdebf6c6 552\r
553 return FALSE;\r
bbfaace4 554}\r
555\r
556\r
557\r
558/**\r
efb23117 559 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
560\r
561 Sets the 8-bit value for the token specified by TokenNumber and\r
bbfaace4 562 Guid to the value specified by Value. Value is returned.\r
0befb08d 563\r
bbfaace4 564 If Guid is NULL, then ASSERT().\r
0befb08d 565\r
9095d37b 566 @param[in] Guid The pointer to a 128-bit unique value that\r
efb23117 567 designates which namespace to set a value from.\r
568 @param[in] TokenNumber The PCD token number to set a current value for.\r
569 @param[in] Value The 8-bit value to set.\r
bbfaace4 570\r
58380e9c 571 @return Return the value that was set.\r
bbfaace4 572\r
573**/\r
574UINT8\r
575EFIAPI\r
576LibPcdSetEx8 (\r
577 IN CONST GUID *Guid,\r
578 IN UINTN TokenNumber,\r
579 IN UINT8 Value\r
580 )\r
581{\r
afa22326 582 ASSERT (FALSE);\r
bbfaace4 583\r
cdebf6c6 584 return 0;\r
bbfaace4 585}\r
586\r
587\r
588\r
589/**\r
efb23117 590 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
591\r
592 Sets the 16-bit value for the token specified by TokenNumber and\r
bbfaace4 593 Guid to the value specified by Value. Value is returned.\r
0befb08d 594\r
bbfaace4 595 If Guid is NULL, then ASSERT().\r
0befb08d 596\r
9095d37b 597 @param[in] Guid The pointer to a 128-bit unique value that\r
efb23117 598 designates which namespace to set a value from.\r
599 @param[in] TokenNumber The PCD token number to set a current value for.\r
600 @param[in] Value The 16-bit value to set.\r
bbfaace4 601\r
58380e9c 602 @return Return the value that was set.\r
bbfaace4 603\r
604**/\r
605UINT16\r
606EFIAPI\r
607LibPcdSetEx16 (\r
608 IN CONST GUID *Guid,\r
609 IN UINTN TokenNumber,\r
610 IN UINT16 Value\r
611 )\r
612{\r
afa22326 613 ASSERT (FALSE);\r
bbfaace4 614\r
cdebf6c6 615 return 0;\r
bbfaace4 616}\r
617\r
618\r
619\r
620/**\r
efb23117 621 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
622\r
623 Sets the 32-bit value for the token specified by TokenNumber and\r
bbfaace4 624 Guid to the value specified by Value. Value is returned.\r
0befb08d 625\r
bbfaace4 626 If Guid is NULL, then ASSERT().\r
0befb08d 627\r
9095d37b 628 @param[in] Guid The pointer to a 128-bit unique value that\r
efb23117 629 designates which namespace to set a value from.\r
630 @param[in] TokenNumber The PCD token number to set a current value for.\r
631 @param[in] Value The 32-bit value to set.\r
bbfaace4 632\r
58380e9c 633 @return Return the value that was set.\r
bbfaace4 634\r
635**/\r
636UINT32\r
637EFIAPI\r
638LibPcdSetEx32 (\r
639 IN CONST GUID *Guid,\r
640 IN UINTN TokenNumber,\r
641 IN UINT32 Value\r
642 )\r
643{\r
afa22326 644 ASSERT (FALSE);\r
bbfaace4 645\r
cdebf6c6 646 return 0;\r
bbfaace4 647}\r
648\r
649\r
650\r
651/**\r
efb23117 652 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
653\r
654 Sets the 64-bit value for the token specified by TokenNumber and\r
bbfaace4 655 Guid to the value specified by Value. Value is returned.\r
0befb08d 656\r
bbfaace4 657 If Guid is NULL, then ASSERT().\r
0befb08d 658\r
9095d37b 659 @param[in] Guid The pointer to a 128-bit unique value that\r
efb23117 660 designates which namespace to set a value from.\r
661 @param[in] TokenNumber The PCD token number to set a current value for.\r
662 @param[in] Value The 64-bit value to set.\r
bbfaace4 663\r
58380e9c 664 @return Return the value that was set.\r
bbfaace4 665\r
666**/\r
667UINT64\r
668EFIAPI\r
669LibPcdSetEx64 (\r
670 IN CONST GUID *Guid,\r
671 IN UINTN TokenNumber,\r
672 IN UINT64 Value\r
673 )\r
674{\r
afa22326 675 ASSERT (FALSE);\r
bbfaace4 676\r
cdebf6c6 677 return 0;\r
bbfaace4 678}\r
679\r
680\r
681\r
682/**\r
efb23117 683 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
684\r
685 Sets a buffer for the token specified by TokenNumber to the value specified by\r
686 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
687 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size\r
688 supported by TokenNumber and return NULL to indicate that the set operation\r
9a355841 689 was not actually performed.\r
9095d37b 690\r
efb23117 691 If Guid is NULL, then ASSERT().\r
692 If SizeOfBuffer is NULL, then ASSERT().\r
693 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
9095d37b
LG
694\r
695 @param[in] Guid The pointer to a 128-bit unique value that\r
efb23117 696 designates which namespace to set a value from.\r
697 @param[in] TokenNumber The PCD token number to set a current value for.\r
698 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
699 @param[in] Buffer A pointer to the buffer to set.\r
bbfaace4 700\r
f73e0ad2 701 @return Return the pinter to the buffer been set.\r
bbfaace4 702\r
703**/\r
704VOID *\r
705EFIAPI\r
706LibPcdSetExPtr (\r
707 IN CONST GUID *Guid,\r
708 IN UINTN TokenNumber,\r
709 IN OUT UINTN *SizeOfBuffer,\r
710 IN VOID *Buffer\r
711 )\r
712{\r
afa22326 713 ASSERT (FALSE);\r
bbfaace4 714\r
cdebf6c6 715 return NULL;\r
bbfaace4 716}\r
717\r
718\r
719\r
720/**\r
efb23117 721 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
722\r
723 Sets the Boolean value for the token specified by TokenNumber and\r
bbfaace4 724 Guid to the value specified by Value. Value is returned.\r
0befb08d 725\r
bbfaace4 726 If Guid is NULL, then ASSERT().\r
0befb08d 727\r
9095d37b 728 @param[in] Guid The pointer to a 128-bit unique value that\r
efb23117 729 designates which namespace to set a value from.\r
730 @param[in] TokenNumber The PCD token number to set a current value for.\r
731 @param[in] Value The Boolean value to set.\r
bbfaace4 732\r
58380e9c 733 @return Return the value that was set.\r
bbfaace4 734\r
735**/\r
736BOOLEAN\r
737EFIAPI\r
738LibPcdSetExBool (\r
739 IN CONST GUID *Guid,\r
740 IN UINTN TokenNumber,\r
741 IN BOOLEAN Value\r
742 )\r
743{\r
afa22326 744 ASSERT (FALSE);\r
bbfaace4 745\r
cdebf6c6 746 return FALSE;\r
bbfaace4 747}\r
9a355841
SZ
748#endif\r
749\r
750/**\r
751 This function provides a means by which to set a value for a given PCD token.\r
752\r
753 Sets the 8-bit value for the token specified by TokenNumber\r
754 to the value specified by Value.\r
755\r
756 @param[in] TokenNumber The PCD token number to set a current value for.\r
757 @param[in] Value The 8-bit value to set.\r
758\r
759 @return The status of the set operation.\r
760\r
761**/\r
762RETURN_STATUS\r
763EFIAPI\r
764LibPcdSet8S (\r
765 IN UINTN TokenNumber,\r
766 IN UINT8 Value\r
767 )\r
768{\r
769 ASSERT (FALSE);\r
770\r
771 return RETURN_INVALID_PARAMETER;\r
772}\r
773\r
774/**\r
775 This function provides a means by which to set a value for a given PCD token.\r
776\r
777 Sets the 16-bit value for the token specified by TokenNumber\r
778 to the value specified by Value.\r
779\r
780 @param[in] TokenNumber The PCD token number to set a current value for.\r
781 @param[in] Value The 16-bit value to set.\r
782\r
783 @return The status of the set operation.\r
784\r
785**/\r
786RETURN_STATUS\r
787EFIAPI\r
788LibPcdSet16S (\r
789 IN UINTN TokenNumber,\r
790 IN UINT16 Value\r
791 )\r
792{\r
793 ASSERT (FALSE);\r
794\r
795 return RETURN_INVALID_PARAMETER;\r
796}\r
797\r
798/**\r
799 This function provides a means by which to set a value for a given PCD token.\r
800\r
801 Sets the 32-bit value for the token specified by TokenNumber\r
802 to the value specified by Value.\r
803\r
804 @param[in] TokenNumber The PCD token number to set a current value for.\r
805 @param[in] Value The 32-bit value to set.\r
806\r
807 @return The status of the set operation.\r
808\r
809**/\r
810RETURN_STATUS\r
811EFIAPI\r
812LibPcdSet32S (\r
813 IN UINTN TokenNumber,\r
814 IN UINT32 Value\r
815 )\r
816{\r
817 ASSERT (FALSE);\r
818\r
819 return RETURN_INVALID_PARAMETER;\r
820}\r
821\r
822/**\r
823 This function provides a means by which to set a value for a given PCD token.\r
824\r
825 Sets the 64-bit value for the token specified by TokenNumber\r
826 to the value specified by Value.\r
827\r
828 @param[in] TokenNumber The PCD token number to set a current value for.\r
829 @param[in] Value The 64-bit value to set.\r
830\r
831 @return The status of the set operation.\r
832\r
833**/\r
834RETURN_STATUS\r
835EFIAPI\r
836LibPcdSet64S (\r
837 IN UINTN TokenNumber,\r
838 IN UINT64 Value\r
839 )\r
840{\r
841 ASSERT (FALSE);\r
842\r
843 return RETURN_INVALID_PARAMETER;\r
844}\r
845\r
846/**\r
847 This function provides a means by which to set a value for a given PCD token.\r
848\r
849 Sets a buffer for the token specified by TokenNumber to the value specified\r
850 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r
851 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r
852 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation\r
853 was not actually performed.\r
854\r
855 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the\r
856 maximum size supported by TokenName and EFI_INVALID_PARAMETER must be returned.\r
857\r
858 If SizeOfBuffer is NULL, then ASSERT().\r
859 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
860\r
861 @param[in] TokenNumber The PCD token number to set a current value for.\r
862 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
863 @param[in] Buffer A pointer to the buffer to set.\r
864\r
865 @return The status of the set operation.\r
bbfaace4 866\r
9a355841
SZ
867**/\r
868RETURN_STATUS\r
869EFIAPI\r
870LibPcdSetPtrS (\r
871 IN UINTN TokenNumber,\r
872 IN OUT UINTN *SizeOfBuffer,\r
873 IN CONST VOID *Buffer\r
874 )\r
875{\r
876 ASSERT (FALSE);\r
bbfaace4 877\r
9a355841
SZ
878 return RETURN_INVALID_PARAMETER;\r
879}\r
880\r
881/**\r
882 This function provides a means by which to set a value for a given PCD token.\r
883\r
884 Sets the boolean value for the token specified by TokenNumber\r
885 to the value specified by Value.\r
886\r
887 @param[in] TokenNumber The PCD token number to set a current value for.\r
888 @param[in] Value The boolean value to set.\r
889\r
890 @return The status of the set operation.\r
891\r
892**/\r
893RETURN_STATUS\r
894EFIAPI\r
895LibPcdSetBoolS (\r
896 IN UINTN TokenNumber,\r
897 IN BOOLEAN Value\r
898 )\r
899{\r
900 ASSERT (FALSE);\r
901\r
902 return RETURN_INVALID_PARAMETER;\r
903}\r
904\r
905/**\r
906 This function provides a means by which to set a value for a given PCD token.\r
907\r
908 Sets the 8-bit value for the token specified by TokenNumber\r
909 to the value specified by Value.\r
910\r
911 If Guid is NULL, then ASSERT().\r
912\r
913 @param[in] Guid The pointer to a 128-bit unique value that\r
914 designates which namespace to set a value from.\r
915 @param[in] TokenNumber The PCD token number to set a current value for.\r
916 @param[in] Value The 8-bit value to set.\r
917\r
918 @return The status of the set operation.\r
919\r
920**/\r
921RETURN_STATUS\r
922EFIAPI\r
923LibPcdSetEx8S (\r
924 IN CONST GUID *Guid,\r
925 IN UINTN TokenNumber,\r
926 IN UINT8 Value\r
927 )\r
928{\r
929 ASSERT (FALSE);\r
930\r
931 return RETURN_INVALID_PARAMETER;\r
932}\r
933\r
934/**\r
935 This function provides a means by which to set a value for a given PCD token.\r
936\r
937 Sets the 16-bit value for the token specified by TokenNumber\r
938 to the value specified by Value.\r
939\r
940 If Guid is NULL, then ASSERT().\r
941\r
942 @param[in] Guid The pointer to a 128-bit unique value that\r
943 designates which namespace to set a value from.\r
944 @param[in] TokenNumber The PCD token number to set a current value for.\r
945 @param[in] Value The 16-bit value to set.\r
946\r
947 @return The status of the set operation.\r
948\r
949**/\r
950RETURN_STATUS\r
951EFIAPI\r
952LibPcdSetEx16S (\r
953 IN CONST GUID *Guid,\r
954 IN UINTN TokenNumber,\r
955 IN UINT16 Value\r
956 )\r
957{\r
958 ASSERT (FALSE);\r
959\r
960 return RETURN_INVALID_PARAMETER;\r
961}\r
962\r
963/**\r
964 This function provides a means by which to set a value for a given PCD token.\r
965\r
966 Sets the 32-bit value for the token specified by TokenNumber\r
967 to the value specified by Value.\r
968\r
969 If Guid is NULL, then ASSERT().\r
970\r
971 @param[in] Guid The pointer to a 128-bit unique value that\r
972 designates which namespace to set a value from.\r
973 @param[in] TokenNumber The PCD token number to set a current value for.\r
974 @param[in] Value The 32-bit value to set.\r
975\r
976 @return The status of the set operation.\r
977\r
978**/\r
979RETURN_STATUS\r
980EFIAPI\r
981LibPcdSetEx32S (\r
982 IN CONST GUID *Guid,\r
983 IN UINTN TokenNumber,\r
984 IN UINT32 Value\r
985 )\r
986{\r
987 ASSERT (FALSE);\r
988\r
989 return RETURN_INVALID_PARAMETER;\r
990}\r
991\r
992/**\r
993 This function provides a means by which to set a value for a given PCD token.\r
994\r
995 Sets the 64-bit value for the token specified by TokenNumber\r
996 to the value specified by Value.\r
997\r
998 If Guid is NULL, then ASSERT().\r
999\r
1000 @param[in] Guid The pointer to a 128-bit unique value that\r
1001 designates which namespace to set a value from.\r
1002 @param[in] TokenNumber The PCD token number to set a current value for.\r
1003 @param[in] Value The 64-bit value to set.\r
1004\r
1005 @return The status of the set operation.\r
1006\r
1007**/\r
1008RETURN_STATUS\r
1009EFIAPI\r
1010LibPcdSetEx64S (\r
1011 IN CONST GUID *Guid,\r
1012 IN UINTN TokenNumber,\r
1013 IN UINT64 Value\r
1014 )\r
1015{\r
1016 ASSERT (FALSE);\r
1017\r
1018 return RETURN_INVALID_PARAMETER;\r
1019}\r
1020\r
1021/**\r
1022 This function provides a means by which to set a value for a given PCD token.\r
1023\r
1024 Sets a buffer for the token specified by TokenNumber to the value specified by\r
1025 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r
1026 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r
1027 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation\r
1028 was not actually performed.\r
1029\r
1030 If Guid is NULL, then ASSERT().\r
1031 If SizeOfBuffer is NULL, then ASSERT().\r
1032 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1033\r
1034 @param[in] Guid Pointer to a 128-bit unique value that\r
1035 designates which namespace to set a value from.\r
1036 @param[in] TokenNumber The PCD token number to set a current value for.\r
1037 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
1038 @param[in] Buffer A pointer to the buffer to set.\r
1039\r
1040 @return The status of the set operation.\r
1041\r
1042**/\r
1043RETURN_STATUS\r
1044EFIAPI\r
1045LibPcdSetExPtrS (\r
1046 IN CONST GUID *Guid,\r
1047 IN UINTN TokenNumber,\r
1048 IN OUT UINTN *SizeOfBuffer,\r
1049 IN VOID *Buffer\r
1050 )\r
1051{\r
1052 ASSERT (FALSE);\r
1053\r
1054 return RETURN_INVALID_PARAMETER;\r
1055}\r
1056\r
1057/**\r
1058 This function provides a means by which to set a value for a given PCD token.\r
1059\r
1060 Sets the boolean value for the token specified by TokenNumber\r
1061 to the value specified by Value.\r
1062\r
1063 If Guid is NULL, then ASSERT().\r
1064\r
1065 @param[in] Guid The pointer to a 128-bit unique value that\r
1066 designates which namespace to set a value from.\r
1067 @param[in] TokenNumber The PCD token number to set a current value for.\r
1068 @param[in] Value The boolean value to set.\r
1069\r
1070 @return The status of the set operation.\r
1071\r
1072**/\r
1073RETURN_STATUS\r
1074EFIAPI\r
1075LibPcdSetExBoolS (\r
1076 IN CONST GUID *Guid,\r
1077 IN UINTN TokenNumber,\r
1078 IN BOOLEAN Value\r
1079 )\r
1080{\r
1081 ASSERT (FALSE);\r
1082\r
1083 return RETURN_INVALID_PARAMETER;\r
1084}\r
bbfaace4 1085\r
1086/**\r
efb23117 1087 Set up a notification function that is called when a specified token is set.\r
9095d37b
LG
1088\r
1089 When the token specified by TokenNumber and Guid is set,\r
1090 then notification function specified by NotificationFunction is called.\r
1091 If Guid is NULL, then the default token space is used.\r
1092\r
bbfaace4 1093 If NotificationFunction is NULL, then ASSERT().\r
1094\r
9095d37b
LG
1095 @param[in] Guid The pointer to a 128-bit unique value that designates which\r
1096 namespace to set a value from. If NULL, then the default\r
efb23117 1097 token space is used.\r
1098 @param[in] TokenNumber The PCD token number to monitor.\r
9095d37b 1099 @param[in] NotificationFunction The function to call when the token\r
efb23117 1100 specified by Guid and TokenNumber is set.\r
bbfaace4 1101\r
bbfaace4 1102**/\r
1103VOID\r
1104EFIAPI\r
1105LibPcdCallbackOnSet (\r
1106 IN CONST GUID *Guid, OPTIONAL\r
1107 IN UINTN TokenNumber,\r
1108 IN PCD_CALLBACK NotificationFunction\r
1109 )\r
1110{\r
afa22326 1111 ASSERT (FALSE);\r
bbfaace4 1112}\r
1113\r
1114\r
1115\r
1116/**\r
1117 Disable a notification function that was established with LibPcdCallbackonSet().\r
9095d37b
LG
1118\r
1119 Disable a notification function that was previously established with LibPcdCallbackOnSet().\r
1120\r
bbfaace4 1121 If NotificationFunction is NULL, then ASSERT().\r
9095d37b 1122 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,\r
efb23117 1123 and NotificationFunction, then ASSERT().\r
9095d37b 1124\r
efb23117 1125 @param[in] Guid Specify the GUID token space.\r
1126 @param[in] TokenNumber Specify the token number.\r
bbfaace4 1127 @param[in] NotificationFunction The callback function to be unregistered.\r
1128\r
bbfaace4 1129**/\r
1130VOID\r
1131EFIAPI\r
1132LibPcdCancelCallback (\r
1133 IN CONST GUID *Guid, OPTIONAL\r
1134 IN UINTN TokenNumber,\r
1135 IN PCD_CALLBACK NotificationFunction\r
1136 )\r
1137{\r
afa22326 1138 ASSERT (FALSE);\r
bbfaace4 1139}\r
1140\r
1141\r
1142\r
1143/**\r
efb23117 1144 Retrieves the next token in a token space.\r
9095d37b
LG
1145\r
1146 Retrieves the next PCD token number from the token space specified by Guid.\r
1147 If Guid is NULL, then the default token space is used. If TokenNumber is 0,\r
1148 then the first token number is returned. Otherwise, the token number that\r
1149 follows TokenNumber in the token space is returned. If TokenNumber is the last\r
1150 token number in the token space, then 0 is returned.\r
1151\r
efb23117 1152 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r
bbfaace4 1153\r
9095d37b 1154 @param[in] Guid The pointer to a 128-bit unique value that designates which namespace\r
efb23117 1155 to set a value from. If NULL, then the default token space is used.\r
9095d37b 1156 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD\r
efb23117 1157 token number.\r
bbfaace4 1158\r
f73e0ad2 1159 @return The next valid token number.\r
bbfaace4 1160\r
1161**/\r
9095d37b 1162UINTN\r
bbfaace4 1163EFIAPI\r
1164LibPcdGetNextToken (\r
efb23117 1165 IN CONST GUID *Guid, OPTIONAL\r
1166 IN UINTN TokenNumber\r
bbfaace4 1167 )\r
1168{\r
afa22326 1169 ASSERT (FALSE);\r
cdebf6c6 1170\r
bbfaace4 1171 return 0;\r
1172}\r
1173\r
1174\r
1175\r
1176/**\r
efb23117 1177 Used to retrieve the list of available PCD token space GUIDs.\r
9095d37b 1178\r
8f0dd97e 1179 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces\r
1180 in the platform.\r
1181 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.\r
1182 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.\r
9095d37b 1183\r
2fc59a00 1184 @param TokenSpaceGuid The pointer to a PCD token space GUID.\r
bbfaace4 1185\r
f73e0ad2 1186 @return The next valid token namespace.\r
bbfaace4 1187\r
1188**/\r
9095d37b 1189GUID *\r
bbfaace4 1190EFIAPI\r
1191LibPcdGetNextTokenSpace (\r
efb23117 1192 IN CONST GUID *TokenSpaceGuid\r
bbfaace4 1193 )\r
1194{\r
afa22326 1195 ASSERT (FALSE);\r
cdebf6c6 1196\r
bbfaace4 1197 return NULL;\r
1198}\r
1199\r
1200\r
bbfaace4 1201/**\r
9638ba6d 1202 Sets a value of a patchable PCD entry that is type pointer.\r
9095d37b
LG
1203\r
1204 Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r
1205 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
1206 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r
1207 NULL to indicate that the set operation was not actually performed.\r
1208 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
bbfaace4 1209 MaximumDatumSize and NULL must be returned.\r
9095d37b 1210\r
bbfaace4 1211 If PatchVariable is NULL, then ASSERT().\r
9638ba6d 1212 If SizeOfBuffer is NULL, then ASSERT().\r
1213 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
bbfaace4 1214\r
9095d37b 1215 @param[out] PatchVariable A pointer to the global variable in a module that is\r
bbfaace4 1216 the target of the set operation.\r
1217 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
1218 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1219 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 1220\r
2fc59a00 1221 @return Return the pointer to the buffer that was set.\r
bbfaace4 1222\r
1223**/\r
1224VOID *\r
1225EFIAPI\r
1226LibPatchPcdSetPtr (\r
f8308f0a 1227 OUT VOID *PatchVariable,\r
bbfaace4 1228 IN UINTN MaximumDatumSize,\r
1229 IN OUT UINTN *SizeOfBuffer,\r
1230 IN CONST VOID *Buffer\r
1231 )\r
1232{\r
1233 ASSERT (PatchVariable != NULL);\r
1234 ASSERT (SizeOfBuffer != NULL);\r
9095d37b 1235\r
bbfaace4 1236 if (*SizeOfBuffer > 0) {\r
1237 ASSERT (Buffer != NULL);\r
1238 }\r
1239\r
1240 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
1241 (*SizeOfBuffer == MAX_ADDRESS)) {\r
1242 *SizeOfBuffer = MaximumDatumSize;\r
1243 return NULL;\r
1244 }\r
9095d37b 1245\r
bbfaace4 1246 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
9095d37b 1247\r
bbfaace4 1248 return (VOID *) Buffer;\r
1249}\r
1250\r
9a355841
SZ
1251/**\r
1252 Sets a value of a patchable PCD entry that is type pointer.\r
1253\r
1254 Sets the PCD entry specified by PatchVariable to the value specified\r
1255 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r
1256 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r
1257 to indicate that the set operation was not actually performed.\r
1258 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
1259 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r
1260\r
1261 If PatchVariable is NULL, then ASSERT().\r
1262 If SizeOfBuffer is NULL, then ASSERT().\r
1263 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1264\r
f8308f0a 1265 @param[out] PatchVariable A pointer to the global variable in a module that is\r
9a355841
SZ
1266 the target of the set operation.\r
1267 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
1268 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1269 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 1270\r
9a355841
SZ
1271 @return The status of the set operation.\r
1272\r
1273**/\r
1274RETURN_STATUS\r
1275EFIAPI\r
1276LibPatchPcdSetPtrS (\r
f8308f0a 1277 OUT VOID *PatchVariable,\r
9a355841
SZ
1278 IN UINTN MaximumDatumSize,\r
1279 IN OUT UINTN *SizeOfBuffer,\r
1280 IN CONST VOID *Buffer\r
1281 )\r
1282{\r
1283 ASSERT (PatchVariable != NULL);\r
1284 ASSERT (SizeOfBuffer != NULL);\r
9095d37b 1285\r
9a355841
SZ
1286 if (*SizeOfBuffer > 0) {\r
1287 ASSERT (Buffer != NULL);\r
1288 }\r
1289\r
1290 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
1291 (*SizeOfBuffer == MAX_ADDRESS)) {\r
1292 *SizeOfBuffer = MaximumDatumSize;\r
1293 return RETURN_INVALID_PARAMETER;\r
1294 }\r
1295\r
1296 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
1297\r
1298 return RETURN_SUCCESS;\r
1299}\r
1300\r
f8308f0a
LG
1301/**\r
1302 Sets a value and size of a patchable PCD entry that is type pointer.\r
9095d37b
LG
1303\r
1304 Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r
1305 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
1306 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r
1307 NULL to indicate that the set operation was not actually performed.\r
1308 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
f8308f0a 1309 MaximumDatumSize and NULL must be returned.\r
9095d37b 1310\r
f8308f0a
LG
1311 If PatchVariable is NULL, then ASSERT().\r
1312 If SizeOfPatchVariable is NULL, then ASSERT().\r
1313 If SizeOfBuffer is NULL, then ASSERT().\r
1314 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1315\r
9095d37b 1316 @param[out] PatchVariable A pointer to the global variable in a module that is\r
f8308f0a
LG
1317 the target of the set operation.\r
1318 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r
1319 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
1320 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1321 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 1322\r
f8308f0a
LG
1323 @return Return the pointer to the buffer been set.\r
1324\r
1325**/\r
1326VOID *\r
1327EFIAPI\r
1328LibPatchPcdSetPtrAndSize (\r
1329 OUT VOID *PatchVariable,\r
1330 OUT UINTN *SizeOfPatchVariable,\r
1331 IN UINTN MaximumDatumSize,\r
1332 IN OUT UINTN *SizeOfBuffer,\r
1333 IN CONST VOID *Buffer\r
1334 )\r
1335{\r
1336 ASSERT (PatchVariable != NULL);\r
1337 ASSERT (SizeOfPatchVariable != NULL);\r
1338 ASSERT (SizeOfBuffer != NULL);\r
9095d37b 1339\r
f8308f0a
LG
1340 if (*SizeOfBuffer > 0) {\r
1341 ASSERT (Buffer != NULL);\r
1342 }\r
1343\r
1344 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
1345 (*SizeOfBuffer == MAX_ADDRESS)) {\r
1346 *SizeOfBuffer = MaximumDatumSize;\r
1347 return NULL;\r
1348 }\r
9095d37b 1349\r
f8308f0a
LG
1350 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
1351 *SizeOfPatchVariable = *SizeOfBuffer;\r
9095d37b 1352\r
f8308f0a
LG
1353 return (VOID *) Buffer;\r
1354}\r
1355\r
1356/**\r
1357 Sets a value and size of a patchable PCD entry that is type pointer.\r
1358\r
1359 Sets the PCD entry specified by PatchVariable to the value specified\r
1360 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r
1361 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r
1362 to indicate that the set operation was not actually performed.\r
1363 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
1364 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r
1365\r
1366 If PatchVariable is NULL, then ASSERT().\r
1367 If SizeOfPatchVariable is NULL, then ASSERT().\r
1368 If SizeOfBuffer is NULL, then ASSERT().\r
1369 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1370\r
1371 @param[out] PatchVariable A pointer to the global variable in a module that is\r
1372 the target of the set operation.\r
1373 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r
1374 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
1375 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1376 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 1377\r
f8308f0a
LG
1378 @return The status of the set operation.\r
1379\r
1380**/\r
1381RETURN_STATUS\r
1382EFIAPI\r
1383LibPatchPcdSetPtrAndSizeS (\r
1384 OUT VOID *PatchVariable,\r
1385 OUT UINTN *SizeOfPatchVariable,\r
1386 IN UINTN MaximumDatumSize,\r
1387 IN OUT UINTN *SizeOfBuffer,\r
1388 IN CONST VOID *Buffer\r
1389 )\r
1390{\r
1391 ASSERT (PatchVariable != NULL);\r
1392 ASSERT (SizeOfPatchVariable != NULL);\r
1393 ASSERT (SizeOfBuffer != NULL);\r
9095d37b 1394\r
f8308f0a
LG
1395 if (*SizeOfBuffer > 0) {\r
1396 ASSERT (Buffer != NULL);\r
1397 }\r
1398\r
1399 if ((*SizeOfBuffer > MaximumDatumSize) ||\r
1400 (*SizeOfBuffer == MAX_ADDRESS)) {\r
1401 *SizeOfBuffer = MaximumDatumSize;\r
1402 return RETURN_INVALID_PARAMETER;\r
1403 }\r
1404\r
1405 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r
1406 *SizeOfPatchVariable = *SizeOfBuffer;\r
1407\r
1408 return RETURN_SUCCESS;\r
1409}\r
1410\r
96d6d004
SZ
1411/**\r
1412 Retrieve additional information associated with a PCD token.\r
1413\r
1414 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
1415 human readable name that is associated with the token.\r
1416\r
1417 If TokenNumber is not in the default token space specified, then ASSERT().\r
1418\r
1419 @param[in] TokenNumber The PCD token number.\r
1420 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
1421 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
1422**/\r
1423VOID\r
1424EFIAPI\r
1425LibPcdGetInfo (\r
1426 IN UINTN TokenNumber,\r
1427 OUT PCD_INFO *PcdInfo\r
1428 )\r
1429{\r
1430 ASSERT (FALSE);\r
1431}\r
1432\r
1433/**\r
1434 Retrieve additional information associated with a PCD token.\r
1435\r
1436 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
1437 human readable name that is associated with the token.\r
1438\r
1439 If TokenNumber is not in the token space specified by Guid, then ASSERT().\r
1440\r
1441 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
1442 @param[in] TokenNumber The PCD token number.\r
1443 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
1444 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
1445**/\r
1446VOID\r
1447EFIAPI\r
1448LibPcdGetInfoEx (\r
1449 IN CONST GUID *Guid,\r
1450 IN UINTN TokenNumber,\r
1451 OUT PCD_INFO *PcdInfo\r
1452 )\r
1453{\r
1454 ASSERT (FALSE);\r
1455}\r
1456\r
1457/**\r
1458 Retrieve the currently set SKU Id.\r
1459\r
96d6d004
SZ
1460 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the\r
1461 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU\r
1462 Id is returned.\r
1463**/\r
1464UINTN\r
1465EFIAPI\r
1466LibPcdGetSku (\r
1467 VOID\r
1468 )\r
1469{\r
1470 ASSERT (FALSE);\r
1471\r
1472 return 0;\r
1473}\r
1474\r