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 - 2018, Intel Corporation. All rights reserved.<BR>
18 SPDX-License-Identifier: BSD-2-Clause-Patent
27 Retrieves a token number based on a token name.
29 Returns the token number associated with the PCD token specified by TokenName.
30 If TokenName is not a valid token in the token space, then the module will not build.
32 @param TokenName The name of the PCD token to retrieve the token number for.
34 @return The token number associated with the PCD.
37 #define PcdToken(TokenName) _PCD_TOKEN_##TokenName
41 Retrieves a Boolean PCD feature flag based on a token name.
43 Returns the Boolean value for the PCD feature flag specified by TokenName.
44 If TokenName is not a valid token in the token space, then the module will not build.
45 If TokenName is not a feature flag PCD, then the module will not build.
47 @param TokenName The name of the PCD token to retrieve a current value for.
49 @return Boolean value for the PCD feature flag.
52 #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
56 Retrieves an 8-bit fixed PCD token value based on a token name.
58 Returns the 8-bit value for the token specified by TokenName.
59 If TokenName is not a valid token in the token space, then the module will not build.
60 If TokenName is not a fixed at build PCD, then the module will not build.
62 @param TokenName The name of the PCD token to retrieve a current value for.
64 @return 8-bit value for the token specified by TokenName.
67 #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
71 Retrieves a 16-bit fixed PCD token value based on a token name.
73 Returns the 16-bit value for the token specified by TokenName.
74 If TokenName is not a valid token in the token space, then the module will not build.
75 If TokenName is not a fixed at build PCD, then the module will not build.
77 @param TokenName The name of the PCD token to retrieve a current value for.
79 @return 16-bit value for the token specified by TokenName.
82 #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
86 Retrieves a 32-bit fixed PCD token value based on a token name.
88 Returns the 32-bit value for the token specified by TokenName.
89 If TokenName is not a valid token in the token space, then the module will not build.
90 If TokenName is not a fixed at build PCD, then the module will not build.
92 @param TokenName The name of the PCD token to retrieve a current value for.
94 @return 32-bit value for the token specified by TokenName.
97 #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
101 Retrieves a 64-bit fixed PCD token value based on a token name.
103 Returns the 64-bit value for the token specified by TokenName.
104 If TokenName is not a valid token in the token space, then the module will not build.
105 If TokenName is not a fixed at build PCD, then the module will not build.
107 @param TokenName The name of the PCD token to retrieve a current value for.
109 @return 64-bit value for the token specified by TokenName.
112 #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
116 Retrieves a Boolean fixed PCD token value based on a token name.
118 Returns the Boolean value for the token specified by TokenName.
119 If TokenName is not a valid token in the token space, then the module will not build.
120 If TokenName is not a fixed at build PCD, then the module will not build.
122 @param TokenName The name of the PCD token to retrieve a current value for.
124 @return The Boolean value for the token.
127 #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
131 Retrieves a pointer to a fixed PCD token buffer based on a token name.
133 Returns a pointer to the buffer for the token specified by TokenName.
134 If TokenName is not a valid token in the token space, then the module will not build.
135 If TokenName is not a fixed at build PCD, then the module will not build.
137 @param TokenName The name of the PCD token to retrieve a current value for.
139 @return A pointer to the buffer.
142 #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
146 Retrieves an 8-bit binary patchable PCD token value based on a token name.
148 Returns the 8-bit value for the token specified by TokenName.
149 If TokenName is not a valid token in the token space, then the module will not build.
150 If TokenName is not a patchable in module PCD, then the module will not build.
152 @param TokenName The name of the PCD token to retrieve a current value for.
154 @return An 8-bit binary patchable PCD token value.
157 #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
160 Retrieves a 16-bit binary patchable PCD token value based on a token name.
162 Returns the 16-bit value for the token specified by TokenName.
163 If TokenName is not a valid token in the token space, then the module will not build.
164 If TokenName is not a patchable in module PCD, then the module will not build.
166 @param TokenName The name of the PCD token to retrieve a current value for.
168 @return A 16-bit binary patchable PCD token value.
171 #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
175 Retrieves a 32-bit binary patchable PCD token value based on a token name.
177 Returns the 32-bit value for the token specified by TokenName.
178 If TokenName is not a valid token in the token space, then the module will not build.
179 If TokenName is not a patchable in module PCD, then the module will not build.
181 @param TokenName The name of the PCD token to retrieve a current value for.
183 @return A 32-bit binary patchable PCD token value.
186 #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
190 Retrieves a 64-bit binary patchable PCD token value based on a token name.
192 Returns the 64-bit value for the token specified by TokenName.
193 If TokenName is not a valid token in the token space, then the module will not build.
194 If TokenName is not a patchable in module PCD, then the module will not build.
196 @param TokenName The name of the PCD token to retrieve a current value for.
198 @return A 64-bit binary patchable PCD token value.
201 #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
205 Retrieves a Boolean binary patchable PCD token value based on a token name.
207 Returns the Boolean value for the token specified by TokenName.
208 If TokenName is not a valid token in the token space, then the module will not build.
209 If TokenName is not a patchable in module PCD, then the module will not build.
211 @param TokenName The name of the PCD token to retrieve a current value for.
213 @return The Boolean value for the token.
216 #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
220 Retrieves a pointer to a binary patchable PCD token buffer based on a token name.
222 Returns a pointer to the buffer for the token specified by TokenName.
223 If TokenName is not a valid token in the token space, then the module will not build.
224 If TokenName is not a patchable in module PCD, then the module will not build.
226 @param TokenName The name of the PCD token to retrieve a current value for.
228 @return A pointer to the buffer for the token.
231 #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
235 Sets an 8-bit binary patchable PCD token value based on a token name.
237 Sets the 8-bit value for the token specified by TokenName. Value is returned.
238 If TokenName is not a valid token in the token space, then the module will not build.
239 If TokenName is not a patchable in module PCD, then the module will not build.
241 @param TokenName The name of the binary patchable PCD token to set the current value for.
242 @param Value The 8-bit value to set.
244 @return Return the Value that was set.
247 #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
251 Sets a 16-bit binary patchable PCD token value based on a token name.
253 Sets the 16-bit value for the token specified by TokenName. Value is returned.
254 If TokenName is not a valid token in the token space, then the module will not build.
255 If TokenName is not a patchable in module PCD, then the module will not build.
257 @param TokenName The name of the binary patchable PCD token to set the current value for.
258 @param Value The 16-bit value to set.
260 @return Return the Value that was set.
263 #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
267 Sets a 32-bit binary patchable PCD token value based on a token name.
269 Sets the 32-bit value for the token specified by TokenName. Value is returned.
270 If TokenName is not a valid token in the token space, then the module will not build.
271 If TokenName is not a patchable in module PCD, then the module will not build.
273 @param TokenName The name of the binary patchable PCD token to set the current value for.
274 @param Value The 32-bit value to set.
276 @return Return the Value that was set.
279 #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
283 Sets a 64-bit binary patchable PCD token value based on a token name.
285 Sets the 64-bit value for the token specified by TokenName. Value is returned.
286 If TokenName is not a valid token in the token space, then the module will not build.
287 If TokenName is not a patchable in module PCD, then the module will not build.
289 @param TokenName The name of the binary patchable PCD token to set the current value for.
290 @param Value The 64-bit value to set.
292 @return Return the Value that was set.
295 #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
299 Sets a Boolean binary patchable PCD token value based on a token name.
301 Sets the Boolean value for the token specified by TokenName. Value is returned.
302 If TokenName is not a valid token in the token space, then the module will not build.
303 If TokenName is not a patchable in module PCD, then the module will not build.
305 @param TokenName The name of the binary patchable PCD token to set the current value for.
306 @param Value The boolean value to set.
308 @return Return the Value that was set.
311 #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
315 Sets a pointer to a binary patchable PCD token buffer based on a token name.
317 Sets the buffer for the token specified by TokenName. Buffer is returned.
318 If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer
319 to the maximum size supported by TokenName and return NULL to indicate that the set operation
320 was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be
321 set to the maximum size supported by TokenName and NULL must be returned.
322 If TokenName is not a valid token in the token space, then the module will not build.
323 If TokenName is not a patchable in module PCD, then the module will not build.
325 If SizeOfBuffer is NULL, then ASSERT().
326 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
328 @param TokenName The name of the binary patchable PCD token to set the current value for.
329 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
330 @param Buffer Pointer to the value to set.
332 @return Return the pointer to the Buffer that was set.
335 #define PatchPcdSetPtr(TokenName, Size, Buffer) \
336 LibPatchPcdSetPtrAndSize ( \
337 (VOID *)_gPcd_BinaryPatch_##TokenName, \
338 &_gPcd_BinaryPatch_Size_##TokenName, \
339 (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \
344 Retrieves an 8-bit PCD token value based on a token name.
346 Returns the 8-bit value for the token specified by TokenName.
347 If TokenName is not a valid token in the token space, then the module will not build.
349 @param TokenName The name of the PCD token to retrieve a current value for.
351 @return 8-bit value for the token specified by TokenName.
354 #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
358 Retrieves a 16-bit PCD token value based on a token name.
360 Returns the 16-bit value for the token specified by TokenName.
361 If TokenName is not a valid token in the token space, then the module will not build.
363 @param TokenName The name of the PCD token to retrieve a current value for.
365 @return 16-bit value for the token specified by TokenName.
368 #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
372 Retrieves a 32-bit PCD token value based on a token name.
374 Returns the 32-bit value for the token specified by TokenName.
375 If TokenName is not a valid token in the token space, then the module will not build.
377 @param TokenName The name of the PCD token to retrieve a current value for.
379 @return 32-bit value for the token specified by TokenName.
382 #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
386 Retrieves a 64-bit PCD token value based on a token name.
388 Returns the 64-bit value for the token specified by TokenName.
389 If TokenName is not a valid token in the token space, then the module will not build.
391 @param TokenName The name of the PCD token to retrieve a current value for.
393 @return 64-bit value for the token specified by TokenName.
396 #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
400 Retrieves a pointer to a PCD token buffer based on a token name.
402 Returns a pointer to the buffer for the token specified by TokenName.
403 If TokenName is not a valid token in the token space, then the module will not build.
405 @param TokenName The name of the PCD token to retrieve a current value for.
407 @return A pointer to the buffer.
410 #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
414 Retrieves a Boolean PCD token value based on a token name.
416 Returns the Boolean value for the token specified by TokenName.
417 If TokenName is not a valid token in the token space, then the module will not build.
419 @param TokenName The name of the PCD token to retrieve a current value for.
421 @return A Boolean PCD token value.
424 #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
428 Retrieves the size of a fixed PCD token based on a token name.
430 Returns the size of the token specified by TokenName.
431 If TokenName is not a valid token in the token space, then the module will not build.
433 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
435 @return Return the size
438 #define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName
442 Retrieves the size of a binary patchable PCD token based on a token name.
444 Returns the size of the token specified by TokenName.
445 If TokenName is not a valid token in the token space, then the module will not build.
447 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
449 @return Return the size
452 #define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName
456 Retrieves the size of the PCD token based on a token name.
458 Returns the size of the token specified by TokenName.
459 If TokenName is not a valid token in the token space, then the module will not build.
461 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
463 @return Return the size
466 #define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName
470 Retrieve the size of a given PCD token.
472 Returns the size of the token specified by TokenNumber and Guid.
473 If Guid is NULL, then ASSERT().
475 @param[in] Guid Pointer to a 128-bit unique value that designates
476 which namespace to retrieve a value from.
477 @param[in] TokenNumber The PCD token number to retrieve a current value size for.
479 @return Return the size.
482 #define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))
484 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
486 Sets an 8-bit PCD token value based on a token name.
488 Sets the 8-bit value for the token specified by TokenName. Value is returned.
489 If TokenName is not a valid token in the token space, then the module will not build.
491 @param TokenName The name of the PCD token to retrieve a current value for.
492 @param Value The 8-bit value to set.
494 @return Return the Value that was set.
497 #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))
501 Sets a 16-bit PCD token value based on a token name.
503 Sets the 16-bit value for the token specified by TokenName. Value is returned.
504 If TokenName is not a valid token in the token space, then the module will not build.
506 @param TokenName The name of the PCD token to retrieve a current value for.
507 @param Value The 16-bit value to set.
509 @return Return the Value that was set.
512 #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))
516 Sets a 32-bit PCD token value based on a token name.
518 Sets the 32-bit value for the token specified by TokenName. Value is returned.
519 If TokenName is not a valid token in the token space, then the module will not build.
521 @param TokenName The name of the PCD token to retrieve a current value for.
522 @param Value The 32-bit value to set.
524 @return Return the Value that was set.
527 #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))
531 Sets a 64-bit PCD token value based on a token name.
533 Sets the 64-bit value for the token specified by TokenName. Value is returned.
534 If TokenName is not a valid token in the token space, then the module will not build.
536 @param TokenName The name of the PCD token to retrieve a current value for.
537 @param Value The 64-bit value to set.
539 @return Return the Value that was set.
542 #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))
546 Sets a pointer to a PCD token buffer based on a token name.
548 Sets the buffer for the token specified by TokenName. Buffer is returned.
549 If SizeOfBuffer is greater than the maximum size supported by TokenName,
550 then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
551 to indicate that the set operation was not actually performed. If SizeOfBuffer
552 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
553 by TokenName and NULL must be returned.
554 If TokenName is not a valid token in the token space, then the module will not build.
556 If SizeOfBuffer is NULL, then ASSERT().
557 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
559 @param TokenName The name of the PCD token to set the current value for.
560 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
561 @param Buffer A pointer to the buffer to set.
563 @return Return the pointer to the Buffer that was set.
566 #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \
567 _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))
570 Sets a Boolean PCD token value based on a token name.
572 Sets the Boolean value for the token specified by TokenName. Value is returned.
573 If TokenName is not a valid token in the token space, then the module will not build.
575 @param TokenName The name of the PCD token to set the current value for.
576 @param Buffer The Boolean value to set.
578 @return Return the Value that was set.
581 #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
585 Sets a 8-bit PCD token value based on a token name.
587 Sets the 8-bit value for the token specified by TokenName.
588 If TokenName is not a valid token in the token space, then the module will not build.
590 @param TokenName The name of the PCD token to retrieve a current value for.
591 @param Value The 8-bit value to set.
593 @return The status of the set operation.
596 #define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
599 Sets a 16-bit PCD token value based on a token name.
601 Sets the 16-bit value for the token specified by TokenName.
602 If TokenName is not a valid token in the token space, then the module will not build.
604 @param TokenName The name of the PCD token to retrieve a current value for.
605 @param Value The 16-bit value to set.
607 @return The status of the set operation.
610 #define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
613 Sets a 32-bit PCD token value based on a token name.
615 Sets the 32-bit value for the token specified by TokenName.
616 If TokenName is not a valid token in the token space, then the module will not build.
618 @param TokenName The name of the PCD token to retrieve a current value for.
619 @param Value The 32-bit value to set.
621 @return The status of the set operation.
624 #define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
627 Sets a 64-bit PCD token value based on a token name.
629 Sets the 64-bit value for the token specified by TokenName.
630 If TokenName is not a valid token in the token space, then the module will not build.
632 @param TokenName The name of the PCD token to retrieve a current value for.
633 @param Value The 64-bit value to set.
635 @return The status of the set operation.
638 #define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
641 Sets a pointer to a PCD token buffer based on a token name.
643 Sets the buffer for the token specified by TokenName.
644 If SizeOfBuffer is greater than the maximum size supported by TokenName,
645 then set SizeOfBuffer to the maximum size supported by TokenName and return
646 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
647 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
648 supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
649 If TokenName is not a valid token in the token space, then the module will not build.
651 If SizeOfBuffer is NULL, then ASSERT().
652 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
654 @param TokenName The name of the PCD token to set the current value for.
655 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
656 @param Buffer A pointer to the buffer to set.
658 @return The status of the set operation.
661 #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
662 _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
667 Sets a boolean PCD token value based on a token name.
669 Sets the boolean value for the token specified by TokenName.
670 If TokenName is not a valid token in the token space, then the module will not build.
672 @param TokenName The name of the PCD token to retrieve a current value for.
673 @param Value The boolean value to set.
675 @return The status of the set operation.
678 #define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
681 Retrieves a token number based on a GUID and a token name.
683 Returns the token number for the token specified by Guid and TokenName.
684 If TokenName is not a valid token in the token space, then the module will not build.
686 @param Guid Pointer to a 128-bit unique value that designates
687 which namespace to retrieve a value from.
688 @param TokenName The name of the PCD token to retrieve a current value for.
690 @return Return the token number.
693 #define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
696 Retrieves an 8-bit PCD token value based on a GUID and a token name.
698 Returns the 8-bit value for the token specified by Guid and TokenName.
699 If TokenName is not a valid token in the token space specified by Guid,
700 then the module will not build.
702 If Guid is NULL, then ASSERT().
704 @param Guid Pointer to a 128-bit unique value that designates
705 which namespace to retrieve a value from.
706 @param TokenName The name of the PCD token to retrieve a current value for.
708 @return An 8-bit PCD token value.
711 #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
714 Retrieves a 16-bit PCD token value based on a GUID and a token name.
716 Returns the 16-bit value for the token specified by Guid and TokenName.
717 If TokenName is not a valid token in the token space specified by Guid,
718 then the module will not build.
720 If Guid is NULL, then ASSERT().
722 @param Guid Pointer to a 128-bit unique value that designates
723 which namespace to retrieve a value from.
724 @param TokenName The name of the PCD token to retrieve a current value for.
726 @return A 16-bit PCD token value.
729 #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
733 Retrieves a 32-bit PCD token value based on a GUID and a token name.
735 Returns the 32-bit value for the token specified by Guid and TokenName.
736 If TokenName is not a valid token in the token space specified by Guid,
737 then the module will not build.
739 If Guid is NULL, then ASSERT().
741 @param Guid Pointer to a 128-bit unique value that designates
742 which namespace to retrieve a value from.
743 @param TokenName The name of the PCD token to retrieve a current value for.
745 @return A 32-bit PCD token value.
748 #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
752 Retrieves a 64-bit PCD token value based on a GUID and a token name.
754 Returns the 64-bit value for the token specified by Guid and TokenName.
755 If TokenName is not a valid token in the token space specified by Guid,
756 then the module will not build.
758 If Guid is NULL, then ASSERT().
760 @param Guid Pointer to a 128-bit unique value that designates
761 which namespace to retrieve a value from.
762 @param TokenName The name of the PCD token to retrieve a current value for.
764 @return A 64-bit PCD token value.
767 #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
771 Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
773 Returns a pointer to the buffer for the token specified by Guid and TokenName.
774 If TokenName is not a valid token in the token space specified by Guid,
775 then the module will not build.
777 If Guid is NULL, then ASSERT().
779 @param Guid Pointer to a 128-bit unique value that designates
780 which namespace to retrieve a value from.
781 @param TokenName The name of the PCD token to retrieve a current value for.
783 @return A pointer to a PCD token buffer.
786 #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
790 Retrieves a Boolean PCD token value based on a GUID and a token name.
792 Returns the Boolean value for the token specified by Guid and TokenName.
793 If TokenName is not a valid token in the token space specified by Guid,
794 then the module will not build.
796 If Guid is NULL, then ASSERT().
798 @param Guid Pointer to a 128-bit unique value that designates
799 which namespace to retrieve a value from.
800 @param TokenName The name of the PCD token to retrieve a current value for.
802 @return A Boolean PCD token value.
805 #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
809 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
811 Sets an 8-bit PCD token value based on a GUID and a token name.
813 Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.
814 If TokenName is not a valid token in the token space specified by Guid,
815 then the module will not build.
817 If Guid is NULL, then ASSERT().
819 @param Guid Pointer to a 128-bit unique value that designates
820 which namespace to retrieve a value from.
821 @param TokenName The name of the PCD token to set the current value for.
822 @param Value The 8-bit value to set.
824 @return Return the Value that was set.
827 #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
831 Sets a 16-bit PCD token value based on a GUID and a token name.
833 Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.
834 If TokenName is not a valid token in the token space specified by Guid,
835 then the module will not build.
837 If Guid is NULL, then ASSERT().
839 @param Guid Pointer to a 128-bit unique value that designates
840 which namespace to retrieve a value from.
841 @param TokenName The name of the PCD token to set the current value for.
842 @param Value The 16-bit value to set.
844 @return Return the Value that was set.
847 #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
851 Sets a 32-bit PCD token value based on a GUID and a token name.
853 Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.
854 If TokenName is not a valid token in the token space specified by Guid,
855 then the module will not build.
857 If Guid is NULL, then ASSERT().
859 @param Guid Pointer to a 128-bit unique value that designates
860 which namespace to retrieve a value from.
861 @param TokenName The name of the PCD token to set the current value for.
862 @param Value The 32-bit value to set.
864 @return Return the Value that was set.
867 #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
871 Sets a 64-bit PCD token value based on a GUID and a token name.
873 Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.
874 If TokenName is not a valid token in the token space specified by Guid,
875 then the module will not build.
877 If Guid is NULL, then ASSERT().
879 @param Guid Pointer to a 128-bit unique value that designates
880 which namespace to retrieve a value from.
881 @param TokenName The name of the PCD token to set the current value for.
882 @param Value The 64-bit value to set.
884 @return Return the Value that was set.
887 #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
891 Sets a pointer to a PCD token buffer based on a GUID and a token name.
893 Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.
894 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
895 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
896 NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
897 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by
898 Guid and TokenName and NULL must be returned.
899 If TokenName is not a valid token in the token space specified by Guid,
900 then the module will not build.
902 If Guid is NULL, then ASSERT().
903 If SizeOfBuffer is NULL, then ASSERT().
904 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
906 @param Guid Pointer to a 128-bit unique value that designates
907 which namespace to retrieve a value from.
908 @param TokenName The name of the PCD token to set the current value for.
909 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
910 @param Buffer Pointer to the buffer to set.
912 @return Return the pointer to the Buffer that was set.
915 #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \
916 LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
920 Sets a Boolean PCD token value based on a GUID and a token name.
922 Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.
923 If TokenName is not a valid token in the token space specified by Guid,
924 then the module will not build.
926 If Guid is NULL, then ASSERT().
928 @param Guid Pointer to a 128-bit unique value that designates
929 which namespace to retrieve a value from.
930 @param TokenName The name of the PCD token to set the current value for.
931 @param Value The Boolean value to set.
933 @return Return the Value that was set.
936 #define PcdSetExBool(Guid, TokenName, Value) \
937 LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
941 Sets an 8-bit PCD token value based on a GUID and a token name.
943 Sets the 8-bit value for the token specified by Guid and TokenName.
944 If TokenName is not a valid token in the token space specified by Guid,
945 then the module will not build.
947 If Guid is NULL, then ASSERT().
949 @param Guid Pointer to a 128-bit unique value that designates
950 which namespace to retrieve a value from.
951 @param TokenName The name of the PCD token to set the current value for.
952 @param Value The 8-bit value to set.
954 @return The status of the set operation.
957 #define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
960 Sets an 16-bit PCD token value based on a GUID and a token name.
962 Sets the 16-bit value for the token specified by Guid and TokenName.
963 If TokenName is not a valid token in the token space specified by Guid,
964 then the module will not build.
966 If Guid is NULL, then ASSERT().
968 @param Guid Pointer to a 128-bit unique value that designates
969 which namespace to retrieve a value from.
970 @param TokenName The name of the PCD token to set the current value for.
971 @param Value The 16-bit value to set.
973 @return The status of the set operation.
976 #define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
979 Sets an 32-bit PCD token value based on a GUID and a token name.
981 Sets the 32-bit value for the token specified by Guid and TokenName.
982 If TokenName is not a valid token in the token space specified by Guid,
983 then the module will not build.
985 If Guid is NULL, then ASSERT().
987 @param Guid Pointer to a 128-bit unique value that designates
988 which namespace to retrieve a value from.
989 @param TokenName The name of the PCD token to set the current value for.
990 @param Value The 32-bit value to set.
992 @return The status of the set operation.
995 #define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
998 Sets an 64-bit PCD token value based on a GUID and a token name.
1000 Sets the 64-bit value for the token specified by Guid and TokenName.
1001 If TokenName is not a valid token in the token space specified by Guid,
1002 then the module will not build.
1004 If Guid is NULL, then ASSERT().
1006 @param Guid Pointer to a 128-bit unique value that designates
1007 which namespace to retrieve a value from.
1008 @param TokenName The name of the PCD token to set the current value for.
1009 @param Value The 64-bit value to set.
1011 @return The status of the set operation.
1014 #define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1017 Sets a pointer to a PCD token buffer based on a GUID and a token name.
1019 Sets the buffer for the token specified by Guid and TokenName.
1020 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
1021 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
1022 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
1023 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
1024 supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.
1025 If TokenName is not a valid token in the token space specified by Guid,
1026 then the module will not build.
1028 If Guid is NULL, then ASSERT().
1029 If SizeOfBuffer is NULL, then ASSERT().
1030 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1032 @param Guid Pointer to a 128-bit unique value that designates
1033 which namespace to retrieve a value from.
1034 @param TokenName The name of the PCD token to set the current value for.
1035 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1036 @param Buffer Pointer to the buffer to set.
1038 @return The status of the set operation.
1041 #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
1042 LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
1046 Sets an boolean PCD token value based on a GUID and a token name.
1048 Sets the boolean value for the token specified by Guid and TokenName.
1049 If TokenName is not a valid token in the token space specified by Guid,
1050 then the module will not build.
1052 If Guid is NULL, then ASSERT().
1054 @param Guid Pointer to a 128-bit unique value that designates
1055 which namespace to retrieve a value from.
1056 @param TokenName The name of the PCD token to set the current value for.
1057 @param Value The boolean value to set.
1059 @return The status of the set operation.
1062 #define PcdSetExBoolS(Guid, TokenName, Value) \
1063 LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1066 This function provides a means by which SKU support can be established in the PCD infrastructure.
1068 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
1070 @param SkuId The SKU value that will be used when the PCD service retrieves and sets values
1071 associated with a PCD token.
1073 @return Return the SKU ID that was set.
1084 This function provides a means by which to retrieve a value for a given PCD token.
1086 Returns the 8-bit value for the token specified by TokenNumber.
1088 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1090 @return Returns the 8-bit value for the token specified by TokenNumber.
1096 IN UINTN TokenNumber
1101 This function provides a means by which to retrieve a value for a given PCD token.
1103 Returns the 16-bit value for the token specified by TokenNumber.
1105 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1107 @return Returns the 16-bit value for the token specified by TokenNumber.
1113 IN UINTN TokenNumber
1118 This function provides a means by which to retrieve a value for a given PCD token.
1120 Returns the 32-bit value for the token specified by TokenNumber.
1122 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1124 @return Returns the 32-bit value for the token specified by TokenNumber.
1130 IN UINTN TokenNumber
1135 This function provides a means by which to retrieve a value for a given PCD token.
1137 Returns the 64-bit value for the token specified by TokenNumber.
1139 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1141 @return Returns the 64-bit value for the token specified by TokenNumber.
1147 IN UINTN TokenNumber
1152 This function provides a means by which to retrieve a value for a given PCD token.
1154 Returns the pointer to the buffer of the token specified by TokenNumber.
1156 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1158 @return Returns the pointer to the token specified by TokenNumber.
1164 IN UINTN TokenNumber
1169 This function provides a means by which to retrieve a value for a given PCD token.
1171 Returns the Boolean value of the token specified by TokenNumber.
1173 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1175 @return Returns the Boolean value of the token specified by TokenNumber.
1181 IN UINTN TokenNumber
1186 This function provides a means by which to retrieve the size of a given PCD token.
1188 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1190 @return Returns the size of the token specified by TokenNumber.
1196 IN UINTN TokenNumber
1201 This function provides a means by which to retrieve a value for a given PCD token.
1203 Returns the 8-bit value for the token specified by TokenNumber and Guid.
1205 If Guid is NULL, then ASSERT().
1207 @param[in] Guid Pointer to a 128-bit unique value that designates
1208 which namespace to retrieve a value from.
1209 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1211 @return Return the UINT8.
1217 IN CONST GUID *Guid,
1218 IN UINTN TokenNumber
1223 This function provides a means by which to retrieve a value for a given PCD token.
1225 Returns the 16-bit value for the token specified by TokenNumber and Guid.
1227 If Guid is NULL, then ASSERT().
1229 @param[in] Guid Pointer to a 128-bit unique value that designates
1230 which namespace to retrieve a value from.
1231 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1233 @return Return the UINT16.
1239 IN CONST GUID *Guid,
1240 IN UINTN TokenNumber
1245 Returns the 32-bit value for the token specified by TokenNumber and Guid.
1246 If Guid is NULL, then ASSERT().
1248 @param[in] Guid Pointer to a 128-bit unique value that designates
1249 which namespace to retrieve a value from.
1250 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1252 @return Return the UINT32.
1258 IN CONST GUID *Guid,
1259 IN UINTN TokenNumber
1264 This function provides a means by which to retrieve a value for a given PCD token.
1266 Returns the 64-bit value for the token specified by TokenNumber and Guid.
1268 If Guid is NULL, then ASSERT().
1270 @param[in] Guid Pointer to a 128-bit unique value that designates
1271 which namespace to retrieve a value from.
1272 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1274 @return Return the UINT64.
1280 IN CONST GUID *Guid,
1281 IN UINTN TokenNumber
1286 This function provides a means by which to retrieve a value for a given PCD token.
1288 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
1290 If Guid is NULL, then ASSERT().
1292 @param[in] Guid Pointer to a 128-bit unique value that designates
1293 which namespace to retrieve a value from.
1294 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1296 @return Return the VOID* pointer.
1302 IN CONST GUID *Guid,
1303 IN UINTN TokenNumber
1308 This function provides a means by which to retrieve a value for a given PCD token.
1310 Returns the Boolean value of the token specified by TokenNumber and Guid.
1312 If Guid is NULL, then ASSERT().
1314 @param[in] Guid Pointer to a 128-bit unique value that designates
1315 which namespace to retrieve a value from.
1316 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1318 @return Return the BOOLEAN.
1324 IN CONST GUID *Guid,
1325 IN UINTN TokenNumber
1330 This function provides a means by which to retrieve the size of a given PCD token.
1332 Returns the size of the token specified by TokenNumber and Guid.
1334 If Guid is NULL, then ASSERT().
1336 @param[in] Guid Pointer to a 128-bit unique value that designates
1337 which namespace to retrieve a value from.
1338 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1340 @return Return the size.
1346 IN CONST GUID *Guid,
1347 IN UINTN TokenNumber
1351 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1353 This function provides a means by which to set a value for a given PCD token.
1355 Sets the 8-bit value for the token specified by TokenNumber
1356 to the value specified by Value. Value is returned.
1358 @param[in] TokenNumber The PCD token number to set a current value for.
1359 @param[in] Value The 8-bit value to set.
1361 @return Return the Value that was set.
1367 IN UINTN TokenNumber,
1373 This function provides a means by which to set a value for a given PCD token.
1375 Sets the 16-bit value for the token specified by TokenNumber
1376 to the value specified by Value. Value is returned.
1378 @param[in] TokenNumber The PCD token number to set a current value for.
1379 @param[in] Value The 16-bit value to set.
1381 @return Return the Value that was set.
1387 IN UINTN TokenNumber,
1393 This function provides a means by which to set a value for a given PCD token.
1395 Sets the 32-bit value for the token specified by TokenNumber
1396 to the value specified by Value. Value is returned.
1398 @param[in] TokenNumber The PCD token number to set a current value for.
1399 @param[in] Value The 32-bit value to set.
1401 @return Return the Value that was set.
1407 IN UINTN TokenNumber,
1413 This function provides a means by which to set a value for a given PCD token.
1415 Sets the 64-bit value for the token specified by TokenNumber
1416 to the value specified by Value. Value is returned.
1418 @param[in] TokenNumber The PCD token number to set a current value for.
1419 @param[in] Value The 64-bit value to set.
1421 @return Return the Value that was set.
1427 IN UINTN TokenNumber,
1433 This function provides a means by which to set a value for a given PCD token.
1435 Sets a buffer for the token specified by TokenNumber to the value
1436 specified by Buffer and SizeOfBuffer. Buffer is returned.
1437 If SizeOfBuffer is greater than the maximum size support by TokenNumber,
1438 then set SizeOfBuffer to the maximum size supported by TokenNumber and
1439 return NULL to indicate that the set operation was not actually performed.
1441 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1442 maximum size supported by TokenName and NULL must be returned.
1444 If SizeOfBuffer is NULL, then ASSERT().
1445 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1447 @param[in] TokenNumber The PCD token number to set a current value for.
1448 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1449 @param[in] Buffer A pointer to the buffer to set.
1451 @return Return the pointer for the Buffer that was set.
1457 IN UINTN TokenNumber,
1458 IN OUT UINTN *SizeOfBuffer,
1459 IN CONST VOID *Buffer
1464 This function provides a means by which to set a value for a given PCD token.
1466 Sets the Boolean value for the token specified by TokenNumber
1467 to the value specified by Value. Value is returned.
1469 @param[in] TokenNumber The PCD token number to set a current value for.
1470 @param[in] Value The boolean value to set.
1472 @return Return the Value that was set.
1478 IN UINTN TokenNumber,
1484 This function provides a means by which to set a value for a given PCD token.
1486 Sets the 8-bit value for the token specified by TokenNumber and
1487 Guid to the value specified by Value. Value is returned.
1489 If Guid is NULL, then ASSERT().
1491 @param[in] Guid Pointer to a 128-bit unique value that
1492 designates which namespace to set a value from.
1493 @param[in] TokenNumber The PCD token number to set a current value for.
1494 @param[in] Value The 8-bit value to set.
1496 @return Return the Value that was set.
1502 IN CONST GUID *Guid,
1503 IN UINTN TokenNumber,
1509 This function provides a means by which to set a value for a given PCD token.
1511 Sets the 16-bit value for the token specified by TokenNumber and
1512 Guid to the value specified by Value. Value is returned.
1514 If Guid is NULL, then ASSERT().
1516 @param[in] Guid Pointer to a 128-bit unique value that
1517 designates which namespace to set a value from.
1518 @param[in] TokenNumber The PCD token number to set a current value for.
1519 @param[in] Value The 16-bit value to set.
1521 @return Return the Value that was set.
1527 IN CONST GUID *Guid,
1528 IN UINTN TokenNumber,
1534 This function provides a means by which to set a value for a given PCD token.
1536 Sets the 32-bit value for the token specified by TokenNumber and
1537 Guid to the value specified by Value. Value is returned.
1539 If Guid is NULL, then ASSERT().
1541 @param[in] Guid Pointer to a 128-bit unique value that
1542 designates which namespace to set a value from.
1543 @param[in] TokenNumber The PCD token number to set a current value for.
1544 @param[in] Value The 32-bit value to set.
1546 @return Return the Value that was set.
1552 IN CONST GUID *Guid,
1553 IN UINTN TokenNumber,
1559 This function provides a means by which to set a value for a given PCD token.
1561 Sets the 64-bit value for the token specified by TokenNumber and
1562 Guid to the value specified by Value. Value is returned.
1564 If Guid is NULL, then ASSERT().
1566 @param[in] Guid Pointer to a 128-bit unique value that
1567 designates which namespace to set a value from.
1568 @param[in] TokenNumber The PCD token number to set a current value for.
1569 @param[in] Value The 64-bit value to set.
1571 @return Return the Value that was set.
1577 IN CONST GUID *Guid,
1578 IN UINTN TokenNumber,
1584 This function provides a means by which to set a value for a given PCD token.
1586 Sets a buffer for the token specified by TokenNumber to the value specified by
1587 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1588 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
1589 supported by TokenNumber and return NULL to indicate that the set operation
1590 was not actually performed.
1592 If Guid is NULL, then ASSERT().
1593 If SizeOfBuffer is NULL, then ASSERT().
1594 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1596 @param[in] Guid Pointer to a 128-bit unique value that
1597 designates which namespace to set a value from.
1598 @param[in] TokenNumber The PCD token number to set a current value for.
1599 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1600 @param[in] Buffer A pointer to the buffer to set.
1602 @return Return the pointer to the Buffer that was set.
1608 IN CONST GUID *Guid,
1609 IN UINTN TokenNumber,
1610 IN OUT UINTN *SizeOfBuffer,
1616 This function provides a means by which to set a value for a given PCD token.
1618 Sets the Boolean value for the token specified by TokenNumber and
1619 Guid to the value specified by Value. Value is returned.
1621 If Guid is NULL, then ASSERT().
1623 @param[in] Guid Pointer to a 128-bit unique value that
1624 designates which namespace to set a value from.
1625 @param[in] TokenNumber The PCD token number to set a current value for.
1626 @param[in] Value The Boolean value to set.
1628 @return Return the Value that was set.
1634 IN CONST GUID *Guid,
1635 IN UINTN TokenNumber,
1641 This function provides a means by which to set a value for a given PCD token.
1643 Sets the 8-bit value for the token specified by TokenNumber
1644 to the value specified by Value.
1646 @param[in] TokenNumber The PCD token number to set a current value for.
1647 @param[in] Value The 8-bit value to set.
1649 @return The status of the set operation.
1655 IN UINTN TokenNumber,
1660 This function provides a means by which to set a value for a given PCD token.
1662 Sets the 16-bit value for the token specified by TokenNumber
1663 to the value specified by Value.
1665 @param[in] TokenNumber The PCD token number to set a current value for.
1666 @param[in] Value The 16-bit value to set.
1668 @return The status of the set operation.
1674 IN UINTN TokenNumber,
1679 This function provides a means by which to set a value for a given PCD token.
1681 Sets the 32-bit value for the token specified by TokenNumber
1682 to the value specified by Value.
1684 @param[in] TokenNumber The PCD token number to set a current value for.
1685 @param[in] Value The 32-bit value to set.
1687 @return The status of the set operation.
1693 IN UINTN TokenNumber,
1698 This function provides a means by which to set a value for a given PCD token.
1700 Sets the 64-bit value for the token specified by TokenNumber
1701 to the value specified by Value.
1703 @param[in] TokenNumber The PCD token number to set a current value for.
1704 @param[in] Value The 64-bit value to set.
1706 @return The status of the set operation.
1712 IN UINTN TokenNumber,
1717 This function provides a means by which to set a value for a given PCD token.
1719 Sets a buffer for the token specified by TokenNumber to the value specified
1720 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1721 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1722 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1723 was not actually performed.
1725 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1726 maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
1728 If SizeOfBuffer is NULL, then ASSERT().
1729 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1731 @param[in] TokenNumber The PCD token number to set a current value for.
1732 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1733 @param[in] Buffer A pointer to the buffer to set.
1735 @return The status of the set operation.
1741 IN UINTN TokenNumber,
1742 IN OUT UINTN *SizeOfBuffer,
1743 IN CONST VOID *Buffer
1747 This function provides a means by which to set a value for a given PCD token.
1749 Sets the boolean value for the token specified by TokenNumber
1750 to the value specified by Value.
1752 @param[in] TokenNumber The PCD token number to set a current value for.
1753 @param[in] Value The boolean value to set.
1755 @return The status of the set operation.
1761 IN UINTN TokenNumber,
1766 This function provides a means by which to set a value for a given PCD token.
1768 Sets the 8-bit value for the token specified by TokenNumber
1769 to the value specified by Value.
1771 If Guid is NULL, then ASSERT().
1773 @param[in] Guid The pointer to a 128-bit unique value that
1774 designates which namespace to set a value from.
1775 @param[in] TokenNumber The PCD token number to set a current value for.
1776 @param[in] Value The 8-bit value to set.
1778 @return The status of the set operation.
1784 IN CONST GUID *Guid,
1785 IN UINTN TokenNumber,
1790 This function provides a means by which to set a value for a given PCD token.
1792 Sets the 16-bit value for the token specified by TokenNumber
1793 to the value specified by Value.
1795 If Guid is NULL, then ASSERT().
1797 @param[in] Guid The pointer to a 128-bit unique value that
1798 designates which namespace to set a value from.
1799 @param[in] TokenNumber The PCD token number to set a current value for.
1800 @param[in] Value The 16-bit value to set.
1802 @return The status of the set operation.
1808 IN CONST GUID *Guid,
1809 IN UINTN TokenNumber,
1814 This function provides a means by which to set a value for a given PCD token.
1816 Sets the 32-bit value for the token specified by TokenNumber
1817 to the value specified by Value.
1819 If Guid is NULL, then ASSERT().
1821 @param[in] Guid The pointer to a 128-bit unique value that
1822 designates which namespace to set a value from.
1823 @param[in] TokenNumber The PCD token number to set a current value for.
1824 @param[in] Value The 32-bit value to set.
1826 @return The status of the set operation.
1832 IN CONST GUID *Guid,
1833 IN UINTN TokenNumber,
1838 This function provides a means by which to set a value for a given PCD token.
1840 Sets the 64-bit value for the token specified by TokenNumber
1841 to the value specified by Value.
1843 If Guid is NULL, then ASSERT().
1845 @param[in] Guid The pointer to a 128-bit unique value that
1846 designates which namespace to set a value from.
1847 @param[in] TokenNumber The PCD token number to set a current value for.
1848 @param[in] Value The 64-bit value to set.
1850 @return The status of the set operation.
1856 IN CONST GUID *Guid,
1857 IN UINTN TokenNumber,
1862 This function provides a means by which to set a value for a given PCD token.
1864 Sets a buffer for the token specified by TokenNumber to the value specified by
1865 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1866 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1867 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1868 was not actually performed.
1870 If Guid is NULL, then ASSERT().
1871 If SizeOfBuffer is NULL, then ASSERT().
1872 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1874 @param[in] Guid Pointer to a 128-bit unique value that
1875 designates which namespace to set a value from.
1876 @param[in] TokenNumber The PCD token number to set a current value for.
1877 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1878 @param[in] Buffer A pointer to the buffer to set.
1880 @return The status of the set operation.
1886 IN CONST GUID *Guid,
1887 IN UINTN TokenNumber,
1888 IN OUT UINTN *SizeOfBuffer,
1893 This function provides a means by which to set a value for a given PCD token.
1895 Sets the boolean value for the token specified by TokenNumber
1896 to the value specified by Value.
1898 If Guid is NULL, then ASSERT().
1900 @param[in] Guid The pointer to a 128-bit unique value that
1901 designates which namespace to set a value from.
1902 @param[in] TokenNumber The PCD token number to set a current value for.
1903 @param[in] Value The boolean value to set.
1905 @return The status of the set operation.
1911 IN CONST GUID *Guid,
1912 IN UINTN TokenNumber,
1917 This notification function serves two purposes.
1919 Firstly, it notifies the module that did the registration that the value of this
1920 PCD token has been set.
1921 Secondly, it provides a mechanism for the module that did the registration to intercept
1922 the set operation and override the value been set if necessary. After the invocation of
1923 the callback function, TokenData will be used by PCD service PEIM or driver to modify th
1924 internal data in PCD database.
1926 @param[in] CallBackGuid The PCD token GUID being set.
1927 @param[in] CallBackToken The PCD token number being set.
1928 @param[in, out] TokenData A pointer to the token data being set.
1929 @param[in] TokenDataSize The size, in bytes, of the data being set.
1934 (EFIAPI *PCD_CALLBACK)(
1935 IN CONST GUID *CallBackGuid, OPTIONAL
1936 IN UINTN CallBackToken,
1937 IN OUT VOID *TokenData,
1938 IN UINTN TokenDataSize
1943 Set up a notification function that is called when a specified token is set.
1945 When the token specified by TokenNumber and Guid is set,
1946 then notification function specified by NotificationFunction is called.
1947 If Guid is NULL, then the default token space is used.
1948 If NotificationFunction is NULL, then ASSERT().
1950 @param[in] Guid Pointer to a 128-bit unique value that designates which
1951 namespace to set a value from. If NULL, then the default
1952 token space is used.
1953 @param[in] TokenNumber The PCD token number to monitor.
1954 @param[in] NotificationFunction The function to call when the token
1955 specified by Guid and TokenNumber is set.
1960 LibPcdCallbackOnSet (
1961 IN CONST GUID *Guid, OPTIONAL
1962 IN UINTN TokenNumber,
1963 IN PCD_CALLBACK NotificationFunction
1968 Disable a notification function that was established with LibPcdCallbackonSet().
1970 Disable a notification function that was previously established with LibPcdCallbackOnSet().
1971 If NotificationFunction is NULL, then ASSERT().
1972 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
1973 and NotificationFunction, then ASSERT().
1975 @param[in] Guid Specify the GUID token space.
1976 @param[in] TokenNumber Specify the token number.
1977 @param[in] NotificationFunction The callback function to be unregistered.
1982 LibPcdCancelCallback (
1983 IN CONST GUID *Guid, OPTIONAL
1984 IN UINTN TokenNumber,
1985 IN PCD_CALLBACK NotificationFunction
1990 Retrieves the next token in a token space.
1992 Retrieves the next PCD token number from the token space specified by Guid.
1993 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
1994 then the first token number is returned. Otherwise, the token number that
1995 follows TokenNumber in the token space is returned. If TokenNumber is the last
1996 token number in the token space, then 0 is returned.
1998 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
2000 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace
2001 to set a value from. If NULL, then the default token space is used.
2002 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
2005 @return The next valid token number.
2010 LibPcdGetNextToken (
2011 IN CONST GUID *Guid, OPTIONAL
2012 IN UINTN TokenNumber
2018 Used to retrieve the list of available PCD token space GUIDs.
2020 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
2022 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
2023 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
2025 @param TokenSpaceGuid Pointer to the a PCD token space GUID
2027 @return The next valid token namespace.
2032 LibPcdGetNextTokenSpace (
2033 IN CONST GUID *TokenSpaceGuid
2038 Sets a value of a patchable PCD entry that is type pointer.
2040 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
2041 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
2042 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
2043 NULL to indicate that the set operation was not actually performed.
2044 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2045 MaximumDatumSize and NULL must be returned.
2047 If PatchVariable is NULL, then ASSERT().
2048 If SizeOfBuffer is NULL, then ASSERT().
2049 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2051 @param[out] PatchVariable A pointer to the global variable in a module that is
2052 the target of the set operation.
2053 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2054 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2055 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2057 @return Return the pointer to the Buffer that was set.
2063 OUT VOID *PatchVariable,
2064 IN UINTN MaximumDatumSize,
2065 IN OUT UINTN *SizeOfBuffer,
2066 IN CONST VOID *Buffer
2070 Sets a value of a patchable PCD entry that is type pointer.
2072 Sets the PCD entry specified by PatchVariable to the value specified
2073 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
2074 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
2075 to indicate that the set operation was not actually performed.
2076 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2077 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
2079 If PatchVariable is NULL, then ASSERT().
2080 If SizeOfBuffer is NULL, then ASSERT().
2081 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2083 @param[out] PatchVariable A pointer to the global variable in a module that is
2084 the target of the set operation.
2085 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2086 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2087 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2089 @return The status of the set operation.
2094 LibPatchPcdSetPtrS (
2095 OUT VOID *PatchVariable,
2096 IN UINTN MaximumDatumSize,
2097 IN OUT UINTN *SizeOfBuffer,
2098 IN CONST VOID *Buffer
2102 Sets a value and size of a patchable PCD entry that is type pointer.
2104 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
2105 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
2106 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
2107 NULL to indicate that the set operation was not actually performed.
2108 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2109 MaximumDatumSize and NULL must be returned.
2111 If PatchVariable is NULL, then ASSERT().
2112 If SizeOfPatchVariable is NULL, then ASSERT().
2113 If SizeOfBuffer is NULL, then ASSERT().
2114 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2116 @param[out] PatchVariable A pointer to the global variable in a module that is
2117 the target of the set operation.
2118 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
2119 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2120 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2121 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2123 @return Return the pointer to the Buffer that was set.
2128 LibPatchPcdSetPtrAndSize (
2129 OUT VOID *PatchVariable,
2130 OUT UINTN *SizeOfPatchVariable,
2131 IN UINTN MaximumDatumSize,
2132 IN OUT UINTN *SizeOfBuffer,
2133 IN CONST VOID *Buffer
2137 Sets a value and size of a patchable PCD entry that is type pointer.
2139 Sets the PCD entry specified by PatchVariable to the value specified
2140 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
2141 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
2142 to indicate that the set operation was not actually performed.
2143 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2144 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
2146 If PatchVariable is NULL, then ASSERT().
2147 If SizeOfPatchVariable is NULL, then ASSERT().
2148 If SizeOfBuffer is NULL, then ASSERT().
2149 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2151 @param[out] PatchVariable A pointer to the global variable in a module that is
2152 the target of the set operation.
2153 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
2154 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2155 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2156 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2158 @return The status of the set operation.
2163 LibPatchPcdSetPtrAndSizeS (
2164 OUT VOID *PatchVariable,
2165 OUT UINTN *SizeOfPatchVariable,
2166 IN UINTN MaximumDatumSize,
2167 IN OUT UINTN *SizeOfBuffer,
2168 IN CONST VOID *Buffer
2182 /// The returned information associated with the requested TokenNumber. If
2183 /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.
2187 /// The size of the data in bytes associated with the TokenNumber specified. If
2188 /// TokenNumber is 0, then PcdSize is set 0.
2192 /// The null-terminated ASCII string associated with a given token. If the
2193 /// TokenNumber specified was 0, then this field corresponds to the null-terminated
2194 /// ASCII string associated with the token's namespace Guid. If NULL, there is no
2195 /// name associated with this request.
2202 Retrieve additional information associated with a PCD token.
2204 This includes information such as the type of value the TokenNumber is associated with as well as possible
2205 human readable name that is associated with the token.
2207 If TokenNumber is not in the default token space specified, then ASSERT().
2209 @param[in] TokenNumber The PCD token number.
2210 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2211 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2216 IN UINTN TokenNumber,
2217 OUT PCD_INFO *PcdInfo
2221 Retrieve additional information associated with a PCD token.
2223 This includes information such as the type of value the TokenNumber is associated with as well as possible
2224 human readable name that is associated with the token.
2226 If TokenNumber is not in the token space specified by Guid, then ASSERT().
2228 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
2229 @param[in] TokenNumber The PCD token number.
2230 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2231 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2236 IN CONST GUID *Guid,
2237 IN UINTN TokenNumber,
2238 OUT PCD_INFO *PcdInfo
2242 Retrieve the currently set SKU Id.
2244 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
2245 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU