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 - 2016, 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.
33 Retrieves a token number based on a token name.
35 Returns the token number associated with the PCD token specified by TokenName.
36 If TokenName is not a valid token in the token space, then the module will not build.
37 If TokenName is not a feature flag, then the module will not build.
39 @param TokenName The name of the PCD token to retrieve the token number for.
41 @return The token number associated with the PCD.
44 #define PcdToken(TokenName) _PCD_TOKEN_##TokenName
48 Retrieves a Boolean PCD feature flag based on a token name.
50 Returns the Boolean value for the PCD feature flag specified by TokenName.
51 If TokenName is not a valid token in the token space, then the module will not build.
52 If TokenName is not a feature flag, then the module will not build.
54 @param TokenName The name of the PCD token to retrieve a current value for.
56 @return Boolean value for the PCD feature flag.
59 #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
63 Retrieves an 8-bit fixed PCD token value based on a token name.
65 Returns the 8-bit value for the token specified by TokenName.
66 If TokenName is not a valid token in the token space, then the module will not build.
67 If TokenName is not a feature flag, then the module will not build.
69 @param TokenName The name of the PCD token to retrieve a current value for.
71 @return 8-bit value for the token specified by TokenName.
74 #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
78 Retrieves a 16-bit fixed PCD token value based on a token name.
80 Returns the 16-bit value for the token specified by TokenName.
81 If TokenName is not a valid token in the token space, then the module will not build.
82 If TokenName is not a feature flag, then the module will not build.
84 @param TokenName The name of the PCD token to retrieve a current value for.
86 @return 16-bit value for the token specified by TokenName.
89 #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
93 Retrieves a 32-bit fixed PCD token value based on a token name.
95 Returns the 32-bit value for the token specified by TokenName.
96 If TokenName is not a valid token in the token space, then the module will not build.
97 If TokenName is not a feature flag, then the module will not build.
99 @param TokenName The name of the PCD token to retrieve a current value for.
101 @return 32-bit value for the token specified by TokenName.
104 #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
108 Retrieves a 64-bit fixed PCD token value based on a token name.
110 Returns the 64-bit value for the token specified by TokenName.
111 If TokenName is not a valid token in the token space, then the module will not build.
112 If TokenName is not a feature flag, then the module will not build.
114 @param TokenName The name of the PCD token to retrieve a current value for.
116 @return 64-bit value for the token specified by TokenName.
119 #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
123 Retrieves a Boolean fixed PCD token value based on a token name.
125 Returns the Boolean value for the token specified by TokenName.
126 If TokenName is not a valid token in the token space, then the module will not build.
127 If TokenName is not a feature flag, then the module will not build.
129 @param TokenName The name of the PCD token to retrieve a current value for.
131 @return The Boolean value for the token.
134 #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
138 Retrieves a pointer to a fixed PCD token buffer based on a token name.
140 Returns a pointer to the buffer for the token specified by TokenName.
141 If TokenName is not a valid token in the token space, then the module will not build.
142 If TokenName is not a feature flag, then the module will not build.
144 @param TokenName The name of the PCD token to retrieve a current value for.
146 @return A pointer to the buffer.
149 #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
153 Retrieves an 8-bit binary patchable PCD token value based on a token name.
155 Returns the 8-bit value for the token specified by TokenName.
156 If TokenName is not a valid token in the token space, then the module will not build.
157 If TokenName is not a feature flag, then the module will not build.
159 @param TokenName The name of the PCD token to retrieve a current value for.
161 @return An 8-bit binary patchable PCD token value.
164 #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
167 Retrieves a 16-bit binary patchable PCD token value based on a token name.
169 Returns the 16-bit value for the token specified by TokenName.
170 If TokenName is not a valid token in the token space, then the module will not build.
171 If TokenName is not a feature flag, then the module will not build.
173 @param TokenName The name of the PCD token to retrieve a current value for.
175 @return A 16-bit binary patchable PCD token value.
178 #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
182 Retrieves a 32-bit binary patchable PCD token value based on a token name.
184 Returns the 32-bit value for the token specified by TokenName.
185 If TokenName is not a valid token in the token space, then the module will not build.
186 If TokenName is not a feature flag, then the module will not build.
188 @param TokenName The name of the PCD token to retrieve a current value for.
190 @return A 32-bit binary patchable PCD token value.
193 #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
197 Retrieves a 64-bit binary patchable PCD token value based on a token name.
199 Returns the 64-bit value for the token specified by TokenName.
200 If TokenName is not a valid token in the token space, then the module will not build.
201 If TokenName is not a feature flag, then the module will not build.
203 @param TokenName The name of the PCD token to retrieve a current value for.
205 @return A 64-bit binary patchable PCD token value.
208 #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
212 Retrieves a Boolean binary patchable PCD token value based on a token name.
214 Returns the Boolean value for the token specified by TokenName.
215 If TokenName is not a valid token in the token space, then the module will not build.
216 If TokenName is not a feature flag, then the module will not build.
218 @param TokenName The name of the PCD token to retrieve a current value for.
220 @return The Boolean value for the token.
223 #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
227 Retrieves a pointer to a binary patchable PCD token buffer based on a token name.
229 Returns a pointer to the buffer for the token specified by TokenName.
230 If TokenName is not a valid token in the token space, then the module will not build.
231 If TokenName is not a feature flag, then the module will not build.
233 @param TokenName The name of the PCD token to retrieve a current value for.
235 @return A pointer to the buffer for the token.
238 #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
242 Sets an 8-bit binary patchable PCD token value based on a token name.
244 Sets the 8-bit value for the token specified by TokenName. Value is returned.
245 If TokenName is not a valid token in the token space, then the module will not build.
246 If TokenName is not a feature flag, then the module will not build.
248 @param TokenName The name of the binary patchable PCD token to set the current value for.
249 @param Value The 8-bit value to set.
251 @return Return the Value that was set.
254 #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
258 Sets a 16-bit binary patchable PCD token value based on a token name.
260 Sets the 16-bit value for the token specified by TokenName. Value is returned.
261 If TokenName is not a valid token in the token space, then the module will not build.
262 If TokenName is not a feature flag, then the module will not build.
264 @param TokenName The name of the binary patchable PCD token to set the current value for.
265 @param Value The 16-bit value to set.
267 @return Return the Value that was set.
270 #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
274 Sets a 32-bit binary patchable PCD token value based on a token name.
276 Sets the 32-bit value for the token specified by TokenName. Value is returned.
277 If TokenName is not a valid token in the token space, then the module will not build.
278 If TokenName is not a feature flag, then the module will not build.
280 @param TokenName The name of the binary patchable PCD token to set the current value for.
281 @param Value The 32-bit value to set.
283 @return Return the Value that was set.
286 #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
290 Sets a 64-bit binary patchable PCD token value based on a token name.
292 Sets the 64-bit value for the token specified by TokenName. Value is returned.
293 If TokenName is not a valid token in the token space, then the module will not build.
294 If TokenName is not a feature flag, then the module will not build.
296 @param TokenName The name of the binary patchable PCD token to set the current value for.
297 @param Value The 64-bit value to set.
299 @return Return the Value that was set.
302 #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
306 Sets a Boolean binary patchable PCD token value based on a token name.
308 Sets the Boolean value for the token specified by TokenName. Value is returned.
309 If TokenName is not a valid token in the token space, then the module will not build.
310 If TokenName is not a feature flag, then the module will not build.
312 @param TokenName The name of the binary patchable PCD token to set the current value for.
313 @param Value The boolean value to set.
315 @return Return the Value that was set.
318 #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
322 Sets a pointer to a binary patchable PCD token buffer based on a token name.
324 Sets the buffer for the token specified by TokenName. Buffer is returned.
325 If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer
326 to the maximum size supported by TokenName and return NULL to indicate that the set operation
327 was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be
328 set to the maximum size supported by TokenName and NULL must be returned.
329 If TokenName is not a valid token in the token space, then the module will not build.
330 If TokenName is not a feature flag, then the module will not build.
332 If SizeOfBuffer is NULL, then ASSERT().
333 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
335 @param TokenName The name of the binary patchable PCD token to set the current value for.
336 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
337 @param Buffer Pointer to the value to set.
339 @return Return the pointer to the Buffer that was set.
342 #define PatchPcdSetPtr(TokenName, Size, Buffer) \
343 LibPatchPcdSetPtrAndSize ( \
344 (VOID *)_gPcd_BinaryPatch_##TokenName, \
345 &_gPcd_BinaryPatch_Size_##TokenName, \
346 (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \
351 Retrieves an 8-bit PCD token value based on a token name.
353 Returns the 8-bit value for the token specified by TokenName.
354 If TokenName is not a valid token in the token space, then the module will not build.
356 @param TokenName The name of the PCD token to retrieve a current value for.
358 @return 8-bit value for the token specified by TokenName.
361 #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
365 Retrieves a 16-bit PCD token value based on a token name.
367 Returns the 16-bit value for the token specified by TokenName.
368 If TokenName is not a valid token in the token space, then the module will not build.
370 @param TokenName The name of the PCD token to retrieve a current value for.
372 @return 16-bit value for the token specified by TokenName.
375 #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
379 Retrieves a 32-bit PCD token value based on a token name.
381 Returns the 32-bit value for the token specified by TokenName.
382 If TokenName is not a valid token in the token space, then the module will not build.
384 @param TokenName The name of the PCD token to retrieve a current value for.
386 @return 32-bit value for the token specified by TokenName.
389 #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
393 Retrieves a 64-bit PCD token value based on a token name.
395 Returns the 64-bit value for the token specified by TokenName.
396 If TokenName is not a valid token in the token space, then the module will not build.
398 @param TokenName The name of the PCD token to retrieve a current value for.
400 @return 64-bit value for the token specified by TokenName.
403 #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
407 Retrieves a pointer to a PCD token buffer based on a token name.
409 Returns a pointer to the buffer for the token specified by TokenName.
410 If TokenName is not a valid token in the token space, then the module will not build.
412 @param TokenName The name of the PCD token to retrieve a current value for.
414 @return A pointer to the buffer.
417 #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
421 Retrieves a Boolean PCD token value based on a token name.
423 Returns the Boolean value for the token specified by TokenName.
424 If TokenName is not a valid token in the token space, then the module will not build.
426 @param TokenName The name of the PCD token to retrieve a current value for.
428 @return A Boolean PCD token value.
431 #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
435 Retrieves the size of a fixed PCD token based on a token name.
437 Returns the size of the token specified by TokenName.
438 If TokenName is not a valid token in the token space, then the module will not build.
440 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
442 @return Return the size
445 #define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName
449 Retrieves the size of a binary patchable PCD token based on a token name.
451 Returns the size of the token specified by TokenName.
452 If TokenName is not a valid token in the token space, then the module will not build.
454 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
456 @return Return the size
459 #define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName
463 Retrieves the size of the PCD token based on a token name.
465 Returns the size of the token specified by TokenName.
466 If TokenName is not a valid token in the token space, then the module will not build.
468 @param[in] TokenName The name of the PCD token to retrieve a current value size for.
470 @return Return the size
473 #define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName
477 Retrieve the size of a given PCD token.
479 Returns the size of the token specified by TokenNumber and Guid.
480 If Guid is NULL, then ASSERT().
482 @param[in] Guid Pointer to a 128-bit unique value that designates
483 which namespace to retrieve a value from.
484 @param[in] TokenNumber The PCD token number to retrieve a current value size for.
486 @return Return the size.
489 #define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))
491 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
493 Sets an 8-bit PCD token value based on a token name.
495 Sets the 8-bit value for the token specified by TokenName. Value is returned.
496 If TokenName is not a valid token in the token space, then the module will not build.
498 @param TokenName The name of the PCD token to retrieve a current value for.
499 @param Value The 8-bit value to set.
501 @return Return the Value that was set.
504 #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))
508 Sets a 16-bit PCD token value based on a token name.
510 Sets the 16-bit value for the token specified by TokenName. Value is returned.
511 If TokenName is not a valid token in the token space, then the module will not build.
513 @param TokenName The name of the PCD token to retrieve a current value for.
514 @param Value The 16-bit value to set.
516 @return Return the Value that was set.
519 #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))
523 Sets a 32-bit PCD token value based on a token name.
525 Sets the 32-bit value for the token specified by TokenName. Value is returned.
526 If TokenName is not a valid token in the token space, then the module will not build.
528 @param TokenName The name of the PCD token to retrieve a current value for.
529 @param Value The 32-bit value to set.
531 @return Return the Value that was set.
534 #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))
538 Sets a 64-bit PCD token value based on a token name.
540 Sets the 64-bit value for the token specified by TokenName. Value is returned.
541 If TokenName is not a valid token in the token space, then the module will not build.
543 @param TokenName The name of the PCD token to retrieve a current value for.
544 @param Value The 64-bit value to set.
546 @return Return the Value that was set.
549 #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))
553 Sets a pointer to a PCD token buffer based on a token name.
555 Sets the buffer for the token specified by TokenName. Buffer is returned.
556 If SizeOfBuffer is greater than the maximum size supported by TokenName,
557 then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
558 to indicate that the set operation was not actually performed. If SizeOfBuffer
559 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
560 by TokenName and NULL must be returned.
561 If TokenName is not a valid token in the token space, then the module will not build.
563 If SizeOfBuffer is NULL, then ASSERT().
564 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
566 @param TokenName The name of the PCD token to set the current value for.
567 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
568 @param Buffer A pointer to the buffer to set.
570 @return Return the pointer to the Buffer that was set.
573 #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \
574 _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))
577 Sets a Boolean PCD token value based on a token name.
579 Sets the Boolean value for the token specified by TokenName. Value is returned.
580 If TokenName is not a valid token in the token space, then the module will not build.
582 @param TokenName The name of the PCD token to set the current value for.
583 @param Buffer The Boolean value to set.
585 @return Return the Value that was set.
588 #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
592 Sets a 8-bit PCD token value based on a token name.
594 Sets the 8-bit value for the token specified by TokenName.
595 If TokenName is not a valid token in the token space, then the module will not build.
597 @param TokenName The name of the PCD token to retrieve a current value for.
598 @param Value The 8-bit value to set.
600 @return The status of the set operation.
603 #define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
606 Sets a 16-bit PCD token value based on a token name.
608 Sets the 16-bit value for the token specified by TokenName.
609 If TokenName is not a valid token in the token space, then the module will not build.
611 @param TokenName The name of the PCD token to retrieve a current value for.
612 @param Value The 16-bit value to set.
614 @return The status of the set operation.
617 #define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
620 Sets a 32-bit PCD token value based on a token name.
622 Sets the 32-bit value for the token specified by TokenName.
623 If TokenName is not a valid token in the token space, then the module will not build.
625 @param TokenName The name of the PCD token to retrieve a current value for.
626 @param Value The 32-bit value to set.
628 @return The status of the set operation.
631 #define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
634 Sets a 64-bit PCD token value based on a token name.
636 Sets the 64-bit value for the token specified by TokenName.
637 If TokenName is not a valid token in the token space, then the module will not build.
639 @param TokenName The name of the PCD token to retrieve a current value for.
640 @param Value The 64-bit value to set.
642 @return The status of the set operation.
645 #define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
648 Sets a pointer to a PCD token buffer based on a token name.
650 Sets the buffer for the token specified by TokenName.
651 If SizeOfBuffer is greater than the maximum size supported by TokenName,
652 then set SizeOfBuffer to the maximum size supported by TokenName and return
653 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
654 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
655 supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
656 If TokenName is not a valid token in the token space, then the module will not build.
658 If SizeOfBuffer is NULL, then ASSERT().
659 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
661 @param TokenName The name of the PCD token to set the current value for.
662 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
663 @param Buffer A pointer to the buffer to set.
665 @return The status of the set operation.
668 #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
669 _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
674 Sets a boolean PCD token value based on a token name.
676 Sets the boolean value for the token specified by TokenName.
677 If TokenName is not a valid token in the token space, then the module will not build.
679 @param TokenName The name of the PCD token to retrieve a current value for.
680 @param Value The boolean value to set.
682 @return The status of the set operation.
685 #define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
688 Retrieves a token number based on a GUID and a token name.
690 Returns the token number for the token specified by Guid and TokenName.
692 @param Guid Pointer to a 128-bit unique value that designates
693 which namespace to retrieve a value from.
694 @param TokenName The name of the PCD token to retrieve a current value for.
696 @return Return the token number.
699 #define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
702 Retrieves an 8-bit PCD token value based on a GUID and a token name.
704 Returns the 8-bit value for the token specified by Guid and TokenName.
705 If TokenName is not a valid token in the token space specified by Guid,
706 then the module will not build.
708 If Guid is NULL, then ASSERT().
710 @param Guid Pointer to a 128-bit unique value that designates
711 which namespace to retrieve a value from.
712 @param TokenName The name of the PCD token to retrieve a current value for.
714 @return An 8-bit PCD token value.
717 #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
720 Retrieves a 16-bit PCD token value based on a GUID and a token name.
722 Returns the 16-bit value for the token specified by Guid and TokenName.
723 If TokenName is not a valid token in the token space specified by Guid,
724 then the module will not build.
726 If Guid is NULL, then ASSERT().
728 @param Guid Pointer to a 128-bit unique value that designates
729 which namespace to retrieve a value from.
730 @param TokenName The name of the PCD token to retrieve a current value for.
732 @return A 16-bit PCD token value.
735 #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
739 Retrieves a 32-bit PCD token value based on a GUID and a token name.
741 Returns the 32-bit value for the token specified by Guid and TokenName.
742 If TokenName is not a valid token in the token space specified by Guid,
743 then the module will not build.
745 If Guid is NULL, then ASSERT().
747 @param Guid Pointer to a 128-bit unique value that designates
748 which namespace to retrieve a value from.
749 @param TokenName The name of the PCD token to retrieve a current value for.
751 @return A 32-bit PCD token value.
754 #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
758 Retrieves a 64-bit PCD token value based on a GUID and a token name.
760 Returns the 64-bit value for the token specified by Guid and TokenName.
761 If TokenName is not a valid token in the token space specified by Guid,
762 then the module will not build.
764 If Guid is NULL, then ASSERT().
766 @param Guid Pointer to a 128-bit unique value that designates
767 which namespace to retrieve a value from.
768 @param TokenName The name of the PCD token to retrieve a current value for.
770 @return A 64-bit PCD token value.
773 #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
777 Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
779 Returns a pointer to the buffer for the token specified by Guid and TokenName.
780 If TokenName is not a valid token in the token space specified by Guid,
781 then the module will not build.
783 If Guid is NULL, then ASSERT().
785 @param Guid Pointer to a 128-bit unique value that designates
786 which namespace to retrieve a value from.
787 @param TokenName The name of the PCD token to retrieve a current value for.
789 @return A pointer to a PCD token buffer.
792 #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
796 Retrieves a Boolean PCD token value based on a GUID and a token name.
798 Returns the Boolean value for the token specified by Guid and TokenName.
799 If TokenName is not a valid token in the token space specified by Guid,
800 then the module will not build.
802 If Guid is NULL, then ASSERT().
804 @param Guid Pointer to a 128-bit unique value that designates
805 which namespace to retrieve a value from.
806 @param TokenName The name of the PCD token to retrieve a current value for.
808 @return A Boolean PCD token value.
811 #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
815 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
817 Sets an 8-bit PCD token value based on a GUID and a token name.
819 Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.
820 If TokenName is not a valid token in the token space specified by Guid,
821 then the module will not build.
823 If Guid is NULL, then ASSERT().
825 @param Guid Pointer to a 128-bit unique value that designates
826 which namespace to retrieve a value from.
827 @param TokenName The name of the PCD token to set the current value for.
828 @param Value The 8-bit value to set.
830 @return Return the Value that was set.
833 #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
837 Sets a 16-bit PCD token value based on a GUID and a token name.
839 Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.
840 If TokenName is not a valid token in the token space specified by Guid,
841 then the module will not build.
843 If Guid is NULL, then ASSERT().
845 @param Guid Pointer to a 128-bit unique value that designates
846 which namespace to retrieve a value from.
847 @param TokenName The name of the PCD token to set the current value for.
848 @param Value The 16-bit value to set.
850 @return Return the Value that was set.
853 #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
857 Sets a 32-bit PCD token value based on a GUID and a token name.
859 Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.
860 If TokenName is not a valid token in the token space specified by Guid,
861 then the module will not build.
863 If Guid is NULL, then ASSERT().
865 @param Guid Pointer to a 128-bit unique value that designates
866 which namespace to retrieve a value from.
867 @param TokenName The name of the PCD token to set the current value for.
868 @param Value The 32-bit value to set.
870 @return Return the Value that was set.
873 #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
877 Sets a 64-bit PCD token value based on a GUID and a token name.
879 Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.
880 If TokenName is not a valid token in the token space specified by Guid,
881 then the module will not build.
883 If Guid is NULL, then ASSERT().
885 @param Guid Pointer to a 128-bit unique value that designates
886 which namespace to retrieve a value from.
887 @param TokenName The name of the PCD token to set the current value for.
888 @param Value The 64-bit value to set.
890 @return Return the Value that was set.
893 #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
897 Sets a pointer to a PCD token buffer based on a GUID and a token name.
899 Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.
900 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
901 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
902 NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
903 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by
904 Guid and TokenName and NULL must be returned.
905 If TokenName is not a valid token in the token space specified by Guid,
906 then the module will not build.
908 If Guid is NULL, then ASSERT().
909 If SizeOfBuffer is NULL, then ASSERT().
910 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
912 @param Guid Pointer to a 128-bit unique value that designates
913 which namespace to retrieve a value from.
914 @param TokenName The name of the PCD token to set the current value for.
915 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
916 @param Buffer Pointer to the buffer to set.
918 @return Return the pointer to the Buffer that was set.
921 #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \
922 LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
926 Sets a Boolean PCD token value based on a GUID and a token name.
928 Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.
929 If TokenName is not a valid token in the token space specified by Guid,
930 then the module will not build.
932 If Guid is NULL, then ASSERT().
934 @param Guid Pointer to a 128-bit unique value that designates
935 which namespace to retrieve a value from.
936 @param TokenName The name of the PCD token to set the current value for.
937 @param Value The Boolean value to set.
939 @return Return the Value that was set.
942 #define PcdSetExBool(Guid, TokenName, Value) \
943 LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
947 Sets an 8-bit PCD token value based on a GUID and a token name.
949 Sets the 8-bit value for the token specified by Guid and TokenName.
950 If TokenName is not a valid token in the token space specified by Guid,
951 then the module will not build.
953 If Guid is NULL, then ASSERT().
955 @param Guid Pointer to a 128-bit unique value that designates
956 which namespace to retrieve a value from.
957 @param TokenName The name of the PCD token to set the current value for.
958 @param Value The 8-bit value to set.
960 @return The status of the set operation.
963 #define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
966 Sets an 16-bit PCD token value based on a GUID and a token name.
968 Sets the 16-bit value for the token specified by Guid and TokenName.
969 If TokenName is not a valid token in the token space specified by Guid,
970 then the module will not build.
972 If Guid is NULL, then ASSERT().
974 @param Guid Pointer to a 128-bit unique value that designates
975 which namespace to retrieve a value from.
976 @param TokenName The name of the PCD token to set the current value for.
977 @param Value The 16-bit value to set.
979 @return The status of the set operation.
982 #define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
985 Sets an 32-bit PCD token value based on a GUID and a token name.
987 Sets the 32-bit value for the token specified by Guid and TokenName.
988 If TokenName is not a valid token in the token space specified by Guid,
989 then the module will not build.
991 If Guid is NULL, then ASSERT().
993 @param Guid Pointer to a 128-bit unique value that designates
994 which namespace to retrieve a value from.
995 @param TokenName The name of the PCD token to set the current value for.
996 @param Value The 32-bit value to set.
998 @return The status of the set operation.
1001 #define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1004 Sets an 64-bit PCD token value based on a GUID and a token name.
1006 Sets the 64-bit value for the token specified by Guid and TokenName.
1007 If TokenName is not a valid token in the token space specified by Guid,
1008 then the module will not build.
1010 If Guid is NULL, then ASSERT().
1012 @param Guid Pointer to a 128-bit unique value that designates
1013 which namespace to retrieve a value from.
1014 @param TokenName The name of the PCD token to set the current value for.
1015 @param Value The 64-bit value to set.
1017 @return The status of the set operation.
1020 #define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1023 Sets a pointer to a PCD token buffer based on a GUID and a token name.
1025 Sets the buffer for the token specified by Guid and TokenName.
1026 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
1027 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
1028 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
1029 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
1030 supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.
1031 If TokenName is not a valid token in the token space specified by Guid,
1032 then the module will not build.
1034 If Guid is NULL, then ASSERT().
1035 If SizeOfBuffer is NULL, then ASSERT().
1036 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1038 @param Guid Pointer to a 128-bit unique value that designates
1039 which namespace to retrieve a value from.
1040 @param TokenName The name of the PCD token to set the current value for.
1041 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1042 @param Buffer Pointer to the buffer to set.
1044 @return The status of the set operation.
1047 #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
1048 LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
1052 Sets an boolean PCD token value based on a GUID and a token name.
1054 Sets the boolean value for the token specified by Guid and TokenName.
1055 If TokenName is not a valid token in the token space specified by Guid,
1056 then the module will not build.
1058 If Guid is NULL, then ASSERT().
1060 @param Guid Pointer to a 128-bit unique value that designates
1061 which namespace to retrieve a value from.
1062 @param TokenName The name of the PCD token to set the current value for.
1063 @param Value The boolean value to set.
1065 @return The status of the set operation.
1068 #define PcdSetExBoolS(Guid, TokenName, Value) \
1069 LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1072 This function provides a means by which SKU support can be established in the PCD infrastructure.
1074 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
1076 @param SkuId The SKU value that will be used when the PCD service retrieves and sets values
1077 associated with a PCD token.
1079 @return Return the SKU ID that was set.
1090 This function provides a means by which to retrieve a value for a given PCD token.
1092 Returns the 8-bit value for the token specified by TokenNumber.
1094 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1096 @return Returns the 8-bit value for the token specified by TokenNumber.
1102 IN UINTN TokenNumber
1107 This function provides a means by which to retrieve a value for a given PCD token.
1109 Returns the 16-bit value for the token specified by TokenNumber.
1111 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1113 @return Returns the 16-bit value for the token specified by TokenNumber.
1119 IN UINTN TokenNumber
1124 This function provides a means by which to retrieve a value for a given PCD token.
1126 Returns the 32-bit value for the token specified by TokenNumber.
1128 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1130 @return Returns the 32-bit value for the token specified by TokenNumber.
1136 IN UINTN TokenNumber
1141 This function provides a means by which to retrieve a value for a given PCD token.
1143 Returns the 64-bit value for the token specified by TokenNumber.
1145 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1147 @return Returns the 64-bit value for the token specified by TokenNumber.
1153 IN UINTN TokenNumber
1158 This function provides a means by which to retrieve a value for a given PCD token.
1160 Returns the pointer to the buffer of the token specified by TokenNumber.
1162 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1164 @return Returns the pointer to the token specified by TokenNumber.
1170 IN UINTN TokenNumber
1175 This function provides a means by which to retrieve a value for a given PCD token.
1177 Returns the Boolean value of the token specified by TokenNumber.
1179 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1181 @return Returns the Boolean value of the token specified by TokenNumber.
1187 IN UINTN TokenNumber
1192 This function provides a means by which to retrieve the size of a given PCD token.
1194 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1196 @return Returns the size of the token specified by TokenNumber.
1202 IN UINTN TokenNumber
1207 This function provides a means by which to retrieve a value for a given PCD token.
1209 Returns the 8-bit value for the token specified by TokenNumber and Guid.
1211 If Guid is NULL, then ASSERT().
1213 @param[in] Guid Pointer to a 128-bit unique value that designates
1214 which namespace to retrieve a value from.
1215 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1217 @return Return the UINT8.
1223 IN CONST GUID
*Guid
,
1224 IN UINTN TokenNumber
1229 This function provides a means by which to retrieve a value for a given PCD token.
1231 Returns the 16-bit value for the token specified by TokenNumber and Guid.
1233 If Guid is NULL, then ASSERT().
1235 @param[in] Guid Pointer to a 128-bit unique value that designates
1236 which namespace to retrieve a value from.
1237 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1239 @return Return the UINT16.
1245 IN CONST GUID
*Guid
,
1246 IN UINTN TokenNumber
1251 Returns the 32-bit value for the token specified by TokenNumber and Guid.
1252 If Guid is NULL, then ASSERT().
1254 @param[in] Guid Pointer to a 128-bit unique value that designates
1255 which namespace to retrieve a value from.
1256 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1258 @return Return the UINT32.
1264 IN CONST GUID
*Guid
,
1265 IN UINTN TokenNumber
1270 This function provides a means by which to retrieve a value for a given PCD token.
1272 Returns the 64-bit value for the token specified by TokenNumber and Guid.
1274 If Guid is NULL, then ASSERT().
1276 @param[in] Guid Pointer to a 128-bit unique value that designates
1277 which namespace to retrieve a value from.
1278 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1280 @return Return the UINT64.
1286 IN CONST GUID
*Guid
,
1287 IN UINTN TokenNumber
1292 This function provides a means by which to retrieve a value for a given PCD token.
1294 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
1296 If Guid is NULL, then ASSERT().
1298 @param[in] Guid Pointer to a 128-bit unique value that designates
1299 which namespace to retrieve a value from.
1300 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1302 @return Return the VOID* pointer.
1308 IN CONST GUID
*Guid
,
1309 IN UINTN TokenNumber
1314 This function provides a means by which to retrieve a value for a given PCD token.
1316 Returns the Boolean value of the token specified by TokenNumber and Guid.
1318 If Guid is NULL, then ASSERT().
1320 @param[in] Guid Pointer to a 128-bit unique value that designates
1321 which namespace to retrieve a value from.
1322 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1324 @return Return the BOOLEAN.
1330 IN CONST GUID
*Guid
,
1331 IN UINTN TokenNumber
1336 This function provides a means by which to retrieve the size of a given PCD token.
1338 Returns the size of the token specified by TokenNumber and Guid.
1340 If Guid is NULL, then ASSERT().
1342 @param[in] Guid Pointer to a 128-bit unique value that designates
1343 which namespace to retrieve a value from.
1344 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1346 @return Return the size.
1352 IN CONST GUID
*Guid
,
1353 IN UINTN TokenNumber
1357 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1359 This function provides a means by which to set a value for a given PCD token.
1361 Sets the 8-bit value for the token specified by TokenNumber
1362 to the value specified by Value. Value is returned.
1364 @param[in] TokenNumber The PCD token number to set a current value for.
1365 @param[in] Value The 8-bit value to set.
1367 @return Return the Value that was set.
1373 IN UINTN TokenNumber
,
1379 This function provides a means by which to set a value for a given PCD token.
1381 Sets the 16-bit value for the token specified by TokenNumber
1382 to the value specified by Value. Value is returned.
1384 @param[in] TokenNumber The PCD token number to set a current value for.
1385 @param[in] Value The 16-bit value to set.
1387 @return Return the Value that was set.
1393 IN UINTN TokenNumber
,
1399 This function provides a means by which to set a value for a given PCD token.
1401 Sets the 32-bit value for the token specified by TokenNumber
1402 to the value specified by Value. Value is returned.
1404 @param[in] TokenNumber The PCD token number to set a current value for.
1405 @param[in] Value The 32-bit value to set.
1407 @return Return the Value that was set.
1413 IN UINTN TokenNumber
,
1419 This function provides a means by which to set a value for a given PCD token.
1421 Sets the 64-bit value for the token specified by TokenNumber
1422 to the value specified by Value. Value is returned.
1424 @param[in] TokenNumber The PCD token number to set a current value for.
1425 @param[in] Value The 64-bit value to set.
1427 @return Return the Value that was set.
1433 IN UINTN TokenNumber
,
1439 This function provides a means by which to set a value for a given PCD token.
1441 Sets a buffer for the token specified by TokenNumber to the value
1442 specified by Buffer and SizeOfBuffer. Buffer is returned.
1443 If SizeOfBuffer is greater than the maximum size support by TokenNumber,
1444 then set SizeOfBuffer to the maximum size supported by TokenNumber and
1445 return NULL to indicate that the set operation was not actually performed.
1447 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1448 maximum size supported by TokenName and NULL must be returned.
1450 If SizeOfBuffer is NULL, then ASSERT().
1451 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1453 @param[in] TokenNumber The PCD token number to set a current value for.
1454 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1455 @param[in] Buffer A pointer to the buffer to set.
1457 @return Return the pointer for the Buffer that was set.
1463 IN UINTN TokenNumber
,
1464 IN OUT UINTN
*SizeOfBuffer
,
1465 IN CONST VOID
*Buffer
1470 This function provides a means by which to set a value for a given PCD token.
1472 Sets the Boolean value for the token specified by TokenNumber
1473 to the value specified by Value. Value is returned.
1475 @param[in] TokenNumber The PCD token number to set a current value for.
1476 @param[in] Value The boolean value to set.
1478 @return Return the Value that was set.
1484 IN UINTN TokenNumber
,
1490 This function provides a means by which to set a value for a given PCD token.
1492 Sets the 8-bit value for the token specified by TokenNumber and
1493 Guid to the value specified by Value. Value is returned.
1495 If Guid is NULL, then ASSERT().
1497 @param[in] Guid Pointer to a 128-bit unique value that
1498 designates which namespace to set a value from.
1499 @param[in] TokenNumber The PCD token number to set a current value for.
1500 @param[in] Value The 8-bit value to set.
1502 @return Return the Value that was set.
1508 IN CONST GUID
*Guid
,
1509 IN UINTN TokenNumber
,
1515 This function provides a means by which to set a value for a given PCD token.
1517 Sets the 16-bit value for the token specified by TokenNumber and
1518 Guid to the value specified by Value. Value is returned.
1520 If Guid is NULL, then ASSERT().
1522 @param[in] Guid Pointer to a 128-bit unique value that
1523 designates which namespace to set a value from.
1524 @param[in] TokenNumber The PCD token number to set a current value for.
1525 @param[in] Value The 16-bit value to set.
1527 @return Return the Value that was set.
1533 IN CONST GUID
*Guid
,
1534 IN UINTN TokenNumber
,
1540 This function provides a means by which to set a value for a given PCD token.
1542 Sets the 32-bit value for the token specified by TokenNumber and
1543 Guid to the value specified by Value. Value is returned.
1545 If Guid is NULL, then ASSERT().
1547 @param[in] Guid Pointer to a 128-bit unique value that
1548 designates which namespace to set a value from.
1549 @param[in] TokenNumber The PCD token number to set a current value for.
1550 @param[in] Value The 32-bit value to set.
1552 @return Return the Value that was set.
1558 IN CONST GUID
*Guid
,
1559 IN UINTN TokenNumber
,
1565 This function provides a means by which to set a value for a given PCD token.
1567 Sets the 64-bit value for the token specified by TokenNumber and
1568 Guid to the value specified by Value. Value is returned.
1570 If Guid is NULL, then ASSERT().
1572 @param[in] Guid Pointer to a 128-bit unique value that
1573 designates which namespace to set a value from.
1574 @param[in] TokenNumber The PCD token number to set a current value for.
1575 @param[in] Value The 64-bit value to set.
1577 @return Return the Value that was set.
1583 IN CONST GUID
*Guid
,
1584 IN UINTN TokenNumber
,
1590 This function provides a means by which to set a value for a given PCD token.
1592 Sets a buffer for the token specified by TokenNumber to the value specified by
1593 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1594 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
1595 supported by TokenNumber and return NULL to indicate that the set operation
1596 was not actually performed.
1598 If Guid is NULL, then ASSERT().
1599 If SizeOfBuffer is NULL, then ASSERT().
1600 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1602 @param[in] Guid Pointer to a 128-bit unique value that
1603 designates which namespace to set a value from.
1604 @param[in] TokenNumber The PCD token number to set a current value for.
1605 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1606 @param[in] Buffer A pointer to the buffer to set.
1608 @return Return the pointer to the Buffer that was set.
1614 IN CONST GUID
*Guid
,
1615 IN UINTN TokenNumber
,
1616 IN OUT UINTN
*SizeOfBuffer
,
1622 This function provides a means by which to set a value for a given PCD token.
1624 Sets the Boolean value for the token specified by TokenNumber and
1625 Guid to the value specified by Value. Value is returned.
1627 If Guid is NULL, then ASSERT().
1629 @param[in] Guid Pointer to a 128-bit unique value that
1630 designates which namespace to set a value from.
1631 @param[in] TokenNumber The PCD token number to set a current value for.
1632 @param[in] Value The Boolean value to set.
1634 @return Return the Value that was set.
1640 IN CONST GUID
*Guid
,
1641 IN UINTN TokenNumber
,
1647 This function provides a means by which to set a value for a given PCD token.
1649 Sets the 8-bit value for the token specified by TokenNumber
1650 to the value specified by Value.
1652 @param[in] TokenNumber The PCD token number to set a current value for.
1653 @param[in] Value The 8-bit value to set.
1655 @return The status of the set operation.
1661 IN UINTN TokenNumber
,
1666 This function provides a means by which to set a value for a given PCD token.
1668 Sets the 16-bit value for the token specified by TokenNumber
1669 to the value specified by Value.
1671 @param[in] TokenNumber The PCD token number to set a current value for.
1672 @param[in] Value The 16-bit value to set.
1674 @return The status of the set operation.
1680 IN UINTN TokenNumber
,
1685 This function provides a means by which to set a value for a given PCD token.
1687 Sets the 32-bit value for the token specified by TokenNumber
1688 to the value specified by Value.
1690 @param[in] TokenNumber The PCD token number to set a current value for.
1691 @param[in] Value The 32-bit value to set.
1693 @return The status of the set operation.
1699 IN UINTN TokenNumber
,
1704 This function provides a means by which to set a value for a given PCD token.
1706 Sets the 64-bit value for the token specified by TokenNumber
1707 to the value specified by Value.
1709 @param[in] TokenNumber The PCD token number to set a current value for.
1710 @param[in] Value The 64-bit value to set.
1712 @return The status of the set operation.
1718 IN UINTN TokenNumber
,
1723 This function provides a means by which to set a value for a given PCD token.
1725 Sets a buffer for the token specified by TokenNumber to the value specified
1726 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1727 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1728 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1729 was not actually performed.
1731 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1732 maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
1734 If SizeOfBuffer is NULL, then ASSERT().
1735 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1737 @param[in] TokenNumber The PCD token number to set a current value for.
1738 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1739 @param[in] Buffer A pointer to the buffer to set.
1741 @return The status of the set operation.
1747 IN UINTN TokenNumber
,
1748 IN OUT UINTN
*SizeOfBuffer
,
1749 IN CONST VOID
*Buffer
1753 This function provides a means by which to set a value for a given PCD token.
1755 Sets the boolean value for the token specified by TokenNumber
1756 to the value specified by Value.
1758 @param[in] TokenNumber The PCD token number to set a current value for.
1759 @param[in] Value The boolean value to set.
1761 @return The status of the set operation.
1767 IN UINTN TokenNumber
,
1772 This function provides a means by which to set a value for a given PCD token.
1774 Sets the 8-bit value for the token specified by TokenNumber
1775 to the value specified by Value.
1777 If Guid is NULL, then ASSERT().
1779 @param[in] Guid The pointer to a 128-bit unique value that
1780 designates which namespace to set a value from.
1781 @param[in] TokenNumber The PCD token number to set a current value for.
1782 @param[in] Value The 8-bit value to set.
1784 @return The status of the set operation.
1790 IN CONST GUID
*Guid
,
1791 IN UINTN TokenNumber
,
1796 This function provides a means by which to set a value for a given PCD token.
1798 Sets the 16-bit value for the token specified by TokenNumber
1799 to the value specified by Value.
1801 If Guid is NULL, then ASSERT().
1803 @param[in] Guid The pointer to a 128-bit unique value that
1804 designates which namespace to set a value from.
1805 @param[in] TokenNumber The PCD token number to set a current value for.
1806 @param[in] Value The 16-bit value to set.
1808 @return The status of the set operation.
1814 IN CONST GUID
*Guid
,
1815 IN UINTN TokenNumber
,
1820 This function provides a means by which to set a value for a given PCD token.
1822 Sets the 32-bit value for the token specified by TokenNumber
1823 to the value specified by Value.
1825 If Guid is NULL, then ASSERT().
1827 @param[in] Guid The pointer to a 128-bit unique value that
1828 designates which namespace to set a value from.
1829 @param[in] TokenNumber The PCD token number to set a current value for.
1830 @param[in] Value The 32-bit value to set.
1832 @return The status of the set operation.
1838 IN CONST GUID
*Guid
,
1839 IN UINTN TokenNumber
,
1844 This function provides a means by which to set a value for a given PCD token.
1846 Sets the 64-bit value for the token specified by TokenNumber
1847 to the value specified by Value.
1849 If Guid is NULL, then ASSERT().
1851 @param[in] Guid The pointer to a 128-bit unique value that
1852 designates which namespace to set a value from.
1853 @param[in] TokenNumber The PCD token number to set a current value for.
1854 @param[in] Value The 64-bit value to set.
1856 @return The status of the set operation.
1862 IN CONST GUID
*Guid
,
1863 IN UINTN TokenNumber
,
1868 This function provides a means by which to set a value for a given PCD token.
1870 Sets a buffer for the token specified by TokenNumber to the value specified by
1871 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1872 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1873 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1874 was not actually performed.
1876 If Guid is NULL, then ASSERT().
1877 If SizeOfBuffer is NULL, then ASSERT().
1878 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1880 @param[in] Guid Pointer to a 128-bit unique value that
1881 designates which namespace to set a value from.
1882 @param[in] TokenNumber The PCD token number to set a current value for.
1883 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1884 @param[in] Buffer A pointer to the buffer to set.
1886 @return The status of the set operation.
1892 IN CONST GUID
*Guid
,
1893 IN UINTN TokenNumber
,
1894 IN OUT UINTN
*SizeOfBuffer
,
1899 This function provides a means by which to set a value for a given PCD token.
1901 Sets the boolean value for the token specified by TokenNumber
1902 to the value specified by Value.
1904 If Guid is NULL, then ASSERT().
1906 @param[in] Guid The pointer to a 128-bit unique value that
1907 designates which namespace to set a value from.
1908 @param[in] TokenNumber The PCD token number to set a current value for.
1909 @param[in] Value The boolean value to set.
1911 @return The status of the set operation.
1917 IN CONST GUID
*Guid
,
1918 IN UINTN TokenNumber
,
1923 This notification function serves two purposes.
1925 Firstly, it notifies the module that did the registration that the value of this
1926 PCD token has been set.
1927 Secondly, it provides a mechanism for the module that did the registration to intercept
1928 the set operation and override the value been set if necessary. After the invocation of
1929 the callback function, TokenData will be used by PCD service PEIM or driver to modify th
1930 internal data in PCD database.
1932 @param[in] CallBackGuid The PCD token GUID being set.
1933 @param[in] CallBackToken The PCD token number being set.
1934 @param[in, out] TokenData A pointer to the token data being set.
1935 @param[in] TokenDataSize The size, in bytes, of the data being set.
1940 (EFIAPI
*PCD_CALLBACK
)(
1941 IN CONST GUID
*CallBackGuid
, OPTIONAL
1942 IN UINTN CallBackToken
,
1943 IN OUT VOID
*TokenData
,
1944 IN UINTN TokenDataSize
1949 Set up a notification function that is called when a specified token is set.
1951 When the token specified by TokenNumber and Guid is set,
1952 then notification function specified by NotificationFunction is called.
1953 If Guid is NULL, then the default token space is used.
1954 If NotificationFunction is NULL, then ASSERT().
1956 @param[in] Guid Pointer to a 128-bit unique value that designates which
1957 namespace to set a value from. If NULL, then the default
1958 token space is used.
1959 @param[in] TokenNumber The PCD token number to monitor.
1960 @param[in] NotificationFunction The function to call when the token
1961 specified by Guid and TokenNumber is set.
1966 LibPcdCallbackOnSet (
1967 IN CONST GUID
*Guid
, OPTIONAL
1968 IN UINTN TokenNumber
,
1969 IN PCD_CALLBACK NotificationFunction
1974 Disable a notification function that was established with LibPcdCallbackonSet().
1976 Disable a notification function that was previously established with LibPcdCallbackOnSet().
1977 If NotificationFunction is NULL, then ASSERT().
1978 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
1979 and NotificationFunction, then ASSERT().
1981 @param[in] Guid Specify the GUID token space.
1982 @param[in] TokenNumber Specify the token number.
1983 @param[in] NotificationFunction The callback function to be unregistered.
1988 LibPcdCancelCallback (
1989 IN CONST GUID
*Guid
, OPTIONAL
1990 IN UINTN TokenNumber
,
1991 IN PCD_CALLBACK NotificationFunction
1996 Retrieves the next token in a token space.
1998 Retrieves the next PCD token number from the token space specified by Guid.
1999 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
2000 then the first token number is returned. Otherwise, the token number that
2001 follows TokenNumber in the token space is returned. If TokenNumber is the last
2002 token number in the token space, then 0 is returned.
2004 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
2006 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace
2007 to set a value from. If NULL, then the default token space is used.
2008 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
2011 @return The next valid token number.
2016 LibPcdGetNextToken (
2017 IN CONST GUID
*Guid
, OPTIONAL
2018 IN UINTN TokenNumber
2024 Used to retrieve the list of available PCD token space GUIDs.
2026 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
2028 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
2029 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
2031 @param TokenSpaceGuid Pointer to the a PCD token space GUID
2033 @return The next valid token namespace.
2038 LibPcdGetNextTokenSpace (
2039 IN CONST GUID
*TokenSpaceGuid
2044 Sets a value of a patchable PCD entry that is type pointer.
2046 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
2047 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
2048 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
2049 NULL to indicate that the set operation was not actually performed.
2050 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2051 MaximumDatumSize and NULL must be returned.
2053 If PatchVariable is NULL, then ASSERT().
2054 If SizeOfBuffer is NULL, then ASSERT().
2055 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2057 @param[out] PatchVariable A pointer to the global variable in a module that is
2058 the target of the set operation.
2059 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2060 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2061 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2063 @return Return the pointer to the Buffer that was set.
2069 OUT VOID
*PatchVariable
,
2070 IN UINTN MaximumDatumSize
,
2071 IN OUT UINTN
*SizeOfBuffer
,
2072 IN CONST VOID
*Buffer
2076 Sets a value of a patchable PCD entry that is type pointer.
2078 Sets the PCD entry specified by PatchVariable to the value specified
2079 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
2080 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
2081 to indicate that the set operation was not actually performed.
2082 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2083 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
2085 If PatchVariable is NULL, then ASSERT().
2086 If SizeOfBuffer is NULL, then ASSERT().
2087 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2089 @param[out] PatchVariable A pointer to the global variable in a module that is
2090 the target of the set operation.
2091 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2092 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2093 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2095 @return The status of the set operation.
2100 LibPatchPcdSetPtrS (
2101 OUT VOID
*PatchVariable
,
2102 IN UINTN MaximumDatumSize
,
2103 IN OUT UINTN
*SizeOfBuffer
,
2104 IN CONST VOID
*Buffer
2108 Sets a value and size of a patchable PCD entry that is type pointer.
2110 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
2111 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
2112 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
2113 NULL to indicate that the set operation was not actually performed.
2114 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2115 MaximumDatumSize and NULL must be returned.
2117 If PatchVariable is NULL, then ASSERT().
2118 If SizeOfPatchVariable is NULL, then ASSERT().
2119 If SizeOfBuffer is NULL, then ASSERT().
2120 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2122 @param[out] PatchVariable A pointer to the global variable in a module that is
2123 the target of the set operation.
2124 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
2125 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2126 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2127 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2129 @return Return the pointer to the Buffer that was set.
2134 LibPatchPcdSetPtrAndSize (
2135 OUT VOID
*PatchVariable
,
2136 OUT UINTN
*SizeOfPatchVariable
,
2137 IN UINTN MaximumDatumSize
,
2138 IN OUT UINTN
*SizeOfBuffer
,
2139 IN CONST VOID
*Buffer
2143 Sets a value and size of a patchable PCD entry that is type pointer.
2145 Sets the PCD entry specified by PatchVariable to the value specified
2146 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
2147 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
2148 to indicate that the set operation was not actually performed.
2149 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2150 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
2152 If PatchVariable is NULL, then ASSERT().
2153 If SizeOfPatchVariable is NULL, then ASSERT().
2154 If SizeOfBuffer is NULL, then ASSERT().
2155 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2157 @param[out] PatchVariable A pointer to the global variable in a module that is
2158 the target of the set operation.
2159 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
2160 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2161 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2162 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2164 @return The status of the set operation.
2169 LibPatchPcdSetPtrAndSizeS (
2170 OUT VOID
*PatchVariable
,
2171 OUT UINTN
*SizeOfPatchVariable
,
2172 IN UINTN MaximumDatumSize
,
2173 IN OUT UINTN
*SizeOfBuffer
,
2174 IN CONST VOID
*Buffer
2188 /// The returned information associated with the requested TokenNumber. If
2189 /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.
2193 /// The size of the data in bytes associated with the TokenNumber specified. If
2194 /// TokenNumber is 0, then PcdSize is set 0.
2198 /// The null-terminated ASCII string associated with a given token. If the
2199 /// TokenNumber specified was 0, then this field corresponds to the null-terminated
2200 /// ASCII string associated with the token's namespace Guid. If NULL, there is no
2201 /// name associated with this request.
2208 Retrieve additional information associated with a PCD token.
2210 This includes information such as the type of value the TokenNumber is associated with as well as possible
2211 human readable name that is associated with the token.
2213 If TokenNumber is not in the default token space specified, then ASSERT().
2215 @param[in] TokenNumber The PCD token number.
2216 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2217 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2222 IN UINTN TokenNumber
,
2223 OUT PCD_INFO
*PcdInfo
2227 Retrieve additional information associated with a PCD token.
2229 This includes information such as the type of value the TokenNumber is associated with as well as possible
2230 human readable name that is associated with the token.
2232 If TokenNumber is not in the token space specified by Guid, then ASSERT().
2234 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
2235 @param[in] TokenNumber The PCD token number.
2236 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2237 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2242 IN CONST GUID
*Guid
,
2243 IN UINTN TokenNumber
,
2244 OUT PCD_INFO
*PcdInfo
2248 Retrieve the currently set SKU Id.
2250 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
2251 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU