2 Provides library services to get and set Platform Configuration Database entries.
4 PCD Library Class provides a PCD usage macro interface for all PCD types.
5 It should be included in any module that uses PCD. If a module uses dynamic/dynamicex
6 PCD, module should be linked to a PEIM/DXE library instance to access that PCD.
7 If a module uses PatchableInModule type PCD, it also needs the library instance to produce
8 LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, the macro interface is
9 translated to a variable or macro that is auto-generated by build tool in
10 module's autogen.h/autogen.c.
11 The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are
12 only available prior to ExitBootServices(). If access to PCD values are required
13 at runtime, then their values must be collected prior to ExitBootServices().
14 There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),
15 PatchPcdGetXX(), and PatchPcdSetXX().
17 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
18 This program and the accompanying materials
19 are licensed and made available under the terms and conditions of the BSD License
20 which accompanies this distribution. The full text of the license may be found at
21 http://opensource.org/licenses/bsd-license.php
23 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
24 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
31 #define PCD_MAX_SKU_ID 0x100
35 Retrieves a token number based on a token name.
37 Returns the token number associated with the PCD token specified by TokenName.
38 If TokenName is not a valid token in the token space, then the module will not build.
39 If TokenName is not a feature flag, then the module will not build.
41 @param TokenName The name of the PCD token to retrieve the token number for.
43 @return The token number associated with the PCD.
46 #define PcdToken(TokenName) _PCD_TOKEN_##TokenName
50 Retrieves a Boolean PCD feature flag based on a token name.
52 Returns the Boolean value for the PCD feature flag specified by TokenName.
53 If TokenName is not a valid token in the token space, then the module will not build.
54 If TokenName is not a feature flag, then the module will not build.
56 @param TokenName The name of the PCD token to retrieve a current value for.
58 @return Boolean value for the PCD feature flag.
61 #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
65 Retrieves an 8-bit fixed PCD token value based on a token name.
67 Returns the 8-bit value for the token specified by TokenName.
68 If TokenName is not a valid token in the token space, then the module will not build.
69 If TokenName is not a feature flag, then the module will not build.
71 @param TokenName The name of the PCD token to retrieve a current value for.
73 @return 8-bit value for the token specified by TokenName.
76 #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
80 Retrieves a 16-bit fixed PCD token value based on a token name.
82 Returns the 16-bit value for the token specified by TokenName.
83 If TokenName is not a valid token in the token space, then the module will not build.
84 If TokenName is not a feature flag, then the module will not build.
86 @param TokenName The name of the PCD token to retrieve a current value for.
88 @return 16-bit value for the token specified by TokenName.
91 #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
95 Retrieves a 32-bit fixed PCD token value based on a token name.
97 Returns the 32-bit value for the token specified by TokenName.
98 If TokenName is not a valid token in the token space, then the module will not build.
99 If TokenName is not a feature flag, then the module will not build.
101 @param TokenName The name of the PCD token to retrieve a current value for.
103 @return 32-bit value for the token specified by TokenName.
106 #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
110 Retrieves a 64-bit fixed PCD token value based on a token name.
112 Returns the 64-bit value for the token specified by TokenName.
113 If TokenName is not a valid token in the token space, then the module will not build.
114 If TokenName is not a feature flag, then the module will not build.
116 @param TokenName The name of the PCD token to retrieve a current value for.
118 @return 64-bit value for the token specified by TokenName.
121 #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
125 Retrieves a Boolean fixed PCD token value based on a token name.
127 Returns the Boolean value for the token specified by TokenName.
128 If TokenName is not a valid token in the token space, then the module will not build.
129 If TokenName is not a feature flag, then the module will not build.
131 @param TokenName The name of the PCD token to retrieve a current value for.
133 @return The Boolean value for the token.
136 #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
140 Retrieves a pointer to a fixed PCD token buffer based on a token name.
142 Returns a pointer to the buffer for the token specified by TokenName.
143 If TokenName is not a valid token in the token space, then the module will not build.
144 If TokenName is not a feature flag, then the module will not build.
146 @param TokenName The name of the PCD token to retrieve a current value for.
148 @return A pointer to the buffer.
151 #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
155 Retrieves an 8-bit binary patchable PCD token value based on a token name.
157 Returns the 8-bit value for the token specified by TokenName.
158 If TokenName is not a valid token in the token space, then the module will not build.
159 If TokenName is not a feature flag, then the module will not build.
161 @param TokenName The name of the PCD token to retrieve a current value for.
163 @return An 8-bit binary patchable PCD token value.
166 #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
169 Retrieves a 16-bit binary patchable PCD token value based on a token name.
171 Returns the 16-bit value for the token specified by TokenName.
172 If TokenName is not a valid token in the token space, then the module will not build.
173 If TokenName is not a feature flag, then the module will not build.
175 @param TokenName The name of the PCD token to retrieve a current value for.
177 @return A 16-bit binary patchable PCD token value.
180 #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
184 Retrieves a 32-bit binary patchable PCD token value based on a token name.
186 Returns the 32-bit value for the token specified by TokenName.
187 If TokenName is not a valid token in the token space, then the module will not build.
188 If TokenName is not a feature flag, then the module will not build.
190 @param TokenName The name of the PCD token to retrieve a current value for.
192 @return A 32-bit binary patchable PCD token value.
195 #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
199 Retrieves a 64-bit binary patchable PCD token value based on a token name.
201 Returns the 64-bit value for the token specified by TokenName.
202 If TokenName is not a valid token in the token space, then the module will not build.
203 If TokenName is not a feature flag, then the module will not build.
205 @param TokenName The name of the PCD token to retrieve a current value for.
207 @return A 64-bit binary patchable PCD token value.
210 #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
214 Retrieves a Boolean binary patchable PCD token value based on a token name.
216 Returns the Boolean value for the token specified by TokenName.
217 If TokenName is not a valid token in the token space, then the module will not build.
218 If TokenName is not a feature flag, then the module will not build.
220 @param TokenName The name of the PCD token to retrieve a current value for.
222 @return The Boolean value for the token.
225 #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
229 Retrieves a pointer to a binary patchable PCD token buffer based on a token name.
231 Returns a pointer to the buffer for the token specified by TokenName.
232 If TokenName is not a valid token in the token space, then the module will not build.
233 If TokenName is not a feature flag, then the module will not build.
235 @param TokenName The name of the PCD token to retrieve a current value for.
237 @return A pointer to the buffer for the token.
240 #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
244 Sets an 8-bit binary patchable PCD token value based on a token name.
246 Sets the 8-bit value for the token specified by TokenName. Value is returned.
247 If TokenName is not a valid token in the token space, then the module will not build.
248 If TokenName is not a feature flag, then the module will not build.
250 @param TokenName The name of the binary patchable PCD token to set the current value for.
251 @param Value The 8-bit value to set.
253 @return Return the Value that was set.
256 #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
260 Sets a 16-bit binary patchable PCD token value based on a token name.
262 Sets the 16-bit value for the token specified by TokenName. Value is returned.
263 If TokenName is not a valid token in the token space, then the module will not build.
264 If TokenName is not a feature flag, then the module will not build.
266 @param TokenName The name of the binary patchable PCD token to set the current value for.
267 @param Value The 16-bit value to set.
269 @return Return the Value that was set.
272 #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
276 Sets a 32-bit binary patchable PCD token value based on a token name.
278 Sets the 32-bit value for the token specified by TokenName. Value is returned.
279 If TokenName is not a valid token in the token space, then the module will not build.
280 If TokenName is not a feature flag, then the module will not build.
282 @param TokenName The name of the binary patchable PCD token to set the current value for.
283 @param Value The 32-bit value to set.
285 @return Return the Value that was set.
288 #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
292 Sets a 64-bit binary patchable PCD token value based on a token name.
294 Sets the 64-bit value for the token specified by TokenName. Value is returned.
295 If TokenName is not a valid token in the token space, then the module will not build.
296 If TokenName is not a feature flag, then the module will not build.
298 @param TokenName The name of the binary patchable PCD token to set the current value for.
299 @param Value The 64-bit value to set.
301 @return Return the Value that was set.
304 #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
308 Sets a Boolean binary patchable PCD token value based on a token name.
310 Sets the Boolean value for the token specified by TokenName. Value is returned.
311 If TokenName is not a valid token in the token space, then the module will not build.
312 If TokenName is not a feature flag, then the module will not build.
314 @param TokenName The name of the binary patchable PCD token to set the current value for.
315 @param Value The boolean value to set.
317 @return Return the Value that was set.
320 #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
324 Sets a pointer to a binary patchable PCD token buffer based on a token name.
326 Sets the buffer for the token specified by TokenName. Buffer is returned.
327 If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer
328 to the maximum size supported by TokenName and return NULL to indicate that the set operation
329 was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be
330 set to the maximum size supported by TokenName and NULL must be returned.
331 If TokenName is not a valid token in the token space, then the module will not build.
332 If TokenName is not a feature flag, then the module will not build.
334 If SizeOfBuffer is NULL, then ASSERT().
335 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
337 @param TokenName The name of the binary patchable PCD token to set the current value for.
338 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
339 @param Buffer Pointer to the value to set.
341 @return Return the pointer to the Buffer that was set.
344 #define PatchPcdSetPtr(TokenName, Size, Buffer) \
345 LibPatchPcdSetPtr ( \
346 _gPcd_BinaryPatch_##TokenName, \
347 (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \
353 Retrieves an 8-bit PCD token value based on a token name.
355 Returns the 8-bit value for the token specified by TokenName.
356 If TokenName is not a valid token in the token space, then the module will not build.
358 @param TokenName The name of the PCD token to retrieve a current value for.
360 @return 8-bit value for the token specified by TokenName.
363 #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
367 Retrieves a 16-bit PCD token value based on a token name.
369 Returns the 16-bit value for the token specified by TokenName.
370 If TokenName is not a valid token in the token space, then the module will not build.
372 @param TokenName The name of the PCD token to retrieve a current value for.
374 @return 16-bit value for the token specified by TokenName.
377 #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
381 Retrieves a 32-bit PCD token value based on a token name.
383 Returns the 32-bit value for the token specified by TokenName.
384 If TokenName is not a valid token in the token space, then the module will not build.
386 @param TokenName The name of the PCD token to retrieve a current value for.
388 @return 32-bit value for the token specified by TokenName.
391 #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
395 Retrieves a 64-bit PCD token value based on a token name.
397 Returns the 64-bit value for the token specified by TokenName.
398 If TokenName is not a valid token in the token space, then the module will not build.
400 @param TokenName The name of the PCD token to retrieve a current value for.
402 @return 64-bit value for the token specified by TokenName.
405 #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
409 Retrieves a pointer to a PCD token buffer based on a token name.
411 Returns a pointer to the buffer for the token specified by TokenName.
412 If TokenName is not a valid token in the token space, then the module will not build.
414 @param TokenName The name of the PCD token to retrieve a current value for.
416 @return A pointer to the buffer.
419 #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
423 Retrieves a Boolean PCD token value based on a token name.
425 Returns the Boolean value for the token specified by TokenName.
426 If TokenName is not a valid token in the token space, then the module will not build.
428 @param TokenName The name of the PCD token to retrieve a current value for.
430 @return A Boolean PCD token value.
433 #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
436 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
438 Sets an 8-bit PCD token value based on a token name.
440 Sets the 8-bit value for the token specified by TokenName. Value is returned.
441 If TokenName is not a valid token in the token space, then the module will not build.
443 @param TokenName The name of the PCD token to retrieve a current value for.
444 @param Value The 8-bit value to set.
446 @return Return the Value that was set.
449 #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))
453 Sets a 16-bit PCD token value based on a token name.
455 Sets the 16-bit value for the token specified by TokenName. Value is returned.
456 If TokenName is not a valid token in the token space, then the module will not build.
458 @param TokenName The name of the PCD token to retrieve a current value for.
459 @param Value The 16-bit value to set.
461 @return Return the Value that was set.
464 #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))
468 Sets a 32-bit PCD token value based on a token name.
470 Sets the 32-bit value for the token specified by TokenName. Value is returned.
471 If TokenName is not a valid token in the token space, then the module will not build.
473 @param TokenName The name of the PCD token to retrieve a current value for.
474 @param Value The 32-bit value to set.
476 @return Return the Value that was set.
479 #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))
483 Sets a 64-bit PCD token value based on a token name.
485 Sets the 64-bit value for the token specified by TokenName. Value is returned.
486 If TokenName is not a valid token in the token space, then the module will not build.
488 @param TokenName The name of the PCD token to retrieve a current value for.
489 @param Value The 64-bit value to set.
491 @return Return the Value that was set.
494 #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))
498 Sets a pointer to a PCD token buffer based on a token name.
500 Sets the buffer for the token specified by TokenName. Buffer is returned.
501 If SizeOfBuffer is greater than the maximum size supported by TokenName,
502 then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
503 to indicate that the set operation was not actually performed. If SizeOfBuffer
504 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
505 by TokenName and NULL must be returned.
506 If TokenName is not a valid token in the token space, then the module will not build.
508 If SizeOfBuffer is NULL, then ASSERT().
509 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
511 @param TokenName The name of the PCD token to set the current value for.
512 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
513 @param Buffer A pointer to the buffer to set.
515 @return Return the pointer to the Buffer that was set.
518 #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \
519 _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))
522 Sets a Boolean PCD token value based on a token name.
524 Sets the Boolean value for the token specified by TokenName. Value is returned.
525 If TokenName is not a valid token in the token space, then the module will not build.
527 @param TokenName The name of the PCD token to set the current value for.
528 @param Buffer The Boolean value to set.
530 @return Return the Value that was set.
533 #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
537 Sets a 8-bit PCD token value based on a token name.
539 Sets the 8-bit value for the token specified by TokenName.
540 If TokenName is not a valid token in the token space, then the module will not build.
542 @param TokenName The name of the PCD token to retrieve a current value for.
543 @param Value The 8-bit value to set.
545 @return The status of the set operation.
548 #define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
551 Sets a 16-bit PCD token value based on a token name.
553 Sets the 16-bit value for the token specified by TokenName.
554 If TokenName is not a valid token in the token space, then the module will not build.
556 @param TokenName The name of the PCD token to retrieve a current value for.
557 @param Value The 16-bit value to set.
559 @return The status of the set operation.
562 #define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
565 Sets a 32-bit PCD token value based on a token name.
567 Sets the 32-bit value for the token specified by TokenName.
568 If TokenName is not a valid token in the token space, then the module will not build.
570 @param TokenName The name of the PCD token to retrieve a current value for.
571 @param Value The 32-bit value to set.
573 @return The status of the set operation.
576 #define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
579 Sets a 64-bit PCD token value based on a token name.
581 Sets the 64-bit value for the token specified by TokenName.
582 If TokenName is not a valid token in the token space, then the module will not build.
584 @param TokenName The name of the PCD token to retrieve a current value for.
585 @param Value The 64-bit value to set.
587 @return The status of the set operation.
590 #define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
593 Sets a pointer to a PCD token buffer based on a token name.
595 Sets the buffer for the token specified by TokenName.
596 If SizeOfBuffer is greater than the maximum size supported by TokenName,
597 then set SizeOfBuffer to the maximum size supported by TokenName and return
598 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
599 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
600 supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
601 If TokenName is not a valid token in the token space, then the module will not build.
603 If SizeOfBuffer is NULL, then ASSERT().
604 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
606 @param TokenName The name of the PCD token to set the current value for.
607 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
608 @param Buffer A pointer to the buffer to set.
610 @return The status of the set operation.
613 #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
614 _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
619 Sets a boolean PCD token value based on a token name.
621 Sets the boolean value for the token specified by TokenName.
622 If TokenName is not a valid token in the token space, then the module will not build.
624 @param TokenName The name of the PCD token to retrieve a current value for.
625 @param Value The boolean value to set.
627 @return The status of the set operation.
630 #define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
633 Retrieves a token number based on a GUID and a token name.
635 Returns the token number for the token specified by Guid and TokenName.
637 @param Guid Pointer to a 128-bit unique value that designates
638 which namespace to retrieve a value from.
639 @param TokenName The name of the PCD token to retrieve a current value for.
641 @return Return the token number.
644 #define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
647 Retrieves an 8-bit PCD token value based on a GUID and a token name.
649 Returns the 8-bit value for the token specified by Guid and TokenName.
650 If TokenName is not a valid token in the token space specified by Guid,
651 then the module will not build.
653 If Guid is NULL, then ASSERT().
655 @param Guid Pointer to a 128-bit unique value that designates
656 which namespace to retrieve a value from.
657 @param TokenName The name of the PCD token to retrieve a current value for.
659 @return An 8-bit PCD token value.
662 #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
665 Retrieves a 16-bit PCD token value based on a GUID and a token name.
667 Returns the 16-bit value for the token specified by Guid and TokenName.
668 If TokenName is not a valid token in the token space specified by Guid,
669 then the module will not build.
671 If Guid is NULL, then ASSERT().
673 @param Guid Pointer to a 128-bit unique value that designates
674 which namespace to retrieve a value from.
675 @param TokenName The name of the PCD token to retrieve a current value for.
677 @return A 16-bit PCD token value.
680 #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
684 Retrieves a 32-bit PCD token value based on a GUID and a token name.
686 Returns the 32-bit value for the token specified by Guid and TokenName.
687 If TokenName is not a valid token in the token space specified by Guid,
688 then the module will not build.
690 If Guid is NULL, then ASSERT().
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 A 32-bit PCD token value.
699 #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
703 Retrieves a 64-bit PCD token value based on a GUID and a token name.
705 Returns the 64-bit value for the token specified by Guid and TokenName.
706 If TokenName is not a valid token in the token space specified by Guid,
707 then the module will not build.
709 If Guid is NULL, then ASSERT().
711 @param Guid Pointer to a 128-bit unique value that designates
712 which namespace to retrieve a value from.
713 @param TokenName The name of the PCD token to retrieve a current value for.
715 @return A 64-bit PCD token value.
718 #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
722 Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
724 Returns a pointer to the buffer for the token specified by Guid and TokenName.
725 If TokenName is not a valid token in the token space specified by Guid,
726 then the module will not build.
728 If Guid is NULL, then ASSERT().
730 @param Guid Pointer to a 128-bit unique value that designates
731 which namespace to retrieve a value from.
732 @param TokenName The name of the PCD token to retrieve a current value for.
734 @return A pointer to a PCD token buffer.
737 #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
741 Retrieves a Boolean PCD token value based on a GUID and a token name.
743 Returns the Boolean value for the token specified by Guid and TokenName.
744 If TokenName is not a valid token in the token space specified by Guid,
745 then the module will not build.
747 If Guid is NULL, then ASSERT().
749 @param Guid Pointer to a 128-bit unique value that designates
750 which namespace to retrieve a value from.
751 @param TokenName The name of the PCD token to retrieve a current value for.
753 @return A Boolean PCD token value.
756 #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
760 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
762 Sets an 8-bit PCD token value based on a GUID and a token name.
764 Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.
765 If TokenName is not a valid token in the token space specified by Guid,
766 then the module will not build.
768 If Guid is NULL, then ASSERT().
770 @param Guid Pointer to a 128-bit unique value that designates
771 which namespace to retrieve a value from.
772 @param TokenName The name of the PCD token to set the current value for.
773 @param Value The 8-bit value to set.
775 @return Return the Value that was set.
778 #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
782 Sets a 16-bit PCD token value based on a GUID and a token name.
784 Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.
785 If TokenName is not a valid token in the token space specified by Guid,
786 then the module will not build.
788 If Guid is NULL, then ASSERT().
790 @param Guid Pointer to a 128-bit unique value that designates
791 which namespace to retrieve a value from.
792 @param TokenName The name of the PCD token to set the current value for.
793 @param Value The 16-bit value to set.
795 @return Return the Value that was set.
798 #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
802 Sets a 32-bit PCD token value based on a GUID and a token name.
804 Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.
805 If TokenName is not a valid token in the token space specified by Guid,
806 then the module will not build.
808 If Guid is NULL, then ASSERT().
810 @param Guid Pointer to a 128-bit unique value that designates
811 which namespace to retrieve a value from.
812 @param TokenName The name of the PCD token to set the current value for.
813 @param Value The 32-bit value to set.
815 @return Return the Value that was set.
818 #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
822 Sets a 64-bit PCD token value based on a GUID and a token name.
824 Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.
825 If TokenName is not a valid token in the token space specified by Guid,
826 then the module will not build.
828 If Guid is NULL, then ASSERT().
830 @param Guid Pointer to a 128-bit unique value that designates
831 which namespace to retrieve a value from.
832 @param TokenName The name of the PCD token to set the current value for.
833 @param Value The 64-bit value to set.
835 @return Return the Value that was set.
838 #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
842 Sets a pointer to a PCD token buffer based on a GUID and a token name.
844 Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.
845 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
846 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
847 NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
848 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by
849 Guid and TokenName and NULL must be returned.
850 If TokenName is not a valid token in the token space specified by Guid,
851 then the module will not build.
853 If Guid is NULL, then ASSERT().
854 If SizeOfBuffer is NULL, then ASSERT().
855 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
857 @param Guid Pointer to a 128-bit unique value that designates
858 which namespace to retrieve a value from.
859 @param TokenName The name of the PCD token to set the current value for.
860 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
861 @param Buffer Pointer to the buffer to set.
863 @return Return the pointer to the Buffer that was set.
866 #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \
867 LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
871 Sets a Boolean PCD token value based on a GUID and a token name.
873 Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.
874 If TokenName is not a valid token in the token space specified by Guid,
875 then the module will not build.
877 If Guid is NULL, then ASSERT().
879 @param Guid Pointer to a 128-bit unique value that designates
880 which namespace to retrieve a value from.
881 @param TokenName The name of the PCD token to set the current value for.
882 @param Value The Boolean value to set.
884 @return Return the Value that was set.
887 #define PcdSetExBool(Guid, TokenName, Value) \
888 LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
892 Sets an 8-bit PCD token value based on a GUID and a token name.
894 Sets the 8-bit value for the token specified by Guid and TokenName.
895 If TokenName is not a valid token in the token space specified by Guid,
896 then the module will not build.
898 If Guid is NULL, then ASSERT().
900 @param Guid Pointer to a 128-bit unique value that designates
901 which namespace to retrieve a value from.
902 @param TokenName The name of the PCD token to set the current value for.
903 @param Value The 8-bit value to set.
905 @return The status of the set operation.
908 #define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
911 Sets an 16-bit PCD token value based on a GUID and a token name.
913 Sets the 16-bit value for the token specified by Guid and TokenName.
914 If TokenName is not a valid token in the token space specified by Guid,
915 then the module will not build.
917 If Guid is NULL, then ASSERT().
919 @param Guid Pointer to a 128-bit unique value that designates
920 which namespace to retrieve a value from.
921 @param TokenName The name of the PCD token to set the current value for.
922 @param Value The 16-bit value to set.
924 @return The status of the set operation.
927 #define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
930 Sets an 32-bit PCD token value based on a GUID and a token name.
932 Sets the 32-bit value for the token specified by Guid and TokenName.
933 If TokenName is not a valid token in the token space specified by Guid,
934 then the module will not build.
936 If Guid is NULL, then ASSERT().
938 @param Guid Pointer to a 128-bit unique value that designates
939 which namespace to retrieve a value from.
940 @param TokenName The name of the PCD token to set the current value for.
941 @param Value The 32-bit value to set.
943 @return The status of the set operation.
946 #define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
949 Sets an 64-bit PCD token value based on a GUID and a token name.
951 Sets the 64-bit value for the token specified by Guid and TokenName.
952 If TokenName is not a valid token in the token space specified by Guid,
953 then the module will not build.
955 If Guid is NULL, then ASSERT().
957 @param Guid Pointer to a 128-bit unique value that designates
958 which namespace to retrieve a value from.
959 @param TokenName The name of the PCD token to set the current value for.
960 @param Value The 64-bit value to set.
962 @return The status of the set operation.
965 #define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
968 Sets a pointer to a PCD token buffer based on a GUID and a token name.
970 Sets the buffer for the token specified by Guid and TokenName.
971 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
972 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
973 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
974 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
975 supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.
976 If TokenName is not a valid token in the token space specified by Guid,
977 then the module will not build.
979 If Guid is NULL, then ASSERT().
980 If SizeOfBuffer is NULL, then ASSERT().
981 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
983 @param Guid Pointer to a 128-bit unique value that designates
984 which namespace to retrieve a value from.
985 @param TokenName The name of the PCD token to set the current value for.
986 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
987 @param Buffer Pointer to the buffer to set.
989 @return The status of the set operation.
992 #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
993 LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
997 Sets an boolean PCD token value based on a GUID and a token name.
999 Sets the boolean value for the token specified by Guid and TokenName.
1000 If TokenName is not a valid token in the token space specified by Guid,
1001 then the module will not build.
1003 If Guid is NULL, then ASSERT().
1005 @param Guid Pointer to a 128-bit unique value that designates
1006 which namespace to retrieve a value from.
1007 @param TokenName The name of the PCD token to set the current value for.
1008 @param Value The boolean value to set.
1010 @return The status of the set operation.
1013 #define PcdSetExBoolS(Guid, TokenName, Value) \
1014 LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1017 This function provides a means by which SKU support can be established in the PCD infrastructure.
1019 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
1020 If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
1022 @param SkuId The SKU value that will be used when the PCD service retrieves and sets values
1023 associated with a PCD token.
1025 @return Return the SKU ID that was set.
1036 This function provides a means by which to retrieve a value for a given PCD token.
1038 Returns the 8-bit value for the token specified by TokenNumber.
1040 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1042 @return Returns the 8-bit value for the token specified by TokenNumber.
1048 IN UINTN TokenNumber
1053 This function provides a means by which to retrieve a value for a given PCD token.
1055 Returns the 16-bit value for the token specified by TokenNumber.
1057 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1059 @return Returns the 16-bit value for the token specified by TokenNumber.
1065 IN UINTN TokenNumber
1070 This function provides a means by which to retrieve a value for a given PCD token.
1072 Returns the 32-bit value for the token specified by TokenNumber.
1074 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1076 @return Returns the 32-bit value for the token specified by TokenNumber.
1082 IN UINTN TokenNumber
1087 This function provides a means by which to retrieve a value for a given PCD token.
1089 Returns the 64-bit value for the token specified by TokenNumber.
1091 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1093 @return Returns the 64-bit value for the token specified by TokenNumber.
1099 IN UINTN TokenNumber
1104 This function provides a means by which to retrieve a value for a given PCD token.
1106 Returns the pointer to the buffer of the token specified by TokenNumber.
1108 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1110 @return Returns the pointer to the token specified by TokenNumber.
1116 IN UINTN TokenNumber
1121 This function provides a means by which to retrieve a value for a given PCD token.
1123 Returns the Boolean value of the token specified by TokenNumber.
1125 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1127 @return Returns the Boolean value of the token specified by TokenNumber.
1133 IN UINTN TokenNumber
1138 This function provides a means by which to retrieve the size of a given PCD token.
1140 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1142 @return Returns the size of the token specified by TokenNumber.
1148 IN UINTN TokenNumber
1153 This function provides a means by which to retrieve a value for a given PCD token.
1155 Returns the 8-bit value for the token specified by TokenNumber and Guid.
1157 If Guid is NULL, then ASSERT().
1159 @param[in] Guid Pointer to a 128-bit unique value that designates
1160 which namespace to retrieve a value from.
1161 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1163 @return Return the UINT8.
1169 IN CONST GUID
*Guid
,
1170 IN UINTN TokenNumber
1175 This function provides a means by which to retrieve a value for a given PCD token.
1177 Returns the 16-bit value for the token specified by TokenNumber and Guid.
1179 If Guid is NULL, then ASSERT().
1181 @param[in] Guid Pointer to a 128-bit unique value that designates
1182 which namespace to retrieve a value from.
1183 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1185 @return Return the UINT16.
1191 IN CONST GUID
*Guid
,
1192 IN UINTN TokenNumber
1197 Returns the 32-bit value for the token specified by TokenNumber and Guid.
1198 If Guid is NULL, then ASSERT().
1200 @param[in] Guid Pointer to a 128-bit unique value that designates
1201 which namespace to retrieve a value from.
1202 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1204 @return Return the UINT32.
1210 IN CONST GUID
*Guid
,
1211 IN UINTN TokenNumber
1216 This function provides a means by which to retrieve a value for a given PCD token.
1218 Returns the 64-bit value for the token specified by TokenNumber and Guid.
1220 If Guid is NULL, then ASSERT().
1222 @param[in] Guid Pointer to a 128-bit unique value that designates
1223 which namespace to retrieve a value from.
1224 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1226 @return Return the UINT64.
1232 IN CONST GUID
*Guid
,
1233 IN UINTN TokenNumber
1238 This function provides a means by which to retrieve a value for a given PCD token.
1240 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
1242 If Guid is NULL, then ASSERT().
1244 @param[in] Guid Pointer to a 128-bit unique value that designates
1245 which namespace to retrieve a value from.
1246 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1248 @return Return the VOID* pointer.
1254 IN CONST GUID
*Guid
,
1255 IN UINTN TokenNumber
1260 This function provides a means by which to retrieve a value for a given PCD token.
1262 Returns the Boolean value of the token specified by TokenNumber and Guid.
1264 If Guid is NULL, then ASSERT().
1266 @param[in] Guid Pointer to a 128-bit unique value that designates
1267 which namespace to retrieve a value from.
1268 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1270 @return Return the BOOLEAN.
1276 IN CONST GUID
*Guid
,
1277 IN UINTN TokenNumber
1282 This function provides a means by which to retrieve the size of a given PCD token.
1284 Returns the size of the token specified by TokenNumber and Guid.
1286 If Guid is NULL, then ASSERT().
1288 @param[in] Guid Pointer to a 128-bit unique value that designates
1289 which namespace to retrieve a value from.
1290 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1292 @return Return the size.
1298 IN CONST GUID
*Guid
,
1299 IN UINTN TokenNumber
1303 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1305 This function provides a means by which to set a value for a given PCD token.
1307 Sets the 8-bit value for the token specified by TokenNumber
1308 to the value specified by Value. Value is returned.
1310 @param[in] TokenNumber The PCD token number to set a current value for.
1311 @param[in] Value The 8-bit value to set.
1313 @return Return the Value that was set.
1319 IN UINTN TokenNumber
,
1325 This function provides a means by which to set a value for a given PCD token.
1327 Sets the 16-bit value for the token specified by TokenNumber
1328 to the value specified by Value. Value is returned.
1330 @param[in] TokenNumber The PCD token number to set a current value for.
1331 @param[in] Value The 16-bit value to set.
1333 @return Return the Value that was set.
1339 IN UINTN TokenNumber
,
1345 This function provides a means by which to set a value for a given PCD token.
1347 Sets the 32-bit value for the token specified by TokenNumber
1348 to the value specified by Value. Value is returned.
1350 @param[in] TokenNumber The PCD token number to set a current value for.
1351 @param[in] Value The 32-bit value to set.
1353 @return Return the Value that was set.
1359 IN UINTN TokenNumber
,
1365 This function provides a means by which to set a value for a given PCD token.
1367 Sets the 64-bit value for the token specified by TokenNumber
1368 to the value specified by Value. Value is returned.
1370 @param[in] TokenNumber The PCD token number to set a current value for.
1371 @param[in] Value The 64-bit value to set.
1373 @return Return the Value that was set.
1379 IN UINTN TokenNumber
,
1385 This function provides a means by which to set a value for a given PCD token.
1387 Sets a buffer for the token specified by TokenNumber to the value
1388 specified by Buffer and SizeOfBuffer. Buffer is returned.
1389 If SizeOfBuffer is greater than the maximum size support by TokenNumber,
1390 then set SizeOfBuffer to the maximum size supported by TokenNumber and
1391 return NULL to indicate that the set operation was not actually performed.
1393 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1394 maximum size supported by TokenName and NULL must be returned.
1396 If SizeOfBuffer is NULL, then ASSERT().
1397 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1399 @param[in] TokenNumber The PCD token number to set a current value for.
1400 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1401 @param[in] Buffer A pointer to the buffer to set.
1403 @return Return the pointer for the Buffer that was set.
1409 IN UINTN TokenNumber
,
1410 IN OUT UINTN
*SizeOfBuffer
,
1411 IN CONST VOID
*Buffer
1416 This function provides a means by which to set a value for a given PCD token.
1418 Sets the Boolean value for the token specified by TokenNumber
1419 to the value specified by Value. Value is returned.
1421 @param[in] TokenNumber The PCD token number to set a current value for.
1422 @param[in] Value The boolean value to set.
1424 @return Return the Value that was set.
1430 IN UINTN TokenNumber
,
1436 This function provides a means by which to set a value for a given PCD token.
1438 Sets the 8-bit value for the token specified by TokenNumber and
1439 Guid to the value specified by Value. Value is returned.
1441 If Guid is NULL, then ASSERT().
1443 @param[in] Guid Pointer to a 128-bit unique value that
1444 designates which namespace to set a value from.
1445 @param[in] TokenNumber The PCD token number to set a current value for.
1446 @param[in] Value The 8-bit value to set.
1448 @return Return the Value that was set.
1454 IN CONST GUID
*Guid
,
1455 IN UINTN TokenNumber
,
1461 This function provides a means by which to set a value for a given PCD token.
1463 Sets the 16-bit value for the token specified by TokenNumber and
1464 Guid to the value specified by Value. Value is returned.
1466 If Guid is NULL, then ASSERT().
1468 @param[in] Guid Pointer to a 128-bit unique value that
1469 designates which namespace to set a value from.
1470 @param[in] TokenNumber The PCD token number to set a current value for.
1471 @param[in] Value The 16-bit value to set.
1473 @return Return the Value that was set.
1479 IN CONST GUID
*Guid
,
1480 IN UINTN TokenNumber
,
1486 This function provides a means by which to set a value for a given PCD token.
1488 Sets the 32-bit value for the token specified by TokenNumber and
1489 Guid to the value specified by Value. Value is returned.
1491 If Guid is NULL, then ASSERT().
1493 @param[in] Guid Pointer to a 128-bit unique value that
1494 designates which namespace to set a value from.
1495 @param[in] TokenNumber The PCD token number to set a current value for.
1496 @param[in] Value The 32-bit value to set.
1498 @return Return the Value that was set.
1504 IN CONST GUID
*Guid
,
1505 IN UINTN TokenNumber
,
1511 This function provides a means by which to set a value for a given PCD token.
1513 Sets the 64-bit value for the token specified by TokenNumber and
1514 Guid to the value specified by Value. Value is returned.
1516 If Guid is NULL, then ASSERT().
1518 @param[in] Guid Pointer to a 128-bit unique value that
1519 designates which namespace to set a value from.
1520 @param[in] TokenNumber The PCD token number to set a current value for.
1521 @param[in] Value The 64-bit value to set.
1523 @return Return the Value that was set.
1529 IN CONST GUID
*Guid
,
1530 IN UINTN TokenNumber
,
1536 This function provides a means by which to set a value for a given PCD token.
1538 Sets a buffer for the token specified by TokenNumber to the value specified by
1539 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1540 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
1541 supported by TokenNumber and return NULL to indicate that the set operation
1542 was not actually performed.
1544 If Guid is NULL, then ASSERT().
1545 If SizeOfBuffer is NULL, then ASSERT().
1546 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1548 @param[in] Guid Pointer to a 128-bit unique value that
1549 designates which namespace to set a value from.
1550 @param[in] TokenNumber The PCD token number to set a current value for.
1551 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1552 @param[in] Buffer A pointer to the buffer to set.
1554 @return Return the pointer to the Buffer that was set.
1560 IN CONST GUID
*Guid
,
1561 IN UINTN TokenNumber
,
1562 IN OUT UINTN
*SizeOfBuffer
,
1568 This function provides a means by which to set a value for a given PCD token.
1570 Sets the Boolean value for the token specified by TokenNumber and
1571 Guid to the value specified by Value. Value is returned.
1573 If Guid is NULL, then ASSERT().
1575 @param[in] Guid Pointer to a 128-bit unique value that
1576 designates which namespace to set a value from.
1577 @param[in] TokenNumber The PCD token number to set a current value for.
1578 @param[in] Value The Boolean value to set.
1580 @return Return the Value that was set.
1586 IN CONST GUID
*Guid
,
1587 IN UINTN TokenNumber
,
1593 This function provides a means by which to set a value for a given PCD token.
1595 Sets the 8-bit value for the token specified by TokenNumber
1596 to the value specified by Value.
1598 @param[in] TokenNumber The PCD token number to set a current value for.
1599 @param[in] Value The 8-bit value to set.
1601 @return The status of the set operation.
1607 IN UINTN TokenNumber
,
1612 This function provides a means by which to set a value for a given PCD token.
1614 Sets the 16-bit value for the token specified by TokenNumber
1615 to the value specified by Value.
1617 @param[in] TokenNumber The PCD token number to set a current value for.
1618 @param[in] Value The 16-bit value to set.
1620 @return The status of the set operation.
1626 IN UINTN TokenNumber
,
1631 This function provides a means by which to set a value for a given PCD token.
1633 Sets the 32-bit value for the token specified by TokenNumber
1634 to the value specified by Value.
1636 @param[in] TokenNumber The PCD token number to set a current value for.
1637 @param[in] Value The 32-bit value to set.
1639 @return The status of the set operation.
1645 IN UINTN TokenNumber
,
1650 This function provides a means by which to set a value for a given PCD token.
1652 Sets the 64-bit value for the token specified by TokenNumber
1653 to the value specified by Value.
1655 @param[in] TokenNumber The PCD token number to set a current value for.
1656 @param[in] Value The 64-bit value to set.
1658 @return The status of the set operation.
1664 IN UINTN TokenNumber
,
1669 This function provides a means by which to set a value for a given PCD token.
1671 Sets a buffer for the token specified by TokenNumber to the value specified
1672 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1673 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1674 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1675 was not actually performed.
1677 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1678 maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
1680 If SizeOfBuffer is NULL, then ASSERT().
1681 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1683 @param[in] TokenNumber The PCD token number to set a current value for.
1684 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1685 @param[in] Buffer A pointer to the buffer to set.
1687 @return The status of the set operation.
1693 IN UINTN TokenNumber
,
1694 IN OUT UINTN
*SizeOfBuffer
,
1695 IN CONST VOID
*Buffer
1699 This function provides a means by which to set a value for a given PCD token.
1701 Sets the boolean value for the token specified by TokenNumber
1702 to the value specified by Value.
1704 @param[in] TokenNumber The PCD token number to set a current value for.
1705 @param[in] Value The boolean value to set.
1707 @return The status of the set operation.
1713 IN UINTN TokenNumber
,
1718 This function provides a means by which to set a value for a given PCD token.
1720 Sets the 8-bit value for the token specified by TokenNumber
1721 to the value specified by Value.
1723 If Guid is NULL, then ASSERT().
1725 @param[in] Guid The pointer to a 128-bit unique value that
1726 designates which namespace to set a value from.
1727 @param[in] TokenNumber The PCD token number to set a current value for.
1728 @param[in] Value The 8-bit value to set.
1730 @return The status of the set operation.
1736 IN CONST GUID
*Guid
,
1737 IN UINTN TokenNumber
,
1742 This function provides a means by which to set a value for a given PCD token.
1744 Sets the 16-bit value for the token specified by TokenNumber
1745 to the value specified by Value.
1747 If Guid is NULL, then ASSERT().
1749 @param[in] Guid The pointer to a 128-bit unique value that
1750 designates which namespace to set a value from.
1751 @param[in] TokenNumber The PCD token number to set a current value for.
1752 @param[in] Value The 16-bit value to set.
1754 @return The status of the set operation.
1760 IN CONST GUID
*Guid
,
1761 IN UINTN TokenNumber
,
1766 This function provides a means by which to set a value for a given PCD token.
1768 Sets the 32-bit value for the token specified by TokenNumber
1769 to the value specified by Value.
1771 If Guid is NULL, then ASSERT().
1773 @param[in] Guid The pointer to a 128-bit unique value that
1774 designates which namespace to set a value from.
1775 @param[in] TokenNumber The PCD token number to set a current value for.
1776 @param[in] Value The 32-bit value to set.
1778 @return The status of the set operation.
1784 IN CONST GUID
*Guid
,
1785 IN UINTN TokenNumber
,
1790 This function provides a means by which to set a value for a given PCD token.
1792 Sets the 64-bit value for the token specified by TokenNumber
1793 to the value specified by Value.
1795 If Guid is NULL, then ASSERT().
1797 @param[in] Guid The pointer to a 128-bit unique value that
1798 designates which namespace to set a value from.
1799 @param[in] TokenNumber The PCD token number to set a current value for.
1800 @param[in] Value The 64-bit value to set.
1802 @return The status of the set operation.
1808 IN CONST GUID
*Guid
,
1809 IN UINTN TokenNumber
,
1814 This function provides a means by which to set a value for a given PCD token.
1816 Sets a buffer for the token specified by TokenNumber to the value specified by
1817 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1818 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1819 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1820 was not actually performed.
1822 If Guid is NULL, then ASSERT().
1823 If SizeOfBuffer is NULL, then ASSERT().
1824 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1826 @param[in] Guid Pointer to a 128-bit unique value that
1827 designates which namespace to set a value from.
1828 @param[in] TokenNumber The PCD token number to set a current value for.
1829 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1830 @param[in] Buffer A pointer to the buffer to set.
1832 @return The status of the set operation.
1838 IN CONST GUID
*Guid
,
1839 IN UINTN TokenNumber
,
1840 IN OUT UINTN
*SizeOfBuffer
,
1845 This function provides a means by which to set a value for a given PCD token.
1847 Sets the boolean value for the token specified by TokenNumber
1848 to the value specified by Value.
1850 If Guid is NULL, then ASSERT().
1852 @param[in] Guid The pointer to a 128-bit unique value that
1853 designates which namespace to set a value from.
1854 @param[in] TokenNumber The PCD token number to set a current value for.
1855 @param[in] Value The boolean value to set.
1857 @return The status of the set operation.
1863 IN CONST GUID
*Guid
,
1864 IN UINTN TokenNumber
,
1869 This notification function serves two purposes.
1871 Firstly, it notifies the module that did the registration that the value of this
1872 PCD token has been set.
1873 Secondly, it provides a mechanism for the module that did the registration to intercept
1874 the set operation and override the value been set if necessary. After the invocation of
1875 the callback function, TokenData will be used by PCD service PEIM or driver to modify th
1876 internal data in PCD database.
1878 @param[in] CallBackGuid The PCD token GUID being set.
1879 @param[in] CallBackToken The PCD token number being set.
1880 @param[in, out] TokenData A pointer to the token data being set.
1881 @param[in] TokenDataSize The size, in bytes, of the data being set.
1886 (EFIAPI
*PCD_CALLBACK
)(
1887 IN CONST GUID
*CallBackGuid
, OPTIONAL
1888 IN UINTN CallBackToken
,
1889 IN OUT VOID
*TokenData
,
1890 IN UINTN TokenDataSize
1895 Set up a notification function that is called when a specified token is set.
1897 When the token specified by TokenNumber and Guid is set,
1898 then notification function specified by NotificationFunction is called.
1899 If Guid is NULL, then the default token space is used.
1900 If NotificationFunction is NULL, then ASSERT().
1902 @param[in] Guid Pointer to a 128-bit unique value that designates which
1903 namespace to set a value from. If NULL, then the default
1904 token space is used.
1905 @param[in] TokenNumber The PCD token number to monitor.
1906 @param[in] NotificationFunction The function to call when the token
1907 specified by Guid and TokenNumber is set.
1912 LibPcdCallbackOnSet (
1913 IN CONST GUID
*Guid
, OPTIONAL
1914 IN UINTN TokenNumber
,
1915 IN PCD_CALLBACK NotificationFunction
1920 Disable a notification function that was established with LibPcdCallbackonSet().
1922 Disable a notification function that was previously established with LibPcdCallbackOnSet().
1923 If NotificationFunction is NULL, then ASSERT().
1924 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
1925 and NotificationFunction, then ASSERT().
1927 @param[in] Guid Specify the GUID token space.
1928 @param[in] TokenNumber Specify the token number.
1929 @param[in] NotificationFunction The callback function to be unregistered.
1934 LibPcdCancelCallback (
1935 IN CONST GUID
*Guid
, OPTIONAL
1936 IN UINTN TokenNumber
,
1937 IN PCD_CALLBACK NotificationFunction
1942 Retrieves the next token in a token space.
1944 Retrieves the next PCD token number from the token space specified by Guid.
1945 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
1946 then the first token number is returned. Otherwise, the token number that
1947 follows TokenNumber in the token space is returned. If TokenNumber is the last
1948 token number in the token space, then 0 is returned.
1950 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
1952 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace
1953 to set a value from. If NULL, then the default token space is used.
1954 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
1957 @return The next valid token number.
1962 LibPcdGetNextToken (
1963 IN CONST GUID
*Guid
, OPTIONAL
1964 IN UINTN TokenNumber
1970 Used to retrieve the list of available PCD token space GUIDs.
1972 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
1974 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
1975 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
1977 @param TokenSpaceGuid Pointer to the a PCD token space GUID
1979 @return The next valid token namespace.
1984 LibPcdGetNextTokenSpace (
1985 IN CONST GUID
*TokenSpaceGuid
1990 Sets a value of a patchable PCD entry that is type pointer.
1992 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
1993 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1994 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
1995 NULL to indicate that the set operation was not actually performed.
1996 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1997 MaximumDatumSize and NULL must be returned.
1999 If PatchVariable is NULL, then ASSERT().
2000 If SizeOfBuffer is NULL, then ASSERT().
2001 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2003 @param[in] PatchVariable A pointer to the global variable in a module that is
2004 the target of the set operation.
2005 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2006 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2007 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2009 @return Return the pointer to the Buffer that was set.
2015 IN VOID
*PatchVariable
,
2016 IN UINTN MaximumDatumSize
,
2017 IN OUT UINTN
*SizeOfBuffer
,
2018 IN CONST VOID
*Buffer
2022 Sets a value of a patchable PCD entry that is type pointer.
2024 Sets the PCD entry specified by PatchVariable to the value specified
2025 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
2026 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
2027 to indicate that the set operation was not actually performed.
2028 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2029 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
2031 If PatchVariable is NULL, then ASSERT().
2032 If SizeOfBuffer is NULL, then ASSERT().
2033 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2035 @param[in] PatchVariable A pointer to the global variable in a module that is
2036 the target of the set operation.
2037 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2038 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2039 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2041 @return The status of the set operation.
2046 LibPatchPcdSetPtrS (
2047 IN VOID
*PatchVariable
,
2048 IN UINTN MaximumDatumSize
,
2049 IN OUT UINTN
*SizeOfBuffer
,
2050 IN CONST VOID
*Buffer
2064 /// The returned information associated with the requested TokenNumber. If
2065 /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.
2069 /// The size of the data in bytes associated with the TokenNumber specified. If
2070 /// TokenNumber is 0, then PcdSize is set 0.
2074 /// The null-terminated ASCII string associated with a given token. If the
2075 /// TokenNumber specified was 0, then this field corresponds to the null-terminated
2076 /// ASCII string associated with the token's namespace Guid. If NULL, there is no
2077 /// name associated with this request.
2084 Retrieve additional information associated with a PCD token.
2086 This includes information such as the type of value the TokenNumber is associated with as well as possible
2087 human readable name that is associated with the token.
2089 If TokenNumber is not in the default token space specified, then ASSERT().
2091 @param[in] TokenNumber The PCD token number.
2092 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2093 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2098 IN UINTN TokenNumber
,
2099 OUT PCD_INFO
*PcdInfo
2103 Retrieve additional information associated with a PCD token.
2105 This includes information such as the type of value the TokenNumber is associated with as well as possible
2106 human readable name that is associated with the token.
2108 If TokenNumber is not in the token space specified by Guid, then ASSERT().
2110 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
2111 @param[in] TokenNumber The PCD token number.
2112 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2113 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2118 IN CONST GUID
*Guid
,
2119 IN UINTN TokenNumber
,
2120 OUT PCD_INFO
*PcdInfo
2124 Retrieve the currently set SKU Id.
2126 If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
2128 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
2129 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU