]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/PcdLib.h
MdeModulePkg: Apply uncrustify changes
[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
9344f092 18SPDX-License-Identifier: BSD-2-Clause-Patent\r
fb3df220 19\r
fb3df220 20**/\r
21\r
22#ifndef __PCD_LIB_H__\r
23#define __PCD_LIB_H__\r
24\r
64735d24 25\r
26/**\r
27 Retrieves a token number based on a token name.\r
28\r
88fd27e5 29 Returns the token number associated with the PCD token specified by TokenName.\r
64735d24 30 If TokenName is not a valid token in the token space, then the module will not build.\r
64735d24 31\r
32 @param TokenName The name of the PCD token to retrieve the token number for.\r
33\r
34 @return The token number associated with the PCD.\r
35\r
36**/\r
fb3df220 37#define PcdToken(TokenName) _PCD_TOKEN_##TokenName\r
38\r
39\r
64735d24 40/**\r
41 Retrieves a Boolean PCD feature flag based on a token name.\r
42\r
43 Returns the Boolean value for the PCD feature flag specified by TokenName.\r
44 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 45 If TokenName is not a feature flag PCD, then the module will not build.\r
64735d24 46\r
47 @param TokenName The name of the PCD token to retrieve a current value for.\r
48\r
49 @return Boolean value for the PCD feature flag.\r
50\r
51**/\r
fb3df220 52#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r
53\r
54\r
64735d24 55/**\r
56 Retrieves an 8-bit fixed PCD token value based on a token name.\r
57\r
58 Returns the 8-bit value for the token specified by TokenName.\r
59 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 60 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 61\r
62 @param TokenName The name of the PCD token to retrieve a current value for.\r
63\r
64 @return 8-bit value for the token specified by TokenName.\r
65\r
66**/\r
fb3df220 67#define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName\r
64735d24 68\r
69\r
70/**\r
71 Retrieves a 16-bit fixed PCD token value based on a token name.\r
72\r
73 Returns the 16-bit value for the token specified by TokenName.\r
74 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 75 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 76\r
77 @param TokenName The name of the PCD token to retrieve a current value for.\r
78\r
79 @return 16-bit value for the token specified by TokenName.\r
80\r
81**/\r
fb3df220 82#define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName\r
64735d24 83\r
84\r
85/**\r
86 Retrieves a 32-bit fixed PCD token value based on a token name.\r
87\r
88 Returns the 32-bit value for the token specified by TokenName.\r
89 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 90 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 91\r
92 @param TokenName The name of the PCD token to retrieve a current value for.\r
93\r
94 @return 32-bit value for the token specified by TokenName.\r
95\r
96**/\r
fb3df220 97#define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName\r
64735d24 98\r
99\r
100/**\r
101 Retrieves a 64-bit fixed PCD token value based on a token name.\r
102\r
103 Returns the 64-bit value for the token specified by TokenName.\r
104 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 105 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 106\r
107 @param TokenName The name of the PCD token to retrieve a current value for.\r
108\r
109 @return 64-bit value for the token specified by TokenName.\r
110\r
111**/\r
fb3df220 112#define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName\r
64735d24 113\r
114\r
115/**\r
116 Retrieves a Boolean fixed PCD token value based on a token name.\r
117\r
118 Returns the Boolean value for the token specified by TokenName.\r
119 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 120 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 121\r
122 @param TokenName The name of the PCD token to retrieve a current value for.\r
123\r
9095d37b 124 @return The Boolean value for the token.\r
64735d24 125\r
126**/\r
fb3df220 127#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName\r
128\r
129\r
64735d24 130/**\r
131 Retrieves a pointer to a fixed PCD token buffer based on a token name.\r
132\r
133 Returns a pointer to the buffer for the token specified by TokenName.\r
134 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 135 If TokenName is not a fixed at build PCD, then the module will not build.\r
64735d24 136\r
137 @param TokenName The name of the PCD token to retrieve a current value for.\r
138\r
9095d37b 139 @return A pointer to the buffer.\r
64735d24 140\r
141**/\r
fb3df220 142#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)\r
143\r
144\r
64735d24 145/**\r
146 Retrieves an 8-bit binary patchable PCD token value based on a token name.\r
147\r
148 Returns the 8-bit value for the token specified by TokenName.\r
149 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 150 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 151\r
152 @param TokenName The name of the PCD token to retrieve a current value for.\r
153\r
154 @return An 8-bit binary patchable PCD token value.\r
155\r
156**/\r
fb3df220 157#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 158\r
159/**\r
160 Retrieves a 16-bit binary patchable PCD token value based on a token name.\r
161\r
162 Returns the 16-bit value for the token specified by TokenName.\r
163 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 164 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 165\r
166 @param TokenName The name of the PCD token to retrieve a current value for.\r
167\r
168 @return A 16-bit binary patchable PCD token value.\r
169\r
170**/\r
fb3df220 171#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 172\r
173\r
174/**\r
175 Retrieves a 32-bit binary patchable PCD token value based on a token name.\r
176\r
177 Returns the 32-bit value for the token specified by TokenName.\r
178 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 179 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 180\r
181 @param TokenName The name of the PCD token to retrieve a current value for.\r
182\r
183 @return A 32-bit binary patchable PCD token value.\r
184\r
185**/\r
fb3df220 186#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 187\r
188\r
189/**\r
190 Retrieves a 64-bit binary patchable PCD token value based on a token name.\r
191\r
192 Returns the 64-bit value for the token specified by TokenName.\r
193 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 194 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 195\r
196 @param TokenName The name of the PCD token to retrieve a current value for.\r
197\r
198 @return A 64-bit binary patchable PCD token value.\r
199\r
200**/\r
fb3df220 201#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 202\r
203\r
204/**\r
205 Retrieves a Boolean binary patchable PCD token value based on a token name.\r
206\r
207 Returns the Boolean value for the token specified by TokenName.\r
208 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 209 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 210\r
211 @param TokenName The name of the PCD token to retrieve a current value for.\r
212\r
213 @return The Boolean value for the token.\r
214\r
215**/\r
fb3df220 216#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName\r
64735d24 217\r
218\r
219/**\r
220 Retrieves a pointer to a binary patchable PCD token buffer based on a token name.\r
221\r
222 Returns a pointer to the buffer for the token specified by TokenName.\r
223 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 224 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 225\r
226 @param TokenName The name of the PCD token to retrieve a current value for.\r
227\r
228 @return A pointer to the buffer for the token.\r
229\r
230**/\r
fb3df220 231#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)\r
232\r
64735d24 233\r
234/**\r
235 Sets an 8-bit binary patchable PCD token value based on a token name.\r
236\r
237 Sets the 8-bit value for the token specified by TokenName. Value is returned.\r
238 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 239 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 240\r
241 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
242 @param Value The 8-bit value to set.\r
9095d37b 243\r
7b5b3124 244 @return Return the Value that was set.\r
64735d24 245\r
246**/\r
fb3df220 247#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 248\r
249\r
250/**\r
251 Sets a 16-bit binary patchable PCD token value based on a token name.\r
252\r
253 Sets the 16-bit value for the token specified by TokenName. Value is returned.\r
254 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 255 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 256\r
257 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
258 @param Value The 16-bit value to set.\r
259\r
7b5b3124 260 @return Return the Value that was set.\r
64735d24 261\r
262**/\r
fb3df220 263#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 264\r
265\r
266/**\r
267 Sets a 32-bit binary patchable PCD token value based on a token name.\r
268\r
269 Sets the 32-bit value for the token specified by TokenName. Value is returned.\r
270 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 271 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 272\r
273 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
274 @param Value The 32-bit value to set.\r
275\r
7b5b3124 276 @return Return the Value that was set.\r
64735d24 277\r
278**/\r
fb3df220 279#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 280\r
281\r
282/**\r
283 Sets a 64-bit binary patchable PCD token value based on a token name.\r
284\r
285 Sets the 64-bit value for the token specified by TokenName. Value is returned.\r
286 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 287 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 288\r
289 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
290 @param Value The 64-bit value to set.\r
291\r
7b5b3124 292 @return Return the Value that was set.\r
64735d24 293\r
294**/\r
fb3df220 295#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 296\r
297\r
298/**\r
299 Sets a Boolean binary patchable PCD token value based on a token name.\r
300\r
301 Sets the Boolean value for the token specified by TokenName. Value is returned.\r
302 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 303 If TokenName is not a patchable in module PCD, then the module will not build.\r
64735d24 304\r
305 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
306 @param Value The boolean value to set.\r
307\r
7b5b3124 308 @return Return the Value that was set.\r
64735d24 309\r
310**/\r
fb3df220 311#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
64735d24 312\r
313\r
314/**\r
315 Sets a pointer to a binary patchable PCD token buffer based on a token name.\r
316\r
9095d37b 317 Sets the buffer for the token specified by TokenName. Buffer is returned.\r
64735d24 318 If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer\r
9095d37b
LG
319 to the maximum size supported by TokenName and return NULL to indicate that the set operation\r
320 was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be\r
64735d24 321 set to the maximum size supported by TokenName and NULL must be returned.\r
322 If TokenName is not a valid token in the token space, then the module will not build.\r
88fd27e5 323 If TokenName is not a patchable in module PCD, then the module will not build.\r
9095d37b 324\r
64735d24 325 If SizeOfBuffer is NULL, then ASSERT().\r
326 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
9095d37b 327\r
64735d24 328 @param TokenName The name of the binary patchable PCD token to set the current value for.\r
329 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
330 @param Buffer Pointer to the value to set.\r
331\r
7b5b3124 332 @return Return the pointer to the Buffer that was set.\r
64735d24 333\r
334**/\r
fb3df220 335#define PatchPcdSetPtr(TokenName, Size, Buffer) \\r
f8308f0a
LG
336 LibPatchPcdSetPtrAndSize ( \\r
337 (VOID *)_gPcd_BinaryPatch_##TokenName, \\r
338 &_gPcd_BinaryPatch_Size_##TokenName, \\r
fb3df220 339 (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \\r
340 (Size), \\r
341 (Buffer) \\r
342 )\r
64735d24 343/**\r
344 Retrieves an 8-bit PCD token value based on a token name.\r
9095d37b 345\r
64735d24 346 Returns the 8-bit value for the token specified by TokenName.\r
347 If TokenName is not a valid token in the token space, then the module will not build.\r
9095d37b 348\r
64735d24 349 @param TokenName The name of the PCD token to retrieve a current value for.\r
350\r
351 @return 8-bit value for the token specified by TokenName.\r
352\r
353**/\r
fb3df220 354#define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName\r
64735d24 355\r
356\r
357/**\r
358 Retrieves a 16-bit PCD token value based on a token name.\r
359\r
360 Returns the 16-bit value for the token specified by TokenName.\r
361 If TokenName is not a valid token in the token space, then the module will not build.\r
362\r
363 @param TokenName The name of the PCD token to retrieve a current value for.\r
364\r
365 @return 16-bit value for the token specified by TokenName.\r
366\r
367**/\r
fb3df220 368#define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName\r
64735d24 369\r
370\r
371/**\r
372 Retrieves a 32-bit PCD token value based on a token name.\r
373\r
374 Returns the 32-bit value for the token specified by TokenName.\r
375 If TokenName is not a valid token in the token space, then the module will not build.\r
376\r
377 @param TokenName The name of the PCD token to retrieve a current value for.\r
378\r
379 @return 32-bit value for the token specified by TokenName.\r
380\r
381**/\r
fb3df220 382#define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName\r
64735d24 383\r
384\r
385/**\r
386 Retrieves a 64-bit PCD token value based on a token name.\r
387\r
388 Returns the 64-bit value for the token specified by TokenName.\r
389 If TokenName is not a valid token in the token space, then the module will not build.\r
390\r
391 @param TokenName The name of the PCD token to retrieve a current value for.\r
392\r
393 @return 64-bit value for the token specified by TokenName.\r
394\r
395**/\r
fb3df220 396#define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName\r
64735d24 397\r
398\r
399/**\r
400 Retrieves a pointer to a PCD token buffer based on a token name.\r
401\r
402 Returns a pointer to the buffer for the token specified by TokenName.\r
403 If TokenName is not a valid token in the token space, then the module will not build.\r
404\r
405 @param TokenName The name of the PCD token to retrieve a current value for.\r
406\r
407 @return A pointer to the buffer.\r
408\r
409**/\r
fb3df220 410#define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName\r
64735d24 411\r
412\r
413/**\r
414 Retrieves a Boolean PCD token value based on a token name.\r
415\r
416 Returns the Boolean value for the token specified by TokenName.\r
417 If TokenName is not a valid token in the token space, then the module will not build.\r
418\r
419 @param TokenName The name of the PCD token to retrieve a current value for.\r
420\r
421 @return A Boolean PCD token value.\r
422\r
423**/\r
fb3df220 424#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r
425\r
64735d24 426\r
bf8e99a4
LG
427/**\r
428 Retrieves the size of a fixed PCD token based on a token name.\r
429\r
430 Returns the size of the token specified by TokenName.\r
431 If TokenName is not a valid token in the token space, then the module will not build.\r
432\r
433 @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r
434\r
435 @return Return the size\r
436\r
437**/\r
438#define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName\r
439\r
440\r
441/**\r
442 Retrieves the size of a binary patchable PCD token based on a token name.\r
443\r
444 Returns the size of the token specified by TokenName.\r
445 If TokenName is not a valid token in the token space, then the module will not build.\r
446\r
447 @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r
448\r
449 @return Return the size\r
450\r
451**/\r
452#define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName\r
453\r
454\r
455/**\r
456 Retrieves the size of the PCD token based on a token name.\r
9095d37b 457\r
bf8e99a4
LG
458 Returns the size of the token specified by TokenName.\r
459 If TokenName is not a valid token in the token space, then the module will not build.\r
9095d37b 460\r
bf8e99a4
LG
461 @param[in] TokenName The name of the PCD token to retrieve a current value size for.\r
462\r
463 @return Return the size\r
464\r
465**/\r
466#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName\r
467\r
468\r
469/**\r
470 Retrieve the size of a given PCD token.\r
bf8e99a4 471\r
9095d37b
LG
472 Returns the size of the token specified by TokenNumber and Guid.\r
473 If Guid is NULL, then ASSERT().\r
474\r
475 @param[in] Guid Pointer to a 128-bit unique value that designates\r
bf8e99a4
LG
476 which namespace to retrieve a value from.\r
477 @param[in] TokenNumber The PCD token number to retrieve a current value size for.\r
478\r
479 @return Return the size.\r
480\r
481**/\r
482#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))\r
483\r
9a355841
SZ
484/**\r
485 Sets a 8-bit PCD token value based on a token name.\r
486\r
487 Sets the 8-bit value for the token specified by TokenName.\r
488 If TokenName is not a valid token in the token space, then the module will not build.\r
489\r
490 @param TokenName The name of the PCD token to retrieve a current value for.\r
491 @param Value The 8-bit value to set.\r
492\r
493 @return The status of the set operation.\r
494\r
495**/\r
496#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))\r
497\r
498/**\r
499 Sets a 16-bit PCD token value based on a token name.\r
500\r
501 Sets the 16-bit value for the token specified by TokenName.\r
502 If TokenName is not a valid token in the token space, then the module will not build.\r
503\r
504 @param TokenName The name of the PCD token to retrieve a current value for.\r
505 @param Value The 16-bit value to set.\r
506\r
507 @return The status of the set operation.\r
fb3df220 508\r
9a355841
SZ
509**/\r
510#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))\r
511\r
512/**\r
513 Sets a 32-bit PCD token value based on a token name.\r
514\r
515 Sets the 32-bit value for the token specified by TokenName.\r
516 If TokenName is not a valid token in the token space, then the module will not build.\r
517\r
518 @param TokenName The name of the PCD token to retrieve a current value for.\r
519 @param Value The 32-bit value to set.\r
520\r
521 @return The status of the set operation.\r
522\r
523**/\r
524#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))\r
525\r
526/**\r
527 Sets a 64-bit PCD token value based on a token name.\r
528\r
529 Sets the 64-bit value for the token specified by TokenName.\r
530 If TokenName is not a valid token in the token space, then the module will not build.\r
531\r
532 @param TokenName The name of the PCD token to retrieve a current value for.\r
533 @param Value The 64-bit value to set.\r
534\r
535 @return The status of the set operation.\r
536\r
537**/\r
538#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))\r
539\r
540/**\r
541 Sets a pointer to a PCD token buffer based on a token name.\r
542\r
543 Sets the buffer for the token specified by TokenName.\r
544 If SizeOfBuffer is greater than the maximum size supported by TokenName,\r
545 then set SizeOfBuffer to the maximum size supported by TokenName and return\r
546 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.\r
547 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size\r
548 supported by TokenName and RETURN_INVALID_PARAMETER must be returned.\r
549 If TokenName is not a valid token in the token space, then the module will not build.\r
550\r
551 If SizeOfBuffer is NULL, then ASSERT().\r
552 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
553\r
554 @param TokenName The name of the PCD token to set the current value for.\r
555 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
556 @param Buffer A pointer to the buffer to set.\r
557\r
558 @return The status of the set operation.\r
559\r
560**/\r
561#define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \\r
562 _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))\r
563\r
564\r
565\r
566/**\r
567 Sets a boolean PCD token value based on a token name.\r
568\r
569 Sets the boolean value for the token specified by TokenName.\r
570 If TokenName is not a valid token in the token space, then the module will not build.\r
571\r
572 @param TokenName The name of the PCD token to retrieve a current value for.\r
573 @param Value The boolean value to set.\r
574\r
575 @return The status of the set operation.\r
576\r
577**/\r
578#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))\r
64735d24 579\r
419db80b
BF
580/**\r
581 Retrieves a token number based on a GUID and a token name.\r
582\r
583 Returns the token number for the token specified by Guid and TokenName.\r
88fd27e5 584 If TokenName is not a valid token in the token space, then the module will not build.\r
419db80b 585\r
9095d37b 586 @param Guid Pointer to a 128-bit unique value that designates\r
419db80b 587 which namespace to retrieve a value from.\r
9095d37b 588 @param TokenName The name of the PCD token to retrieve a current value for.\r
419db80b
BF
589\r
590 @return Return the token number.\r
591\r
592**/\r
593#define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)\r
594\r
64735d24 595/**\r
596 Retrieves an 8-bit PCD token value based on a GUID and a token name.\r
597\r
598 Returns the 8-bit value for the token specified by Guid and TokenName.\r
9095d37b 599 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 600 then the module will not build.\r
9095d37b 601\r
64735d24 602 If Guid is NULL, then ASSERT().\r
603\r
9095d37b 604 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 605 which namespace to retrieve a value from.\r
9095d37b 606 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 607\r
608 @return An 8-bit PCD token value.\r
609\r
610**/\r
419db80b 611#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 612\r
613/**\r
614 Retrieves a 16-bit PCD token value based on a GUID and a token name.\r
615\r
616 Returns the 16-bit value for the token specified by Guid and TokenName.\r
9095d37b 617 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 618 then the module will not build.\r
619\r
620 If Guid is NULL, then ASSERT().\r
621\r
9095d37b 622 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 623 which namespace to retrieve a value from.\r
9095d37b 624 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 625\r
626 @return A 16-bit PCD token value.\r
627\r
628**/\r
419db80b 629#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 630\r
631\r
632/**\r
633 Retrieves a 32-bit PCD token value based on a GUID and a token name.\r
634\r
635 Returns the 32-bit value for the token specified by Guid and TokenName.\r
9095d37b 636 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 637 then the module will not build.\r
638\r
639 If Guid is NULL, then ASSERT().\r
640\r
9095d37b 641 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 642 which namespace to retrieve a value from.\r
9095d37b 643 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 644\r
645 @return A 32-bit PCD token value.\r
646\r
647**/\r
419db80b 648#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 649\r
650\r
651/**\r
652 Retrieves a 64-bit PCD token value based on a GUID and a token name.\r
653\r
654 Returns the 64-bit value for the token specified by Guid and TokenName.\r
9095d37b 655 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 656 then the module will not build.\r
657\r
658 If Guid is NULL, then ASSERT().\r
659\r
9095d37b 660 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 661 which namespace to retrieve a value from.\r
9095d37b 662 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 663\r
664 @return A 64-bit PCD token value.\r
665\r
666**/\r
419db80b 667#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 668\r
669\r
670/**\r
671 Retrieves a pointer to a PCD token buffer based on a GUID and a token name.\r
672\r
673 Returns a pointer to the buffer for the token specified by Guid and TokenName.\r
9095d37b 674 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 675 then the module will not build.\r
676\r
677 If Guid is NULL, then ASSERT().\r
678\r
9095d37b 679 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 680 which namespace to retrieve a value from.\r
9095d37b 681 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 682\r
683 @return A pointer to a PCD token buffer.\r
684\r
685**/\r
419db80b 686#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))\r
64735d24 687\r
688\r
689/**\r
690 Retrieves a Boolean PCD token value based on a GUID and a token name.\r
691\r
692 Returns the Boolean value for the token specified by Guid and TokenName.\r
9095d37b 693 If TokenName is not a valid token in the token space specified by Guid,\r
64735d24 694 then the module will not build.\r
695\r
696 If Guid is NULL, then ASSERT().\r
697\r
9095d37b 698 @param Guid Pointer to a 128-bit unique value that designates\r
64735d24 699 which namespace to retrieve a value from.\r
9095d37b 700 @param TokenName The name of the PCD token to retrieve a current value for.\r
64735d24 701\r
702 @return A Boolean PCD token value.\r
703\r
704**/\r
419db80b 705#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))\r
fb3df220 706\r
64735d24 707\r
9a355841 708\r
9a355841
SZ
709/**\r
710 Sets an 8-bit PCD token value based on a GUID and a token name.\r
711\r
712 Sets the 8-bit value for the token specified by Guid and TokenName.\r
713 If TokenName is not a valid token in the token space specified by Guid,\r
714 then the module will not build.\r
fb3df220 715\r
9a355841
SZ
716 If Guid is NULL, then ASSERT().\r
717\r
718 @param Guid Pointer to a 128-bit unique value that designates\r
719 which namespace to retrieve a value from.\r
720 @param TokenName The name of the PCD token to set the current value for.\r
721 @param Value The 8-bit value to set.\r
722\r
723 @return The status of the set operation.\r
724\r
725**/\r
726#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
727\r
728/**\r
729 Sets an 16-bit PCD token value based on a GUID and a token name.\r
730\r
731 Sets the 16-bit value for the token specified by Guid and TokenName.\r
732 If TokenName is not a valid token in the token space specified by Guid,\r
733 then the module will not build.\r
734\r
735 If Guid is NULL, then ASSERT().\r
736\r
737 @param Guid Pointer to a 128-bit unique value that designates\r
738 which namespace to retrieve a value from.\r
739 @param TokenName The name of the PCD token to set the current value for.\r
740 @param Value The 16-bit value to set.\r
741\r
742 @return The status of the set operation.\r
743\r
744**/\r
745#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
746\r
747/**\r
748 Sets an 32-bit PCD token value based on a GUID and a token name.\r
749\r
750 Sets the 32-bit value for the token specified by Guid and TokenName.\r
751 If TokenName is not a valid token in the token space specified by Guid,\r
752 then the module will not build.\r
753\r
754 If Guid is NULL, then ASSERT().\r
755\r
756 @param Guid Pointer to a 128-bit unique value that designates\r
757 which namespace to retrieve a value from.\r
758 @param TokenName The name of the PCD token to set the current value for.\r
759 @param Value The 32-bit value to set.\r
760\r
761 @return The status of the set operation.\r
762\r
763**/\r
764#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
765\r
766/**\r
767 Sets an 64-bit PCD token value based on a GUID and a token name.\r
768\r
769 Sets the 64-bit value for the token specified by Guid and TokenName.\r
770 If TokenName is not a valid token in the token space specified by Guid,\r
771 then the module will not build.\r
772\r
773 If Guid is NULL, then ASSERT().\r
774\r
775 @param Guid Pointer to a 128-bit unique value that designates\r
776 which namespace to retrieve a value from.\r
777 @param TokenName The name of the PCD token to set the current value for.\r
778 @param Value The 64-bit value to set.\r
779\r
780 @return The status of the set operation.\r
781\r
782**/\r
783#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
784\r
785/**\r
786 Sets a pointer to a PCD token buffer based on a GUID and a token name.\r
787\r
788 Sets the buffer for the token specified by Guid and TokenName.\r
789 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,\r
790 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return\r
791 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.\r
792 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size\r
793 supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.\r
794 If TokenName is not a valid token in the token space specified by Guid,\r
795 then the module will not build.\r
796\r
797 If Guid is NULL, then ASSERT().\r
798 If SizeOfBuffer is NULL, then ASSERT().\r
799 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
800\r
801 @param Guid Pointer to a 128-bit unique value that designates\r
802 which namespace to retrieve a value from.\r
803 @param TokenName The name of the PCD token to set the current value for.\r
804 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
805 @param Buffer Pointer to the buffer to set.\r
806\r
807 @return The status of the set operation.\r
808\r
809**/\r
810#define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \\r
811 LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))\r
812\r
813\r
814/**\r
815 Sets an boolean PCD token value based on a GUID and a token name.\r
816\r
817 Sets the boolean value for the token specified by Guid and TokenName.\r
818 If TokenName is not a valid token in the token space specified by Guid,\r
819 then the module will not build.\r
820\r
821 If Guid is NULL, then ASSERT().\r
822\r
823 @param Guid Pointer to a 128-bit unique value that designates\r
824 which namespace to retrieve a value from.\r
825 @param TokenName The name of the PCD token to set the current value for.\r
826 @param Value The boolean value to set.\r
827\r
828 @return The status of the set operation.\r
829\r
830**/\r
831#define PcdSetExBoolS(Guid, TokenName, Value) \\r
832 LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))\r
fb3df220 833\r
834/**\r
64735d24 835 This function provides a means by which SKU support can be established in the PCD infrastructure.\r
836\r
fb3df220 837 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r
838\r
b677694d 839 @param SkuId The SKU value that will be used when the PCD service retrieves and sets values\r
840 associated with a PCD token.\r
fb3df220 841\r
1a2f870c 842 @return Return the SKU ID that was set.\r
fb3df220 843\r
844**/\r
845UINTN\r
846EFIAPI\r
847LibPcdSetSku (\r
848 IN UINTN SkuId\r
849 );\r
850\r
851\r
852/**\r
64735d24 853 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
854\r
855 Returns the 8-bit value for the token specified by TokenNumber.\r
fb3df220 856\r
2a254b90 857 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 858\r
9095d37b 859 @return Returns the 8-bit value for the token specified by TokenNumber.\r
fb3df220 860\r
861**/\r
862UINT8\r
863EFIAPI\r
864LibPcdGet8 (\r
865 IN UINTN TokenNumber\r
866 );\r
867\r
868\r
869/**\r
64735d24 870 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
871\r
872 Returns the 16-bit value for the token specified by TokenNumber.\r
fb3df220 873\r
2a254b90 874 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 875\r
9095d37b 876 @return Returns the 16-bit value for the token specified by TokenNumber.\r
fb3df220 877\r
878**/\r
879UINT16\r
880EFIAPI\r
881LibPcdGet16 (\r
882 IN UINTN TokenNumber\r
883 );\r
884\r
885\r
886/**\r
64735d24 887 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
888\r
889 Returns the 32-bit value for the token specified by TokenNumber.\r
fb3df220 890\r
891 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
892\r
f73e0ad2 893 @return Returns the 32-bit value for the token specified by TokenNumber.\r
fb3df220 894\r
895**/\r
896UINT32\r
897EFIAPI\r
898LibPcdGet32 (\r
899 IN UINTN TokenNumber\r
900 );\r
901\r
902\r
903/**\r
64735d24 904 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 905\r
fb3df220 906 Returns the 64-bit value for the token specified by TokenNumber.\r
907\r
908 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
909\r
f73e0ad2 910 @return Returns the 64-bit value for the token specified by TokenNumber.\r
fb3df220 911\r
912**/\r
913UINT64\r
914EFIAPI\r
915LibPcdGet64 (\r
916 IN UINTN TokenNumber\r
917 );\r
918\r
919\r
920/**\r
64735d24 921 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 922\r
fb3df220 923 Returns the pointer to the buffer of the token specified by TokenNumber.\r
924\r
925 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
926\r
f73e0ad2 927 @return Returns the pointer to the token specified by TokenNumber.\r
fb3df220 928\r
929**/\r
930VOID *\r
931EFIAPI\r
932LibPcdGetPtr (\r
933 IN UINTN TokenNumber\r
934 );\r
935\r
936\r
937/**\r
64735d24 938 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b
LG
939\r
940 Returns the Boolean value of the token specified by TokenNumber.\r
fb3df220 941\r
942 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
943\r
9095d37b 944 @return Returns the Boolean value of the token specified by TokenNumber.\r
fb3df220 945\r
946**/\r
9095d37b 947BOOLEAN\r
fb3df220 948EFIAPI\r
949LibPcdGetBool (\r
950 IN UINTN TokenNumber\r
951 );\r
952\r
953\r
954/**\r
64735d24 955 This function provides a means by which to retrieve the size of a given PCD token.\r
fb3df220 956\r
957 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
958\r
9095d37b 959 @return Returns the size of the token specified by TokenNumber.\r
fb3df220 960\r
961**/\r
962UINTN\r
963EFIAPI\r
964LibPcdGetSize (\r
965 IN UINTN TokenNumber\r
966 );\r
967\r
968\r
969/**\r
64735d24 970 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 971\r
fb3df220 972 Returns the 8-bit value for the token specified by TokenNumber and Guid.\r
fb3df220 973\r
9095d37b
LG
974 If Guid is NULL, then ASSERT().\r
975\r
976 @param[in] Guid Pointer to a 128-bit unique value that designates\r
b677694d 977 which namespace to retrieve a value from.\r
978 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 979\r
f73e0ad2 980 @return Return the UINT8.\r
fb3df220 981\r
982**/\r
983UINT8\r
984EFIAPI\r
985LibPcdGetEx8 (\r
986 IN CONST GUID *Guid,\r
987 IN UINTN TokenNumber\r
988 );\r
989\r
990\r
991/**\r
64735d24 992 This function provides a means by which to retrieve a value for a given PCD token.\r
993\r
fb3df220 994 Returns the 16-bit value for the token specified by TokenNumber and Guid.\r
fb3df220 995\r
9095d37b
LG
996 If Guid is NULL, then ASSERT().\r
997\r
998 @param[in] Guid Pointer to a 128-bit unique value that designates\r
b677694d 999 which namespace to retrieve a value from.\r
1000 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1001\r
f73e0ad2 1002 @return Return the UINT16.\r
fb3df220 1003\r
1004**/\r
1005UINT16\r
1006EFIAPI\r
1007LibPcdGetEx16 (\r
1008 IN CONST GUID *Guid,\r
1009 IN UINTN TokenNumber\r
1010 );\r
1011\r
1012\r
1013/**\r
1014 Returns the 32-bit value for the token specified by TokenNumber and Guid.\r
9095d37b 1015 If Guid is NULL, then ASSERT().\r
fb3df220 1016\r
9095d37b 1017 @param[in] Guid Pointer to a 128-bit unique value that designates\r
b677694d 1018 which namespace to retrieve a value from.\r
1019 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1020\r
f73e0ad2 1021 @return Return the UINT32.\r
fb3df220 1022\r
1023**/\r
1024UINT32\r
1025EFIAPI\r
1026LibPcdGetEx32 (\r
1027 IN CONST GUID *Guid,\r
1028 IN UINTN TokenNumber\r
1029 );\r
1030\r
1031\r
1032/**\r
64735d24 1033 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 1034\r
fb3df220 1035 Returns the 64-bit value for the token specified by TokenNumber and Guid.\r
fb3df220 1036\r
9095d37b
LG
1037 If Guid is NULL, then ASSERT().\r
1038\r
1039 @param[in] Guid Pointer to a 128-bit unique value that designates\r
fb287b56 1040 which namespace to retrieve a value from.\r
1041 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1042\r
f73e0ad2 1043 @return Return the UINT64.\r
fb3df220 1044\r
1045**/\r
1046UINT64\r
1047EFIAPI\r
1048LibPcdGetEx64 (\r
1049 IN CONST GUID *Guid,\r
1050 IN UINTN TokenNumber\r
1051 );\r
1052\r
1053\r
1054/**\r
64735d24 1055 This function provides a means by which to retrieve a value for a given PCD token.\r
9095d37b 1056\r
fb3df220 1057 Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r
fb3df220 1058\r
9095d37b
LG
1059 If Guid is NULL, then ASSERT().\r
1060\r
1061 @param[in] Guid Pointer to a 128-bit unique value that designates\r
fb287b56 1062 which namespace to retrieve a value from.\r
1063 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1064\r
f73e0ad2 1065 @return Return the VOID* pointer.\r
fb3df220 1066\r
1067**/\r
1068VOID *\r
1069EFIAPI\r
1070LibPcdGetExPtr (\r
1071 IN CONST GUID *Guid,\r
1072 IN UINTN TokenNumber\r
1073 );\r
1074\r
1075\r
1076/**\r
64735d24 1077 This function provides a means by which to retrieve a value for a given PCD token.\r
fb3df220 1078\r
9095d37b
LG
1079 Returns the Boolean value of the token specified by TokenNumber and Guid.\r
1080\r
1081 If Guid is NULL, then ASSERT().\r
1082\r
1083 @param[in] Guid Pointer to a 128-bit unique value that designates\r
fb287b56 1084 which namespace to retrieve a value from.\r
1085 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1086\r
f73e0ad2 1087 @return Return the BOOLEAN.\r
fb3df220 1088\r
1089**/\r
1090BOOLEAN\r
1091EFIAPI\r
1092LibPcdGetExBool (\r
1093 IN CONST GUID *Guid,\r
1094 IN UINTN TokenNumber\r
1095 );\r
1096\r
1097\r
1098/**\r
64735d24 1099 This function provides a means by which to retrieve the size of a given PCD token.\r
fb3df220 1100\r
9095d37b
LG
1101 Returns the size of the token specified by TokenNumber and Guid.\r
1102\r
1103 If Guid is NULL, then ASSERT().\r
1104\r
1105 @param[in] Guid Pointer to a 128-bit unique value that designates\r
fb287b56 1106 which namespace to retrieve a value from.\r
1107 @param[in] TokenNumber The PCD token number to retrieve a current value for.\r
fb3df220 1108\r
f73e0ad2 1109 @return Return the size.\r
fb3df220 1110\r
1111**/\r
1112UINTN\r
1113EFIAPI\r
1114LibPcdGetExSize (\r
1115 IN CONST GUID *Guid,\r
1116 IN UINTN TokenNumber\r
1117 );\r
1118\r
1119\r
9a355841
SZ
1120/**\r
1121 This function provides a means by which to set a value for a given PCD token.\r
1122\r
1123 Sets the 8-bit value for the token specified by TokenNumber\r
1124 to the value specified by Value.\r
1125\r
1126 @param[in] TokenNumber The PCD token number to set a current value for.\r
1127 @param[in] Value The 8-bit value to set.\r
1128\r
1129 @return The status of the set operation.\r
1130\r
1131**/\r
1132RETURN_STATUS\r
1133EFIAPI\r
1134LibPcdSet8S (\r
1135 IN UINTN TokenNumber,\r
1136 IN UINT8 Value\r
1137 );\r
1138\r
1139/**\r
1140 This function provides a means by which to set a value for a given PCD token.\r
1141\r
1142 Sets the 16-bit value for the token specified by TokenNumber\r
1143 to the value specified by Value.\r
1144\r
1145 @param[in] TokenNumber The PCD token number to set a current value for.\r
1146 @param[in] Value The 16-bit value to set.\r
1147\r
1148 @return The status of the set operation.\r
1149\r
1150**/\r
1151RETURN_STATUS\r
1152EFIAPI\r
1153LibPcdSet16S (\r
1154 IN UINTN TokenNumber,\r
1155 IN UINT16 Value\r
1156 );\r
1157\r
1158/**\r
1159 This function provides a means by which to set a value for a given PCD token.\r
1160\r
1161 Sets the 32-bit value for the token specified by TokenNumber\r
1162 to the value specified by Value.\r
1163\r
1164 @param[in] TokenNumber The PCD token number to set a current value for.\r
1165 @param[in] Value The 32-bit value to set.\r
1166\r
1167 @return The status of the set operation.\r
1168\r
1169**/\r
1170RETURN_STATUS\r
1171EFIAPI\r
1172LibPcdSet32S (\r
1173 IN UINTN TokenNumber,\r
1174 IN UINT32 Value\r
1175 );\r
1176\r
1177/**\r
1178 This function provides a means by which to set a value for a given PCD token.\r
1179\r
1180 Sets the 64-bit value for the token specified by TokenNumber\r
1181 to the value specified by Value.\r
1182\r
1183 @param[in] TokenNumber The PCD token number to set a current value for.\r
1184 @param[in] Value The 64-bit value to set.\r
1185\r
1186 @return The status of the set operation.\r
1187\r
1188**/\r
1189RETURN_STATUS\r
1190EFIAPI\r
1191LibPcdSet64S (\r
1192 IN UINTN TokenNumber,\r
1193 IN UINT64 Value\r
1194 );\r
1195\r
1196/**\r
1197 This function provides a means by which to set a value for a given PCD token.\r
1198\r
1199 Sets a buffer for the token specified by TokenNumber to the value specified\r
1200 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r
1201 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r
1202 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation\r
1203 was not actually performed.\r
1204\r
1205 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the\r
1206 maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.\r
1207\r
1208 If SizeOfBuffer is NULL, then ASSERT().\r
1209 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1210\r
1211 @param[in] TokenNumber The PCD token number to set a current value for.\r
1212 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
1213 @param[in] Buffer A pointer to the buffer to set.\r
1214\r
1215 @return The status of the set operation.\r
1216\r
1217**/\r
1218RETURN_STATUS\r
1219EFIAPI\r
1220LibPcdSetPtrS (\r
1221 IN UINTN TokenNumber,\r
1222 IN OUT UINTN *SizeOfBuffer,\r
1223 IN CONST VOID *Buffer\r
1224 );\r
1225\r
1226/**\r
1227 This function provides a means by which to set a value for a given PCD token.\r
1228\r
1229 Sets the boolean value for the token specified by TokenNumber\r
1230 to the value specified by Value.\r
1231\r
1232 @param[in] TokenNumber The PCD token number to set a current value for.\r
1233 @param[in] Value The boolean value to set.\r
1234\r
1235 @return The status of the set operation.\r
1236\r
1237**/\r
1238RETURN_STATUS\r
1239EFIAPI\r
1240LibPcdSetBoolS (\r
1241 IN UINTN TokenNumber,\r
1242 IN BOOLEAN Value\r
1243 );\r
1244\r
1245/**\r
1246 This function provides a means by which to set a value for a given PCD token.\r
1247\r
1248 Sets the 8-bit value for the token specified by TokenNumber\r
1249 to the value specified by Value.\r
1250\r
1251 If Guid is NULL, then ASSERT().\r
1252\r
1253 @param[in] Guid The pointer to a 128-bit unique value that\r
1254 designates which namespace to set a value from.\r
1255 @param[in] TokenNumber The PCD token number to set a current value for.\r
1256 @param[in] Value The 8-bit value to set.\r
1257\r
1258 @return The status of the set operation.\r
1259\r
1260**/\r
1261RETURN_STATUS\r
1262EFIAPI\r
1263LibPcdSetEx8S (\r
1264 IN CONST GUID *Guid,\r
1265 IN UINTN TokenNumber,\r
1266 IN UINT8 Value\r
1267 );\r
1268\r
1269/**\r
1270 This function provides a means by which to set a value for a given PCD token.\r
1271\r
1272 Sets the 16-bit value for the token specified by TokenNumber\r
1273 to the value specified by Value.\r
1274\r
1275 If Guid is NULL, then ASSERT().\r
1276\r
1277 @param[in] Guid The pointer to a 128-bit unique value that\r
1278 designates which namespace to set a value from.\r
1279 @param[in] TokenNumber The PCD token number to set a current value for.\r
1280 @param[in] Value The 16-bit value to set.\r
1281\r
1282 @return The status of the set operation.\r
1283\r
1284**/\r
1285RETURN_STATUS\r
1286EFIAPI\r
1287LibPcdSetEx16S (\r
1288 IN CONST GUID *Guid,\r
1289 IN UINTN TokenNumber,\r
1290 IN UINT16 Value\r
1291 );\r
1292\r
1293/**\r
1294 This function provides a means by which to set a value for a given PCD token.\r
1295\r
1296 Sets the 32-bit value for the token specified by TokenNumber\r
1297 to the value specified by Value.\r
1298\r
1299 If Guid is NULL, then ASSERT().\r
1300\r
1301 @param[in] Guid The pointer to a 128-bit unique value that\r
1302 designates which namespace to set a value from.\r
1303 @param[in] TokenNumber The PCD token number to set a current value for.\r
1304 @param[in] Value The 32-bit value to set.\r
1305\r
1306 @return The status of the set operation.\r
1307\r
1308**/\r
1309RETURN_STATUS\r
1310EFIAPI\r
1311LibPcdSetEx32S (\r
1312 IN CONST GUID *Guid,\r
1313 IN UINTN TokenNumber,\r
1314 IN UINT32 Value\r
1315 );\r
1316\r
1317/**\r
1318 This function provides a means by which to set a value for a given PCD token.\r
1319\r
1320 Sets the 64-bit value for the token specified by TokenNumber\r
1321 to the value specified by Value.\r
1322\r
1323 If Guid is NULL, then ASSERT().\r
1324\r
1325 @param[in] Guid The pointer to a 128-bit unique value that\r
1326 designates which namespace to set a value from.\r
1327 @param[in] TokenNumber The PCD token number to set a current value for.\r
1328 @param[in] Value The 64-bit value to set.\r
1329\r
1330 @return The status of the set operation.\r
1331\r
1332**/\r
1333RETURN_STATUS\r
1334EFIAPI\r
1335LibPcdSetEx64S (\r
1336 IN CONST GUID *Guid,\r
1337 IN UINTN TokenNumber,\r
1338 IN UINT64 Value\r
1339 );\r
1340\r
1341/**\r
1342 This function provides a means by which to set a value for a given PCD token.\r
1343\r
1344 Sets a buffer for the token specified by TokenNumber to the value specified by\r
1345 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size\r
1346 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by\r
1347 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation\r
1348 was not actually performed.\r
1349\r
1350 If Guid is NULL, then ASSERT().\r
1351 If SizeOfBuffer is NULL, then ASSERT().\r
1352 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1353\r
1354 @param[in] Guid Pointer to a 128-bit unique value that\r
1355 designates which namespace to set a value from.\r
1356 @param[in] TokenNumber The PCD token number to set a current value for.\r
1357 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r
1358 @param[in] Buffer A pointer to the buffer to set.\r
1359\r
1360 @return The status of the set operation.\r
1361\r
1362**/\r
1363RETURN_STATUS\r
1364EFIAPI\r
1365LibPcdSetExPtrS (\r
1366 IN CONST GUID *Guid,\r
1367 IN UINTN TokenNumber,\r
1368 IN OUT UINTN *SizeOfBuffer,\r
1369 IN VOID *Buffer\r
1370 );\r
1371\r
1372/**\r
1373 This function provides a means by which to set a value for a given PCD token.\r
1374\r
1375 Sets the boolean value for the token specified by TokenNumber\r
1376 to the value specified by Value.\r
1377\r
1378 If Guid is NULL, then ASSERT().\r
1379\r
1380 @param[in] Guid The pointer to a 128-bit unique value that\r
1381 designates which namespace to set a value from.\r
1382 @param[in] TokenNumber The PCD token number to set a current value for.\r
1383 @param[in] Value The boolean value to set.\r
1384\r
1385 @return The status of the set operation.\r
1386\r
1387**/\r
1388RETURN_STATUS\r
1389EFIAPI\r
1390LibPcdSetExBoolS (\r
1391 IN CONST GUID *Guid,\r
1392 IN UINTN TokenNumber,\r
1393 IN BOOLEAN Value\r
1394 );\r
fb3df220 1395\r
1396/**\r
b677694d 1397 This notification function serves two purposes.\r
fb3df220 1398\r
1a2f870c 1399 Firstly, it notifies the module that did the registration that the value of this\r
b677694d 1400 PCD token has been set.\r
1a2f870c 1401 Secondly, it provides a mechanism for the module that did the registration to intercept\r
b677694d 1402 the set operation and override the value been set if necessary. After the invocation of\r
1403 the callback function, TokenData will be used by PCD service PEIM or driver to modify th\r
9095d37b 1404 internal data in PCD database.\r
fb3df220 1405\r
2a254b90 1406 @param[in] CallBackGuid The PCD token GUID being set.\r
1407 @param[in] CallBackToken The PCD token number being set.\r
1408 @param[in, out] TokenData A pointer to the token data being set.\r
1409 @param[in] TokenDataSize The size, in bytes, of the data being set.\r
fb3df220 1410\r
fb3df220 1411**/\r
1412typedef\r
1413VOID\r
78bf8f2d 1414(EFIAPI *PCD_CALLBACK)(\r
d0e2f823 1415 IN CONST GUID *CallBackGuid OPTIONAL,\r
fb3df220 1416 IN UINTN CallBackToken,\r
1417 IN OUT VOID *TokenData,\r
1418 IN UINTN TokenDataSize\r
1419 );\r
1420\r
1421\r
1422/**\r
64735d24 1423 Set up a notification function that is called when a specified token is set.\r
9095d37b
LG
1424\r
1425 When the token specified by TokenNumber and Guid is set,\r
1426 then notification function specified by NotificationFunction is called.\r
b677694d 1427 If Guid is NULL, then the default token space is used.\r
fb3df220 1428 If NotificationFunction is NULL, then ASSERT().\r
1429\r
9095d37b
LG
1430 @param[in] Guid Pointer to a 128-bit unique value that designates which\r
1431 namespace to set a value from. If NULL, then the default\r
b677694d 1432 token space is used.\r
1433 @param[in] TokenNumber The PCD token number to monitor.\r
9095d37b 1434 @param[in] NotificationFunction The function to call when the token\r
fb287b56 1435 specified by Guid and TokenNumber is set.\r
fb3df220 1436\r
1437**/\r
1438VOID\r
1439EFIAPI\r
1440LibPcdCallbackOnSet (\r
d0e2f823 1441 IN CONST GUID *Guid OPTIONAL,\r
fb3df220 1442 IN UINTN TokenNumber,\r
1443 IN PCD_CALLBACK NotificationFunction\r
1444 );\r
1445\r
1446\r
1447/**\r
1448 Disable a notification function that was established with LibPcdCallbackonSet().\r
9095d37b 1449\r
b677694d 1450 Disable a notification function that was previously established with LibPcdCallbackOnSet().\r
64735d24 1451 If NotificationFunction is NULL, then ASSERT().\r
9095d37b 1452 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,\r
64735d24 1453 and NotificationFunction, then ASSERT().\r
9095d37b 1454\r
b677694d 1455 @param[in] Guid Specify the GUID token space.\r
1456 @param[in] TokenNumber Specify the token number.\r
fb3df220 1457 @param[in] NotificationFunction The callback function to be unregistered.\r
1458\r
fb3df220 1459**/\r
1460VOID\r
1461EFIAPI\r
1462LibPcdCancelCallback (\r
d0e2f823 1463 IN CONST GUID *Guid OPTIONAL,\r
fb3df220 1464 IN UINTN TokenNumber,\r
1465 IN PCD_CALLBACK NotificationFunction\r
1466 );\r
1467\r
1468\r
1469/**\r
64735d24 1470 Retrieves the next token in a token space.\r
9095d37b
LG
1471\r
1472 Retrieves the next PCD token number from the token space specified by Guid.\r
1473 If Guid is NULL, then the default token space is used. If TokenNumber is 0,\r
1474 then the first token number is returned. Otherwise, the token number that\r
1475 follows TokenNumber in the token space is returned. If TokenNumber is the last\r
1476 token number in the token space, then 0 is returned.\r
1477\r
64735d24 1478 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().\r
fb3df220 1479\r
9095d37b 1480 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace\r
2a254b90 1481 to set a value from. If NULL, then the default token space is used.\r
9095d37b 1482 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD\r
2a254b90 1483 token number.\r
fb3df220 1484\r
f73e0ad2 1485 @return The next valid token number.\r
fb3df220 1486\r
1487**/\r
9095d37b 1488UINTN\r
fb3df220 1489EFIAPI\r
1490LibPcdGetNextToken (\r
d0e2f823 1491 IN CONST GUID *Guid OPTIONAL,\r
fb3df220 1492 IN UINTN TokenNumber\r
1493 );\r
1494\r
1495\r
1496\r
1497/**\r
64735d24 1498 Used to retrieve the list of available PCD token space GUIDs.\r
9095d37b 1499\r
b677694d 1500 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces\r
1501 in the platform.\r
1502 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.\r
1503 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.\r
9095d37b 1504\r
b677694d 1505 @param TokenSpaceGuid Pointer to the a PCD token space GUID\r
fb3df220 1506\r
f73e0ad2 1507 @return The next valid token namespace.\r
fb3df220 1508\r
1509**/\r
b677694d 1510GUID *\r
fb3df220 1511EFIAPI\r
1512LibPcdGetNextTokenSpace (\r
64735d24 1513 IN CONST GUID *TokenSpaceGuid\r
fb3df220 1514 );\r
1515\r
1516\r
1517/**\r
64735d24 1518 Sets a value of a patchable PCD entry that is type pointer.\r
9095d37b
LG
1519\r
1520 Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r
1521 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
1522 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r
1523 NULL to indicate that the set operation was not actually performed.\r
1524 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
fb3df220 1525 MaximumDatumSize and NULL must be returned.\r
9095d37b 1526\r
fb3df220 1527 If PatchVariable is NULL, then ASSERT().\r
d3057543 1528 If SizeOfBuffer is NULL, then ASSERT().\r
1529 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
fb3df220 1530\r
9095d37b 1531 @param[out] PatchVariable A pointer to the global variable in a module that is\r
fb3df220 1532 the target of the set operation.\r
1533 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
1534 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1535 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 1536\r
502bfcef 1537 @return Return the pointer to the Buffer that was set.\r
fb3df220 1538\r
1539**/\r
1540VOID *\r
1541EFIAPI\r
1542LibPatchPcdSetPtr (\r
f8308f0a 1543 OUT VOID *PatchVariable,\r
fb3df220 1544 IN UINTN MaximumDatumSize,\r
1545 IN OUT UINTN *SizeOfBuffer,\r
1546 IN CONST VOID *Buffer\r
1547 );\r
1548\r
9a355841
SZ
1549/**\r
1550 Sets a value of a patchable PCD entry that is type pointer.\r
1551\r
1552 Sets the PCD entry specified by PatchVariable to the value specified\r
1553 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r
1554 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r
1555 to indicate that the set operation was not actually performed.\r
1556 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
1557 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r
1558\r
1559 If PatchVariable is NULL, then ASSERT().\r
1560 If SizeOfBuffer is NULL, then ASSERT().\r
1561 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1562\r
f8308f0a 1563 @param[out] PatchVariable A pointer to the global variable in a module that is\r
9a355841
SZ
1564 the target of the set operation.\r
1565 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
1566 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1567 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 1568\r
9a355841
SZ
1569 @return The status of the set operation.\r
1570\r
1571**/\r
1572RETURN_STATUS\r
1573EFIAPI\r
1574LibPatchPcdSetPtrS (\r
f8308f0a
LG
1575 OUT VOID *PatchVariable,\r
1576 IN UINTN MaximumDatumSize,\r
1577 IN OUT UINTN *SizeOfBuffer,\r
1578 IN CONST VOID *Buffer\r
1579 );\r
1580\r
1581/**\r
1582 Sets a value and size of a patchable PCD entry that is type pointer.\r
9095d37b
LG
1583\r
1584 Sets the PCD entry specified by PatchVariable to the value specified by Buffer\r
1585 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than\r
1586 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return\r
1587 NULL to indicate that the set operation was not actually performed.\r
1588 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
f8308f0a 1589 MaximumDatumSize and NULL must be returned.\r
9095d37b 1590\r
f8308f0a
LG
1591 If PatchVariable is NULL, then ASSERT().\r
1592 If SizeOfPatchVariable is NULL, then ASSERT().\r
1593 If SizeOfBuffer is NULL, then ASSERT().\r
1594 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1595\r
9095d37b 1596 @param[out] PatchVariable A pointer to the global variable in a module that is\r
f8308f0a
LG
1597 the target of the set operation.\r
1598 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r
1599 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
1600 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1601 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 1602\r
f8308f0a
LG
1603 @return Return the pointer to the Buffer that was set.\r
1604\r
1605**/\r
1606VOID *\r
1607EFIAPI\r
1608LibPatchPcdSetPtrAndSize (\r
1609 OUT VOID *PatchVariable,\r
1610 OUT UINTN *SizeOfPatchVariable,\r
1611 IN UINTN MaximumDatumSize,\r
1612 IN OUT UINTN *SizeOfBuffer,\r
1613 IN CONST VOID *Buffer\r
1614 );\r
1615\r
1616/**\r
1617 Sets a value and size of a patchable PCD entry that is type pointer.\r
1618\r
1619 Sets the PCD entry specified by PatchVariable to the value specified\r
1620 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,\r
1621 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER\r
1622 to indicate that the set operation was not actually performed.\r
1623 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to\r
1624 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.\r
1625\r
1626 If PatchVariable is NULL, then ASSERT().\r
1627 If SizeOfPatchVariable is NULL, then ASSERT().\r
1628 If SizeOfBuffer is NULL, then ASSERT().\r
1629 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().\r
1630\r
1631 @param[out] PatchVariable A pointer to the global variable in a module that is\r
1632 the target of the set operation.\r
1633 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.\r
1634 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r
1635 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r
1636 @param[in] Buffer A pointer to the buffer to used to set the target variable.\r
9095d37b 1637\r
f8308f0a
LG
1638 @return The status of the set operation.\r
1639\r
1640**/\r
1641RETURN_STATUS\r
1642EFIAPI\r
1643LibPatchPcdSetPtrAndSizeS (\r
1644 OUT VOID *PatchVariable,\r
1645 OUT UINTN *SizeOfPatchVariable,\r
9a355841
SZ
1646 IN UINTN MaximumDatumSize,\r
1647 IN OUT UINTN *SizeOfBuffer,\r
1648 IN CONST VOID *Buffer\r
1649 );\r
1650\r
96d6d004
SZ
1651typedef enum {\r
1652 PCD_TYPE_8,\r
1653 PCD_TYPE_16,\r
1654 PCD_TYPE_32,\r
1655 PCD_TYPE_64,\r
1656 PCD_TYPE_BOOL,\r
1657 PCD_TYPE_PTR\r
1658} PCD_TYPE;\r
1659\r
1660typedef struct {\r
1661 ///\r
1662 /// The returned information associated with the requested TokenNumber. If\r
1663 /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.\r
1664 ///\r
1665 PCD_TYPE PcdType;\r
1666 ///\r
1667 /// The size of the data in bytes associated with the TokenNumber specified. If\r
1668 /// TokenNumber is 0, then PcdSize is set 0.\r
1669 ///\r
1670 UINTN PcdSize;\r
1671 ///\r
1672 /// The null-terminated ASCII string associated with a given token. If the\r
1673 /// TokenNumber specified was 0, then this field corresponds to the null-terminated\r
1674 /// ASCII string associated with the token's namespace Guid. If NULL, there is no\r
1675 /// name associated with this request.\r
1676 ///\r
1677 CHAR8 *PcdName;\r
1678} PCD_INFO;\r
1679\r
1680\r
1681/**\r
1682 Retrieve additional information associated with a PCD token.\r
1683\r
1684 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
1685 human readable name that is associated with the token.\r
1686\r
1687 If TokenNumber is not in the default token space specified, then ASSERT().\r
1688\r
1689 @param[in] TokenNumber The PCD token number.\r
1690 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
1691 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
1692**/\r
1693VOID\r
1694EFIAPI\r
1695LibPcdGetInfo (\r
1696 IN UINTN TokenNumber,\r
1697 OUT PCD_INFO *PcdInfo\r
1698 );\r
1699\r
1700/**\r
1701 Retrieve additional information associated with a PCD token.\r
1702\r
1703 This includes information such as the type of value the TokenNumber is associated with as well as possible\r
1704 human readable name that is associated with the token.\r
1705\r
1706 If TokenNumber is not in the token space specified by Guid, then ASSERT().\r
1707\r
1708 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
1709 @param[in] TokenNumber The PCD token number.\r
1710 @param[out] PcdInfo The returned information associated with the requested TokenNumber.\r
1711 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.\r
1712**/\r
1713VOID\r
1714EFIAPI\r
1715LibPcdGetInfoEx (\r
1716 IN CONST GUID *Guid,\r
1717 IN UINTN TokenNumber,\r
1718 OUT PCD_INFO *PcdInfo\r
1719 );\r
1720\r
1721/**\r
1722 Retrieve the currently set SKU Id.\r
1723\r
96d6d004
SZ
1724 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the\r
1725 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU\r
1726 Id is returned.\r
1727**/\r
1728UINTN\r
1729EFIAPI\r
1730LibPcdGetSku (\r
1731 VOID\r
1732 );\r
1733\r
fb3df220 1734#endif\r