2 Provides library services to get and set Platform Configuration Database entries.
4 PCD Library Class provides a PCD usage macro interface for all PCD types.
5 It should be included in any module that uses PCD. If a module uses dynamic/dynamicex
6 PCD, module should be linked to a PEIM/DXE library instance to access that PCD.
7 If a module uses PatchableInModule type PCD, it also needs the library instance to produce
8 LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, the macro interface is
9 translated to a variable or macro that is auto-generated by build tool in
10 module's autogen.h/autogen.c.
11 The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are
12 only available prior to ExitBootServices(). If access to PCD values are required
13 at runtime, then their values must be collected prior to ExitBootServices().
14 There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),
15 PatchPcdGetXX(), and PatchPcdSetXX().
17 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
18 This program and the accompanying materials
19 are licensed and made available under the terms and conditions of the BSD License
20 which accompanies this distribution. The full text of the license may be found at
21 http://opensource.org/licenses/bsd-license.php
23 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
24 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
31 #define PCD_MAX_SKU_ID 0x100
35 Retrieves a token number based on a token name.
37 Returns the token number associated with the PCD token specified by TokenName.
38 If TokenName is not a valid token in the token space, then the module will not build.
39 If TokenName is not a feature flag, then the module will not build.
41 @param TokenName The name of the PCD token to retrieve the token number for.
43 @return The token number associated with the PCD.
46 #define PcdToken(TokenName) _PCD_TOKEN_##TokenName
50 Retrieves a Boolean PCD feature flag based on a token name.
52 Returns the Boolean value for the PCD feature flag specified by TokenName.
53 If TokenName is not a valid token in the token space, then the module will not build.
54 If TokenName is not a feature flag, then the module will not build.
56 @param TokenName The name of the PCD token to retrieve a current value for.
58 @return Boolean value for the PCD feature flag.
61 #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
65 Retrieves an 8-bit fixed PCD token value based on a token name.
67 Returns the 8-bit value for the token specified by TokenName.
68 If TokenName is not a valid token in the token space, then the module will not build.
69 If TokenName is not a feature flag, then the module will not build.
71 @param TokenName The name of the PCD token to retrieve a current value for.
73 @return 8-bit value for the token specified by TokenName.
76 #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
80 Retrieves a 16-bit fixed PCD token value based on a token name.
82 Returns the 16-bit value for the token specified by TokenName.
83 If TokenName is not a valid token in the token space, then the module will not build.
84 If TokenName is not a feature flag, then the module will not build.
86 @param TokenName The name of the PCD token to retrieve a current value for.
88 @return 16-bit value for the token specified by TokenName.
91 #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
95 Retrieves a 32-bit fixed PCD token value based on a token name.
97 Returns the 32-bit value for the token specified by TokenName.
98 If TokenName is not a valid token in the token space, then the module will not build.
99 If TokenName is not a feature flag, then the module will not build.
101 @param TokenName The name of the PCD token to retrieve a current value for.
103 @return 32-bit value for the token specified by TokenName.
106 #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
110 Retrieves a 64-bit fixed PCD token value based on a token name.
112 Returns the 64-bit value for the token specified by TokenName.
113 If TokenName is not a valid token in the token space, then the module will not build.
114 If TokenName is not a feature flag, then the module will not build.
116 @param TokenName The name of the PCD token to retrieve a current value for.
118 @return 64-bit value for the token specified by TokenName.
121 #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
125 Retrieves a Boolean fixed PCD token value based on a token name.
127 Returns the Boolean value for the token specified by TokenName.
128 If TokenName is not a valid token in the token space, then the module will not build.
129 If TokenName is not a feature flag, then the module will not build.
131 @param TokenName The name of the PCD token to retrieve a current value for.
133 @return The Boolean value for the token.
136 #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
140 Retrieves a pointer to a fixed PCD token buffer based on a token name.
142 Returns a pointer to the buffer for the token specified by TokenName.
143 If TokenName is not a valid token in the token space, then the module will not build.
144 If TokenName is not a feature flag, then the module will not build.
146 @param TokenName The name of the PCD token to retrieve a current value for.
148 @return A pointer to the buffer.
151 #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
155 Retrieves an 8-bit binary patchable PCD token value based on a token name.
157 Returns the 8-bit value for the token specified by TokenName.
158 If TokenName is not a valid token in the token space, then the module will not build.
159 If TokenName is not a feature flag, then the module will not build.
161 @param TokenName The name of the PCD token to retrieve a current value for.
163 @return An 8-bit binary patchable PCD token value.
166 #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
169 Retrieves a 16-bit binary patchable PCD token value based on a token name.
171 Returns the 16-bit value for the token specified by TokenName.
172 If TokenName is not a valid token in the token space, then the module will not build.
173 If TokenName is not a feature flag, then the module will not build.
175 @param TokenName The name of the PCD token to retrieve a current value for.
177 @return A 16-bit binary patchable PCD token value.
180 #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
184 Retrieves a 32-bit binary patchable PCD token value based on a token name.
186 Returns the 32-bit value for the token specified by TokenName.
187 If TokenName is not a valid token in the token space, then the module will not build.
188 If TokenName is not a feature flag, then the module will not build.
190 @param TokenName The name of the PCD token to retrieve a current value for.
192 @return A 32-bit binary patchable PCD token value.
195 #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
199 Retrieves a 64-bit binary patchable PCD token value based on a token name.
201 Returns the 64-bit value for the token specified by TokenName.
202 If TokenName is not a valid token in the token space, then the module will not build.
203 If TokenName is not a feature flag, then the module will not build.
205 @param TokenName The name of the PCD token to retrieve a current value for.
207 @return A 64-bit binary patchable PCD token value.
210 #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
214 Retrieves a Boolean binary patchable PCD token value based on a token name.
216 Returns the Boolean value for the token specified by TokenName.
217 If TokenName is not a valid token in the token space, then the module will not build.
218 If TokenName is not a feature flag, then the module will not build.
220 @param TokenName The name of the PCD token to retrieve a current value for.
222 @return The Boolean value for the token.
225 #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
229 Retrieves a pointer to a binary patchable PCD token buffer based on a token name.
231 Returns a pointer to the buffer for the token specified by TokenName.
232 If TokenName is not a valid token in the token space, then the module will not build.
233 If TokenName is not a feature flag, then the module will not build.
235 @param TokenName The name of the PCD token to retrieve a current value for.
237 @return A pointer to the buffer for the token.
240 #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
244 Sets an 8-bit binary patchable PCD token value based on a token name.
246 Sets the 8-bit value for the token specified by TokenName. Value is returned.
247 If TokenName is not a valid token in the token space, then the module will not build.
248 If TokenName is not a feature flag, then the module will not build.
250 @param TokenName The name of the binary patchable PCD token to set the current value for.
251 @param Value The 8-bit value to set.
253 @return Return the Value that was set.
256 #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
260 Sets a 16-bit binary patchable PCD token value based on a token name.
262 Sets the 16-bit value for the token specified by TokenName. Value is returned.
263 If TokenName is not a valid token in the token space, then the module will not build.
264 If TokenName is not a feature flag, then the module will not build.
266 @param TokenName The name of the binary patchable PCD token to set the current value for.
267 @param Value The 16-bit value to set.
269 @return Return the Value that was set.
272 #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
276 Sets a 32-bit binary patchable PCD token value based on a token name.
278 Sets the 32-bit value for the token specified by TokenName. Value is returned.
279 If TokenName is not a valid token in the token space, then the module will not build.
280 If TokenName is not a feature flag, then the module will not build.
282 @param TokenName The name of the binary patchable PCD token to set the current value for.
283 @param Value The 32-bit value to set.
285 @return Return the Value that was set.
288 #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
292 Sets a 64-bit binary patchable PCD token value based on a token name.
294 Sets the 64-bit value for the token specified by TokenName. Value is returned.
295 If TokenName is not a valid token in the token space, then the module will not build.
296 If TokenName is not a feature flag, then the module will not build.
298 @param TokenName The name of the binary patchable PCD token to set the current value for.
299 @param Value The 64-bit value to set.
301 @return Return the Value that was set.
304 #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
308 Sets a Boolean binary patchable PCD token value based on a token name.
310 Sets the Boolean value for the token specified by TokenName. Value is returned.
311 If TokenName is not a valid token in the token space, then the module will not build.
312 If TokenName is not a feature flag, then the module will not build.
314 @param TokenName The name of the binary patchable PCD token to set the current value for.
315 @param Value The boolean value to set.
317 @return Return the Value that was set.
320 #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
324 Sets a pointer to a binary patchable PCD token buffer based on a token name.
326 Sets the buffer for the token specified by TokenName. Buffer is returned.
327 If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer
328 to the maximum size supported by TokenName and return NULL to indicate that the set operation
329 was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be
330 set to the maximum size supported by TokenName and NULL must be returned.
331 If TokenName is not a valid token in the token space, then the module will not build.
332 If TokenName is not a feature flag, then the module will not build.
334 If SizeOfBuffer is NULL, then ASSERT().
335 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
337 @param TokenName The name of the binary patchable PCD token to set the current value for.
338 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
339 @param Buffer Pointer to the value to set.
341 @return Return the pointer to the Buffer that was set.
344 #define PatchPcdSetPtr(TokenName, Size, Buffer) \
345 LibPatchPcdSetPtrAndSize ( \
346 (VOID *)_gPcd_BinaryPatch_##TokenName, \
347 &_gPcd_BinaryPatch_Size_##TokenName, \
348 (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \
353 Retrieves an 8-bit PCD token value based on a token name.
355 Returns the 8-bit value for the token specified by TokenName.
356 If TokenName is not a valid token in the token space, then the module will not build.
358 @param TokenName The name of the PCD token to retrieve a current value for.
360 @return 8-bit value for the token specified by TokenName.
363 #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
367 Retrieves a 16-bit PCD token value based on a token name.
369 Returns the 16-bit value for the token specified by TokenName.
370 If TokenName is not a valid token in the token space, then the module will not build.
372 @param TokenName The name of the PCD token to retrieve a current value for.
374 @return 16-bit value for the token specified by TokenName.
377 #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
381 Retrieves a 32-bit PCD token value based on a token name.
383 Returns the 32-bit value for the token specified by TokenName.
384 If TokenName is not a valid token in the token space, then the module will not build.
386 @param TokenName The name of the PCD token to retrieve a current value for.
388 @return 32-bit value for the token specified by TokenName.
391 #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
395 Retrieves a 64-bit PCD token value based on a token name.
397 Returns the 64-bit value for the token specified by TokenName.
398 If TokenName is not a valid token in the token space, then the module will not build.
400 @param TokenName The name of the PCD token to retrieve a current value for.
402 @return 64-bit value for the token specified by TokenName.
405 #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
409 Retrieves a pointer to a PCD token buffer based on a token name.
411 Returns a pointer to the buffer for the token specified by TokenName.
412 If TokenName is not a valid token in the token space, then the module will not build.
414 @param TokenName The name of the PCD token to retrieve a current value for.
416 @return A pointer to the buffer.
419 #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
423 Retrieves a Boolean PCD token value based on a token name.
425 Returns the Boolean value for the token specified by TokenName.
426 If TokenName is not a valid token in the token space, then the module will not build.
428 @param TokenName The name of the PCD token to retrieve a current value for.
430 @return A Boolean PCD token value.
433 #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
437 Retrieves the size of a fixed PCD token based on a token name.
439 Returns the size of the token specified by TokenName.
440 If TokenName is not a valid token in the token space, then the module will not build.
442 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
444 @return Return the size
447 #define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName
451 Retrieves the size of a binary patchable PCD token based on a token name.
453 Returns the size of the token specified by TokenName.
454 If TokenName is not a valid token in the token space, then the module will not build.
456 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
458 @return Return the size
461 #define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName
465 Retrieves the size of the PCD token based on a token name.
467 Returns the size of the token specified by TokenName.
468 If TokenName is not a valid token in the token space, then the module will not build.
470 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
472 @return Return the size
475 #define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName
479 Retrieve the size of a given PCD token.
481 Returns the size of the token specified by TokenNumber and Guid.
482 If Guid is NULL, then ASSERT().
484 @param[in] Guid Pointer to a 128-bit unique value that designates
485 which namespace to retrieve a value from.
486 @param[in] TokenNumber The PCD token number to retrieve a current value size for.
488 @return Return the size.
491 #define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))
493 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
495 Sets an 8-bit PCD token value based on a token name.
497 Sets the 8-bit value for the token specified by TokenName. Value is returned.
498 If TokenName is not a valid token in the token space, then the module will not build.
500 @param TokenName The name of the PCD token to retrieve a current value for.
501 @param Value The 8-bit value to set.
503 @return Return the Value that was set.
506 #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))
510 Sets a 16-bit PCD token value based on a token name.
512 Sets the 16-bit value for the token specified by TokenName. Value is returned.
513 If TokenName is not a valid token in the token space, then the module will not build.
515 @param TokenName The name of the PCD token to retrieve a current value for.
516 @param Value The 16-bit value to set.
518 @return Return the Value that was set.
521 #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))
525 Sets a 32-bit PCD token value based on a token name.
527 Sets the 32-bit value for the token specified by TokenName. Value is returned.
528 If TokenName is not a valid token in the token space, then the module will not build.
530 @param TokenName The name of the PCD token to retrieve a current value for.
531 @param Value The 32-bit value to set.
533 @return Return the Value that was set.
536 #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))
540 Sets a 64-bit PCD token value based on a token name.
542 Sets the 64-bit value for the token specified by TokenName. Value is returned.
543 If TokenName is not a valid token in the token space, then the module will not build.
545 @param TokenName The name of the PCD token to retrieve a current value for.
546 @param Value The 64-bit value to set.
548 @return Return the Value that was set.
551 #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))
555 Sets a pointer to a PCD token buffer based on a token name.
557 Sets the buffer for the token specified by TokenName. Buffer is returned.
558 If SizeOfBuffer is greater than the maximum size supported by TokenName,
559 then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
560 to indicate that the set operation was not actually performed. If SizeOfBuffer
561 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
562 by TokenName and NULL must be returned.
563 If TokenName is not a valid token in the token space, then the module will not build.
565 If SizeOfBuffer is NULL, then ASSERT().
566 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
568 @param TokenName The name of the PCD token to set the current value for.
569 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
570 @param Buffer A pointer to the buffer to set.
572 @return Return the pointer to the Buffer that was set.
575 #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \
576 _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))
579 Sets a Boolean PCD token value based on a token name.
581 Sets the Boolean value for the token specified by TokenName. Value is returned.
582 If TokenName is not a valid token in the token space, then the module will not build.
584 @param TokenName The name of the PCD token to set the current value for.
585 @param Buffer The Boolean value to set.
587 @return Return the Value that was set.
590 #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
594 Sets a 8-bit PCD token value based on a token name.
596 Sets the 8-bit value for the token specified by TokenName.
597 If TokenName is not a valid token in the token space, then the module will not build.
599 @param TokenName The name of the PCD token to retrieve a current value for.
600 @param Value The 8-bit value to set.
602 @return The status of the set operation.
605 #define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
608 Sets a 16-bit PCD token value based on a token name.
610 Sets the 16-bit value for the token specified by TokenName.
611 If TokenName is not a valid token in the token space, then the module will not build.
613 @param TokenName The name of the PCD token to retrieve a current value for.
614 @param Value The 16-bit value to set.
616 @return The status of the set operation.
619 #define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
622 Sets a 32-bit PCD token value based on a token name.
624 Sets the 32-bit value for the token specified by TokenName.
625 If TokenName is not a valid token in the token space, then the module will not build.
627 @param TokenName The name of the PCD token to retrieve a current value for.
628 @param Value The 32-bit value to set.
630 @return The status of the set operation.
633 #define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
636 Sets a 64-bit PCD token value based on a token name.
638 Sets the 64-bit value for the token specified by TokenName.
639 If TokenName is not a valid token in the token space, then the module will not build.
641 @param TokenName The name of the PCD token to retrieve a current value for.
642 @param Value The 64-bit value to set.
644 @return The status of the set operation.
647 #define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
650 Sets a pointer to a PCD token buffer based on a token name.
652 Sets the buffer for the token specified by TokenName.
653 If SizeOfBuffer is greater than the maximum size supported by TokenName,
654 then set SizeOfBuffer to the maximum size supported by TokenName and return
655 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
656 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
657 supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
658 If TokenName is not a valid token in the token space, then the module will not build.
660 If SizeOfBuffer is NULL, then ASSERT().
661 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
663 @param TokenName The name of the PCD token to set the current value for.
664 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
665 @param Buffer A pointer to the buffer to set.
667 @return The status of the set operation.
670 #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
671 _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
676 Sets a boolean PCD token value based on a token name.
678 Sets the boolean value for the token specified by TokenName.
679 If TokenName is not a valid token in the token space, then the module will not build.
681 @param TokenName The name of the PCD token to retrieve a current value for.
682 @param Value The boolean value to set.
684 @return The status of the set operation.
687 #define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
690 Retrieves a token number based on a GUID and a token name.
692 Returns the token number for the token specified by Guid and TokenName.
694 @param Guid Pointer to a 128-bit unique value that designates
695 which namespace to retrieve a value from.
696 @param TokenName The name of the PCD token to retrieve a current value for.
698 @return Return the token number.
701 #define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
704 Retrieves an 8-bit PCD token value based on a GUID and a token name.
706 Returns the 8-bit value for the token specified by Guid and TokenName.
707 If TokenName is not a valid token in the token space specified by Guid,
708 then the module will not build.
710 If Guid is NULL, then ASSERT().
712 @param Guid Pointer to a 128-bit unique value that designates
713 which namespace to retrieve a value from.
714 @param TokenName The name of the PCD token to retrieve a current value for.
716 @return An 8-bit PCD token value.
719 #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
722 Retrieves a 16-bit PCD token value based on a GUID and a token name.
724 Returns the 16-bit value for the token specified by Guid and TokenName.
725 If TokenName is not a valid token in the token space specified by Guid,
726 then the module will not build.
728 If Guid is NULL, then ASSERT().
730 @param Guid Pointer to a 128-bit unique value that designates
731 which namespace to retrieve a value from.
732 @param TokenName The name of the PCD token to retrieve a current value for.
734 @return A 16-bit PCD token value.
737 #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
741 Retrieves a 32-bit PCD token value based on a GUID and a token name.
743 Returns the 32-bit value for the token specified by Guid and TokenName.
744 If TokenName is not a valid token in the token space specified by Guid,
745 then the module will not build.
747 If Guid is NULL, then ASSERT().
749 @param Guid Pointer to a 128-bit unique value that designates
750 which namespace to retrieve a value from.
751 @param TokenName The name of the PCD token to retrieve a current value for.
753 @return A 32-bit PCD token value.
756 #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
760 Retrieves a 64-bit PCD token value based on a GUID and a token name.
762 Returns the 64-bit value for the token specified by Guid and TokenName.
763 If TokenName is not a valid token in the token space specified by Guid,
764 then the module will not build.
766 If Guid is NULL, then ASSERT().
768 @param Guid Pointer to a 128-bit unique value that designates
769 which namespace to retrieve a value from.
770 @param TokenName The name of the PCD token to retrieve a current value for.
772 @return A 64-bit PCD token value.
775 #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
779 Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
781 Returns a pointer to the buffer for the token specified by Guid and TokenName.
782 If TokenName is not a valid token in the token space specified by Guid,
783 then the module will not build.
785 If Guid is NULL, then ASSERT().
787 @param Guid Pointer to a 128-bit unique value that designates
788 which namespace to retrieve a value from.
789 @param TokenName The name of the PCD token to retrieve a current value for.
791 @return A pointer to a PCD token buffer.
794 #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
798 Retrieves a Boolean PCD token value based on a GUID and a token name.
800 Returns the Boolean value for the token specified by Guid and TokenName.
801 If TokenName is not a valid token in the token space specified by Guid,
802 then the module will not build.
804 If Guid is NULL, then ASSERT().
806 @param Guid Pointer to a 128-bit unique value that designates
807 which namespace to retrieve a value from.
808 @param TokenName The name of the PCD token to retrieve a current value for.
810 @return A Boolean PCD token value.
813 #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
817 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
819 Sets an 8-bit PCD token value based on a GUID and a token name.
821 Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.
822 If TokenName is not a valid token in the token space specified by Guid,
823 then the module will not build.
825 If Guid is NULL, then ASSERT().
827 @param Guid Pointer to a 128-bit unique value that designates
828 which namespace to retrieve a value from.
829 @param TokenName The name of the PCD token to set the current value for.
830 @param Value The 8-bit value to set.
832 @return Return the Value that was set.
835 #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
839 Sets a 16-bit PCD token value based on a GUID and a token name.
841 Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.
842 If TokenName is not a valid token in the token space specified by Guid,
843 then the module will not build.
845 If Guid is NULL, then ASSERT().
847 @param Guid Pointer to a 128-bit unique value that designates
848 which namespace to retrieve a value from.
849 @param TokenName The name of the PCD token to set the current value for.
850 @param Value The 16-bit value to set.
852 @return Return the Value that was set.
855 #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
859 Sets a 32-bit PCD token value based on a GUID and a token name.
861 Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.
862 If TokenName is not a valid token in the token space specified by Guid,
863 then the module will not build.
865 If Guid is NULL, then ASSERT().
867 @param Guid Pointer to a 128-bit unique value that designates
868 which namespace to retrieve a value from.
869 @param TokenName The name of the PCD token to set the current value for.
870 @param Value The 32-bit value to set.
872 @return Return the Value that was set.
875 #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
879 Sets a 64-bit PCD token value based on a GUID and a token name.
881 Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.
882 If TokenName is not a valid token in the token space specified by Guid,
883 then the module will not build.
885 If Guid is NULL, then ASSERT().
887 @param Guid Pointer to a 128-bit unique value that designates
888 which namespace to retrieve a value from.
889 @param TokenName The name of the PCD token to set the current value for.
890 @param Value The 64-bit value to set.
892 @return Return the Value that was set.
895 #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
899 Sets a pointer to a PCD token buffer based on a GUID and a token name.
901 Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.
902 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
903 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
904 NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
905 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by
906 Guid and TokenName and NULL must be returned.
907 If TokenName is not a valid token in the token space specified by Guid,
908 then the module will not build.
910 If Guid is NULL, then ASSERT().
911 If SizeOfBuffer is NULL, then ASSERT().
912 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
914 @param Guid Pointer to a 128-bit unique value that designates
915 which namespace to retrieve a value from.
916 @param TokenName The name of the PCD token to set the current value for.
917 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
918 @param Buffer Pointer to the buffer to set.
920 @return Return the pointer to the Buffer that was set.
923 #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \
924 LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
928 Sets a Boolean PCD token value based on a GUID and a token name.
930 Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.
931 If TokenName is not a valid token in the token space specified by Guid,
932 then the module will not build.
934 If Guid is NULL, then ASSERT().
936 @param Guid Pointer to a 128-bit unique value that designates
937 which namespace to retrieve a value from.
938 @param TokenName The name of the PCD token to set the current value for.
939 @param Value The Boolean value to set.
941 @return Return the Value that was set.
944 #define PcdSetExBool(Guid, TokenName, Value) \
945 LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
949 Sets an 8-bit PCD token value based on a GUID and a token name.
951 Sets the 8-bit value for the token specified by Guid and TokenName.
952 If TokenName is not a valid token in the token space specified by Guid,
953 then the module will not build.
955 If Guid is NULL, then ASSERT().
957 @param Guid Pointer to a 128-bit unique value that designates
958 which namespace to retrieve a value from.
959 @param TokenName The name of the PCD token to set the current value for.
960 @param Value The 8-bit value to set.
962 @return The status of the set operation.
965 #define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
968 Sets an 16-bit PCD token value based on a GUID and a token name.
970 Sets the 16-bit value for the token specified by Guid and TokenName.
971 If TokenName is not a valid token in the token space specified by Guid,
972 then the module will not build.
974 If Guid is NULL, then ASSERT().
976 @param Guid Pointer to a 128-bit unique value that designates
977 which namespace to retrieve a value from.
978 @param TokenName The name of the PCD token to set the current value for.
979 @param Value The 16-bit value to set.
981 @return The status of the set operation.
984 #define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
987 Sets an 32-bit PCD token value based on a GUID and a token name.
989 Sets the 32-bit value for the token specified by Guid and TokenName.
990 If TokenName is not a valid token in the token space specified by Guid,
991 then the module will not build.
993 If Guid is NULL, then ASSERT().
995 @param Guid Pointer to a 128-bit unique value that designates
996 which namespace to retrieve a value from.
997 @param TokenName The name of the PCD token to set the current value for.
998 @param Value The 32-bit value to set.
1000 @return The status of the set operation.
1003 #define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1006 Sets an 64-bit PCD token value based on a GUID and a token name.
1008 Sets the 64-bit value for the token specified by Guid and TokenName.
1009 If TokenName is not a valid token in the token space specified by Guid,
1010 then the module will not build.
1012 If Guid is NULL, then ASSERT().
1014 @param Guid Pointer to a 128-bit unique value that designates
1015 which namespace to retrieve a value from.
1016 @param TokenName The name of the PCD token to set the current value for.
1017 @param Value The 64-bit value to set.
1019 @return The status of the set operation.
1022 #define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1025 Sets a pointer to a PCD token buffer based on a GUID and a token name.
1027 Sets the buffer for the token specified by Guid and TokenName.
1028 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
1029 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
1030 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
1031 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
1032 supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.
1033 If TokenName is not a valid token in the token space specified by Guid,
1034 then the module will not build.
1036 If Guid is NULL, then ASSERT().
1037 If SizeOfBuffer is NULL, then ASSERT().
1038 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1040 @param Guid Pointer to a 128-bit unique value that designates
1041 which namespace to retrieve a value from.
1042 @param TokenName The name of the PCD token to set the current value for.
1043 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1044 @param Buffer Pointer to the buffer to set.
1046 @return The status of the set operation.
1049 #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
1050 LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
1054 Sets an boolean PCD token value based on a GUID and a token name.
1056 Sets the boolean value for the token specified by Guid and TokenName.
1057 If TokenName is not a valid token in the token space specified by Guid,
1058 then the module will not build.
1060 If Guid is NULL, then ASSERT().
1062 @param Guid Pointer to a 128-bit unique value that designates
1063 which namespace to retrieve a value from.
1064 @param TokenName The name of the PCD token to set the current value for.
1065 @param Value The boolean value to set.
1067 @return The status of the set operation.
1070 #define PcdSetExBoolS(Guid, TokenName, Value) \
1071 LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1074 This function provides a means by which SKU support can be established in the PCD infrastructure.
1076 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
1077 If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
1079 @param SkuId The SKU value that will be used when the PCD service retrieves and sets values
1080 associated with a PCD token.
1082 @return Return the SKU ID that was set.
1093 This function provides a means by which to retrieve a value for a given PCD token.
1095 Returns the 8-bit value for the token specified by TokenNumber.
1097 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1099 @return Returns the 8-bit value for the token specified by TokenNumber.
1105 IN UINTN TokenNumber
1110 This function provides a means by which to retrieve a value for a given PCD token.
1112 Returns the 16-bit value for the token specified by TokenNumber.
1114 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1116 @return Returns the 16-bit value for the token specified by TokenNumber.
1122 IN UINTN TokenNumber
1127 This function provides a means by which to retrieve a value for a given PCD token.
1129 Returns the 32-bit value for the token specified by TokenNumber.
1131 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1133 @return Returns the 32-bit value for the token specified by TokenNumber.
1139 IN UINTN TokenNumber
1144 This function provides a means by which to retrieve a value for a given PCD token.
1146 Returns the 64-bit value for the token specified by TokenNumber.
1148 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1150 @return Returns the 64-bit value for the token specified by TokenNumber.
1156 IN UINTN TokenNumber
1161 This function provides a means by which to retrieve a value for a given PCD token.
1163 Returns the pointer to the buffer of the token specified by TokenNumber.
1165 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1167 @return Returns the pointer to the token specified by TokenNumber.
1173 IN UINTN TokenNumber
1178 This function provides a means by which to retrieve a value for a given PCD token.
1180 Returns the Boolean value of the token specified by TokenNumber.
1182 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1184 @return Returns the Boolean value of the token specified by TokenNumber.
1190 IN UINTN TokenNumber
1195 This function provides a means by which to retrieve the size of a given PCD token.
1197 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1199 @return Returns the size of the token specified by TokenNumber.
1205 IN UINTN TokenNumber
1210 This function provides a means by which to retrieve a value for a given PCD token.
1212 Returns the 8-bit value for the token specified by TokenNumber and Guid.
1214 If Guid is NULL, then ASSERT().
1216 @param[in] Guid Pointer to a 128-bit unique value that designates
1217 which namespace to retrieve a value from.
1218 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1220 @return Return the UINT8.
1226 IN CONST GUID
*Guid
,
1227 IN UINTN TokenNumber
1232 This function provides a means by which to retrieve a value for a given PCD token.
1234 Returns the 16-bit value for the token specified by TokenNumber and Guid.
1236 If Guid is NULL, then ASSERT().
1238 @param[in] Guid Pointer to a 128-bit unique value that designates
1239 which namespace to retrieve a value from.
1240 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1242 @return Return the UINT16.
1248 IN CONST GUID
*Guid
,
1249 IN UINTN TokenNumber
1254 Returns the 32-bit value for the token specified by TokenNumber and Guid.
1255 If Guid is NULL, then ASSERT().
1257 @param[in] Guid Pointer to a 128-bit unique value that designates
1258 which namespace to retrieve a value from.
1259 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1261 @return Return the UINT32.
1267 IN CONST GUID
*Guid
,
1268 IN UINTN TokenNumber
1273 This function provides a means by which to retrieve a value for a given PCD token.
1275 Returns the 64-bit value for the token specified by TokenNumber and Guid.
1277 If Guid is NULL, then ASSERT().
1279 @param[in] Guid Pointer to a 128-bit unique value that designates
1280 which namespace to retrieve a value from.
1281 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1283 @return Return the UINT64.
1289 IN CONST GUID
*Guid
,
1290 IN UINTN TokenNumber
1295 This function provides a means by which to retrieve a value for a given PCD token.
1297 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
1299 If Guid is NULL, then ASSERT().
1301 @param[in] Guid Pointer to a 128-bit unique value that designates
1302 which namespace to retrieve a value from.
1303 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1305 @return Return the VOID* pointer.
1311 IN CONST GUID
*Guid
,
1312 IN UINTN TokenNumber
1317 This function provides a means by which to retrieve a value for a given PCD token.
1319 Returns the Boolean value of the token specified by TokenNumber and Guid.
1321 If Guid is NULL, then ASSERT().
1323 @param[in] Guid Pointer to a 128-bit unique value that designates
1324 which namespace to retrieve a value from.
1325 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1327 @return Return the BOOLEAN.
1333 IN CONST GUID
*Guid
,
1334 IN UINTN TokenNumber
1339 This function provides a means by which to retrieve the size of a given PCD token.
1341 Returns the size of the token specified by TokenNumber and Guid.
1343 If Guid is NULL, then ASSERT().
1345 @param[in] Guid Pointer to a 128-bit unique value that designates
1346 which namespace to retrieve a value from.
1347 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1349 @return Return the size.
1355 IN CONST GUID
*Guid
,
1356 IN UINTN TokenNumber
1360 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1362 This function provides a means by which to set a value for a given PCD token.
1364 Sets the 8-bit value for the token specified by TokenNumber
1365 to the value specified by Value. Value is returned.
1367 @param[in] TokenNumber The PCD token number to set a current value for.
1368 @param[in] Value The 8-bit value to set.
1370 @return Return the Value that was set.
1376 IN UINTN TokenNumber
,
1382 This function provides a means by which to set a value for a given PCD token.
1384 Sets the 16-bit value for the token specified by TokenNumber
1385 to the value specified by Value. Value is returned.
1387 @param[in] TokenNumber The PCD token number to set a current value for.
1388 @param[in] Value The 16-bit value to set.
1390 @return Return the Value that was set.
1396 IN UINTN TokenNumber
,
1402 This function provides a means by which to set a value for a given PCD token.
1404 Sets the 32-bit value for the token specified by TokenNumber
1405 to the value specified by Value. Value is returned.
1407 @param[in] TokenNumber The PCD token number to set a current value for.
1408 @param[in] Value The 32-bit value to set.
1410 @return Return the Value that was set.
1416 IN UINTN TokenNumber
,
1422 This function provides a means by which to set a value for a given PCD token.
1424 Sets the 64-bit value for the token specified by TokenNumber
1425 to the value specified by Value. Value is returned.
1427 @param[in] TokenNumber The PCD token number to set a current value for.
1428 @param[in] Value The 64-bit value to set.
1430 @return Return the Value that was set.
1436 IN UINTN TokenNumber
,
1442 This function provides a means by which to set a value for a given PCD token.
1444 Sets a buffer for the token specified by TokenNumber to the value
1445 specified by Buffer and SizeOfBuffer. Buffer is returned.
1446 If SizeOfBuffer is greater than the maximum size support by TokenNumber,
1447 then set SizeOfBuffer to the maximum size supported by TokenNumber and
1448 return NULL to indicate that the set operation was not actually performed.
1450 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1451 maximum size supported by TokenName and NULL must be returned.
1453 If SizeOfBuffer is NULL, then ASSERT().
1454 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1456 @param[in] TokenNumber The PCD token number to set a current value for.
1457 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1458 @param[in] Buffer A pointer to the buffer to set.
1460 @return Return the pointer for the Buffer that was set.
1466 IN UINTN TokenNumber
,
1467 IN OUT UINTN
*SizeOfBuffer
,
1468 IN CONST VOID
*Buffer
1473 This function provides a means by which to set a value for a given PCD token.
1475 Sets the Boolean value for the token specified by TokenNumber
1476 to the value specified by Value. Value is returned.
1478 @param[in] TokenNumber The PCD token number to set a current value for.
1479 @param[in] Value The boolean value to set.
1481 @return Return the Value that was set.
1487 IN UINTN TokenNumber
,
1493 This function provides a means by which to set a value for a given PCD token.
1495 Sets the 8-bit value for the token specified by TokenNumber and
1496 Guid to the value specified by Value. Value is returned.
1498 If Guid is NULL, then ASSERT().
1500 @param[in] Guid Pointer to a 128-bit unique value that
1501 designates which namespace to set a value from.
1502 @param[in] TokenNumber The PCD token number to set a current value for.
1503 @param[in] Value The 8-bit value to set.
1505 @return Return the Value that was set.
1511 IN CONST GUID
*Guid
,
1512 IN UINTN TokenNumber
,
1518 This function provides a means by which to set a value for a given PCD token.
1520 Sets the 16-bit value for the token specified by TokenNumber and
1521 Guid to the value specified by Value. Value is returned.
1523 If Guid is NULL, then ASSERT().
1525 @param[in] Guid Pointer to a 128-bit unique value that
1526 designates which namespace to set a value from.
1527 @param[in] TokenNumber The PCD token number to set a current value for.
1528 @param[in] Value The 16-bit value to set.
1530 @return Return the Value that was set.
1536 IN CONST GUID
*Guid
,
1537 IN UINTN TokenNumber
,
1543 This function provides a means by which to set a value for a given PCD token.
1545 Sets the 32-bit value for the token specified by TokenNumber and
1546 Guid to the value specified by Value. Value is returned.
1548 If Guid is NULL, then ASSERT().
1550 @param[in] Guid Pointer to a 128-bit unique value that
1551 designates which namespace to set a value from.
1552 @param[in] TokenNumber The PCD token number to set a current value for.
1553 @param[in] Value The 32-bit value to set.
1555 @return Return the Value that was set.
1561 IN CONST GUID
*Guid
,
1562 IN UINTN TokenNumber
,
1568 This function provides a means by which to set a value for a given PCD token.
1570 Sets the 64-bit value for the token specified by TokenNumber and
1571 Guid to the value specified by Value. Value is returned.
1573 If Guid is NULL, then ASSERT().
1575 @param[in] Guid Pointer to a 128-bit unique value that
1576 designates which namespace to set a value from.
1577 @param[in] TokenNumber The PCD token number to set a current value for.
1578 @param[in] Value The 64-bit value to set.
1580 @return Return the Value that was set.
1586 IN CONST GUID
*Guid
,
1587 IN UINTN TokenNumber
,
1593 This function provides a means by which to set a value for a given PCD token.
1595 Sets a buffer for the token specified by TokenNumber to the value specified by
1596 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1597 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
1598 supported by TokenNumber and return NULL to indicate that the set operation
1599 was not actually performed.
1601 If Guid is NULL, then ASSERT().
1602 If SizeOfBuffer is NULL, then ASSERT().
1603 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1605 @param[in] Guid Pointer to a 128-bit unique value that
1606 designates which namespace to set a value from.
1607 @param[in] TokenNumber The PCD token number to set a current value for.
1608 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1609 @param[in] Buffer A pointer to the buffer to set.
1611 @return Return the pointer to the Buffer that was set.
1617 IN CONST GUID
*Guid
,
1618 IN UINTN TokenNumber
,
1619 IN OUT UINTN
*SizeOfBuffer
,
1625 This function provides a means by which to set a value for a given PCD token.
1627 Sets the Boolean value for the token specified by TokenNumber and
1628 Guid to the value specified by Value. Value is returned.
1630 If Guid is NULL, then ASSERT().
1632 @param[in] Guid Pointer to a 128-bit unique value that
1633 designates which namespace to set a value from.
1634 @param[in] TokenNumber The PCD token number to set a current value for.
1635 @param[in] Value The Boolean value to set.
1637 @return Return the Value that was set.
1643 IN CONST GUID
*Guid
,
1644 IN UINTN TokenNumber
,
1650 This function provides a means by which to set a value for a given PCD token.
1652 Sets the 8-bit value for the token specified by TokenNumber
1653 to the value specified by Value.
1655 @param[in] TokenNumber The PCD token number to set a current value for.
1656 @param[in] Value The 8-bit value to set.
1658 @return The status of the set operation.
1664 IN UINTN TokenNumber
,
1669 This function provides a means by which to set a value for a given PCD token.
1671 Sets the 16-bit value for the token specified by TokenNumber
1672 to the value specified by Value.
1674 @param[in] TokenNumber The PCD token number to set a current value for.
1675 @param[in] Value The 16-bit value to set.
1677 @return The status of the set operation.
1683 IN UINTN TokenNumber
,
1688 This function provides a means by which to set a value for a given PCD token.
1690 Sets the 32-bit value for the token specified by TokenNumber
1691 to the value specified by Value.
1693 @param[in] TokenNumber The PCD token number to set a current value for.
1694 @param[in] Value The 32-bit value to set.
1696 @return The status of the set operation.
1702 IN UINTN TokenNumber
,
1707 This function provides a means by which to set a value for a given PCD token.
1709 Sets the 64-bit value for the token specified by TokenNumber
1710 to the value specified by Value.
1712 @param[in] TokenNumber The PCD token number to set a current value for.
1713 @param[in] Value The 64-bit value to set.
1715 @return The status of the set operation.
1721 IN UINTN TokenNumber
,
1726 This function provides a means by which to set a value for a given PCD token.
1728 Sets a buffer for the token specified by TokenNumber to the value specified
1729 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1730 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1731 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1732 was not actually performed.
1734 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1735 maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
1737 If SizeOfBuffer is NULL, then ASSERT().
1738 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1740 @param[in] TokenNumber The PCD token number to set a current value for.
1741 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1742 @param[in] Buffer A pointer to the buffer to set.
1744 @return The status of the set operation.
1750 IN UINTN TokenNumber
,
1751 IN OUT UINTN
*SizeOfBuffer
,
1752 IN CONST VOID
*Buffer
1756 This function provides a means by which to set a value for a given PCD token.
1758 Sets the boolean value for the token specified by TokenNumber
1759 to the value specified by Value.
1761 @param[in] TokenNumber The PCD token number to set a current value for.
1762 @param[in] Value The boolean value to set.
1764 @return The status of the set operation.
1770 IN UINTN TokenNumber
,
1775 This function provides a means by which to set a value for a given PCD token.
1777 Sets the 8-bit value for the token specified by TokenNumber
1778 to the value specified by Value.
1780 If Guid is NULL, then ASSERT().
1782 @param[in] Guid The pointer to a 128-bit unique value that
1783 designates which namespace to set a value from.
1784 @param[in] TokenNumber The PCD token number to set a current value for.
1785 @param[in] Value The 8-bit value to set.
1787 @return The status of the set operation.
1793 IN CONST GUID
*Guid
,
1794 IN UINTN TokenNumber
,
1799 This function provides a means by which to set a value for a given PCD token.
1801 Sets the 16-bit value for the token specified by TokenNumber
1802 to the value specified by Value.
1804 If Guid is NULL, then ASSERT().
1806 @param[in] Guid The pointer to a 128-bit unique value that
1807 designates which namespace to set a value from.
1808 @param[in] TokenNumber The PCD token number to set a current value for.
1809 @param[in] Value The 16-bit value to set.
1811 @return The status of the set operation.
1817 IN CONST GUID
*Guid
,
1818 IN UINTN TokenNumber
,
1823 This function provides a means by which to set a value for a given PCD token.
1825 Sets the 32-bit value for the token specified by TokenNumber
1826 to the value specified by Value.
1828 If Guid is NULL, then ASSERT().
1830 @param[in] Guid The pointer to a 128-bit unique value that
1831 designates which namespace to set a value from.
1832 @param[in] TokenNumber The PCD token number to set a current value for.
1833 @param[in] Value The 32-bit value to set.
1835 @return The status of the set operation.
1841 IN CONST GUID
*Guid
,
1842 IN UINTN TokenNumber
,
1847 This function provides a means by which to set a value for a given PCD token.
1849 Sets the 64-bit value for the token specified by TokenNumber
1850 to the value specified by Value.
1852 If Guid is NULL, then ASSERT().
1854 @param[in] Guid The pointer to a 128-bit unique value that
1855 designates which namespace to set a value from.
1856 @param[in] TokenNumber The PCD token number to set a current value for.
1857 @param[in] Value The 64-bit value to set.
1859 @return The status of the set operation.
1865 IN CONST GUID
*Guid
,
1866 IN UINTN TokenNumber
,
1871 This function provides a means by which to set a value for a given PCD token.
1873 Sets a buffer for the token specified by TokenNumber to the value specified by
1874 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1875 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1876 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1877 was not actually performed.
1879 If Guid is NULL, then ASSERT().
1880 If SizeOfBuffer is NULL, then ASSERT().
1881 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1883 @param[in] Guid Pointer to a 128-bit unique value that
1884 designates which namespace to set a value from.
1885 @param[in] TokenNumber The PCD token number to set a current value for.
1886 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1887 @param[in] Buffer A pointer to the buffer to set.
1889 @return The status of the set operation.
1895 IN CONST GUID
*Guid
,
1896 IN UINTN TokenNumber
,
1897 IN OUT UINTN
*SizeOfBuffer
,
1902 This function provides a means by which to set a value for a given PCD token.
1904 Sets the boolean value for the token specified by TokenNumber
1905 to the value specified by Value.
1907 If Guid is NULL, then ASSERT().
1909 @param[in] Guid The pointer to a 128-bit unique value that
1910 designates which namespace to set a value from.
1911 @param[in] TokenNumber The PCD token number to set a current value for.
1912 @param[in] Value The boolean value to set.
1914 @return The status of the set operation.
1920 IN CONST GUID
*Guid
,
1921 IN UINTN TokenNumber
,
1926 This notification function serves two purposes.
1928 Firstly, it notifies the module that did the registration that the value of this
1929 PCD token has been set.
1930 Secondly, it provides a mechanism for the module that did the registration to intercept
1931 the set operation and override the value been set if necessary. After the invocation of
1932 the callback function, TokenData will be used by PCD service PEIM or driver to modify th
1933 internal data in PCD database.
1935 @param[in] CallBackGuid The PCD token GUID being set.
1936 @param[in] CallBackToken The PCD token number being set.
1937 @param[in, out] TokenData A pointer to the token data being set.
1938 @param[in] TokenDataSize The size, in bytes, of the data being set.
1943 (EFIAPI
*PCD_CALLBACK
)(
1944 IN CONST GUID
*CallBackGuid
, OPTIONAL
1945 IN UINTN CallBackToken
,
1946 IN OUT VOID
*TokenData
,
1947 IN UINTN TokenDataSize
1952 Set up a notification function that is called when a specified token is set.
1954 When the token specified by TokenNumber and Guid is set,
1955 then notification function specified by NotificationFunction is called.
1956 If Guid is NULL, then the default token space is used.
1957 If NotificationFunction is NULL, then ASSERT().
1959 @param[in] Guid Pointer to a 128-bit unique value that designates which
1960 namespace to set a value from. If NULL, then the default
1961 token space is used.
1962 @param[in] TokenNumber The PCD token number to monitor.
1963 @param[in] NotificationFunction The function to call when the token
1964 specified by Guid and TokenNumber is set.
1969 LibPcdCallbackOnSet (
1970 IN CONST GUID
*Guid
, OPTIONAL
1971 IN UINTN TokenNumber
,
1972 IN PCD_CALLBACK NotificationFunction
1977 Disable a notification function that was established with LibPcdCallbackonSet().
1979 Disable a notification function that was previously established with LibPcdCallbackOnSet().
1980 If NotificationFunction is NULL, then ASSERT().
1981 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
1982 and NotificationFunction, then ASSERT().
1984 @param[in] Guid Specify the GUID token space.
1985 @param[in] TokenNumber Specify the token number.
1986 @param[in] NotificationFunction The callback function to be unregistered.
1991 LibPcdCancelCallback (
1992 IN CONST GUID
*Guid
, OPTIONAL
1993 IN UINTN TokenNumber
,
1994 IN PCD_CALLBACK NotificationFunction
1999 Retrieves the next token in a token space.
2001 Retrieves the next PCD token number from the token space specified by Guid.
2002 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
2003 then the first token number is returned. Otherwise, the token number that
2004 follows TokenNumber in the token space is returned. If TokenNumber is the last
2005 token number in the token space, then 0 is returned.
2007 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
2009 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace
2010 to set a value from. If NULL, then the default token space is used.
2011 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
2014 @return The next valid token number.
2019 LibPcdGetNextToken (
2020 IN CONST GUID
*Guid
, OPTIONAL
2021 IN UINTN TokenNumber
2027 Used to retrieve the list of available PCD token space GUIDs.
2029 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
2031 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
2032 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
2034 @param TokenSpaceGuid Pointer to the a PCD token space GUID
2036 @return The next valid token namespace.
2041 LibPcdGetNextTokenSpace (
2042 IN CONST GUID
*TokenSpaceGuid
2047 Sets a value of a patchable PCD entry that is type pointer.
2049 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
2050 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
2051 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
2052 NULL to indicate that the set operation was not actually performed.
2053 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2054 MaximumDatumSize and NULL must be returned.
2056 If PatchVariable is NULL, then ASSERT().
2057 If SizeOfBuffer is NULL, then ASSERT().
2058 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2060 @param[out] PatchVariable A pointer to the global variable in a module that is
2061 the target of the set operation.
2062 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2063 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2064 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2066 @return Return the pointer to the Buffer that was set.
2072 OUT VOID
*PatchVariable
,
2073 IN UINTN MaximumDatumSize
,
2074 IN OUT UINTN
*SizeOfBuffer
,
2075 IN CONST VOID
*Buffer
2079 Sets a value of a patchable PCD entry that is type pointer.
2081 Sets the PCD entry specified by PatchVariable to the value specified
2082 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
2083 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
2084 to indicate that the set operation was not actually performed.
2085 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2086 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
2088 If PatchVariable is NULL, then ASSERT().
2089 If SizeOfBuffer is NULL, then ASSERT().
2090 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2092 @param[out] PatchVariable A pointer to the global variable in a module that is
2093 the target of the set operation.
2094 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2095 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2096 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2098 @return The status of the set operation.
2103 LibPatchPcdSetPtrS (
2104 OUT VOID
*PatchVariable
,
2105 IN UINTN MaximumDatumSize
,
2106 IN OUT UINTN
*SizeOfBuffer
,
2107 IN CONST VOID
*Buffer
2111 Sets a value and size of a patchable PCD entry that is type pointer.
2113 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
2114 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
2115 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
2116 NULL to indicate that the set operation was not actually performed.
2117 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2118 MaximumDatumSize and NULL must be returned.
2120 If PatchVariable is NULL, then ASSERT().
2121 If SizeOfPatchVariable is NULL, then ASSERT().
2122 If SizeOfBuffer is NULL, then ASSERT().
2123 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2125 @param[out] PatchVariable A pointer to the global variable in a module that is
2126 the target of the set operation.
2127 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
2128 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2129 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2130 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2132 @return Return the pointer to the Buffer that was set.
2137 LibPatchPcdSetPtrAndSize (
2138 OUT VOID
*PatchVariable
,
2139 OUT UINTN
*SizeOfPatchVariable
,
2140 IN UINTN MaximumDatumSize
,
2141 IN OUT UINTN
*SizeOfBuffer
,
2142 IN CONST VOID
*Buffer
2146 Sets a value and size of a patchable PCD entry that is type pointer.
2148 Sets the PCD entry specified by PatchVariable to the value specified
2149 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
2150 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
2151 to indicate that the set operation was not actually performed.
2152 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2153 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
2155 If PatchVariable is NULL, then ASSERT().
2156 If SizeOfPatchVariable is NULL, then ASSERT().
2157 If SizeOfBuffer is NULL, then ASSERT().
2158 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2160 @param[out] PatchVariable A pointer to the global variable in a module that is
2161 the target of the set operation.
2162 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
2163 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2164 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2165 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2167 @return The status of the set operation.
2172 LibPatchPcdSetPtrAndSizeS (
2173 OUT VOID
*PatchVariable
,
2174 OUT UINTN
*SizeOfPatchVariable
,
2175 IN UINTN MaximumDatumSize
,
2176 IN OUT UINTN
*SizeOfBuffer
,
2177 IN CONST VOID
*Buffer
2191 /// The returned information associated with the requested TokenNumber. If
2192 /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.
2196 /// The size of the data in bytes associated with the TokenNumber specified. If
2197 /// TokenNumber is 0, then PcdSize is set 0.
2201 /// The null-terminated ASCII string associated with a given token. If the
2202 /// TokenNumber specified was 0, then this field corresponds to the null-terminated
2203 /// ASCII string associated with the token's namespace Guid. If NULL, there is no
2204 /// name associated with this request.
2211 Retrieve additional information associated with a PCD token.
2213 This includes information such as the type of value the TokenNumber is associated with as well as possible
2214 human readable name that is associated with the token.
2216 If TokenNumber is not in the default token space specified, then ASSERT().
2218 @param[in] TokenNumber The PCD token number.
2219 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2220 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2225 IN UINTN TokenNumber
,
2226 OUT PCD_INFO
*PcdInfo
2230 Retrieve additional information associated with a PCD token.
2232 This includes information such as the type of value the TokenNumber is associated with as well as possible
2233 human readable name that is associated with the token.
2235 If TokenNumber is not in the token space specified by Guid, then ASSERT().
2237 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
2238 @param[in] TokenNumber The PCD token number.
2239 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2240 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2245 IN CONST GUID
*Guid
,
2246 IN UINTN TokenNumber
,
2247 OUT PCD_INFO
*PcdInfo
2251 Retrieve the currently set SKU Id.
2253 If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
2255 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
2256 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU