2 Implementation of PcdLib class library for PEI phase.
4 Copyright (c) 2006 - 2013, 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.
22 #include <Ppi/PiPcd.h>
23 #include <Ppi/PcdInfo.h>
24 #include <Ppi/PiPcdInfo.h>
26 #include <Library/PeiServicesLib.h>
27 #include <Library/PcdLib.h>
28 #include <Library/DebugLib.h>
29 #include <Library/BaseMemoryLib.h>
32 Retrieve the PCD_PPI pointer.
34 This function is to locate PCD_PPI PPI via PeiService.
35 If fail to locate PCD_PPI, then ASSERT_EFI_ERROR().
37 @retval PCD_PPI * The pointer to the PCD_PPI.
48 Status
= PeiServicesLocatePpi (&gPcdPpiGuid
, 0, NULL
, (VOID
**)&PcdPpi
);
49 ASSERT_EFI_ERROR (Status
);
55 Retrieve the pointer of EFI_PEI_PCD_PPI defined in PI 1.2 Vol 3.
57 This function is to locate EFI_PEI_PCD_PPI PPI via PeiService.
58 If fail to locate EFI_PEI_PCD_PPI, then ASSERT_EFI_ERROR().
60 @retval EFI_PEI_PCD_PPI * The pointer to the EFI_PEI_PCD_PPI.
69 EFI_PEI_PCD_PPI
*PiPcdPpi
;
71 Status
= PeiServicesLocatePpi (&gEfiPeiPcdPpiGuid
, 0, NULL
, (VOID
**)&PiPcdPpi
);
72 ASSERT_EFI_ERROR (Status
);
78 Retrieve the GET_PCD_INFO_PPI pointer.
80 This function is to locate GET_PCD_INFO_PPI PPI via PeiService.
81 If fail to locate GET_PCD_INFO_PPI, then ASSERT_EFI_ERROR().
83 @retval GET_PCD_INFO_PPI * The pointer to the GET_PCD_INFO_PPI.
87 GetPcdInfoPpiPointer (
92 GET_PCD_INFO_PPI
*PcdInfoPpi
;
94 Status
= PeiServicesLocatePpi (&gGetPcdInfoPpiGuid
, 0, NULL
, (VOID
**)&PcdInfoPpi
);
95 ASSERT_EFI_ERROR (Status
);
101 Retrieve the pointer of EFI_GET_PCD_INFO_PPI defined in PI 1.2.1 Vol 3.
103 This function is to locate EFI_GET_PCD_INFO_PPI PPI via PeiService.
104 If fail to locate EFI_GET_PCD_INFO_PPI, then ASSERT_EFI_ERROR().
106 @retval EFI_GET_PCD_INFO_PPI * The pointer to the EFI_GET_PCD_INFO_PPI.
109 EFI_GET_PCD_INFO_PPI
*
110 GetPiPcdInfoPpiPointer (
115 EFI_GET_PCD_INFO_PPI
*PiPcdInfoPpi
;
117 Status
= PeiServicesLocatePpi (&gEfiGetPcdInfoPpiGuid
, 0, NULL
, (VOID
**)&PiPcdInfoPpi
);
118 ASSERT_EFI_ERROR (Status
);
124 This function provides a means by which SKU support can be established in the PCD infrastructure.
126 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
127 If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
129 @param SkuId The SKU value that will be used when the PCD service retrieves
130 and sets values associated with a PCD token.
132 @return Return the SKU ID that just be set.
142 ASSERT (SkuId
< PCD_MAX_SKU_ID
);
144 GetPiPcdPpiPointer()->SetSku (SkuId
);
152 This function provides a means by which to retrieve a value for a given PCD token.
154 Returns the 8-bit value for the token specified by TokenNumber.
156 @param[in] TokenNumber The PCD token number to retrieve a current value for.
158 @return Returns the 8-bit value for the token specified by TokenNumber.
167 return (GetPcdPpiPointer ())->Get8 (TokenNumber
);
173 This function provides a means by which to retrieve a value for a given PCD token.
175 Returns the 16-bit value for the token specified by TokenNumber.
177 @param[in] TokenNumber The PCD token number to retrieve a current value for.
179 @return Returns the 16-bit value for the token specified by TokenNumber.
188 return (GetPcdPpiPointer ())->Get16 (TokenNumber
);
194 This function provides a means by which to retrieve a value for a given PCD token.
196 Returns the 32-bit value for the token specified by TokenNumber.
198 @param[in] TokenNumber The PCD token number to retrieve a current value for.
200 @return Returns the 32-bit value for the token specified by TokenNumber.
209 return (GetPcdPpiPointer ())->Get32 (TokenNumber
);
215 This function provides a means by which to retrieve a value for a given PCD token.
217 Returns the 64-bit value for the token specified by TokenNumber.
219 @param[in] TokenNumber The PCD token number to retrieve a current value for.
221 @return Returns the 64-bit value for the token specified by TokenNumber.
230 return (GetPcdPpiPointer ())->Get64 (TokenNumber
);
236 This function provides a means by which to retrieve a value for a given PCD token.
238 Returns the pointer to the buffer of the token specified by TokenNumber.
240 @param[in] TokenNumber The PCD token number to retrieve a current value for.
242 @return Returns the pointer to the token specified by TokenNumber.
251 return (GetPcdPpiPointer ())->GetPtr (TokenNumber
);
257 This function provides a means by which to retrieve a value for a given PCD token.
259 Returns the Boolean value of the token specified by TokenNumber.
261 @param[in] TokenNumber The PCD token number to retrieve a current value for.
263 @return Returns the Boolean value of the token specified by TokenNumber.
272 return (GetPcdPpiPointer ())->GetBool (TokenNumber
);
278 This function provides a means by which to retrieve the size of a given PCD token.
280 @param[in] TokenNumber The PCD token number to retrieve a current value for.
282 @return Returns the size of the token specified by TokenNumber.
291 return (GetPcdPpiPointer ())->GetSize (TokenNumber
);
297 This function provides a means by which to retrieve a value for a given PCD token.
299 Returns the 8-bit value for the token specified by TokenNumber and Guid.
301 If Guid is NULL, then ASSERT().
303 @param[in] Guid The pointer to a 128-bit unique value that designates
304 which namespace to retrieve a value from.
305 @param[in] TokenNumber The PCD token number to retrieve a current value for.
307 @return Return the UINT8.
317 ASSERT (Guid
!= NULL
);
319 return (GetPiPcdPpiPointer ())->Get8 (Guid
, TokenNumber
);
325 This function provides a means by which to retrieve a value for a given PCD token.
327 Returns the 16-bit value for the token specified by TokenNumber and Guid.
329 If Guid is NULL, then ASSERT().
331 @param[in] Guid The pointer to a 128-bit unique value that designates
332 which namespace to retrieve a value from.
333 @param[in] TokenNumber The PCD token number to retrieve a current value for.
335 @return Return the UINT16.
346 ASSERT (Guid
!= NULL
);
348 return (GetPiPcdPpiPointer ())->Get16 (Guid
, TokenNumber
);
354 Returns the 32-bit value for the token specified by TokenNumber and Guid.
355 If Guid is NULL, then ASSERT().
357 @param[in] Guid The pointer to a 128-bit unique value that designates
358 which namespace to retrieve a value from.
359 @param[in] TokenNumber The PCD token number to retrieve a current value for.
361 @return Return the UINT32.
371 ASSERT (Guid
!= NULL
);
373 return (GetPiPcdPpiPointer ())->Get32 (Guid
, TokenNumber
);
380 This function provides a means by which to retrieve a value for a given PCD token.
382 Returns the 64-bit value for the token specified by TokenNumber and Guid.
384 If Guid is NULL, then ASSERT().
386 @param[in] Guid The pointer to a 128-bit unique value that designates
387 which namespace to retrieve a value from.
388 @param[in] TokenNumber The PCD token number to retrieve a current value for.
390 @return Return the UINT64.
400 ASSERT (Guid
!= NULL
);
401 return (GetPiPcdPpiPointer ())->Get64 (Guid
, TokenNumber
);
407 This function provides a means by which to retrieve a value for a given PCD token.
409 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
411 If Guid is NULL, then ASSERT().
413 @param[in] Guid The pointer to a 128-bit unique value that designates
414 which namespace to retrieve a value from.
415 @param[in] TokenNumber The PCD token number to retrieve a current value for.
417 @return Return the VOID* pointer.
427 ASSERT (Guid
!= NULL
);
429 return (GetPiPcdPpiPointer ())->GetPtr (Guid
, TokenNumber
);
435 This function provides a means by which to retrieve a value for a given PCD token.
437 Returns the Boolean value of the token specified by TokenNumber and Guid.
439 If Guid is NULL, then ASSERT().
441 @param[in] Guid The pointer to a 128-bit unique value that designates
442 which namespace to retrieve a value from.
443 @param[in] TokenNumber The PCD token number to retrieve a current value for.
445 @return Return the BOOLEAN.
455 ASSERT (Guid
!= NULL
);
456 return (GetPiPcdPpiPointer ())->GetBool (Guid
, TokenNumber
);
462 This function provides a means by which to retrieve the size of a given PCD token.
464 Returns the size of the token specified by TokenNumber and Guid.
466 If Guid is NULL, then ASSERT().
468 @param[in] Guid The pointer to a 128-bit unique value that designates
469 which namespace to retrieve a value from.
470 @param[in] TokenNumber The PCD token number to retrieve a current value for.
472 @return Return the size.
482 ASSERT (Guid
!= NULL
);
483 return (GetPiPcdPpiPointer ())->GetSize (Guid
, TokenNumber
);
489 This function provides a means by which to set a value for a given PCD token.
491 Sets the 8-bit value for the token specified by TokenNumber
492 to the value specified by Value. Value is returned.
494 @param[in] TokenNumber The PCD token number to set a current value for.
495 @param[in] Value The 8-bit value to set.
497 @return Return the value that was set.
503 IN UINTN TokenNumber
,
509 Status
= (GetPcdPpiPointer ())->Set8 (TokenNumber
, Value
);
511 ASSERT_EFI_ERROR (Status
);
519 This function provides a means by which to set a value for a given PCD token.
521 Sets the 16-bit value for the token specified by TokenNumber
522 to the value specified by Value. Value is returned.
524 @param[in] TokenNumber The PCD token number to set a current value for.
525 @param[in] Value The 16-bit value to set.
527 @return Return the value that was set.
533 IN UINTN TokenNumber
,
539 Status
= (GetPcdPpiPointer ())->Set16 (TokenNumber
, Value
);
541 ASSERT_EFI_ERROR (Status
);
549 This function provides a means by which to set a value for a given PCD token.
551 Sets the 32-bit value for the token specified by TokenNumber
552 to the value specified by Value. Value is returned.
554 @param[in] TokenNumber The PCD token number to set a current value for.
555 @param[in] Value The 32-bit value to set.
557 @return Return the value that was set.
563 IN UINTN TokenNumber
,
569 Status
= (GetPcdPpiPointer ())->Set32 (TokenNumber
, Value
);
571 ASSERT_EFI_ERROR (Status
);
579 This function provides a means by which to set a value for a given PCD token.
581 Sets the 64-bit value for the token specified by TokenNumber
582 to the value specified by Value. Value is returned.
584 @param[in] TokenNumber The PCD token number to set a current value for.
585 @param[in] Value The 64-bit value to set.
587 @return Return the value that was set.
593 IN UINTN TokenNumber
,
599 Status
= (GetPcdPpiPointer ())->Set64 (TokenNumber
, Value
);
601 ASSERT_EFI_ERROR (Status
);
609 This function provides a means by which to set a value for a given PCD token.
611 Sets a buffer for the token specified by TokenNumber to the value
612 specified by Buffer and SizeOfBuffer. Buffer is returned.
613 If SizeOfBuffer is greater than the maximum size support by TokenNumber,
614 then set SizeOfBuffer to the maximum size supported by TokenNumber and
615 return NULL to indicate that the set operation was not actually performed.
617 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
618 maximum size supported by TokenName and NULL must be returned.
620 If SizeOfBuffer is NULL, then ASSERT().
621 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
623 @param[in] TokenNumber The PCD token number to set a current value for.
624 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
625 @param[in] Buffer A pointer to the buffer to set.
627 @return Return the pointer for the buffer been set.
633 IN UINTN TokenNumber
,
634 IN OUT UINTN
*SizeOfBuffer
,
635 IN CONST VOID
*Buffer
640 ASSERT (SizeOfBuffer
!= NULL
);
642 if (*SizeOfBuffer
> 0) {
643 ASSERT (Buffer
!= NULL
);
646 Status
= (GetPcdPpiPointer ())->SetPtr (TokenNumber
, SizeOfBuffer
, (VOID
*) Buffer
);
648 if (EFI_ERROR (Status
)) {
652 return (VOID
*) Buffer
;
658 This function provides a means by which to set a value for a given PCD token.
660 Sets the Boolean value for the token specified by TokenNumber
661 to the value specified by Value. Value is returned.
663 @param[in] TokenNumber The PCD token number to set a current value for.
664 @param[in] Value The boolean value to set.
666 @return Return the value that was set.
672 IN UINTN TokenNumber
,
678 Status
= (GetPcdPpiPointer ())->SetBool (TokenNumber
, Value
);
680 ASSERT_EFI_ERROR (Status
);
688 This function provides a means by which to set a value for a given PCD token.
690 Sets the 8-bit value for the token specified by TokenNumber and
691 Guid to the value specified by Value. Value is returned.
693 If Guid is NULL, then ASSERT().
695 @param[in] Guid The pointer to a 128-bit unique value that
696 designates which namespace to set a value from.
697 @param[in] TokenNumber The PCD token number to set a current value for.
698 @param[in] Value The 8-bit value to set.
700 @return Return the value that was set.
707 IN UINTN TokenNumber
,
713 ASSERT (Guid
!= NULL
);
715 Status
= (GetPiPcdPpiPointer ())->Set8 (Guid
, TokenNumber
, Value
);
717 ASSERT_EFI_ERROR (Status
);
725 This function provides a means by which to set a value for a given PCD token.
727 Sets the 16-bit value for the token specified by TokenNumber and
728 Guid to the value specified by Value. Value is returned.
730 If Guid is NULL, then ASSERT().
732 @param[in] Guid The pointer to a 128-bit unique value that
733 designates which namespace to set a value from.
734 @param[in] TokenNumber The PCD token number to set a current value for.
735 @param[in] Value The 16-bit value to set.
737 @return Return the value that was set.
744 IN UINTN TokenNumber
,
749 ASSERT (Guid
!= NULL
);
750 Status
= (GetPiPcdPpiPointer ())->Set16 (Guid
, TokenNumber
, Value
);
752 ASSERT_EFI_ERROR (Status
);
760 This function provides a means by which to set a value for a given PCD token.
762 Sets the 32-bit value for the token specified by TokenNumber and
763 Guid to the value specified by Value. Value is returned.
765 If Guid is NULL, then ASSERT().
767 @param[in] Guid The pointer to a 128-bit unique value that
768 designates which namespace to set a value from.
769 @param[in] TokenNumber The PCD token number to set a current value for.
770 @param[in] Value The 32-bit value to set.
772 @return Return the value that was set.
779 IN UINTN TokenNumber
,
785 ASSERT (Guid
!= NULL
);
787 Status
= (GetPiPcdPpiPointer ())->Set32 (Guid
, TokenNumber
, Value
);
789 ASSERT_EFI_ERROR (Status
);
797 This function provides a means by which to set a value for a given PCD token.
799 Sets the 64-bit value for the token specified by TokenNumber and
800 Guid to the value specified by Value. Value is returned.
801 If Guid is NULL, then ASSERT().
803 @param[in] Guid The pointer to a 128-bit unique value that
804 designates which namespace to set a value from.
805 @param[in] TokenNumber The PCD token number to set a current value for.
806 @param[in] Value The 64-bit value to set.
808 @return Return the value that was set.
815 IN UINTN TokenNumber
,
820 ASSERT (Guid
!= NULL
);
822 Status
= (GetPiPcdPpiPointer ())->Set64 (Guid
, TokenNumber
, Value
);
824 ASSERT_EFI_ERROR (Status
);
832 This function provides a means by which to set a value for a given PCD token.
834 Sets a buffer for the token specified by TokenNumber to the value specified by
835 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
836 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
837 supported by TokenNumber and return NULL to indicate that the set operation
838 was not actually performed.
840 If Guid is NULL, then ASSERT().
841 If SizeOfBuffer is NULL, then ASSERT().
842 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
844 @param[in] Guid The pointer to a 128-bit unique value that
845 designates which namespace to set a value from.
846 @param[in] TokenNumber The PCD token number to set a current value for.
847 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
848 @param[in] Buffer A pointer to the buffer to set.
850 @return Return the pinter to the buffer been set.
857 IN UINTN TokenNumber
,
858 IN OUT UINTN
*SizeOfBuffer
,
863 ASSERT (SizeOfBuffer
!= NULL
);
864 if (*SizeOfBuffer
> 0) {
865 ASSERT (Buffer
!= NULL
);
867 ASSERT (Guid
!= NULL
);
869 Status
= (GetPiPcdPpiPointer ())->SetPtr (Guid
, TokenNumber
, SizeOfBuffer
, Buffer
);
871 if (EFI_ERROR (Status
)) {
881 This function provides a means by which to set a value for a given PCD token.
883 Sets the Boolean value for the token specified by TokenNumber and
884 Guid to the value specified by Value. Value is returned.
886 If Guid is NULL, then ASSERT().
888 @param[in] Guid The pointer to a 128-bit unique value that
889 designates which namespace to set a value from.
890 @param[in] TokenNumber The PCD token number to set a current value for.
891 @param[in] Value The Boolean value to set.
893 @return Return the value that was set.
900 IN UINTN TokenNumber
,
906 ASSERT (Guid
!= NULL
);
907 Status
= (GetPiPcdPpiPointer ())->SetBool (Guid
, TokenNumber
, Value
);
909 ASSERT_EFI_ERROR (Status
);
917 Set up a notification function that is called when a specified token is set.
919 When the token specified by TokenNumber and Guid is set,
920 then notification function specified by NotificationFunction is called.
921 If Guid is NULL, then the default token space is used.
922 If NotificationFunction is NULL, then ASSERT().
924 @param[in] Guid The pointer to a 128-bit unique value that
925 designates which namespace to set a value from.
926 If NULL, then the default token space is used.
927 @param[in] TokenNumber The PCD token number to monitor.
928 @param[in] NotificationFunction The function to call when the token
929 specified by Guid and TokenNumber is set.
934 LibPcdCallbackOnSet (
935 IN CONST GUID
*Guid
, OPTIONAL
936 IN UINTN TokenNumber
,
937 IN PCD_CALLBACK NotificationFunction
942 ASSERT (NotificationFunction
!= NULL
);
944 Status
= (GetPiPcdPpiPointer ())->CallbackOnSet (Guid
, TokenNumber
, (EFI_PEI_PCD_PPI_CALLBACK
) NotificationFunction
);
946 ASSERT_EFI_ERROR (Status
);
954 Disable a notification function that was established with LibPcdCallbackonSet().
956 Disable a notification function that was previously established with LibPcdCallbackOnSet().
957 If NotificationFunction is NULL, then ASSERT().
958 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
959 and NotificationFunction, then ASSERT().
961 @param[in] Guid Specify the GUID token space.
962 @param[in] TokenNumber Specify the token number.
963 @param[in] NotificationFunction The callback function to be unregistered.
968 LibPcdCancelCallback (
969 IN CONST GUID
*Guid
, OPTIONAL
970 IN UINTN TokenNumber
,
971 IN PCD_CALLBACK NotificationFunction
976 ASSERT (NotificationFunction
!= NULL
);
978 Status
= (GetPiPcdPpiPointer ())->CancelCallback (Guid
, TokenNumber
, (EFI_PEI_PCD_PPI_CALLBACK
) NotificationFunction
);
980 ASSERT_EFI_ERROR (Status
);
988 Retrieves the next token in a token space.
990 Retrieves the next PCD token number from the token space specified by Guid.
991 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
992 then the first token number is returned. Otherwise, the token number that
993 follows TokenNumber in the token space is returned. If TokenNumber is the last
994 token number in the token space, then 0 is returned.
996 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
998 @param[in] Guid The pointer to a 128-bit unique value that designates which namespace
999 to set a value from. If NULL, then the default token space is used.
1000 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
1003 @return The next valid token number.
1008 LibPcdGetNextToken (
1009 IN CONST GUID
*Guid
, OPTIONAL
1010 IN UINTN TokenNumber
1013 (GetPiPcdPpiPointer ())->GetNextToken (Guid
, &TokenNumber
);
1020 Used to retrieve the list of available PCD token space GUIDs.
1022 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
1024 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
1025 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
1027 @param TokenSpaceGuid The pointer to the a PCD token space GUID
1029 @return The next valid token namespace.
1034 LibPcdGetNextTokenSpace (
1035 IN CONST GUID
*TokenSpaceGuid
1038 (GetPiPcdPpiPointer ())->GetNextTokenSpace (&TokenSpaceGuid
);
1040 return (GUID
*) TokenSpaceGuid
;
1046 Sets a value of a patchable PCD entry that is type pointer.
1048 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
1049 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1050 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
1051 NULL to indicate that the set operation was not actually performed.
1052 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1053 MaximumDatumSize and NULL must be returned.
1055 If PatchVariable is NULL, then ASSERT().
1056 If SizeOfBuffer is NULL, then ASSERT().
1057 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1059 @param[in] PatchVariable A pointer to the global variable in a module that is
1060 the target of the set operation.
1061 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
1062 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
1063 @param[in] Buffer A pointer to the buffer to used to set the target variable.
1065 @return Return the pointer to the buffer been set.
1071 IN VOID
*PatchVariable
,
1072 IN UINTN MaximumDatumSize
,
1073 IN OUT UINTN
*SizeOfBuffer
,
1074 IN CONST VOID
*Buffer
1077 ASSERT (PatchVariable
!= NULL
);
1078 ASSERT (SizeOfBuffer
!= NULL
);
1080 if (*SizeOfBuffer
> 0) {
1081 ASSERT (Buffer
!= NULL
);
1084 if ((*SizeOfBuffer
> MaximumDatumSize
) ||
1085 (*SizeOfBuffer
== MAX_ADDRESS
)) {
1086 *SizeOfBuffer
= MaximumDatumSize
;
1090 CopyMem (PatchVariable
, Buffer
, *SizeOfBuffer
);
1092 return (VOID
*) Buffer
;
1096 Retrieve additional information associated with a PCD token.
1098 This includes information such as the type of value the TokenNumber is associated with as well as possible
1099 human readable name that is associated with the token.
1101 If TokenNumber is not in the default token space specified, then ASSERT().
1103 @param[in] TokenNumber The PCD token number.
1104 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
1105 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
1110 IN UINTN TokenNumber
,
1111 OUT PCD_INFO
*PcdInfo
1116 Status
= GetPcdInfoPpiPointer()->GetInfo (TokenNumber
, (EFI_PCD_INFO
*) PcdInfo
);
1117 ASSERT_EFI_ERROR (Status
);
1121 Retrieve additional information associated with a PCD token.
1123 This includes information such as the type of value the TokenNumber is associated with as well as possible
1124 human readable name that is associated with the token.
1126 If TokenNumber is not in the token space specified by Guid, then ASSERT().
1128 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
1129 @param[in] TokenNumber The PCD token number.
1130 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
1131 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
1136 IN CONST GUID
*Guid
,
1137 IN UINTN TokenNumber
,
1138 OUT PCD_INFO
*PcdInfo
1143 Status
= GetPiPcdInfoPpiPointer()->GetInfo (Guid
, TokenNumber
, (EFI_PCD_INFO
*) PcdInfo
);
1144 ASSERT_EFI_ERROR (Status
);
1148 Retrieve the currently set SKU Id.
1150 If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
1152 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
1153 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
1164 SkuId
= GetPiPcdInfoPpiPointer()->GetSku ();
1165 ASSERT (SkuId
< PCD_MAX_SKU_ID
);