2 A emptry template implementation of PCD Library.
4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/DebugLib.h>
18 #include <Library/PcdLib.h>
19 #include <Library/BaseMemoryLib.h>
23 This function provides a means by which SKU support can be established in the PCD infrastructure.
25 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
27 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
28 set values associated with a PCD token.
30 If SkuId >= 0x100, then ASSERT().
32 @return Return the SKU ID that just be set.
47 This function provides a means by which to retrieve a value for a given PCD token.
49 Returns the 8-bit value for the token specified by TokenNumber.
51 @param[in] TokenNumber The PCD token number to retrieve a current value for.
53 @return Returns the 8-bit value for the token specified by TokenNumber.
70 This function provides a means by which to retrieve a value for a given PCD token.
72 Returns the 16-bit value for the token specified by TokenNumber.
74 @param[in] TokenNumber The PCD token number to retrieve a current value for.
76 @return Returns the 16-bit value for the token specified by TokenNumber.
93 This function provides a means by which to retrieve a value for a given PCD token.
95 Returns the 32-bit value for the token specified by TokenNumber.
97 @param[in] TokenNumber The PCD token number to retrieve a current value for.
99 @return Returns the 32-bit value for the token specified by TokenNumber.
116 This function provides a means by which to retrieve a value for a given PCD token.
118 Returns the 64-bit value for the token specified by TokenNumber.
120 @param[in] TokenNumber The PCD token number to retrieve a current value for.
122 @return Returns the 64-bit value for the token specified by TokenNumber.
139 This function provides a means by which to retrieve a value for a given PCD token.
141 Returns the pointer to the buffer of the token specified by TokenNumber.
143 @param[in] TokenNumber The PCD token number to retrieve a current value for.
145 @return Returns the pointer to the token specified by TokenNumber.
162 This function provides a means by which to retrieve a value for a given PCD token.
164 Returns the Boolean value of the token specified by TokenNumber.
166 @param[in] TokenNumber The PCD token number to retrieve a current value for.
168 @return Returns the Boolean value of the token specified by TokenNumber.
185 This function provides a means by which to retrieve the size of a given PCD token.
187 @param[in] TokenNumber The PCD token number to retrieve a current value for.
189 @return Returns the size of the token specified by TokenNumber.
206 This function provides a means by which to retrieve a value for a given PCD token.
208 Returns the 8-bit value for the token specified by TokenNumber and Guid.
210 If Guid is NULL, then ASSERT().
212 @param[in] Guid The pointer to a 128-bit unique value that designates
213 which namespace to retrieve a value from.
214 @param[in] TokenNumber The PCD token number to retrieve a current value for.
216 @return Return the UINT8.
234 This function provides a means by which to retrieve a value for a given PCD token.
236 Returns the 16-bit value for the token specified by TokenNumber and Guid.
238 If Guid is NULL, then ASSERT().
240 @param[in] Guid The pointer to a 128-bit unique value that designates
241 which namespace to retrieve a value from.
242 @param[in] TokenNumber The PCD token number to retrieve a current value for.
244 @return Return the UINT16.
262 Returns the 32-bit value for the token specified by TokenNumber and Guid.
263 If Guid is NULL, then ASSERT().
265 @param[in] Guid The pointer to a 128-bit unique value that designates
266 which namespace to retrieve a value from.
267 @param[in] TokenNumber The PCD token number to retrieve a current value for.
269 @return Return the UINT32.
287 This function provides a means by which to retrieve a value for a given PCD token.
289 Returns the 64-bit value for the token specified by TokenNumber and Guid.
291 If Guid is NULL, then ASSERT().
293 @param[in] Guid The pointer to a 128-bit unique value that designates
294 which namespace to retrieve a value from.
295 @param[in] TokenNumber The PCD token number to retrieve a current value for.
297 @return Return the UINT64.
315 This function provides a means by which to retrieve a value for a given PCD token.
317 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
319 If Guid is NULL, then ASSERT().
321 @param[in] Guid The pointer to a 128-bit unique value that designates
322 which namespace to retrieve a value from.
323 @param[in] TokenNumber The PCD token number to retrieve a current value for.
325 @return Return the VOID* pointer.
343 This function provides a means by which to retrieve a value for a given PCD token.
345 Returns the Boolean value of the token specified by TokenNumber and Guid.
347 If Guid is NULL, then ASSERT().
349 @param[in] Guid The pointer to a 128-bit unique value that designates
350 which namespace to retrieve a value from.
351 @param[in] TokenNumber The PCD token number to retrieve a current value for.
353 @return Return the BOOLEAN.
371 This function provides a means by which to retrieve the size of a given PCD token.
373 Returns the size of the token specified by TokenNumber and Guid.
375 If Guid is NULL, then ASSERT().
377 @param[in] Guid The pointer to a 128-bit unique value that designates
378 which namespace to retrieve a value from.
379 @param[in] TokenNumber The PCD token number to retrieve a current value for.
381 @return Return the size.
398 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
400 This function provides a means by which to set a value for a given PCD token.
402 Sets the 8-bit value for the token specified by TokenNumber
403 to the value specified by Value. Value is returned.
405 @param[in] TokenNumber The PCD token number to set a current value for.
406 @param[in] Value The 8-bit value to set.
408 @return Return the value that was set.
414 IN UINTN TokenNumber
,
426 This function provides a means by which to set a value for a given PCD token.
428 Sets the 16-bit value for the token specified by TokenNumber
429 to the value specified by Value. Value is returned.
431 @param[in] TokenNumber The PCD token number to set a current value for.
432 @param[in] Value The 16-bit value to set.
434 @return Return the value that was set.
440 IN UINTN TokenNumber
,
452 This function provides a means by which to set a value for a given PCD token.
454 Sets the 32-bit value for the token specified by TokenNumber
455 to the value specified by Value. Value is returned.
457 @param[in] TokenNumber The PCD token number to set a current value for.
458 @param[in] Value The 32-bit value to set.
460 @return Return the value that was set.
466 IN UINTN TokenNumber
,
478 This function provides a means by which to set a value for a given PCD token.
480 Sets the 64-bit value for the token specified by TokenNumber
481 to the value specified by Value. Value is returned.
483 @param[in] TokenNumber The PCD token number to set a current value for.
484 @param[in] Value The 64-bit value to set.
486 @return Return the value that was set.
492 IN UINTN TokenNumber
,
504 This function provides a means by which to set a value for a given PCD token.
506 Sets a buffer for the token specified by TokenNumber to the value
507 specified by Buffer and SizeOfBuffer. Buffer is returned.
508 If SizeOfBuffer is greater than the maximum size support by TokenNumber,
509 then set SizeOfBuffer to the maximum size supported by TokenNumber and
510 return NULL to indicate that the set operation was not actually performed.
512 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
513 maximum size supported by TokenName and NULL must be returned.
515 If SizeOfBuffer is NULL, then ASSERT().
516 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
518 @param[in] TokenNumber The PCD token number to set a current value for.
519 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
520 @param[in] Buffer A pointer to the buffer to set.
522 @return Return the pointer for the buffer been set.
528 IN UINTN TokenNumber
,
529 IN OUT UINTN
*SizeOfBuffer
,
530 IN CONST VOID
*Buffer
541 This function provides a means by which to set a value for a given PCD token.
543 Sets the Boolean value for the token specified by TokenNumber
544 to the value specified by Value. Value is returned.
546 @param[in] TokenNumber The PCD token number to set a current value for.
547 @param[in] Value The boolean value to set.
549 @return Return the value that was set.
555 IN UINTN TokenNumber
,
567 This function provides a means by which to set a value for a given PCD token.
569 Sets the 8-bit value for the token specified by TokenNumber and
570 Guid to the value specified by Value. Value is returned.
572 If Guid is NULL, then ASSERT().
574 @param[in] Guid The pointer to a 128-bit unique value that
575 designates which namespace to set a value from.
576 @param[in] TokenNumber The PCD token number to set a current value for.
577 @param[in] Value The 8-bit value to set.
579 @return Return the value that was set.
586 IN UINTN TokenNumber
,
598 This function provides a means by which to set a value for a given PCD token.
600 Sets the 16-bit value for the token specified by TokenNumber and
601 Guid to the value specified by Value. Value is returned.
603 If Guid is NULL, then ASSERT().
605 @param[in] Guid The pointer to a 128-bit unique value that
606 designates which namespace to set a value from.
607 @param[in] TokenNumber The PCD token number to set a current value for.
608 @param[in] Value The 16-bit value to set.
610 @return Return the value that was set.
617 IN UINTN TokenNumber
,
629 This function provides a means by which to set a value for a given PCD token.
631 Sets the 32-bit value for the token specified by TokenNumber and
632 Guid to the value specified by Value. Value is returned.
634 If Guid is NULL, then ASSERT().
636 @param[in] Guid The pointer to a 128-bit unique value that
637 designates which namespace to set a value from.
638 @param[in] TokenNumber The PCD token number to set a current value for.
639 @param[in] Value The 32-bit value to set.
641 @return Return the value that was set.
648 IN UINTN TokenNumber
,
660 This function provides a means by which to set a value for a given PCD token.
662 Sets the 64-bit value for the token specified by TokenNumber and
663 Guid to the value specified by Value. Value is returned.
665 If Guid is NULL, then ASSERT().
667 @param[in] Guid The pointer to a 128-bit unique value that
668 designates which namespace to set a value from.
669 @param[in] TokenNumber The PCD token number to set a current value for.
670 @param[in] Value The 64-bit value to set.
672 @return Return the value that was set.
679 IN UINTN TokenNumber
,
691 This function provides a means by which to set a value for a given PCD token.
693 Sets a buffer for the token specified by TokenNumber to the value specified by
694 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
695 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
696 supported by TokenNumber and return NULL to indicate that the set operation
697 was not actually performed.
699 If Guid is NULL, then ASSERT().
700 If SizeOfBuffer is NULL, then ASSERT().
701 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
703 @param[in] Guid The pointer to a 128-bit unique value that
704 designates which namespace to set a value from.
705 @param[in] TokenNumber The PCD token number to set a current value for.
706 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
707 @param[in] Buffer A pointer to the buffer to set.
709 @return Return the pinter to the buffer been set.
716 IN UINTN TokenNumber
,
717 IN OUT UINTN
*SizeOfBuffer
,
729 This function provides a means by which to set a value for a given PCD token.
731 Sets the Boolean value for the token specified by TokenNumber and
732 Guid to the value specified by Value. Value is returned.
734 If Guid is NULL, then ASSERT().
736 @param[in] Guid The pointer to a 128-bit unique value that
737 designates which namespace to set a value from.
738 @param[in] TokenNumber The PCD token number to set a current value for.
739 @param[in] Value The Boolean value to set.
741 @return Return the value that was set.
748 IN UINTN TokenNumber
,
759 This function provides a means by which to set a value for a given PCD token.
761 Sets the 8-bit value for the token specified by TokenNumber
762 to the value specified by Value.
764 @param[in] TokenNumber The PCD token number to set a current value for.
765 @param[in] Value The 8-bit value to set.
767 @return The status of the set operation.
773 IN UINTN TokenNumber
,
779 return RETURN_INVALID_PARAMETER
;
783 This function provides a means by which to set a value for a given PCD token.
785 Sets the 16-bit value for the token specified by TokenNumber
786 to the value specified by Value.
788 @param[in] TokenNumber The PCD token number to set a current value for.
789 @param[in] Value The 16-bit value to set.
791 @return The status of the set operation.
797 IN UINTN TokenNumber
,
803 return RETURN_INVALID_PARAMETER
;
807 This function provides a means by which to set a value for a given PCD token.
809 Sets the 32-bit value for the token specified by TokenNumber
810 to the value specified by Value.
812 @param[in] TokenNumber The PCD token number to set a current value for.
813 @param[in] Value The 32-bit value to set.
815 @return The status of the set operation.
821 IN UINTN TokenNumber
,
827 return RETURN_INVALID_PARAMETER
;
831 This function provides a means by which to set a value for a given PCD token.
833 Sets the 64-bit value for the token specified by TokenNumber
834 to the value specified by Value.
836 @param[in] TokenNumber The PCD token number to set a current value for.
837 @param[in] Value The 64-bit value to set.
839 @return The status of the set operation.
845 IN UINTN TokenNumber
,
851 return RETURN_INVALID_PARAMETER
;
855 This function provides a means by which to set a value for a given PCD token.
857 Sets a buffer for the token specified by TokenNumber to the value specified
858 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
859 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
860 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation
861 was not actually performed.
863 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
864 maximum size supported by TokenName and EFI_INVALID_PARAMETER must be returned.
866 If SizeOfBuffer is NULL, then ASSERT().
867 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
869 @param[in] TokenNumber The PCD token number to set a current value for.
870 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
871 @param[in] Buffer A pointer to the buffer to set.
873 @return The status of the set operation.
879 IN UINTN TokenNumber
,
880 IN OUT UINTN
*SizeOfBuffer
,
881 IN CONST VOID
*Buffer
886 return RETURN_INVALID_PARAMETER
;
890 This function provides a means by which to set a value for a given PCD token.
892 Sets the boolean value for the token specified by TokenNumber
893 to the value specified by Value.
895 @param[in] TokenNumber The PCD token number to set a current value for.
896 @param[in] Value The boolean value to set.
898 @return The status of the set operation.
904 IN UINTN TokenNumber
,
910 return RETURN_INVALID_PARAMETER
;
914 This function provides a means by which to set a value for a given PCD token.
916 Sets the 8-bit value for the token specified by TokenNumber
917 to the value specified by Value.
919 If Guid is NULL, then ASSERT().
921 @param[in] Guid The pointer to a 128-bit unique value that
922 designates which namespace to set a value from.
923 @param[in] TokenNumber The PCD token number to set a current value for.
924 @param[in] Value The 8-bit value to set.
926 @return The status of the set operation.
933 IN UINTN TokenNumber
,
939 return RETURN_INVALID_PARAMETER
;
943 This function provides a means by which to set a value for a given PCD token.
945 Sets the 16-bit value for the token specified by TokenNumber
946 to the value specified by Value.
948 If Guid is NULL, then ASSERT().
950 @param[in] Guid The pointer to a 128-bit unique value that
951 designates which namespace to set a value from.
952 @param[in] TokenNumber The PCD token number to set a current value for.
953 @param[in] Value The 16-bit value to set.
955 @return The status of the set operation.
962 IN UINTN TokenNumber
,
968 return RETURN_INVALID_PARAMETER
;
972 This function provides a means by which to set a value for a given PCD token.
974 Sets the 32-bit value for the token specified by TokenNumber
975 to the value specified by Value.
977 If Guid is NULL, then ASSERT().
979 @param[in] Guid The pointer to a 128-bit unique value that
980 designates which namespace to set a value from.
981 @param[in] TokenNumber The PCD token number to set a current value for.
982 @param[in] Value The 32-bit value to set.
984 @return The status of the set operation.
991 IN UINTN TokenNumber
,
997 return RETURN_INVALID_PARAMETER
;
1001 This function provides a means by which to set a value for a given PCD token.
1003 Sets the 64-bit value for the token specified by TokenNumber
1004 to the value specified by Value.
1006 If Guid is NULL, then ASSERT().
1008 @param[in] Guid The pointer to a 128-bit unique value that
1009 designates which namespace to set a value from.
1010 @param[in] TokenNumber The PCD token number to set a current value for.
1011 @param[in] Value The 64-bit value to set.
1013 @return The status of the set operation.
1019 IN CONST GUID
*Guid
,
1020 IN UINTN TokenNumber
,
1026 return RETURN_INVALID_PARAMETER
;
1030 This function provides a means by which to set a value for a given PCD token.
1032 Sets a buffer for the token specified by TokenNumber to the value specified by
1033 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1034 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1035 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation
1036 was not actually performed.
1038 If Guid is NULL, then ASSERT().
1039 If SizeOfBuffer is NULL, then ASSERT().
1040 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1042 @param[in] Guid Pointer to a 128-bit unique value that
1043 designates which namespace to set a value from.
1044 @param[in] TokenNumber The PCD token number to set a current value for.
1045 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1046 @param[in] Buffer A pointer to the buffer to set.
1048 @return The status of the set operation.
1054 IN CONST GUID
*Guid
,
1055 IN UINTN TokenNumber
,
1056 IN OUT UINTN
*SizeOfBuffer
,
1062 return RETURN_INVALID_PARAMETER
;
1066 This function provides a means by which to set a value for a given PCD token.
1068 Sets the boolean value for the token specified by TokenNumber
1069 to the value specified by Value.
1071 If Guid is NULL, then ASSERT().
1073 @param[in] Guid The pointer to a 128-bit unique value that
1074 designates which namespace to set a value from.
1075 @param[in] TokenNumber The PCD token number to set a current value for.
1076 @param[in] Value The boolean value to set.
1078 @return The status of the set operation.
1084 IN CONST GUID
*Guid
,
1085 IN UINTN TokenNumber
,
1091 return RETURN_INVALID_PARAMETER
;
1095 Set up a notification function that is called when a specified token is set.
1097 When the token specified by TokenNumber and Guid is set,
1098 then notification function specified by NotificationFunction is called.
1099 If Guid is NULL, then the default token space is used.
1101 If NotificationFunction is NULL, then ASSERT().
1103 @param[in] Guid The pointer to a 128-bit unique value that designates which
1104 namespace to set a value from. If NULL, then the default
1105 token space is used.
1106 @param[in] TokenNumber The PCD token number to monitor.
1107 @param[in] NotificationFunction The function to call when the token
1108 specified by Guid and TokenNumber is set.
1113 LibPcdCallbackOnSet (
1114 IN CONST GUID
*Guid
, OPTIONAL
1115 IN UINTN TokenNumber
,
1116 IN PCD_CALLBACK NotificationFunction
1125 Disable a notification function that was established with LibPcdCallbackonSet().
1127 Disable a notification function that was previously established with LibPcdCallbackOnSet().
1129 If NotificationFunction is NULL, then ASSERT().
1130 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
1131 and NotificationFunction, then ASSERT().
1133 @param[in] Guid Specify the GUID token space.
1134 @param[in] TokenNumber Specify the token number.
1135 @param[in] NotificationFunction The callback function to be unregistered.
1140 LibPcdCancelCallback (
1141 IN CONST GUID
*Guid
, OPTIONAL
1142 IN UINTN TokenNumber
,
1143 IN PCD_CALLBACK NotificationFunction
1152 Retrieves the next token in a token space.
1154 Retrieves the next PCD token number from the token space specified by Guid.
1155 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
1156 then the first token number is returned. Otherwise, the token number that
1157 follows TokenNumber in the token space is returned. If TokenNumber is the last
1158 token number in the token space, then 0 is returned.
1160 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
1162 @param[in] Guid The pointer to a 128-bit unique value that designates which namespace
1163 to set a value from. If NULL, then the default token space is used.
1164 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
1167 @return The next valid token number.
1172 LibPcdGetNextToken (
1173 IN CONST GUID
*Guid
, OPTIONAL
1174 IN UINTN TokenNumber
1185 Used to retrieve the list of available PCD token space GUIDs.
1187 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
1189 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
1190 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
1192 @param TokenSpaceGuid The pointer to a PCD token space GUID.
1194 @return The next valid token namespace.
1199 LibPcdGetNextTokenSpace (
1200 IN CONST GUID
*TokenSpaceGuid
1210 Sets a value of a patchable PCD entry that is type pointer.
1212 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
1213 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1214 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
1215 NULL to indicate that the set operation was not actually performed.
1216 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1217 MaximumDatumSize and NULL must be returned.
1219 If PatchVariable is NULL, then ASSERT().
1220 If SizeOfBuffer is NULL, then ASSERT().
1221 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1223 @param[in] PatchVariable A pointer to the global variable in a module that is
1224 the target of the set operation.
1225 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1226 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1227 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1229 @return Return the pointer to the buffer that was set.
1235 IN VOID
*PatchVariable
,
1236 IN UINTN MaximumDatumSize
,
1237 IN OUT UINTN
*SizeOfBuffer
,
1238 IN CONST VOID
*Buffer
1241 ASSERT (PatchVariable
!= NULL
);
1242 ASSERT (SizeOfBuffer
!= NULL
);
1244 if (*SizeOfBuffer
> 0) {
1245 ASSERT (Buffer
!= NULL
);
1248 if ((*SizeOfBuffer
> MaximumDatumSize
) ||
1249 (*SizeOfBuffer
== MAX_ADDRESS
)) {
1250 *SizeOfBuffer
= MaximumDatumSize
;
1254 CopyMem (PatchVariable
, Buffer
, *SizeOfBuffer
);
1256 return (VOID
*) Buffer
;
1260 Sets a value of a patchable PCD entry that is type pointer.
1262 Sets the PCD entry specified by PatchVariable to the value specified
1263 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
1264 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
1265 to indicate that the set operation was not actually performed.
1266 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1267 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
1269 If PatchVariable is NULL, then ASSERT().
1270 If SizeOfBuffer is NULL, then ASSERT().
1271 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1273 @param[in] PatchVariable A pointer to the global variable in a module that is
1274 the target of the set operation.
1275 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1276 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1277 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1279 @return The status of the set operation.
1284 LibPatchPcdSetPtrS (
1285 IN VOID
*PatchVariable
,
1286 IN UINTN MaximumDatumSize
,
1287 IN OUT UINTN
*SizeOfBuffer
,
1288 IN CONST VOID
*Buffer
1291 ASSERT (PatchVariable
!= NULL
);
1292 ASSERT (SizeOfBuffer
!= NULL
);
1294 if (*SizeOfBuffer
> 0) {
1295 ASSERT (Buffer
!= NULL
);
1298 if ((*SizeOfBuffer
> MaximumDatumSize
) ||
1299 (*SizeOfBuffer
== MAX_ADDRESS
)) {
1300 *SizeOfBuffer
= MaximumDatumSize
;
1301 return RETURN_INVALID_PARAMETER
;
1304 CopyMem (PatchVariable
, Buffer
, *SizeOfBuffer
);
1306 return RETURN_SUCCESS
;
1310 Retrieve additional information associated with a PCD token.
1312 This includes information such as the type of value the TokenNumber is associated with as well as possible
1313 human readable name that is associated with the token.
1315 If TokenNumber is not in the default token space specified, then ASSERT().
1317 @param[in] TokenNumber The PCD token number.
1318 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
1319 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
1324 IN UINTN TokenNumber
,
1325 OUT PCD_INFO
*PcdInfo
1332 Retrieve additional information associated with a PCD token.
1334 This includes information such as the type of value the TokenNumber is associated with as well as possible
1335 human readable name that is associated with the token.
1337 If TokenNumber is not in the token space specified by Guid, then ASSERT().
1339 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
1340 @param[in] TokenNumber The PCD token number.
1341 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
1342 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
1347 IN CONST GUID
*Guid
,
1348 IN UINTN TokenNumber
,
1349 OUT PCD_INFO
*PcdInfo
1356 Retrieve the currently set SKU Id.
1358 If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
1360 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
1361 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU