]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/PcdLib.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Library / PcdLib.h
CommitLineData
fb3df220 1/** @file\r
50a64e5b 2 Provides library services to get and set Platform Configuration Database entries.\r
3\r
1a2f870c 4 PCD Library Class provides a PCD usage macro interface for all PCD types.\r
5 It should be included in any module that uses PCD. If a module uses dynamic/dynamicex\r
6 PCD, module should be linked to a PEIM/DXE library instance to access that PCD.\r
7 If a module uses PatchableInModule type PCD, it also needs the library instance to produce\r
8 LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, the macro interface is\r
f754f721 9 translated to a variable or macro that is auto-generated by build tool in\r
50a64e5b 10 module's autogen.h/autogen.c.\r
9095d37b
LG
11 The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are\r
12 only available prior to ExitBootServices(). If access to PCD values are required\r
64735d24 13 at runtime, then their values must be collected prior to ExitBootServices().\r
14 There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),\r
15 PatchPcdGetXX(), and PatchPcdSetXX().\r
50a64e5b 16\r
9095d37b 17Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9df063a0 18This program and the accompanying materials\r
50a64e5b 19are licensed and made available under the terms and conditions of the BSD License\r
20which accompanies this distribution. The full text of the license may be found at\r
21http://opensource.org/licenses/bsd-license.php\r
22\r
23THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
24WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
fb3df220 25\r
fb3df220 26**/\r
27\r
28#ifndef __PCD_LIB_H__\r
29#define __PCD_LIB_H__\r
30\r
64735d24 31\r
32/**\r
33 Retrieves a token number based on a token name.\r
34\r
88fd27e5 35 Returns the token number associated with the PCD token specified by TokenName.\r
64735d24 36 If TokenName is not a valid token in the token space, then the module will not build.\r
64735d24 37\r
38 @param TokenName The name of the PCD token to retrieve the token number for.\r
39\r
40 @return The token number associated with the PCD.\r
41\r
42**/\r
fb3df220 43#define PcdToken(TokenName) _PCD_TOKEN_##TokenName\r
44\r
45\r
64735d24 46/**\r
47 Retrieves a Boolean PCD feature flag based on a token name.\r
48\r
49 Returns the Boolean value for the PCD feature flag specified by TokenName.\r
50 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 51 If TokenName is not a feature flag PCD, then the module will not build.\r
64735d24 52\r
53 @param TokenName The name of the PCD token to retrieve a current value for.\r
54\r
55 @return Boolean value for the PCD feature flag.\r
56\r
57**/\r
fb3df220 58#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r
59\r
60\r
64735d24 61/**\r
62 Retrieves an 8-bit fixed PCD token value based on a token name.\r
63\r
64 Returns the 8-bit value for the token specified by TokenName.\r
65 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 66 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 67\r
68 @param TokenName The name of the PCD token to retrieve a current value for.\r
69\r
70 @return 8-bit value for the token specified by TokenName.\r
71\r
72**/\r
fb3df220 73#define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName\r
64735d24 74\r
75\r
76/**\r
77 Retrieves a 16-bit fixed PCD token value based on a token name.\r
78\r
79 Returns the 16-bit value for the token specified by TokenName.\r
80 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 81 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 82\r
83 @param TokenName The name of the PCD token to retrieve a current value for.\r
84\r
85 @return 16-bit value for the token specified by TokenName.\r
86\r
87**/\r
fb3df220 88#define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName\r
64735d24 89\r
90\r
91/**\r
92 Retrieves a 32-bit fixed PCD token value based on a token name.\r
93\r
94 Returns the 32-bit value for the token specified by TokenName.\r
95 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 96 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 97\r
98 @param TokenName The name of the PCD token to retrieve a current value for.\r
99\r
100 @return 32-bit value for the token specified by TokenName.\r
101\r
102**/\r
fb3df220 103#define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName\r
64735d24 104\r
105\r
106/**\r
107 Retrieves a 64-bit fixed PCD token value based on a token name.\r
108\r
109 Returns the 64-bit value for the token specified by TokenName.\r
110 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 111 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 112\r
113 @param TokenName The name of the PCD token to retrieve a current value for.\r
114\r
115 @return 64-bit value for the token specified by TokenName.\r
116\r
117**/\r
fb3df220 118#define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName\r
64735d24 119\r
120\r
121/**\r
122 Retrieves a Boolean fixed PCD token value based on a token name.\r
123\r
124 Returns the Boolean value for the token specified by TokenName.\r
125 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 126 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 127\r
128 @param TokenName The name of the PCD token to retrieve a current value for.\r
129\r
9095d37b 130 @return The Boolean value for the token.\r
64735d24 131\r
132**/\r
fb3df220 133#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName\r
134\r
135\r
64735d24 136/**\r
137 Retrieves a pointer to a fixed PCD token buffer based on a token name.\r
138\r
139 Returns a pointer to the buffer for the token specified by TokenName.\r
140 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 141 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 142\r
143 @param TokenName The name of the PCD token to retrieve a current value for.\r
144\r
9095d37b 145 @return A pointer to the buffer.\r
64735d24 146\r
147**/\r
fb3df220 148#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)\r
149\r
150\r
64735d24 151/**\r
152 Retrieves an 8-bit binary patchable PCD token value based on a token name.\r
153\r
154 Returns the 8-bit value for the token specified by TokenName.\r
155 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 156 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 157\r
158 @param TokenName The name of the PCD token to retrieve a current value for.\r
159\r
160 @return An 8-bit binary patchable PCD token value.\r
161\r
162**/\r
fb3df220 163#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 164\r
165/**\r
166 Retrieves a 16-bit binary patchable PCD token value based on a token name.\r
167\r
168 Returns the 16-bit value for the token specified by TokenName.\r
169 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 170 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 171\r
172 @param TokenName The name of the PCD token to retrieve a current value for.\r
173\r
174 @return A 16-bit binary patchable PCD token value.\r
175\r
176**/\r
fb3df220 177#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 178\r
179\r
180/**\r
181 Retrieves a 32-bit binary patchable PCD token value based on a token name.\r
182\r
183 Returns the 32-bit value for the token specified by TokenName.\r
184 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 185 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 186\r
187 @param TokenName The name of the PCD token to retrieve a current value for.\r
188\r
189 @return A 32-bit binary patchable PCD token value.\r
190\r
191**/\r
fb3df220 192#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 193\r
194\r
195/**\r
196 Retrieves a 64-bit binary patchable PCD token value based on a token name.\r
197\r
198 Returns the 64-bit value for the token specified by TokenName.\r
199 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 200 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 201\r
202 @param TokenName The name of the PCD token to retrieve a current value for.\r
203\r
204 @return A 64-bit binary patchable PCD token value.\r
205\r
206**/\r
fb3df220 207#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 208\r
209\r
210/**\r
211 Retrieves a Boolean binary patchable PCD token value based on a token name.\r
212\r
213 Returns the Boolean value for the token specified by TokenName.\r
214 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 215 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 216\r
217 @param TokenName The name of the PCD token to retrieve a current value for.\r
218\r
219 @return The Boolean value for the token.\r
220\r
221**/\r
fb3df220 222#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 223\r
224\r
225/**\r
226 Retrieves a pointer to a binary patchable PCD token buffer based on a token name.\r
227\r
228 Returns a pointer to the buffer for the token specified by TokenName.\r
229 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 230 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 231\r
232 @param TokenName The name of the PCD token to retrieve a current value for.\r
233\r
234 @return A pointer to the buffer for the token.\r
235\r
236**/\r
fb3df220 237#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)\r
238\r
64735d24 239\r
240/**\r
241 Sets an 8-bit binary patchable PCD token value based on a token name.\r
242\r
243 Sets the 8-bit value for the token specified by TokenName. Value is returned.\r
244 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 245 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 246\r
247 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
248 @param Value The 8-bit value to set.\r
9095d37b 249\r
7b5b3124 250 @return Return the Value that was set.\r
64735d24 251\r
252**/\r
fb3df220 253#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 254\r
255\r
256/**\r
257 Sets a 16-bit binary patchable PCD token value based on a token name.\r
258\r
259 Sets the 16-bit value for the token specified by TokenName. Value is returned.\r
260 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 261 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 262\r
263 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
264 @param Value The 16-bit value to set.\r
265\r
7b5b3124 266 @return Return the Value that was set.\r
64735d24 267\r
268**/\r
fb3df220 269#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 270\r
271\r
272/**\r
273 Sets a 32-bit binary patchable PCD token value based on a token name.\r
274\r
275 Sets the 32-bit value for the token specified by TokenName. Value is returned.\r
276 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 277 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 278\r
279 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
280 @param Value The 32-bit value to set.\r
281\r
7b5b3124 282 @return Return the Value that was set.\r
64735d24 283\r
284**/\r
fb3df220 285#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 286\r
287\r
288/**\r
289 Sets a 64-bit binary patchable PCD token value based on a token name.\r
290\r
291 Sets the 64-bit value for the token specified by TokenName. Value is returned.\r
292 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 293 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 294\r
295 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
296 @param Value The 64-bit value to set.\r
297\r
7b5b3124 298 @return Return the Value that was set.\r
64735d24 299\r
300**/\r
fb3df220 301#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 302\r
303\r
304/**\r
305 Sets a Boolean binary patchable PCD token value based on a token name.\r
306\r
307 Sets the Boolean value for the token specified by TokenName. Value is returned.\r
308 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 309 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 310\r
311 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
312 @param Value The boolean value to set.\r
313\r
7b5b3124 314 @return Return the Value that was set.\r
64735d24 315\r
316**/\r
fb3df220 317#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 318\r
319\r
320/**\r
321 Sets a pointer to a binary patchable PCD token buffer based on a token name.\r
322\r
9095d37b 323 Sets the buffer for the token specified by TokenName. Buffer is returned.\r
64735d24 324 If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer\r
9095d37b
LG
325 to the maximum size supported by TokenName and return NULL to indicate that the set operation\r
326 was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be\r
64735d24 327 set to the maximum size supported by TokenName and NULL must be returned.\r
328 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 329 If TokenName is not a patchable in module PCD, then the module will not build.\r
9095d37b 330\r
64735d24 331 If SizeOfBuffer is NULL, then ASSERT().\r
332 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
9095d37b 333\r
64735d24 334 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
335 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
336 @param Buffer Pointer to the value to set.\r
337\r
7b5b3124 338 @return Return the pointer to the Buffer that was set.\r
64735d24 339\r
340**/\r
fb3df220 341#define PatchPcdSetPtr(TokenName, Size, Buffer) \\r
f8308f0a
LG
342 LibPatchPcdSetPtrAndSize ( \\r
343 (VOID *)_gPcd_BinaryPatch_##TokenName, \\r
344 &_gPcd_BinaryPatch_Size_##TokenName, \\r
fb3df220 345 (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \\r
346 (Size), \\r
347 (Buffer) \\r
348 )\r
64735d24 349/**\r
350 Retrieves an 8-bit PCD token value based on a token name.\r
9095d37b 351\r
64735d24 352 Returns the 8-bit value for the token specified by TokenName.\r
353 If TokenName is not a valid token in the token space, then the module will not build.\r
9095d37b 354\r
64735d24 355 @param TokenName The name of the PCD token to retrieve a current value for.\r
356\r
357 @return 8-bit value for the token specified by TokenName.\r
358\r
359**/\r
fb3df220 360#define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName\r
64735d24 361\r
362\r
363/**\r
364 Retrieves a 16-bit PCD token value based on a token name.\r
365\r
366 Returns the 16-bit value for the token specified by TokenName.\r
367 If TokenName is not a valid token in the token space, then the module will not build.\r
368\r
369 @param TokenName The name of the PCD token to retrieve a current value for.\r
370\r
371 @return 16-bit value for the token specified by TokenName.\r
372\r
373**/\r
fb3df220 374#define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName\r
64735d24 375\r
376\r
377/**\r
378 Retrieves a 32-bit PCD token value based on a token name.\r
379\r
380 Returns the 32-bit value for the token specified by TokenName.\r
381 If TokenName is not a valid token in the token space, then the module will not build.\r
382\r
383 @param TokenName The name of the PCD token to retrieve a current value for.\r
384\r
385 @return 32-bit value for the token specified by TokenName.\r
386\r
387**/\r
fb3df220 388#define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName\r
64735d24 389\r
390\r
391/**\r
392 Retrieves a 64-bit PCD token value based on a token name.\r
393\r
394 Returns the 64-bit value for the token specified by TokenName.\r
395 If TokenName is not a valid token in the token space, then the module will not build.\r
396\r
397 @param TokenName The name of the PCD token to retrieve a current value for.\r
398\r
399 @return 64-bit value for the token specified by TokenName.\r
400\r
401**/\r
fb3df220 402#define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName\r
64735d24 403\r
404\r
405/**\r
406 Retrieves a pointer to a PCD token buffer based on a token name.\r
407\r
408 Returns a pointer to the buffer for the token specified by TokenName.\r
409 If TokenName is not a valid token in the token space, then the module will not build.\r
410\r
411 @param TokenName The name of the PCD token to retrieve a current value for.\r
412\r
413 @return A pointer to the buffer.\r
414\r
415**/\r
fb3df220 416#define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName\r
64735d24 417\r
418\r
419/**\r
420 Retrieves a Boolean PCD token value based on a token name.\r
421\r
422 Returns the Boolean value for the token specified by TokenName.\r
423 If TokenName is not a valid token in the token space, then the module will not build.\r
424\r
425 @param TokenName The name of the PCD token to retrieve a current value for.\r
426\r
427 @return A Boolean PCD token value.\r
428\r
429**/\r
fb3df220 430#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r
431\r
64735d24 432\r
bf8e99a4
LG
433/**\r
434 Retrieves the size of a fixed PCD token based on a token name.\r
435\r
436 Returns the size of the token specified by TokenName.\r
437 If TokenName is not a valid token in the token space, then the module will not build.\r
438\r
439 @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r
440\r
441 @return Return the size\r
442\r
443**/\r
444#define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName\r
445\r
446\r
447/**\r
448 Retrieves the size of a binary patchable PCD token based on a token name.\r
449\r
450 Returns the size of the token specified by TokenName.\r
451 If TokenName is not a valid token in the token space, then the module will not build.\r
452\r
453 @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r
454\r
455 @return Return the size\r
456\r
457**/\r
458#define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName\r
459\r
460\r
461/**\r
462 Retrieves the size of the PCD token based on a token name.\r
9095d37b 463\r
bf8e99a4
LG
464 Returns the size of the token specified by TokenName.\r
465 If TokenName is not a valid token in the token space, then the module will not build.\r
9095d37b 466\r
bf8e99a4
LG
467 @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r
468\r
469 @return Return the size\r
470\r
471**/\r
472#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName\r
473\r
474\r
475/**\r
476 Retrieve the size of a given PCD token.\r
bf8e99a4 477\r
9095d37b
LG
478 Returns the size of the token specified by TokenNumber and Guid.\r
479 If Guid is NULL, then ASSERT().\r
480\r
481 @param[in] Guid Pointer to a 128-bit unique value that designates\r
bf8e99a4
LG
482 which namespace to retrieve a value from.\r
483 @param[in] TokenNumber The PCD token number to retrieve a current value size for.\r
484\r
485 @return Return the size.\r
486\r
487**/\r
488#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))\r
489\r
9a355841 490#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
64735d24 491/**\r
492 Sets an 8-bit PCD token value based on a token name.\r
493\r
494 Sets the 8-bit value for the token specified by TokenName. Value is returned.\r
495 If TokenName is not a valid token in the token space, then the module will not build.\r
496\r
497 @param TokenName The name of the PCD token to retrieve a current value for.\r
498 @param Value The 8-bit value to set.\r
9095d37b 499\r
7b5b3124 500 @return Return the Value that was set.\r
64735d24 501\r
502**/\r
fb3df220 503#define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))\r
64735d24 504\r
505\r
506/**\r
507 Sets a 16-bit PCD token value based on a token name.\r
508\r
509 Sets the 16-bit value for the token specified by TokenName. Value is returned.\r
510 If TokenName is not a valid token in the token space, then the module will not build.\r
511\r
512 @param TokenName The name of the PCD token to retrieve a current value for.\r
513 @param Value The 16-bit value to set.\r
514\r
7b5b3124 515 @return Return the Value that was set.\r
64735d24 516\r
517**/\r
fb3df220 518#define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))\r
64735d24 519\r
520\r
521/**\r
522 Sets a 32-bit PCD token value based on a token name.\r
523\r
524 Sets the 32-bit value for the token specified by TokenName. Value is returned.\r
525 If TokenName is not a valid token in the token space, then the module will not build.\r
526\r
527 @param TokenName The name of the PCD token to retrieve a current value for.\r
528 @param Value The 32-bit value to set.\r
529\r
7b5b3124 530 @return Return the Value that was set.\r
64735d24 531\r
532**/\r
fb3df220 533#define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))\r
64735d24 534\r
535\r
536/**\r
537 Sets a 64-bit PCD token value based on a token name.\r
538\r
539 Sets the 64-bit value for the token specified by TokenName. Value is returned.\r
540 If TokenName is not a valid token in the token space, then the module will not build.\r
541\r
542 @param TokenName The name of the PCD token to retrieve a current value for.\r
543 @param Value The 64-bit value to set.\r
544\r
7b5b3124 545 @return Return the Value that was set.\r
64735d24 546\r
547**/\r
fb3df220 548#define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))\r
64735d24 549\r
550\r
551/**\r
552 Sets a pointer to a PCD token buffer based on a token name.\r
553\r
9095d37b
LG
554 Sets the buffer for the token specified by TokenName. Buffer is returned.\r
555 If SizeOfBuffer is greater than the maximum size supported by TokenName,\r
556 then set SizeOfBuffer to the maximum size supported by TokenName and return NULL\r
557 to indicate that the set operation was not actually performed. If SizeOfBuffer\r
558 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported\r
9a355841 559 by TokenName and NULL must be returned.\r
64735d24 560 If TokenName is not a valid token in the token space, then the module will not build.\r
9095d37b 561\r
64735d24 562 If SizeOfBuffer is NULL, then ASSERT().\r
563 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
9095d37b 564\r
64735d24 565 @param TokenName The name of the PCD token to set the current value for.\r
566 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
567 @param Buffer A pointer to the buffer to set.\r
568\r
7b5b3124 569 @return Return the pointer to the Buffer that was set.\r
64735d24 570\r
571**/\r
fb3df220 572#define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \\r
573 _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))\r
9095d37b 574\r
64735d24 575/**\r
576 Sets a Boolean PCD token value based on a token name.\r
577\r
9095d37b 578 Sets the Boolean value for the token specified by TokenName. Value is returned.\r
64735d24 579 If TokenName is not a valid token in the token space, then the module will not build.\r
580\r
581 @param TokenName The name of the PCD token to set the current value for.\r
582 @param Buffer The Boolean value to set.\r
583\r
7b5b3124 584 @return Return the Value that was set.\r
64735d24 585\r
586**/\r
fb3df220 587#define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))\r
9a355841
SZ
588#endif\r
589\r
590/**\r
591 Sets a 8-bit PCD token value based on a token name.\r
592\r
593 Sets the 8-bit value for the token specified by TokenName.\r
594 If TokenName is not a valid token in the token space, then the module will not build.\r
595\r
596 @param TokenName The name of the PCD token to retrieve a current value for.\r
597 @param Value The 8-bit value to set.\r
598\r
599 @return The status of the set operation.\r
600\r
601**/\r
602#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))\r
603\r
604/**\r
605 Sets a 16-bit PCD token value based on a token name.\r
606\r
607 Sets the 16-bit value for the token specified by TokenName.\r
608 If TokenName is not a valid token in the token space, then the module will not build.\r
609\r
610 @param TokenName The name of the PCD token to retrieve a current value for.\r
611 @param Value The 16-bit value to set.\r
612\r
613 @return The status of the set operation.\r
fb3df220 614\r
9a355841
SZ
615**/\r
616#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))\r
617\r
618/**\r
619 Sets a 32-bit PCD token value based on a token name.\r
620\r
621 Sets the 32-bit value for the token specified by TokenName.\r
622 If TokenName is not a valid token in the token space, then the module will not build.\r
623\r
624 @param TokenName The name of the PCD token to retrieve a current value for.\r
625 @param Value The 32-bit value to set.\r
626\r
627 @return The status of the set operation.\r
628\r
629**/\r
630#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))\r
631\r
632/**\r
633 Sets a 64-bit PCD token value based on a token name.\r
634\r
635 Sets the 64-bit value for the token specified by TokenName.\r
636 If TokenName is not a valid token in the token space, then the module will not build.\r
637\r
638 @param TokenName The name of the PCD token to retrieve a current value for.\r
639 @param Value The 64-bit value to set.\r
640\r
641 @return The status of the set operation.\r
642\r
643**/\r
644#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))\r
645\r
646/**\r
647 Sets a pointer to a PCD token buffer based on a token name.\r
648\r
649 Sets the buffer for the token specified by TokenName.\r
650 If SizeOfBuffer is greater than the maximum size supported by TokenName,\r
651 then set SizeOfBuffer to the maximum size supported by TokenName and return\r
652 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.\r
653 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size\r
654 supported by TokenName and RETURN_INVALID_PARAMETER must be returned.\r
655 If TokenName is not a valid token in the token space, then the module will not build.\r
656\r
657 If SizeOfBuffer is NULL, then ASSERT().\r
658 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
659\r
660 @param TokenName The name of the PCD token to set the current value for.\r
661 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
662 @param Buffer A pointer to the buffer to set.\r
663\r
664 @return The status of the set operation.\r
665\r
666**/\r
667#define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \\r
668 _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))\r
669\r
670\r
671\r
672/**\r
673 Sets a boolean PCD token value based on a token name.\r
674\r
675 Sets the boolean value for the token specified by TokenName.\r
676 If TokenName is not a valid token in the token space, then the module will not build.\r
677\r
678 @param TokenName The name of the PCD token to retrieve a current value for.\r
679 @param Value The boolean value to set.\r
680\r
681 @return The status of the set operation.\r
682\r
683**/\r
684#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))\r
64735d24 685\r
419db80b
BF
686/**\r
687 Retrieves a token number based on a GUID and a token name.\r
688\r
689 Returns the token number for the token specified by Guid and TokenName.\r
88fd27e5 690 If TokenName is not a valid token in the token space, then the module will not build.\r
419db80b 691\r
9095d37b 692 @param Guid Pointer to a 128-bit unique value that designates\r
419db80b 693 which namespace to retrieve a value from.\r
9095d37b 694 @param TokenName The name of the PCD token to retrieve a current value for.\r
419db80b
BF
695\r
696 @return Return the token number.\r
697\r
698**/\r
699#define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)\r
700\r
64735d24 701/**\r
702 Retrieves an 8-bit PCD token value based on a GUID and a token name.\r
703\r
704 Returns the 8-bit value for the token specified by Guid and TokenName.\r
9095d37b 705 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 706 then the module will not build.\r
9095d37b 707\r
64735d24 708 If Guid is NULL, then ASSERT().\r
709\r
9095d37b 710 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 711 which namespace to retrieve a value from.\r
9095d37b 712 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 713\r
714 @return An 8-bit PCD token value.\r
715\r
716**/\r
419db80b 717#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 718\r
719/**\r
720 Retrieves a 16-bit PCD token value based on a GUID and a token name.\r
721\r
722 Returns the 16-bit value for the token specified by Guid and TokenName.\r
9095d37b 723 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 724 then the module will not build.\r
725\r
726 If Guid is NULL, then ASSERT().\r
727\r
9095d37b 728 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 729 which namespace to retrieve a value from.\r
9095d37b 730 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 731\r
732 @return A 16-bit PCD token value.\r
733\r
734**/\r
419db80b 735#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 736\r
737\r
738/**\r
739 Retrieves a 32-bit PCD token value based on a GUID and a token name.\r
740\r
741 Returns the 32-bit value for the token specified by Guid and TokenName.\r
9095d37b 742 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 743 then the module will not build.\r
744\r
745 If Guid is NULL, then ASSERT().\r
746\r
9095d37b 747 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 748 which namespace to retrieve a value from.\r
9095d37b 749 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 750\r
751 @return A 32-bit PCD token value.\r
752\r
753**/\r
419db80b 754#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 755\r
756\r
757/**\r
758 Retrieves a 64-bit PCD token value based on a GUID and a token name.\r
759\r
760 Returns the 64-bit value for the token specified by Guid and TokenName.\r
9095d37b 761 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 762 then the module will not build.\r
763\r
764 If Guid is NULL, then ASSERT().\r
765\r
9095d37b 766 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 767 which namespace to retrieve a value from.\r
9095d37b 768 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 769\r
770 @return A 64-bit PCD token value.\r
771\r
772**/\r
419db80b 773#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 774\r
775\r
776/**\r
777 Retrieves a pointer to a PCD token buffer based on a GUID and a token name.\r
778\r
779 Returns a pointer to the buffer for the token specified by Guid and TokenName.\r
9095d37b 780 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 781 then the module will not build.\r
782\r
783 If Guid is NULL, then ASSERT().\r
784\r
9095d37b 785 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 786 which namespace to retrieve a value from.\r
9095d37b 787 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 788\r
789 @return A pointer to a PCD token buffer.\r
790\r
791**/\r
419db80b 792#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 793\r
794\r
795/**\r
796 Retrieves a Boolean PCD token value based on a GUID and a token name.\r
797\r
798 Returns the Boolean value for the token specified by Guid and TokenName.\r
9095d37b 799 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 800 then the module will not build.\r
801\r
802 If Guid is NULL, then ASSERT().\r
803\r
9095d37b 804 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 805 which namespace to retrieve a value from.\r
9095d37b 806 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 807\r
808 @return A Boolean PCD token value.\r
809\r
810**/\r
419db80b 811#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))\r
fb3df220 812\r
64735d24 813\r
9a355841
SZ
814\r
815#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
64735d24 816/**\r
817 Sets an 8-bit PCD token value based on a GUID and a token name.\r
818\r
819 Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.\r
9095d37b 820 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 821 then the module will not build.\r
822\r
823 If Guid is NULL, then ASSERT().\r
824\r
9095d37b 825 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 826 which namespace to retrieve a value from.\r
827 @param TokenName The name of the PCD token to set the current value for.\r
9095d37b 828 @param Value The 8-bit value to set.\r
64735d24 829\r
7b5b3124 830 @return Return the Value that was set.\r
64735d24 831\r
832**/\r
419db80b 833#define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
64735d24 834\r
835\r
836/**\r
837 Sets a 16-bit PCD token value based on a GUID and a token name.\r
838\r
839 Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.\r
9095d37b 840 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 841 then the module will not build.\r
842\r
843 If Guid is NULL, then ASSERT().\r
844\r
9095d37b 845 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 846 which namespace to retrieve a value from.\r
847 @param TokenName The name of the PCD token to set the current value for.\r
9095d37b 848 @param Value The 16-bit value to set.\r
64735d24 849\r
7b5b3124 850 @return Return the Value that was set.\r
64735d24 851\r
852**/\r
419db80b 853#define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
64735d24 854\r
855\r
856/**\r
857 Sets a 32-bit PCD token value based on a GUID and a token name.\r
858\r
859 Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.\r
9095d37b 860 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 861 then the module will not build.\r
862\r
863 If Guid is NULL, then ASSERT().\r
864\r
9095d37b 865 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 866 which namespace to retrieve a value from.\r
867 @param TokenName The name of the PCD token to set the current value for.\r
9095d37b 868 @param Value The 32-bit value to set.\r
64735d24 869\r
7b5b3124 870 @return Return the Value that was set.\r
64735d24 871\r
872**/\r
419db80b 873#define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
64735d24 874\r
875\r
876/**\r
877 Sets a 64-bit PCD token value based on a GUID and a token name.\r
878\r
879 Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.\r
9095d37b 880 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 881 then the module will not build.\r
882\r
883 If Guid is NULL, then ASSERT().\r
884\r
9095d37b 885 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 886 which namespace to retrieve a value from.\r
887 @param TokenName The name of the PCD token to set the current value for.\r
9095d37b 888 @param Value The 64-bit value to set.\r
64735d24 889\r
7b5b3124 890 @return Return the Value that was set.\r
64735d24 891\r
892**/\r
419db80b 893#define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
64735d24 894\r
895\r
896/**\r
897 Sets a pointer to a PCD token buffer based on a GUID and a token name.\r
898\r
9095d37b
LG
899 Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.\r
900 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,\r
901 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return\r
902 NULL to indicate that the set operation was not actually performed. If SizeOfBuffer\r
64735d24 903 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by\r
9a355841 904 Guid and TokenName and NULL must be returned.\r
9095d37b 905 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 906 then the module will not build.\r
9095d37b 907\r
64735d24 908 If Guid is NULL, then ASSERT().\r
909 If SizeOfBuffer is NULL, then ASSERT().\r
910 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
911\r
9095d37b 912 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 913 which namespace to retrieve a value from.\r
914 @param TokenName The name of the PCD token to set the current value for.\r
9095d37b 915 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
7b5b3124 916 @param Buffer Pointer to the buffer to set.\r
9095d37b 917\r
7b5b3124 918 @return Return the pointer to the Buffer that was set.\r
64735d24 919\r
920**/\r
fb3df220 921#define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \\r
419db80b 922 LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))\r
64735d24 923\r
924\r
925/**\r
926 Sets a Boolean PCD token value based on a GUID and a token name.\r
927\r
9095d37b
LG
928 Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.\r
929 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 930 then the module will not build.\r
931\r
932 If Guid is NULL, then ASSERT().\r
933\r
9095d37b 934 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 935 which namespace to retrieve a value from.\r
9095d37b 936 @param TokenName The name of the PCD token to set the current value for.\r
64735d24 937 @param Value The Boolean value to set.\r
938\r
7b5b3124 939 @return Return the Value that was set.\r
64735d24 940\r
9095d37b 941**/\r
fb3df220 942#define PcdSetExBool(Guid, TokenName, Value) \\r
419db80b 943 LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
9a355841
SZ
944#endif\r
945\r
946/**\r
947 Sets an 8-bit PCD token value based on a GUID and a token name.\r
948\r
949 Sets the 8-bit value for the token specified by Guid and TokenName.\r
950 If TokenName is not a valid token in the token space specified by Guid,\r
951 then the module will not build.\r
fb3df220 952\r
9a355841
SZ
953 If Guid is NULL, then ASSERT().\r
954\r
955 @param Guid Pointer to a 128-bit unique value that designates\r
956 which namespace to retrieve a value from.\r
957 @param TokenName The name of the PCD token to set the current value for.\r
958 @param Value The 8-bit value to set.\r
959\r
960 @return The status of the set operation.\r
961\r
962**/\r
963#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
964\r
965/**\r
966 Sets an 16-bit PCD token value based on a GUID and a token name.\r
967\r
968 Sets the 16-bit value for the token specified by Guid and TokenName.\r
969 If TokenName is not a valid token in the token space specified by Guid,\r
970 then the module will not build.\r
971\r
972 If Guid is NULL, then ASSERT().\r
973\r
974 @param Guid Pointer to a 128-bit unique value that designates\r
975 which namespace to retrieve a value from.\r
976 @param TokenName The name of the PCD token to set the current value for.\r
977 @param Value The 16-bit value to set.\r
978\r
979 @return The status of the set operation.\r
980\r
981**/\r
982#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
983\r
984/**\r
985 Sets an 32-bit PCD token value based on a GUID and a token name.\r
986\r
987 Sets the 32-bit value for the token specified by Guid and TokenName.\r
988 If TokenName is not a valid token in the token space specified by Guid,\r
989 then the module will not build.\r
990\r
991 If Guid is NULL, then ASSERT().\r
992\r
993 @param Guid Pointer to a 128-bit unique value that designates\r
994 which namespace to retrieve a value from.\r
995 @param TokenName The name of the PCD token to set the current value for.\r
996 @param Value The 32-bit value to set.\r
997\r
998 @return The status of the set operation.\r
999\r
1000**/\r
1001#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
1002\r
1003/**\r
1004 Sets an 64-bit PCD token value based on a GUID and a token name.\r
1005\r
1006 Sets the 64-bit value for the token specified by Guid and TokenName.\r
1007 If TokenName is not a valid token in the token space specified by Guid,\r
1008 then the module will not build.\r
1009\r
1010 If Guid is NULL, then ASSERT().\r
1011\r
1012 @param Guid Pointer to a 128-bit unique value that designates\r
1013 which namespace to retrieve a value from.\r
1014 @param TokenName The name of the PCD token to set the current value for.\r
1015 @param Value The 64-bit value to set.\r
1016\r
1017 @return The status of the set operation.\r
1018\r
1019**/\r
1020#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
1021\r
1022/**\r
1023 Sets a pointer to a PCD token buffer based on a GUID and a token name.\r
1024\r
1025 Sets the buffer for the token specified by Guid and TokenName.\r
1026 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,\r
1027 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return\r
1028 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.\r
1029 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size\r
1030 supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.\r
1031 If TokenName is not a valid token in the token space specified by Guid,\r
1032 then the module will not build.\r
1033\r
1034 If Guid is NULL, then ASSERT().\r
1035 If SizeOfBuffer is NULL, then ASSERT().\r
1036 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1037\r
1038 @param Guid Pointer to a 128-bit unique value that designates\r
1039 which namespace to retrieve a value from.\r
1040 @param TokenName The name of the PCD token to set the current value for.\r
1041 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1042 @param Buffer Pointer to the buffer to set.\r
1043\r
1044 @return The status of the set operation.\r
1045\r
1046**/\r
1047#define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \\r
1048 LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))\r
1049\r
1050\r
1051/**\r
1052 Sets an boolean PCD token value based on a GUID and a token name.\r
1053\r
1054 Sets the boolean value for the token specified by Guid and TokenName.\r
1055 If TokenName is not a valid token in the token space specified by Guid,\r
1056 then the module will not build.\r
1057\r
1058 If Guid is NULL, then ASSERT().\r
1059\r
1060 @param Guid Pointer to a 128-bit unique value that designates\r
1061 which namespace to retrieve a value from.\r
1062 @param TokenName The name of the PCD token to set the current value for.\r
1063 @param Value The boolean value to set.\r
1064\r
1065 @return The status of the set operation.\r
1066\r
1067**/\r
1068#define PcdSetExBoolS(Guid, TokenName, Value) \\r
1069 LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
fb3df220 1070\r
1071/**\r
64735d24 1072 This function provides a means by which SKU support can be established in the PCD infrastructure.\r
1073\r
fb3df220 1074 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r
1075\r
b677694d 1076 @param SkuId The SKU value that will be used when the PCD service retrieves and sets values\r
1077 associated with a PCD token.\r
fb3df220 1078\r
1a2f870c 1079 @return Return the SKU ID that was set.\r
fb3df220 1080\r
1081**/\r
1082UINTN\r
1083EFIAPI\r
1084LibPcdSetSku (\r
1085 IN UINTN SkuId\r
1086 );\r
1087\r
1088\r
1089/**\r
64735d24 1090 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
1091\r
1092 Returns the 8-bit value for the token specified by TokenNumber.\r
fb3df220 1093\r
2a254b90 1094 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1095\r
9095d37b 1096 @return Returns the 8-bit value for the token specified by TokenNumber.\r
fb3df220 1097\r
1098**/\r
1099UINT8\r
1100EFIAPI\r
1101LibPcdGet8 (\r
1102 IN UINTN TokenNumber\r
1103 );\r
1104\r
1105\r
1106/**\r
64735d24 1107 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
1108\r
1109 Returns the 16-bit value for the token specified by TokenNumber.\r
fb3df220 1110\r
2a254b90 1111 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1112\r
9095d37b 1113 @return Returns the 16-bit value for the token specified by TokenNumber.\r
fb3df220 1114\r
1115**/\r
1116UINT16\r
1117EFIAPI\r
1118LibPcdGet16 (\r
1119 IN UINTN TokenNumber\r
1120 );\r
1121\r
1122\r
1123/**\r
64735d24 1124 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
1125\r
1126 Returns the 32-bit value for the token specified by TokenNumber.\r
fb3df220 1127\r
1128 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
1129\r
f73e0ad2 1130 @return Returns the 32-bit value for the token specified by TokenNumber.\r
fb3df220 1131\r
1132**/\r
1133UINT32\r
1134EFIAPI\r
1135LibPcdGet32 (\r
1136 IN UINTN TokenNumber\r
1137 );\r
1138\r
1139\r
1140/**\r
64735d24 1141 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 1142\r
fb3df220 1143 Returns the 64-bit value for the token specified by TokenNumber.\r
1144\r
1145 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
1146\r
f73e0ad2 1147 @return Returns the 64-bit value for the token specified by TokenNumber.\r
fb3df220 1148\r
1149**/\r
1150UINT64\r
1151EFIAPI\r
1152LibPcdGet64 (\r
1153 IN UINTN TokenNumber\r
1154 );\r
1155\r
1156\r
1157/**\r
64735d24 1158 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 1159\r
fb3df220 1160 Returns the pointer to the buffer of the token specified by TokenNumber.\r
1161\r
1162 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
1163\r
f73e0ad2 1164 @return Returns the pointer to the token specified by TokenNumber.\r
fb3df220 1165\r
1166**/\r
1167VOID *\r
1168EFIAPI\r
1169LibPcdGetPtr (\r
1170 IN UINTN TokenNumber\r
1171 );\r
1172\r
1173\r
1174/**\r
64735d24 1175 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
1176\r
1177 Returns the Boolean value of the token specified by TokenNumber.\r
fb3df220 1178\r
1179 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
1180\r
9095d37b 1181 @return Returns the Boolean value of the token specified by TokenNumber.\r
fb3df220 1182\r
1183**/\r
9095d37b 1184BOOLEAN\r
fb3df220 1185EFIAPI\r
1186LibPcdGetBool (\r
1187 IN UINTN TokenNumber\r
1188 );\r
1189\r
1190\r
1191/**\r
64735d24 1192 This function provides a means by which to retrieve the size of a given PCD token.\r
fb3df220 1193\r
1194 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
1195\r
9095d37b 1196 @return Returns the size of the token specified by TokenNumber.\r
fb3df220 1197\r
1198**/\r
1199UINTN\r
1200EFIAPI\r
1201LibPcdGetSize (\r
1202 IN UINTN TokenNumber\r
1203 );\r
1204\r
1205\r
1206/**\r
64735d24 1207 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 1208\r
fb3df220 1209 Returns the 8-bit value for the token specified by TokenNumber and Guid.\r
fb3df220 1210\r
9095d37b
LG
1211 If Guid is NULL, then ASSERT().\r
1212\r
1213 @param[in] Guid Pointer to a 128-bit unique value that designates\r
b677694d 1214 which namespace to retrieve a value from.\r
1215 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1216\r
f73e0ad2 1217 @return Return the UINT8.\r
fb3df220 1218\r
1219**/\r
1220UINT8\r
1221EFIAPI\r
1222LibPcdGetEx8 (\r
1223 IN CONST GUID *Guid,\r
1224 IN UINTN TokenNumber\r
1225 );\r
1226\r
1227\r
1228/**\r
64735d24 1229 This function provides a means by which to retrieve a value for a given PCD token.\r
1230\r
fb3df220 1231 Returns the 16-bit value for the token specified by TokenNumber and Guid.\r
fb3df220 1232\r
9095d37b
LG
1233 If Guid is NULL, then ASSERT().\r
1234\r
1235 @param[in] Guid Pointer to a 128-bit unique value that designates\r
b677694d 1236 which namespace to retrieve a value from.\r
1237 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1238\r
f73e0ad2 1239 @return Return the UINT16.\r
fb3df220 1240\r
1241**/\r
1242UINT16\r
1243EFIAPI\r
1244LibPcdGetEx16 (\r
1245 IN CONST GUID *Guid,\r
1246 IN UINTN TokenNumber\r
1247 );\r
1248\r
1249\r
1250/**\r
1251 Returns the 32-bit value for the token specified by TokenNumber and Guid.\r
9095d37b 1252 If Guid is NULL, then ASSERT().\r
fb3df220 1253\r
9095d37b 1254 @param[in] Guid Pointer to a 128-bit unique value that designates\r
b677694d 1255 which namespace to retrieve a value from.\r
1256 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1257\r
f73e0ad2 1258 @return Return the UINT32.\r
fb3df220 1259\r
1260**/\r
1261UINT32\r
1262EFIAPI\r
1263LibPcdGetEx32 (\r
1264 IN CONST GUID *Guid,\r
1265 IN UINTN TokenNumber\r
1266 );\r
1267\r
1268\r
1269/**\r
64735d24 1270 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 1271\r
fb3df220 1272 Returns the 64-bit value for the token specified by TokenNumber and Guid.\r
fb3df220 1273\r
9095d37b
LG
1274 If Guid is NULL, then ASSERT().\r
1275\r
1276 @param[in] Guid Pointer to a 128-bit unique value that designates\r
fb287b56 1277 which namespace to retrieve a value from.\r
1278 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1279\r
f73e0ad2 1280 @return Return the UINT64.\r
fb3df220 1281\r
1282**/\r
1283UINT64\r
1284EFIAPI\r
1285LibPcdGetEx64 (\r
1286 IN CONST GUID *Guid,\r
1287 IN UINTN TokenNumber\r
1288 );\r
1289\r
1290\r
1291/**\r
64735d24 1292 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 1293\r
fb3df220 1294 Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r
fb3df220 1295\r
9095d37b
LG
1296 If Guid is NULL, then ASSERT().\r
1297\r
1298 @param[in] Guid Pointer to a 128-bit unique value that designates\r
fb287b56 1299 which namespace to retrieve a value from.\r
1300 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1301\r
f73e0ad2 1302 @return Return the VOID* pointer.\r
fb3df220 1303\r
1304**/\r
1305VOID *\r
1306EFIAPI\r
1307LibPcdGetExPtr (\r
1308 IN CONST GUID *Guid,\r
1309 IN UINTN TokenNumber\r
1310 );\r
1311\r
1312\r
1313/**\r
64735d24 1314 This function provides a means by which to retrieve a value for a given PCD token.\r
fb3df220 1315\r
9095d37b
LG
1316 Returns the Boolean value of the token specified by TokenNumber and Guid.\r
1317\r
1318 If Guid is NULL, then ASSERT().\r
1319\r
1320 @param[in] Guid Pointer to a 128-bit unique value that designates\r
fb287b56 1321 which namespace to retrieve a value from.\r
1322 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1323\r
f73e0ad2 1324 @return Return the BOOLEAN.\r
fb3df220 1325\r
1326**/\r
1327BOOLEAN\r
1328EFIAPI\r
1329LibPcdGetExBool (\r
1330 IN CONST GUID *Guid,\r
1331 IN UINTN TokenNumber\r
1332 );\r
1333\r
1334\r
1335/**\r
64735d24 1336 This function provides a means by which to retrieve the size of a given PCD token.\r
fb3df220 1337\r
9095d37b
LG
1338 Returns the size of the token specified by TokenNumber and Guid.\r
1339\r
1340 If Guid is NULL, then ASSERT().\r
1341\r
1342 @param[in] Guid Pointer to a 128-bit unique value that designates\r
fb287b56 1343 which namespace to retrieve a value from.\r
1344 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1345\r
f73e0ad2 1346 @return Return the size.\r
fb3df220 1347\r
1348**/\r
1349UINTN\r
1350EFIAPI\r
1351LibPcdGetExSize (\r
1352 IN CONST GUID *Guid,\r
1353 IN UINTN TokenNumber\r
1354 );\r
1355\r
1356\r
9a355841 1357#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
fb3df220 1358/**\r
64735d24 1359 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1360\r
1361 Sets the 8-bit value for the token specified by TokenNumber\r
fb3df220 1362 to the value specified by Value. Value is returned.\r
0befb08d 1363\r
fb287b56 1364 @param[in] TokenNumber The PCD token number to set a current value for.\r
1365 @param[in] Value The 8-bit value to set.\r
fb3df220 1366\r
502bfcef 1367 @return Return the Value that was set.\r
fb3df220 1368\r
1369**/\r
1370UINT8\r
1371EFIAPI\r
1372LibPcdSet8 (\r
1373 IN UINTN TokenNumber,\r
1374 IN UINT8 Value\r
1375 );\r
1376\r
1377\r
1378/**\r
64735d24 1379 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1380\r
1381 Sets the 16-bit value for the token specified by TokenNumber\r
fb3df220 1382 to the value specified by Value. Value is returned.\r
0befb08d 1383\r
fb287b56 1384 @param[in] TokenNumber The PCD token number to set a current value for.\r
1385 @param[in] Value The 16-bit value to set.\r
fb3df220 1386\r
502bfcef 1387 @return Return the Value that was set.\r
fb3df220 1388\r
1389**/\r
1390UINT16\r
1391EFIAPI\r
1392LibPcdSet16 (\r
1393 IN UINTN TokenNumber,\r
1394 IN UINT16 Value\r
1395 );\r
1396\r
1397\r
1398/**\r
64735d24 1399 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1400\r
1401 Sets the 32-bit value for the token specified by TokenNumber\r
fb3df220 1402 to the value specified by Value. Value is returned.\r
0befb08d 1403\r
fb287b56 1404 @param[in] TokenNumber The PCD token number to set a current value for.\r
1405 @param[in] Value The 32-bit value to set.\r
fb3df220 1406\r
502bfcef 1407 @return Return the Value that was set.\r
fb3df220 1408\r
1409**/\r
1410UINT32\r
1411EFIAPI\r
1412LibPcdSet32 (\r
1413 IN UINTN TokenNumber,\r
1414 IN UINT32 Value\r
1415 );\r
1416\r
1417\r
1418/**\r
64735d24 1419 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1420\r
1421 Sets the 64-bit value for the token specified by TokenNumber\r
fb3df220 1422 to the value specified by Value. Value is returned.\r
0befb08d 1423\r
fb287b56 1424 @param[in] TokenNumber The PCD token number to set a current value for.\r
1425 @param[in] Value The 64-bit value to set.\r
fb3df220 1426\r
502bfcef 1427 @return Return the Value that was set.\r
fb3df220 1428\r
1429**/\r
1430UINT64\r
1431EFIAPI\r
1432LibPcdSet64 (\r
1433 IN UINTN TokenNumber,\r
1434 IN UINT64 Value\r
1435 );\r
1436\r
1437\r
1438/**\r
64735d24 1439 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1440\r
1441 Sets a buffer for the token specified by TokenNumber to the value\r
1442 specified by Buffer and SizeOfBuffer. Buffer is returned.\r
1443 If SizeOfBuffer is greater than the maximum size support by TokenNumber,\r
1444 then set SizeOfBuffer to the maximum size supported by TokenNumber and\r
9a355841 1445 return NULL to indicate that the set operation was not actually performed.\r
fb3df220 1446\r
9095d37b 1447 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the\r
fb3df220 1448 maximum size supported by TokenName and NULL must be returned.\r
9095d37b 1449\r
d3057543 1450 If SizeOfBuffer is NULL, then ASSERT().\r
1451 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
9095d37b 1452\r
2a254b90 1453 @param[in] TokenNumber The PCD token number to set a current value for.\r
2616448e 1454 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
64735d24 1455 @param[in] Buffer A pointer to the buffer to set.\r
fb3df220 1456\r
502bfcef 1457 @return Return the pointer for the Buffer that was set.\r
fb3df220 1458\r
1459**/\r
64735d24 1460VOID *\r
fb3df220 1461EFIAPI\r
1462LibPcdSetPtr (\r
64735d24 1463 IN UINTN TokenNumber,\r
1464 IN OUT UINTN *SizeOfBuffer,\r
b52f6a1a 1465 IN CONST VOID *Buffer\r
fb3df220 1466 );\r
1467\r
1468\r
1469/**\r
64735d24 1470 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1471\r
1472 Sets the Boolean value for the token specified by TokenNumber\r
fb3df220 1473 to the value specified by Value. Value is returned.\r
0befb08d 1474\r
fb287b56 1475 @param[in] TokenNumber The PCD token number to set a current value for.\r
1476 @param[in] Value The boolean value to set.\r
fb3df220 1477\r
502bfcef 1478 @return Return the Value that was set.\r
fb3df220 1479\r
1480**/\r
1481BOOLEAN\r
1482EFIAPI\r
1483LibPcdSetBool (\r
1484 IN UINTN TokenNumber,\r
1485 IN BOOLEAN Value\r
1486 );\r
1487\r
1488\r
1489/**\r
64735d24 1490 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1491\r
1492 Sets the 8-bit value for the token specified by TokenNumber and\r
fb3df220 1493 Guid to the value specified by Value. Value is returned.\r
0befb08d 1494\r
fb3df220 1495 If Guid is NULL, then ASSERT().\r
0befb08d 1496\r
9095d37b 1497 @param[in] Guid Pointer to a 128-bit unique value that\r
fb287b56 1498 designates which namespace to set a value from.\r
1499 @param[in] TokenNumber The PCD token number to set a current value for.\r
1500 @param[in] Value The 8-bit value to set.\r
fb3df220 1501\r
502bfcef 1502 @return Return the Value that was set.\r
fb3df220 1503\r
1504**/\r
1505UINT8\r
1506EFIAPI\r
1507LibPcdSetEx8 (\r
1508 IN CONST GUID *Guid,\r
1509 IN UINTN TokenNumber,\r
1510 IN UINT8 Value\r
1511 );\r
1512\r
1513\r
1514/**\r
64735d24 1515 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1516\r
1517 Sets the 16-bit value for the token specified by TokenNumber and\r
fb3df220 1518 Guid to the value specified by Value. Value is returned.\r
0befb08d 1519\r
fb3df220 1520 If Guid is NULL, then ASSERT().\r
0befb08d 1521\r
9095d37b 1522 @param[in] Guid Pointer to a 128-bit unique value that\r
fb287b56 1523 designates which namespace to set a value from.\r
1524 @param[in] TokenNumber The PCD token number to set a current value for.\r
1525 @param[in] Value The 16-bit value to set.\r
fb3df220 1526\r
502bfcef 1527 @return Return the Value that was set.\r
fb3df220 1528\r
1529**/\r
1530UINT16\r
1531EFIAPI\r
1532LibPcdSetEx16 (\r
1533 IN CONST GUID *Guid,\r
1534 IN UINTN TokenNumber,\r
1535 IN UINT16 Value\r
1536 );\r
1537\r
1538\r
1539/**\r
64735d24 1540 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1541\r
1542 Sets the 32-bit value for the token specified by TokenNumber and\r
fb3df220 1543 Guid to the value specified by Value. Value is returned.\r
0befb08d 1544\r
fb3df220 1545 If Guid is NULL, then ASSERT().\r
0befb08d 1546\r
9095d37b 1547 @param[in] Guid Pointer to a 128-bit unique value that\r
fb287b56 1548 designates which namespace to set a value from.\r
1549 @param[in] TokenNumber The PCD token number to set a current value for.\r
1550 @param[in] Value The 32-bit value to set.\r
fb3df220 1551\r
502bfcef 1552 @return Return the Value that was set.\r
fb3df220 1553\r
1554**/\r
1555UINT32\r
1556EFIAPI\r
1557LibPcdSetEx32 (\r
1558 IN CONST GUID *Guid,\r
1559 IN UINTN TokenNumber,\r
1560 IN UINT32 Value\r
1561 );\r
1562\r
1563\r
1564/**\r
64735d24 1565 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1566\r
1567 Sets the 64-bit value for the token specified by TokenNumber and\r
fb3df220 1568 Guid to the value specified by Value. Value is returned.\r
0befb08d 1569\r
fb3df220 1570 If Guid is NULL, then ASSERT().\r
0befb08d 1571\r
9095d37b 1572 @param[in] Guid Pointer to a 128-bit unique value that\r
fb287b56 1573 designates which namespace to set a value from.\r
1574 @param[in] TokenNumber The PCD token number to set a current value for.\r
1575 @param[in] Value The 64-bit value to set.\r
fb3df220 1576\r
502bfcef 1577 @return Return the Value that was set.\r
fb3df220 1578\r
1579**/\r
1580UINT64\r
1581EFIAPI\r
1582LibPcdSetEx64 (\r
1583 IN CONST GUID *Guid,\r
1584 IN UINTN TokenNumber,\r
1585 IN UINT64 Value\r
1586 );\r
1587\r
1588\r
1589/**\r
64735d24 1590 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1591\r
1592 Sets a buffer for the token specified by TokenNumber to the value specified by\r
1593 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
1594 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size\r
1595 supported by TokenNumber and return NULL to indicate that the set operation\r
9a355841 1596 was not actually performed.\r
9095d37b 1597\r
fb3df220 1598 If Guid is NULL, then ASSERT().\r
d3057543 1599 If SizeOfBuffer is NULL, then ASSERT().\r
1600 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
9095d37b
LG
1601\r
1602 @param[in] Guid Pointer to a 128-bit unique value that\r
fb287b56 1603 designates which namespace to set a value from.\r
1604 @param[in] TokenNumber The PCD token number to set a current value for.\r
1605 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
1606 @param[in] Buffer A pointer to the buffer to set.\r
fb3df220 1607\r
502bfcef 1608 @return Return the pointer to the Buffer that was set.\r
fb3df220 1609\r
1610**/\r
1611VOID *\r
1612EFIAPI\r
1613LibPcdSetExPtr (\r
1614 IN CONST GUID *Guid,\r
1615 IN UINTN TokenNumber,\r
1616 IN OUT UINTN *SizeOfBuffer,\r
1617 IN VOID *Buffer\r
1618 );\r
1619\r
1620\r
1621/**\r
64735d24 1622 This function provides a means by which to set a value for a given PCD token.\r
9095d37b
LG
1623\r
1624 Sets the Boolean value for the token specified by TokenNumber and\r
fb3df220 1625 Guid to the value specified by Value. Value is returned.\r
0befb08d 1626\r
fb3df220 1627 If Guid is NULL, then ASSERT().\r
0befb08d 1628\r
9095d37b 1629 @param[in] Guid Pointer to a 128-bit unique value that\r
fb287b56 1630 designates which namespace to set a value from.\r
1631 @param[in] TokenNumber The PCD token number to set a current value for.\r
1632 @param[in] Value The Boolean value to set.\r
fb3df220 1633\r
502bfcef 1634 @return Return the Value that was set.\r
fb3df220 1635\r
1636**/\r
1637BOOLEAN\r
1638EFIAPI\r
1639LibPcdSetExBool (\r
1640 IN CONST GUID *Guid,\r
1641 IN UINTN TokenNumber,\r
1642 IN BOOLEAN Value\r
1643 );\r
9a355841 1644#endif\r
fb3df220 1645\r
9a355841
SZ
1646/**\r
1647 This function provides a means by which to set a value for a given PCD token.\r
1648\r
1649 Sets the 8-bit value for the token specified by TokenNumber\r
1650 to the value specified by Value.\r
1651\r
1652 @param[in] TokenNumber The PCD token number to set a current value for.\r
1653 @param[in] Value The 8-bit value to set.\r
1654\r
1655 @return The status of the set operation.\r
1656\r
1657**/\r
1658RETURN_STATUS\r
1659EFIAPI\r
1660LibPcdSet8S (\r
1661 IN UINTN TokenNumber,\r
1662 IN UINT8 Value\r
1663 );\r
1664\r
1665/**\r
1666 This function provides a means by which to set a value for a given PCD token.\r
1667\r
1668 Sets the 16-bit value for the token specified by TokenNumber\r
1669 to the value specified by Value.\r
1670\r
1671 @param[in] TokenNumber The PCD token number to set a current value for.\r
1672 @param[in] Value The 16-bit value to set.\r
1673\r
1674 @return The status of the set operation.\r
1675\r
1676**/\r
1677RETURN_STATUS\r
1678EFIAPI\r
1679LibPcdSet16S (\r
1680 IN UINTN TokenNumber,\r
1681 IN UINT16 Value\r
1682 );\r
1683\r
1684/**\r
1685 This function provides a means by which to set a value for a given PCD token.\r
1686\r
1687 Sets the 32-bit value for the token specified by TokenNumber\r
1688 to the value specified by Value.\r
1689\r
1690 @param[in] TokenNumber The PCD token number to set a current value for.\r
1691 @param[in] Value The 32-bit value to set.\r
1692\r
1693 @return The status of the set operation.\r
1694\r
1695**/\r
1696RETURN_STATUS\r
1697EFIAPI\r
1698LibPcdSet32S (\r
1699 IN UINTN TokenNumber,\r
1700 IN UINT32 Value\r
1701 );\r
1702\r
1703/**\r
1704 This function provides a means by which to set a value for a given PCD token.\r
1705\r
1706 Sets the 64-bit value for the token specified by TokenNumber\r
1707 to the value specified by Value.\r
1708\r
1709 @param[in] TokenNumber The PCD token number to set a current value for.\r
1710 @param[in] Value The 64-bit value to set.\r
1711\r
1712 @return The status of the set operation.\r
1713\r
1714**/\r
1715RETURN_STATUS\r
1716EFIAPI\r
1717LibPcdSet64S (\r
1718 IN UINTN TokenNumber,\r
1719 IN UINT64 Value\r
1720 );\r
1721\r
1722/**\r
1723 This function provides a means by which to set a value for a given PCD token.\r
1724\r
1725 Sets a buffer for the token specified by TokenNumber to the value specified\r
1726 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r
1727 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r
1728 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation\r
1729 was not actually performed.\r
1730\r
1731 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the\r
1732 maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.\r
1733\r
1734 If SizeOfBuffer is NULL, then ASSERT().\r
1735 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1736\r
1737 @param[in] TokenNumber The PCD token number to set a current value for.\r
1738 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
1739 @param[in] Buffer A pointer to the buffer to set.\r
1740\r
1741 @return The status of the set operation.\r
1742\r
1743**/\r
1744RETURN_STATUS\r
1745EFIAPI\r
1746LibPcdSetPtrS (\r
1747 IN UINTN TokenNumber,\r
1748 IN OUT UINTN *SizeOfBuffer,\r
1749 IN CONST VOID *Buffer\r
1750 );\r
1751\r
1752/**\r
1753 This function provides a means by which to set a value for a given PCD token.\r
1754\r
1755 Sets the boolean value for the token specified by TokenNumber\r
1756 to the value specified by Value.\r
1757\r
1758 @param[in] TokenNumber The PCD token number to set a current value for.\r
1759 @param[in] Value The boolean value to set.\r
1760\r
1761 @return The status of the set operation.\r
1762\r
1763**/\r
1764RETURN_STATUS\r
1765EFIAPI\r
1766LibPcdSetBoolS (\r
1767 IN UINTN TokenNumber,\r
1768 IN BOOLEAN Value\r
1769 );\r
1770\r
1771/**\r
1772 This function provides a means by which to set a value for a given PCD token.\r
1773\r
1774 Sets the 8-bit value for the token specified by TokenNumber\r
1775 to the value specified by Value.\r
1776\r
1777 If Guid is NULL, then ASSERT().\r
1778\r
1779 @param[in] Guid The pointer to a 128-bit unique value that\r
1780 designates which namespace to set a value from.\r
1781 @param[in] TokenNumber The PCD token number to set a current value for.\r
1782 @param[in] Value The 8-bit value to set.\r
1783\r
1784 @return The status of the set operation.\r
1785\r
1786**/\r
1787RETURN_STATUS\r
1788EFIAPI\r
1789LibPcdSetEx8S (\r
1790 IN CONST GUID *Guid,\r
1791 IN UINTN TokenNumber,\r
1792 IN UINT8 Value\r
1793 );\r
1794\r
1795/**\r
1796 This function provides a means by which to set a value for a given PCD token.\r
1797\r
1798 Sets the 16-bit value for the token specified by TokenNumber\r
1799 to the value specified by Value.\r
1800\r
1801 If Guid is NULL, then ASSERT().\r
1802\r
1803 @param[in] Guid The pointer to a 128-bit unique value that\r
1804 designates which namespace to set a value from.\r
1805 @param[in] TokenNumber The PCD token number to set a current value for.\r
1806 @param[in] Value The 16-bit value to set.\r
1807\r
1808 @return The status of the set operation.\r
1809\r
1810**/\r
1811RETURN_STATUS\r
1812EFIAPI\r
1813LibPcdSetEx16S (\r
1814 IN CONST GUID *Guid,\r
1815 IN UINTN TokenNumber,\r
1816 IN UINT16 Value\r
1817 );\r
1818\r
1819/**\r
1820 This function provides a means by which to set a value for a given PCD token.\r
1821\r
1822 Sets the 32-bit value for the token specified by TokenNumber\r
1823 to the value specified by Value.\r
1824\r
1825 If Guid is NULL, then ASSERT().\r
1826\r
1827 @param[in] Guid The pointer to a 128-bit unique value that\r
1828 designates which namespace to set a value from.\r
1829 @param[in] TokenNumber The PCD token number to set a current value for.\r
1830 @param[in] Value The 32-bit value to set.\r
1831\r
1832 @return The status of the set operation.\r
1833\r
1834**/\r
1835RETURN_STATUS\r
1836EFIAPI\r
1837LibPcdSetEx32S (\r
1838 IN CONST GUID *Guid,\r
1839 IN UINTN TokenNumber,\r
1840 IN UINT32 Value\r
1841 );\r
1842\r
1843/**\r
1844 This function provides a means by which to set a value for a given PCD token.\r
1845\r
1846 Sets the 64-bit value for the token specified by TokenNumber\r
1847 to the value specified by Value.\r
1848\r
1849 If Guid is NULL, then ASSERT().\r
1850\r
1851 @param[in] Guid The pointer to a 128-bit unique value that\r
1852 designates which namespace to set a value from.\r
1853 @param[in] TokenNumber The PCD token number to set a current value for.\r
1854 @param[in] Value The 64-bit value to set.\r
1855\r
1856 @return The status of the set operation.\r
1857\r
1858**/\r
1859RETURN_STATUS\r
1860EFIAPI\r
1861LibPcdSetEx64S (\r
1862 IN CONST GUID *Guid,\r
1863 IN UINTN TokenNumber,\r
1864 IN UINT64 Value\r
1865 );\r
1866\r
1867/**\r
1868 This function provides a means by which to set a value for a given PCD token.\r
1869\r
1870 Sets a buffer for the token specified by TokenNumber to the value specified by\r
1871 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r
1872 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r
1873 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation\r
1874 was not actually performed.\r
1875\r
1876 If Guid is NULL, then ASSERT().\r
1877 If SizeOfBuffer is NULL, then ASSERT().\r
1878 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1879\r
1880 @param[in] Guid Pointer to a 128-bit unique value that\r
1881 designates which namespace to set a value from.\r
1882 @param[in] TokenNumber The PCD token number to set a current value for.\r
1883 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
1884 @param[in] Buffer A pointer to the buffer to set.\r
1885\r
1886 @return The status of the set operation.\r
1887\r
1888**/\r
1889RETURN_STATUS\r
1890EFIAPI\r
1891LibPcdSetExPtrS (\r
1892 IN CONST GUID *Guid,\r
1893 IN UINTN TokenNumber,\r
1894 IN OUT UINTN *SizeOfBuffer,\r
1895 IN VOID *Buffer\r
1896 );\r
1897\r
1898/**\r
1899 This function provides a means by which to set a value for a given PCD token.\r
1900\r
1901 Sets the boolean value for the token specified by TokenNumber\r
1902 to the value specified by Value.\r
1903\r
1904 If Guid is NULL, then ASSERT().\r
1905\r
1906 @param[in] Guid The pointer to a 128-bit unique value that\r
1907 designates which namespace to set a value from.\r
1908 @param[in] TokenNumber The PCD token number to set a current value for.\r
1909 @param[in] Value The boolean value to set.\r
1910\r
1911 @return The status of the set operation.\r
1912\r
1913**/\r
1914RETURN_STATUS\r
1915EFIAPI\r
1916LibPcdSetExBoolS (\r
1917 IN CONST GUID *Guid,\r
1918 IN UINTN TokenNumber,\r
1919 IN BOOLEAN Value\r
1920 );\r
fb3df220 1921\r
1922/**\r
b677694d 1923 This notification function serves two purposes.\r
fb3df220 1924\r
1a2f870c 1925 Firstly, it notifies the module that did the registration that the value of this\r
b677694d 1926 PCD token has been set.\r
1a2f870c 1927 Secondly, it provides a mechanism for the module that did the registration to intercept\r
b677694d 1928 the set operation and override the value been set if necessary. After the invocation of\r
1929 the callback function, TokenData will be used by PCD service PEIM or driver to modify th\r
9095d37b 1930 internal data in PCD database.\r
fb3df220 1931\r
2a254b90 1932 @param[in] CallBackGuid The PCD token GUID being set.\r
1933 @param[in] CallBackToken The PCD token number being set.\r
1934 @param[in, out] TokenData A pointer to the token data being set.\r
1935 @param[in] TokenDataSize The size, in bytes, of the data being set.\r
fb3df220 1936\r
fb3df220 1937**/\r
1938typedef\r
1939VOID\r
78bf8f2d 1940(EFIAPI *PCD_CALLBACK)(\r
fb3df220 1941 IN CONST GUID *CallBackGuid, OPTIONAL\r
1942 IN UINTN CallBackToken,\r
1943 IN OUT VOID *TokenData,\r
1944 IN UINTN TokenDataSize\r
1945 );\r
1946\r
1947\r
1948/**\r
64735d24 1949 Set up a notification function that is called when a specified token is set.\r
9095d37b
LG
1950\r
1951 When the token specified by TokenNumber and Guid is set,\r
1952 then notification function specified by NotificationFunction is called.\r
b677694d 1953 If Guid is NULL, then the default token space is used.\r
fb3df220 1954 If NotificationFunction is NULL, then ASSERT().\r
1955\r
9095d37b
LG
1956 @param[in] Guid Pointer to a 128-bit unique value that designates which\r
1957 namespace to set a value from. If NULL, then the default\r
b677694d 1958 token space is used.\r
1959 @param[in] TokenNumber The PCD token number to monitor.\r
9095d37b 1960 @param[in] NotificationFunction The function to call when the token\r
fb287b56 1961 specified by Guid and TokenNumber is set.\r
fb3df220 1962\r
1963**/\r
1964VOID\r
1965EFIAPI\r
1966LibPcdCallbackOnSet (\r
1967 IN CONST GUID *Guid, OPTIONAL\r
1968 IN UINTN TokenNumber,\r
1969 IN PCD_CALLBACK NotificationFunction\r
1970 );\r
1971\r
1972\r
1973/**\r
1974 Disable a notification function that was established with LibPcdCallbackonSet().\r
9095d37b 1975\r
b677694d 1976 Disable a notification function that was previously established with LibPcdCallbackOnSet().\r
64735d24 1977 If NotificationFunction is NULL, then ASSERT().\r
9095d37b 1978 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,\r
64735d24 1979 and NotificationFunction, then ASSERT().\r
9095d37b 1980\r
b677694d 1981 @param[in] Guid Specify the GUID token space.\r
1982 @param[in] TokenNumber Specify the token number.\r
fb3df220 1983 @param[in] NotificationFunction The callback function to be unregistered.\r
1984\r
fb3df220 1985**/\r
1986VOID\r
1987EFIAPI\r
1988LibPcdCancelCallback (\r
1989 IN CONST GUID *Guid, OPTIONAL\r
1990 IN UINTN TokenNumber,\r
1991 IN PCD_CALLBACK NotificationFunction\r
1992 );\r
1993\r
1994\r
1995/**\r
64735d24 1996 Retrieves the next token in a token space.\r
9095d37b
LG
1997\r
1998 Retrieves the next PCD token number from the token space specified by Guid.\r
1999 If Guid is NULL, then the default token space is used. If TokenNumber is 0,\r
2000 then the first token number is returned. Otherwise, the token number that\r
2001 follows TokenNumber in the token space is returned. If TokenNumber is the last\r
2002 token number in the token space, then 0 is returned.\r
2003\r
64735d24 2004 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r
fb3df220 2005\r
9095d37b 2006 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace\r
2a254b90 2007 to set a value from. If NULL, then the default token space is used.\r
9095d37b 2008 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD\r
2a254b90 2009 token number.\r
fb3df220 2010\r
f73e0ad2 2011 @return The next valid token number.\r
fb3df220 2012\r
2013**/\r
9095d37b 2014UINTN\r
fb3df220 2015EFIAPI\r
2016LibPcdGetNextToken (\r
2017 IN CONST GUID *Guid, OPTIONAL\r
2018 IN UINTN TokenNumber\r
2019 );\r
2020\r
2021\r
2022\r
2023/**\r
64735d24 2024 Used to retrieve the list of available PCD token space GUIDs.\r
9095d37b 2025\r
b677694d 2026 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces\r
2027 in the platform.\r
2028 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.\r
2029 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.\r
9095d37b 2030\r
b677694d 2031 @param TokenSpaceGuid Pointer to the a PCD token space GUID\r
fb3df220 2032\r
f73e0ad2 2033 @return The next valid token namespace.\r
fb3df220 2034\r
2035**/\r
b677694d 2036GUID *\r
fb3df220 2037EFIAPI\r
2038LibPcdGetNextTokenSpace (\r
64735d24 2039 IN CONST GUID *TokenSpaceGuid\r
fb3df220 2040 );\r
2041\r
2042\r
2043/**\r
64735d24 2044 Sets a value of a patchable PCD entry that is type pointer.\r
9095d37b
LG
2045\r
2046 Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r
2047 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
2048 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r
2049 NULL to indicate that the set operation was not actually performed.\r
2050 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
fb3df220 2051 MaximumDatumSize and NULL must be returned.\r
9095d37b 2052\r
fb3df220 2053 If PatchVariable is NULL, then ASSERT().\r
d3057543 2054 If SizeOfBuffer is NULL, then ASSERT().\r
2055 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
fb3df220 2056\r
9095d37b 2057 @param[out] PatchVariable A pointer to the global variable in a module that is\r
fb3df220 2058 the target of the set operation.\r
2059 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
2060 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
2061 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 2062\r
502bfcef 2063 @return Return the pointer to the Buffer that was set.\r
fb3df220 2064\r
2065**/\r
2066VOID *\r
2067EFIAPI\r
2068LibPatchPcdSetPtr (\r
f8308f0a 2069 OUT VOID *PatchVariable,\r
fb3df220 2070 IN UINTN MaximumDatumSize,\r
2071 IN OUT UINTN *SizeOfBuffer,\r
2072 IN CONST VOID *Buffer\r
2073 );\r
2074\r
9a355841
SZ
2075/**\r
2076 Sets a value of a patchable PCD entry that is type pointer.\r
2077\r
2078 Sets the PCD entry specified by PatchVariable to the value specified\r
2079 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r
2080 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r
2081 to indicate that the set operation was not actually performed.\r
2082 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
2083 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r
2084\r
2085 If PatchVariable is NULL, then ASSERT().\r
2086 If SizeOfBuffer is NULL, then ASSERT().\r
2087 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
2088\r
f8308f0a 2089 @param[out] PatchVariable A pointer to the global variable in a module that is\r
9a355841
SZ
2090 the target of the set operation.\r
2091 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
2092 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
2093 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 2094\r
9a355841
SZ
2095 @return The status of the set operation.\r
2096\r
2097**/\r
2098RETURN_STATUS\r
2099EFIAPI\r
2100LibPatchPcdSetPtrS (\r
f8308f0a
LG
2101 OUT VOID *PatchVariable,\r
2102 IN UINTN MaximumDatumSize,\r
2103 IN OUT UINTN *SizeOfBuffer,\r
2104 IN CONST VOID *Buffer\r
2105 );\r
2106\r
2107/**\r
2108 Sets a value and size of a patchable PCD entry that is type pointer.\r
9095d37b
LG
2109\r
2110 Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r
2111 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
2112 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r
2113 NULL to indicate that the set operation was not actually performed.\r
2114 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
f8308f0a 2115 MaximumDatumSize and NULL must be returned.\r
9095d37b 2116\r
f8308f0a
LG
2117 If PatchVariable is NULL, then ASSERT().\r
2118 If SizeOfPatchVariable is NULL, then ASSERT().\r
2119 If SizeOfBuffer is NULL, then ASSERT().\r
2120 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
2121\r
9095d37b 2122 @param[out] PatchVariable A pointer to the global variable in a module that is\r
f8308f0a
LG
2123 the target of the set operation.\r
2124 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r
2125 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
2126 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
2127 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 2128\r
f8308f0a
LG
2129 @return Return the pointer to the Buffer that was set.\r
2130\r
2131**/\r
2132VOID *\r
2133EFIAPI\r
2134LibPatchPcdSetPtrAndSize (\r
2135 OUT VOID *PatchVariable,\r
2136 OUT UINTN *SizeOfPatchVariable,\r
2137 IN UINTN MaximumDatumSize,\r
2138 IN OUT UINTN *SizeOfBuffer,\r
2139 IN CONST VOID *Buffer\r
2140 );\r
2141\r
2142/**\r
2143 Sets a value and size of a patchable PCD entry that is type pointer.\r
2144\r
2145 Sets the PCD entry specified by PatchVariable to the value specified\r
2146 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r
2147 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r
2148 to indicate that the set operation was not actually performed.\r
2149 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
2150 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r
2151\r
2152 If PatchVariable is NULL, then ASSERT().\r
2153 If SizeOfPatchVariable is NULL, then ASSERT().\r
2154 If SizeOfBuffer is NULL, then ASSERT().\r
2155 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
2156\r
2157 @param[out] PatchVariable A pointer to the global variable in a module that is\r
2158 the target of the set operation.\r
2159 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r
2160 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
2161 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
2162 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 2163\r
f8308f0a
LG
2164 @return The status of the set operation.\r
2165\r
2166**/\r
2167RETURN_STATUS\r
2168EFIAPI\r
2169LibPatchPcdSetPtrAndSizeS (\r
2170 OUT VOID *PatchVariable,\r
2171 OUT UINTN *SizeOfPatchVariable,\r
9a355841
SZ
2172 IN UINTN MaximumDatumSize,\r
2173 IN OUT UINTN *SizeOfBuffer,\r
2174 IN CONST VOID *Buffer\r
2175 );\r
2176\r
96d6d004
SZ
2177typedef enum {\r
2178 PCD_TYPE_8,\r
2179 PCD_TYPE_16,\r
2180 PCD_TYPE_32,\r
2181 PCD_TYPE_64,\r
2182 PCD_TYPE_BOOL,\r
2183 PCD_TYPE_PTR\r
2184} PCD_TYPE;\r
2185\r
2186typedef struct {\r
2187 ///\r
2188 /// The returned information associated with the requested TokenNumber. If\r
2189 /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.\r
2190 ///\r
2191 PCD_TYPE PcdType;\r
2192 ///\r
2193 /// The size of the data in bytes associated with the TokenNumber specified. If\r
2194 /// TokenNumber is 0, then PcdSize is set 0.\r
2195 ///\r
2196 UINTN PcdSize;\r
2197 ///\r
2198 /// The null-terminated ASCII string associated with a given token. If the\r
2199 /// TokenNumber specified was 0, then this field corresponds to the null-terminated\r
2200 /// ASCII string associated with the token's namespace Guid. If NULL, there is no\r
2201 /// name associated with this request.\r
2202 ///\r
2203 CHAR8 *PcdName;\r
2204} PCD_INFO;\r
2205\r
2206\r
2207/**\r
2208 Retrieve additional information associated with a PCD token.\r
2209\r
2210 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
2211 human readable name that is associated with the token.\r
2212\r
2213 If TokenNumber is not in the default token space specified, then ASSERT().\r
2214\r
2215 @param[in] TokenNumber The PCD token number.\r
2216 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
2217 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
2218**/\r
2219VOID\r
2220EFIAPI\r
2221LibPcdGetInfo (\r
2222 IN UINTN TokenNumber,\r
2223 OUT PCD_INFO *PcdInfo\r
2224 );\r
2225\r
2226/**\r
2227 Retrieve additional information associated with a PCD token.\r
2228\r
2229 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
2230 human readable name that is associated with the token.\r
2231\r
2232 If TokenNumber is not in the token space specified by Guid, then ASSERT().\r
2233\r
2234 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
2235 @param[in] TokenNumber The PCD token number.\r
2236 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
2237 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
2238**/\r
2239VOID\r
2240EFIAPI\r
2241LibPcdGetInfoEx (\r
2242 IN CONST GUID *Guid,\r
2243 IN UINTN TokenNumber,\r
2244 OUT PCD_INFO *PcdInfo\r
2245 );\r
2246\r
2247/**\r
2248 Retrieve the currently set SKU Id.\r
2249\r
96d6d004
SZ
2250 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the\r
2251 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU\r
2252 Id is returned.\r
2253**/\r
2254UINTN\r
2255EFIAPI\r
2256LibPcdGetSku (\r
2257 VOID\r
2258 );\r
2259\r
fb3df220 2260#endif\r