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))
485 Sets a 8-bit PCD token value based on a token name.
487 Sets the 8-bit value for the token specified by TokenName.
488 If TokenName is not a valid token in the token space, then the module will not build.
490 @param TokenName The name of the PCD token to retrieve a current value for.
491 @param Value The 8-bit value to set.
493 @return The status of the set operation.
496 #define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
499 Sets a 16-bit PCD token value based on a token name.
501 Sets the 16-bit value for the token specified by TokenName.
502 If TokenName is not a valid token in the token space, then the module will not build.
504 @param TokenName The name of the PCD token to retrieve a current value for.
505 @param Value The 16-bit value to set.
507 @return The status of the set operation.
510 #define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
513 Sets a 32-bit PCD token value based on a token name.
515 Sets the 32-bit value for the token specified by TokenName.
516 If TokenName is not a valid token in the token space, then the module will not build.
518 @param TokenName The name of the PCD token to retrieve a current value for.
519 @param Value The 32-bit value to set.
521 @return The status of the set operation.
524 #define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
527 Sets a 64-bit PCD token value based on a token name.
529 Sets the 64-bit value for the token specified by TokenName.
530 If TokenName is not a valid token in the token space, then the module will not build.
532 @param TokenName The name of the PCD token to retrieve a current value for.
533 @param Value The 64-bit value to set.
535 @return The status of the set operation.
538 #define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
541 Sets a pointer to a PCD token buffer based on a token name.
543 Sets the buffer for the token specified by TokenName.
544 If SizeOfBuffer is greater than the maximum size supported by TokenName,
545 then set SizeOfBuffer to the maximum size supported by TokenName and return
546 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
547 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
548 supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
549 If TokenName is not a valid token in the token space, then the module will not build.
551 If SizeOfBuffer is NULL, then ASSERT().
552 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
554 @param TokenName The name of the PCD token to set the current value for.
555 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
556 @param Buffer A pointer to the buffer to set.
558 @return The status of the set operation.
561 #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
562 _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
567 Sets a boolean PCD token value based on a token name.
569 Sets the boolean value for the token specified by TokenName.
570 If TokenName is not a valid token in the token space, then the module will not build.
572 @param TokenName The name of the PCD token to retrieve a current value for.
573 @param Value The boolean value to set.
575 @return The status of the set operation.
578 #define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
581 Retrieves a token number based on a GUID and a token name.
583 Returns the token number for the token specified by Guid and TokenName.
584 If TokenName is not a valid token in the token space, then the module will not build.
586 @param Guid Pointer to a 128-bit unique value that designates
587 which namespace to retrieve a value from.
588 @param TokenName The name of the PCD token to retrieve a current value for.
590 @return Return the token number.
593 #define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
596 Retrieves an 8-bit PCD token value based on a GUID and a token name.
598 Returns the 8-bit value for the token specified by Guid and TokenName.
599 If TokenName is not a valid token in the token space specified by Guid,
600 then the module will not build.
602 If Guid is NULL, then ASSERT().
604 @param Guid Pointer to a 128-bit unique value that designates
605 which namespace to retrieve a value from.
606 @param TokenName The name of the PCD token to retrieve a current value for.
608 @return An 8-bit PCD token value.
611 #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
614 Retrieves a 16-bit PCD token value based on a GUID and a token name.
616 Returns the 16-bit value for the token specified by Guid and TokenName.
617 If TokenName is not a valid token in the token space specified by Guid,
618 then the module will not build.
620 If Guid is NULL, then ASSERT().
622 @param Guid Pointer to a 128-bit unique value that designates
623 which namespace to retrieve a value from.
624 @param TokenName The name of the PCD token to retrieve a current value for.
626 @return A 16-bit PCD token value.
629 #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
633 Retrieves a 32-bit PCD token value based on a GUID and a token name.
635 Returns the 32-bit value for the token specified by Guid and TokenName.
636 If TokenName is not a valid token in the token space specified by Guid,
637 then the module will not build.
639 If Guid is NULL, then ASSERT().
641 @param Guid Pointer to a 128-bit unique value that designates
642 which namespace to retrieve a value from.
643 @param TokenName The name of the PCD token to retrieve a current value for.
645 @return A 32-bit PCD token value.
648 #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
652 Retrieves a 64-bit PCD token value based on a GUID and a token name.
654 Returns the 64-bit value for the token specified by Guid and TokenName.
655 If TokenName is not a valid token in the token space specified by Guid,
656 then the module will not build.
658 If Guid is NULL, then ASSERT().
660 @param Guid Pointer to a 128-bit unique value that designates
661 which namespace to retrieve a value from.
662 @param TokenName The name of the PCD token to retrieve a current value for.
664 @return A 64-bit PCD token value.
667 #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
671 Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
673 Returns a pointer to the buffer for the token specified by Guid and TokenName.
674 If TokenName is not a valid token in the token space specified by Guid,
675 then the module will not build.
677 If Guid is NULL, then ASSERT().
679 @param Guid Pointer to a 128-bit unique value that designates
680 which namespace to retrieve a value from.
681 @param TokenName The name of the PCD token to retrieve a current value for.
683 @return A pointer to a PCD token buffer.
686 #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
690 Retrieves a Boolean PCD token value based on a GUID and a token name.
692 Returns the Boolean value for the token specified by Guid and TokenName.
693 If TokenName is not a valid token in the token space specified by Guid,
694 then the module will not build.
696 If Guid is NULL, then ASSERT().
698 @param Guid Pointer to a 128-bit unique value that designates
699 which namespace to retrieve a value from.
700 @param TokenName The name of the PCD token to retrieve a current value for.
702 @return A Boolean PCD token value.
705 #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
710 Sets an 8-bit PCD token value based on a GUID and a token name.
712 Sets the 8-bit value for the token specified by Guid and TokenName.
713 If TokenName is not a valid token in the token space specified by Guid,
714 then the module will not build.
716 If Guid is NULL, then ASSERT().
718 @param Guid Pointer to a 128-bit unique value that designates
719 which namespace to retrieve a value from.
720 @param TokenName The name of the PCD token to set the current value for.
721 @param Value The 8-bit value to set.
723 @return The status of the set operation.
726 #define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
729 Sets an 16-bit PCD token value based on a GUID and a token name.
731 Sets the 16-bit value for the token specified by Guid and TokenName.
732 If TokenName is not a valid token in the token space specified by Guid,
733 then the module will not build.
735 If Guid is NULL, then ASSERT().
737 @param Guid Pointer to a 128-bit unique value that designates
738 which namespace to retrieve a value from.
739 @param TokenName The name of the PCD token to set the current value for.
740 @param Value The 16-bit value to set.
742 @return The status of the set operation.
745 #define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
748 Sets an 32-bit PCD token value based on a GUID and a token name.
750 Sets the 32-bit value for the token specified by Guid and TokenName.
751 If TokenName is not a valid token in the token space specified by Guid,
752 then the module will not build.
754 If Guid is NULL, then ASSERT().
756 @param Guid Pointer to a 128-bit unique value that designates
757 which namespace to retrieve a value from.
758 @param TokenName The name of the PCD token to set the current value for.
759 @param Value The 32-bit value to set.
761 @return The status of the set operation.
764 #define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
767 Sets an 64-bit PCD token value based on a GUID and a token name.
769 Sets the 64-bit value for the token specified by Guid and TokenName.
770 If TokenName is not a valid token in the token space specified by Guid,
771 then the module will not build.
773 If Guid is NULL, then ASSERT().
775 @param Guid Pointer to a 128-bit unique value that designates
776 which namespace to retrieve a value from.
777 @param TokenName The name of the PCD token to set the current value for.
778 @param Value The 64-bit value to set.
780 @return The status of the set operation.
783 #define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
786 Sets a pointer to a PCD token buffer based on a GUID and a token name.
788 Sets the buffer for the token specified by Guid and TokenName.
789 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
790 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
791 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
792 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
793 supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.
794 If TokenName is not a valid token in the token space specified by Guid,
795 then the module will not build.
797 If Guid is NULL, then ASSERT().
798 If SizeOfBuffer is NULL, then ASSERT().
799 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
801 @param Guid Pointer to a 128-bit unique value that designates
802 which namespace to retrieve a value from.
803 @param TokenName The name of the PCD token to set the current value for.
804 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
805 @param Buffer Pointer to the buffer to set.
807 @return The status of the set operation.
810 #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
811 LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
815 Sets an boolean PCD token value based on a GUID and a token name.
817 Sets the boolean value for the token specified by Guid and TokenName.
818 If TokenName is not a valid token in the token space specified by Guid,
819 then the module will not build.
821 If Guid is NULL, then ASSERT().
823 @param Guid Pointer to a 128-bit unique value that designates
824 which namespace to retrieve a value from.
825 @param TokenName The name of the PCD token to set the current value for.
826 @param Value The boolean value to set.
828 @return The status of the set operation.
831 #define PcdSetExBoolS(Guid, TokenName, Value) \
832 LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))
835 This function provides a means by which SKU support can be established in the PCD infrastructure.
837 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
839 @param SkuId The SKU value that will be used when the PCD service retrieves and sets values
840 associated with a PCD token.
842 @return Return the SKU ID that was set.
853 This function provides a means by which to retrieve a value for a given PCD token.
855 Returns the 8-bit value for the token specified by TokenNumber.
857 @param[in] TokenNumber The PCD token number to retrieve a current value for.
859 @return Returns the 8-bit value for the token specified by TokenNumber.
870 This function provides a means by which to retrieve a value for a given PCD token.
872 Returns the 16-bit value for the token specified by TokenNumber.
874 @param[in] TokenNumber The PCD token number to retrieve a current value for.
876 @return Returns the 16-bit value for the token specified by TokenNumber.
887 This function provides a means by which to retrieve a value for a given PCD token.
889 Returns the 32-bit value for the token specified by TokenNumber.
891 @param[in] TokenNumber The PCD token number to retrieve a current value for.
893 @return Returns the 32-bit value for the token specified by TokenNumber.
904 This function provides a means by which to retrieve a value for a given PCD token.
906 Returns the 64-bit value for the token specified by TokenNumber.
908 @param[in] TokenNumber The PCD token number to retrieve a current value for.
910 @return Returns the 64-bit value for the token specified by TokenNumber.
921 This function provides a means by which to retrieve a value for a given PCD token.
923 Returns the pointer to the buffer of the token specified by TokenNumber.
925 @param[in] TokenNumber The PCD token number to retrieve a current value for.
927 @return Returns the pointer to the token specified by TokenNumber.
938 This function provides a means by which to retrieve a value for a given PCD token.
940 Returns the Boolean value of the token specified by TokenNumber.
942 @param[in] TokenNumber The PCD token number to retrieve a current value for.
944 @return Returns the Boolean value of the token specified by TokenNumber.
955 This function provides a means by which to retrieve the size of a given PCD token.
957 @param[in] TokenNumber The PCD token number to retrieve a current value for.
959 @return Returns the size of the token specified by TokenNumber.
970 This function provides a means by which to retrieve a value for a given PCD token.
972 Returns the 8-bit value for the token specified by TokenNumber and Guid.
974 If Guid is NULL, then ASSERT().
976 @param[in] Guid Pointer to a 128-bit unique value that designates
977 which namespace to retrieve a value from.
978 @param[in] TokenNumber The PCD token number to retrieve a current value for.
980 @return Return the UINT8.
992 This function provides a means by which to retrieve a value for a given PCD token.
994 Returns the 16-bit value for the token specified by TokenNumber and Guid.
996 If Guid is NULL, then ASSERT().
998 @param[in] Guid Pointer to a 128-bit unique value that designates
999 which namespace to retrieve a value from.
1000 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1002 @return Return the UINT16.
1008 IN CONST GUID
*Guid
,
1009 IN UINTN TokenNumber
1014 Returns the 32-bit value for the token specified by TokenNumber and Guid.
1015 If Guid is NULL, then ASSERT().
1017 @param[in] Guid Pointer to a 128-bit unique value that designates
1018 which namespace to retrieve a value from.
1019 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1021 @return Return the UINT32.
1027 IN CONST GUID
*Guid
,
1028 IN UINTN TokenNumber
1033 This function provides a means by which to retrieve a value for a given PCD token.
1035 Returns the 64-bit value for the token specified by TokenNumber and Guid.
1037 If Guid is NULL, then ASSERT().
1039 @param[in] Guid Pointer to a 128-bit unique value that designates
1040 which namespace to retrieve a value from.
1041 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1043 @return Return the UINT64.
1049 IN CONST GUID
*Guid
,
1050 IN UINTN TokenNumber
1055 This function provides a means by which to retrieve a value for a given PCD token.
1057 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
1059 If Guid is NULL, then ASSERT().
1061 @param[in] Guid Pointer to a 128-bit unique value that designates
1062 which namespace to retrieve a value from.
1063 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1065 @return Return the VOID* pointer.
1071 IN CONST GUID
*Guid
,
1072 IN UINTN TokenNumber
1077 This function provides a means by which to retrieve a value for a given PCD token.
1079 Returns the Boolean value of the token specified by TokenNumber and Guid.
1081 If Guid is NULL, then ASSERT().
1083 @param[in] Guid Pointer to a 128-bit unique value that designates
1084 which namespace to retrieve a value from.
1085 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1087 @return Return the BOOLEAN.
1093 IN CONST GUID
*Guid
,
1094 IN UINTN TokenNumber
1099 This function provides a means by which to retrieve the size of a given PCD token.
1101 Returns the size of the token specified by TokenNumber and Guid.
1103 If Guid is NULL, then ASSERT().
1105 @param[in] Guid Pointer to a 128-bit unique value that designates
1106 which namespace to retrieve a value from.
1107 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1109 @return Return the size.
1115 IN CONST GUID
*Guid
,
1116 IN UINTN TokenNumber
1121 This function provides a means by which to set a value for a given PCD token.
1123 Sets the 8-bit value for the token specified by TokenNumber
1124 to the value specified by Value.
1126 @param[in] TokenNumber The PCD token number to set a current value for.
1127 @param[in] Value The 8-bit value to set.
1129 @return The status of the set operation.
1135 IN UINTN TokenNumber
,
1140 This function provides a means by which to set a value for a given PCD token.
1142 Sets the 16-bit value for the token specified by TokenNumber
1143 to the value specified by Value.
1145 @param[in] TokenNumber The PCD token number to set a current value for.
1146 @param[in] Value The 16-bit value to set.
1148 @return The status of the set operation.
1154 IN UINTN TokenNumber
,
1159 This function provides a means by which to set a value for a given PCD token.
1161 Sets the 32-bit value for the token specified by TokenNumber
1162 to the value specified by Value.
1164 @param[in] TokenNumber The PCD token number to set a current value for.
1165 @param[in] Value The 32-bit value to set.
1167 @return The status of the set operation.
1173 IN UINTN TokenNumber
,
1178 This function provides a means by which to set a value for a given PCD token.
1180 Sets the 64-bit value for the token specified by TokenNumber
1181 to the value specified by Value.
1183 @param[in] TokenNumber The PCD token number to set a current value for.
1184 @param[in] Value The 64-bit value to set.
1186 @return The status of the set operation.
1192 IN UINTN TokenNumber
,
1197 This function provides a means by which to set a value for a given PCD token.
1199 Sets a buffer for the token specified by TokenNumber to the value specified
1200 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1201 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1202 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1203 was not actually performed.
1205 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1206 maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
1208 If SizeOfBuffer is NULL, then ASSERT().
1209 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1211 @param[in] TokenNumber The PCD token number to set a current value for.
1212 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1213 @param[in] Buffer A pointer to the buffer to set.
1215 @return The status of the set operation.
1221 IN UINTN TokenNumber
,
1222 IN OUT UINTN
*SizeOfBuffer
,
1223 IN CONST VOID
*Buffer
1227 This function provides a means by which to set a value for a given PCD token.
1229 Sets the boolean value for the token specified by TokenNumber
1230 to the value specified by Value.
1232 @param[in] TokenNumber The PCD token number to set a current value for.
1233 @param[in] Value The boolean value to set.
1235 @return The status of the set operation.
1241 IN UINTN TokenNumber
,
1246 This function provides a means by which to set a value for a given PCD token.
1248 Sets the 8-bit value for the token specified by TokenNumber
1249 to the value specified by Value.
1251 If Guid is NULL, then ASSERT().
1253 @param[in] Guid The pointer to a 128-bit unique value that
1254 designates which namespace to set a value from.
1255 @param[in] TokenNumber The PCD token number to set a current value for.
1256 @param[in] Value The 8-bit value to set.
1258 @return The status of the set operation.
1264 IN CONST GUID
*Guid
,
1265 IN UINTN TokenNumber
,
1270 This function provides a means by which to set a value for a given PCD token.
1272 Sets the 16-bit value for the token specified by TokenNumber
1273 to the value specified by Value.
1275 If Guid is NULL, then ASSERT().
1277 @param[in] Guid The pointer to a 128-bit unique value that
1278 designates which namespace to set a value from.
1279 @param[in] TokenNumber The PCD token number to set a current value for.
1280 @param[in] Value The 16-bit value to set.
1282 @return The status of the set operation.
1288 IN CONST GUID
*Guid
,
1289 IN UINTN TokenNumber
,
1294 This function provides a means by which to set a value for a given PCD token.
1296 Sets the 32-bit value for the token specified by TokenNumber
1297 to the value specified by Value.
1299 If Guid is NULL, then ASSERT().
1301 @param[in] Guid The pointer to a 128-bit unique value that
1302 designates which namespace to set a value from.
1303 @param[in] TokenNumber The PCD token number to set a current value for.
1304 @param[in] Value The 32-bit value to set.
1306 @return The status of the set operation.
1312 IN CONST GUID
*Guid
,
1313 IN UINTN TokenNumber
,
1318 This function provides a means by which to set a value for a given PCD token.
1320 Sets the 64-bit value for the token specified by TokenNumber
1321 to the value specified by Value.
1323 If Guid is NULL, then ASSERT().
1325 @param[in] Guid The pointer to a 128-bit unique value that
1326 designates which namespace to set a value from.
1327 @param[in] TokenNumber The PCD token number to set a current value for.
1328 @param[in] Value The 64-bit value to set.
1330 @return The status of the set operation.
1336 IN CONST GUID
*Guid
,
1337 IN UINTN TokenNumber
,
1342 This function provides a means by which to set a value for a given PCD token.
1344 Sets a buffer for the token specified by TokenNumber to the value specified by
1345 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1346 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1347 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1348 was not actually performed.
1350 If Guid is NULL, then ASSERT().
1351 If SizeOfBuffer is NULL, then ASSERT().
1352 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1354 @param[in] Guid Pointer to a 128-bit unique value that
1355 designates which namespace to set a value from.
1356 @param[in] TokenNumber The PCD token number to set a current value for.
1357 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1358 @param[in] Buffer A pointer to the buffer to set.
1360 @return The status of the set operation.
1366 IN CONST GUID
*Guid
,
1367 IN UINTN TokenNumber
,
1368 IN OUT UINTN
*SizeOfBuffer
,
1373 This function provides a means by which to set a value for a given PCD token.
1375 Sets the boolean value for the token specified by TokenNumber
1376 to the value specified by Value.
1378 If Guid is NULL, then ASSERT().
1380 @param[in] Guid The pointer to a 128-bit unique value that
1381 designates which namespace to set a value from.
1382 @param[in] TokenNumber The PCD token number to set a current value for.
1383 @param[in] Value The boolean value to set.
1385 @return The status of the set operation.
1391 IN CONST GUID
*Guid
,
1392 IN UINTN TokenNumber
,
1397 This notification function serves two purposes.
1399 Firstly, it notifies the module that did the registration that the value of this
1400 PCD token has been set.
1401 Secondly, it provides a mechanism for the module that did the registration to intercept
1402 the set operation and override the value been set if necessary. After the invocation of
1403 the callback function, TokenData will be used by PCD service PEIM or driver to modify th
1404 internal data in PCD database.
1406 @param[in] CallBackGuid The PCD token GUID being set.
1407 @param[in] CallBackToken The PCD token number being set.
1408 @param[in, out] TokenData A pointer to the token data being set.
1409 @param[in] TokenDataSize The size, in bytes, of the data being set.
1414 (EFIAPI
*PCD_CALLBACK
)(
1415 IN CONST GUID
*CallBackGuid
, OPTIONAL
1416 IN UINTN CallBackToken
,
1417 IN OUT VOID
*TokenData
,
1418 IN UINTN TokenDataSize
1423 Set up a notification function that is called when a specified token is set.
1425 When the token specified by TokenNumber and Guid is set,
1426 then notification function specified by NotificationFunction is called.
1427 If Guid is NULL, then the default token space is used.
1428 If NotificationFunction is NULL, then ASSERT().
1430 @param[in] Guid Pointer to a 128-bit unique value that designates which
1431 namespace to set a value from. If NULL, then the default
1432 token space is used.
1433 @param[in] TokenNumber The PCD token number to monitor.
1434 @param[in] NotificationFunction The function to call when the token
1435 specified by Guid and TokenNumber is set.
1440 LibPcdCallbackOnSet (
1441 IN CONST GUID
*Guid
, OPTIONAL
1442 IN UINTN TokenNumber
,
1443 IN PCD_CALLBACK NotificationFunction
1448 Disable a notification function that was established with LibPcdCallbackonSet().
1450 Disable a notification function that was previously established with LibPcdCallbackOnSet().
1451 If NotificationFunction is NULL, then ASSERT().
1452 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
1453 and NotificationFunction, then ASSERT().
1455 @param[in] Guid Specify the GUID token space.
1456 @param[in] TokenNumber Specify the token number.
1457 @param[in] NotificationFunction The callback function to be unregistered.
1462 LibPcdCancelCallback (
1463 IN CONST GUID
*Guid
, OPTIONAL
1464 IN UINTN TokenNumber
,
1465 IN PCD_CALLBACK NotificationFunction
1470 Retrieves the next token in a token space.
1472 Retrieves the next PCD token number from the token space specified by Guid.
1473 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
1474 then the first token number is returned. Otherwise, the token number that
1475 follows TokenNumber in the token space is returned. If TokenNumber is the last
1476 token number in the token space, then 0 is returned.
1478 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
1480 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace
1481 to set a value from. If NULL, then the default token space is used.
1482 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
1485 @return The next valid token number.
1490 LibPcdGetNextToken (
1491 IN CONST GUID
*Guid
, OPTIONAL
1492 IN UINTN TokenNumber
1498 Used to retrieve the list of available PCD token space GUIDs.
1500 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
1502 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
1503 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
1505 @param TokenSpaceGuid Pointer to the a PCD token space GUID
1507 @return The next valid token namespace.
1512 LibPcdGetNextTokenSpace (
1513 IN CONST GUID
*TokenSpaceGuid
1518 Sets a value of a patchable PCD entry that is type pointer.
1520 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
1521 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1522 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
1523 NULL to indicate that the set operation was not actually performed.
1524 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1525 MaximumDatumSize and NULL must be returned.
1527 If PatchVariable is NULL, then ASSERT().
1528 If SizeOfBuffer is NULL, then ASSERT().
1529 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1531 @param[out] PatchVariable A pointer to the global variable in a module that is
1532 the target of the set operation.
1533 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1534 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1535 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1537 @return Return the pointer to the Buffer that was set.
1543 OUT VOID
*PatchVariable
,
1544 IN UINTN MaximumDatumSize
,
1545 IN OUT UINTN
*SizeOfBuffer
,
1546 IN CONST VOID
*Buffer
1550 Sets a value of a patchable PCD entry that is type pointer.
1552 Sets the PCD entry specified by PatchVariable to the value specified
1553 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
1554 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
1555 to indicate that the set operation was not actually performed.
1556 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1557 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
1559 If PatchVariable is NULL, then ASSERT().
1560 If SizeOfBuffer is NULL, then ASSERT().
1561 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1563 @param[out] PatchVariable A pointer to the global variable in a module that is
1564 the target of the set operation.
1565 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1566 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1567 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1569 @return The status of the set operation.
1574 LibPatchPcdSetPtrS (
1575 OUT VOID
*PatchVariable
,
1576 IN UINTN MaximumDatumSize
,
1577 IN OUT UINTN
*SizeOfBuffer
,
1578 IN CONST VOID
*Buffer
1582 Sets a value and size of a patchable PCD entry that is type pointer.
1584 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
1585 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1586 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
1587 NULL to indicate that the set operation was not actually performed.
1588 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1589 MaximumDatumSize and NULL must be returned.
1591 If PatchVariable is NULL, then ASSERT().
1592 If SizeOfPatchVariable is NULL, then ASSERT().
1593 If SizeOfBuffer is NULL, then ASSERT().
1594 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1596 @param[out] PatchVariable A pointer to the global variable in a module that is
1597 the target of the set operation.
1598 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
1599 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1600 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1601 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1603 @return Return the pointer to the Buffer that was set.
1608 LibPatchPcdSetPtrAndSize (
1609 OUT VOID
*PatchVariable
,
1610 OUT UINTN
*SizeOfPatchVariable
,
1611 IN UINTN MaximumDatumSize
,
1612 IN OUT UINTN
*SizeOfBuffer
,
1613 IN CONST VOID
*Buffer
1617 Sets a value and size of a patchable PCD entry that is type pointer.
1619 Sets the PCD entry specified by PatchVariable to the value specified
1620 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
1621 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
1622 to indicate that the set operation was not actually performed.
1623 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1624 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
1626 If PatchVariable is NULL, then ASSERT().
1627 If SizeOfPatchVariable is NULL, then ASSERT().
1628 If SizeOfBuffer is NULL, then ASSERT().
1629 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1631 @param[out] PatchVariable A pointer to the global variable in a module that is
1632 the target of the set operation.
1633 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
1634 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1635 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1636 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1638 @return The status of the set operation.
1643 LibPatchPcdSetPtrAndSizeS (
1644 OUT VOID
*PatchVariable
,
1645 OUT UINTN
*SizeOfPatchVariable
,
1646 IN UINTN MaximumDatumSize
,
1647 IN OUT UINTN
*SizeOfBuffer
,
1648 IN CONST VOID
*Buffer
1662 /// The returned information associated with the requested TokenNumber. If
1663 /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.
1667 /// The size of the data in bytes associated with the TokenNumber specified. If
1668 /// TokenNumber is 0, then PcdSize is set 0.
1672 /// The null-terminated ASCII string associated with a given token. If the
1673 /// TokenNumber specified was 0, then this field corresponds to the null-terminated
1674 /// ASCII string associated with the token's namespace Guid. If NULL, there is no
1675 /// name associated with this request.
1682 Retrieve additional information associated with a PCD token.
1684 This includes information such as the type of value the TokenNumber is associated with as well as possible
1685 human readable name that is associated with the token.
1687 If TokenNumber is not in the default token space specified, then ASSERT().
1689 @param[in] TokenNumber The PCD token number.
1690 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
1691 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
1696 IN UINTN TokenNumber
,
1697 OUT PCD_INFO
*PcdInfo
1701 Retrieve additional information associated with a PCD token.
1703 This includes information such as the type of value the TokenNumber is associated with as well as possible
1704 human readable name that is associated with the token.
1706 If TokenNumber is not in the token space specified by Guid, then ASSERT().
1708 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
1709 @param[in] TokenNumber The PCD token number.
1710 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
1711 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
1716 IN CONST GUID
*Guid
,
1717 IN UINTN TokenNumber
,
1718 OUT PCD_INFO
*PcdInfo
1722 Retrieve the currently set SKU Id.
1724 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
1725 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU