2 The internal header file declares the private functions used by PeiPcd driver.
4 Copyright (c) 2006 - 2008, Intel Corporation
5 All rights reserved. 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.
15 #ifndef _PEI_PCD_SERVICE_H_
16 #define _PEI_PCD_SERVICE_H_
19 #include <Ppi/ReadOnlyVariable2.h>
21 #include <Guid/PcdDataBaseHobGuid.h>
22 #include <Library/DebugLib.h>
23 #include <Library/PeimEntryPoint.h>
24 #include <Library/BaseLib.h>
25 #include <Library/HobLib.h>
26 #include <Library/PeiServicesLib.h>
27 #include <Library/PcdLib.h>
28 #include <Library/BaseMemoryLib.h>
32 // Please make sure the PCD Serivce PEIM Version is consistent with
33 // the version of PCD Database generation tool
35 #define PCD_SERVICE_PEIM_VERSION 2
38 // PCD_PEI_DATABASE_GENTOOL_VERSION is defined in Autogen.h
39 // and generated by PCD Database generation tool.
41 //#if (PCD_SERVICE_PEIM_VERSION != PCD_PEI_SERVICE_DRIVER_AUTOGEN_VERSION )
42 // #error "Please make sure the version of PCD Service PEIM and PCD PEI Database Generation Tool matches"
46 // PPI Interface Implementation Declaration.
50 Sets the SKU value for subsequent calls to set or get PCD token values.
52 SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
53 SetSku() is normally called only once by the system.
55 For each item (token), the database can hold a single value that applies to all SKUs,
56 or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
57 SKU-specific values are called SKU enabled.
59 The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255.
60 For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
61 single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
62 last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token,
63 the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been
64 set for that Id, the results are unpredictable.
66 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
67 set values associated with a PCD token.
77 Retrieves an 8-bit value for a given PCD token.
79 Retrieves the current byte-sized value for a PCD token number.
80 If the TokenNumber is invalid, the results are unpredictable.
82 @param[in] TokenNumber The PCD token number.
84 @return The UINT8 value.
94 Retrieves an 16-bit value for a given PCD token.
96 Retrieves the current 16-bits value for a PCD token number.
97 If the TokenNumber is invalid, the results are unpredictable.
99 @param[in] TokenNumber The PCD token number.
101 @return The UINT16 value.
111 Retrieves an 32-bit value for a given PCD token.
113 Retrieves the current 32-bits value for a PCD token number.
114 If the TokenNumber is invalid, the results are unpredictable.
116 @param[in] TokenNumber The PCD token number.
118 @return The UINT32 value.
128 Retrieves an 64-bit value for a given PCD token.
130 Retrieves the current 64-bits value for a PCD token number.
131 If the TokenNumber is invalid, the results are unpredictable.
133 @param[in] TokenNumber The PCD token number.
135 @return The UINT64 value.
145 Retrieves a pointer to a value for a given PCD token.
147 Retrieves the current pointer to the buffer for a PCD token number.
148 Do not make any assumptions about the alignment of the pointer that
149 is returned by this function call. If the TokenNumber is invalid,
150 the results are unpredictable.
152 @param[in] TokenNumber The PCD token number.
154 @return The pointer to the buffer to be retrived.
164 Retrieves a Boolean value for a given PCD token.
166 Retrieves the current boolean value for a PCD token number.
167 Do not make any assumptions about the alignment of the pointer that
168 is returned by this function call. If the TokenNumber is invalid,
169 the results are unpredictable.
171 @param[in] TokenNumber The PCD token number.
173 @return The Boolean value.
183 Retrieves the size of the value for a given PCD token.
185 Retrieves the current size of a particular PCD token.
186 If the TokenNumber is invalid, the results are unpredictable.
188 @param[in] TokenNumber The PCD token number.
190 @return The size of the value for the PCD token.
200 Retrieves an 8-bit value for a given PCD token.
202 Retrieves the 8-bit value of a particular PCD token.
203 If the TokenNumber is invalid or the token space
204 specified by Guid does not exist, the results are
207 @param[in] Guid The token space for the token number.
208 @param[in] TokenNumber The PCD token number.
210 @return The size 8-bit value for the PCD token.
216 IN CONST EFI_GUID
*Guid
,
221 Retrieves an 16-bit value for a given PCD token.
223 Retrieves the 16-bit value of a particular PCD token.
224 If the TokenNumber is invalid or the token space
225 specified by Guid does not exist, the results are
228 @param[in] Guid The token space for the token number.
229 @param[in] TokenNumber The PCD token number.
231 @return The size 16-bit value for the PCD token.
237 IN CONST EFI_GUID
*Guid
,
242 Retrieves an 32-bit value for a given PCD token.
244 Retrieves the 32-bit value of a particular PCD token.
245 If the TokenNumber is invalid or the token space
246 specified by Guid does not exist, the results are
249 @param[in] Guid The token space for the token number.
250 @param[in] TokenNumber The PCD token number.
252 @return The size 32-bit value for the PCD token.
258 IN CONST EFI_GUID
*Guid
,
263 Retrieves an 64-bit value for a given PCD token.
265 Retrieves the 64-bit value of a particular PCD token.
266 If the TokenNumber is invalid or the token space
267 specified by Guid does not exist, the results are
270 @param[in] Guid The token space for the token number.
271 @param[in] TokenNumber The PCD token number.
273 @return The size 64-bit value for the PCD token.
279 IN CONST EFI_GUID
*Guid
,
284 Retrieves a pointer to a value for a given PCD token.
286 Retrieves the current pointer to the buffer for a PCD token number.
287 Do not make any assumptions about the alignment of the pointer that
288 is returned by this function call. If the TokenNumber is invalid,
289 the results are unpredictable.
291 @param[in] Guid The token space for the token number.
292 @param[in] TokenNumber The PCD token number.
294 @return The pointer to the buffer to be retrived.
300 IN CONST EFI_GUID
*Guid
,
305 Retrieves an Boolean value for a given PCD token.
307 Retrieves the Boolean value of a particular PCD token.
308 If the TokenNumber is invalid or the token space
309 specified by Guid does not exist, the results are
312 @param[in] Guid The token space for the token number.
313 @param[in] TokenNumber The PCD token number.
315 @return The size Boolean value for the PCD token.
321 IN CONST EFI_GUID
*Guid
,
326 Retrieves the size of the value for a given PCD token.
328 Retrieves the current size of a particular PCD token.
329 If the TokenNumber is invalid, the results are unpredictable.
331 @param[in] Guid The token space for the token number.
332 @param[in] TokenNumber The PCD token number.
334 @return The size of the value for the PCD token.
340 IN CONST EFI_GUID
*Guid
,
345 Sets an 8-bit value for a given PCD token.
347 When the PCD service sets a value, it will check to ensure that the
348 size of the value being set is compatible with the Token's existing definition.
349 If it is not, an error will be returned.
351 @param[in] TokenNumber The PCD token number.
352 @param[in] Value The value to set for the PCD token.
354 @retval EFI_SUCCESS Procedure returned successfully.
355 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
356 being set was incompatible with a call to this function.
357 Use GetSize() to retrieve the size of the target data.
358 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
364 IN UINTN TokenNumber
,
369 Sets an 16-bit value for a given PCD token.
371 When the PCD service sets a value, it will check to ensure that the
372 size of the value being set is compatible with the Token's existing definition.
373 If it is not, an error will be returned.
375 @param[in] TokenNumber The PCD token number.
376 @param[in] Value The value to set for the PCD token.
378 @retval EFI_SUCCESS Procedure returned successfully.
379 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
380 being set was incompatible with a call to this function.
381 Use GetSize() to retrieve the size of the target data.
382 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
388 IN UINTN TokenNumber
,
393 Sets an 32-bit value for a given PCD token.
395 When the PCD service sets a value, it will check to ensure that the
396 size of the value being set is compatible with the Token's existing definition.
397 If it is not, an error will be returned.
399 @param[in] TokenNumber The PCD token number.
400 @param[in] Value The value to set for the PCD token.
402 @retval EFI_SUCCESS Procedure returned successfully.
403 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
404 being set was incompatible with a call to this function.
405 Use GetSize() to retrieve the size of the target data.
406 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
412 IN UINTN TokenNumber
,
417 Sets an 64-bit value for a given PCD token.
419 When the PCD service sets a value, it will check to ensure that the
420 size of the value being set is compatible with the Token's existing definition.
421 If it is not, an error will be returned.
423 @param[in] TokenNumber The PCD token number.
424 @param[in] Value The value to set for the PCD token.
426 @retval EFI_SUCCESS Procedure returned successfully.
427 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
428 being set was incompatible with a call to this function.
429 Use GetSize() to retrieve the size of the target data.
430 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
436 IN UINTN TokenNumber
,
441 Sets a value of a specified size for a given PCD token.
443 When the PCD service sets a value, it will check to ensure that the
444 size of the value being set is compatible with the Token's existing definition.
445 If it is not, an error will be returned.
447 @param[in] TokenNumber The PCD token number.
448 @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
449 On input, if the SizeOfValue is greater than the maximum size supported
450 for this TokenNumber then the output value of SizeOfValue will reflect
451 the maximum size supported for this TokenNumber.
452 @param[in] Buffer The buffer to set for the PCD token.
454 @retval EFI_SUCCESS Procedure returned successfully.
455 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
456 being set was incompatible with a call to this function.
457 Use GetSize() to retrieve the size of the target data.
458 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
464 IN UINTN TokenNumber
,
465 IN OUT UINTN
*SizeOfBuffer
,
470 Sets an Boolean value for a given PCD token.
472 When the PCD service sets a value, it will check to ensure that the
473 size of the value being set is compatible with the Token's existing definition.
474 If it is not, an error will be returned.
476 @param[in] TokenNumber The PCD token number.
477 @param[in] Value The value to set for the PCD token.
479 @retval EFI_SUCCESS Procedure returned successfully.
480 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
481 being set was incompatible with a call to this function.
482 Use GetSize() to retrieve the size of the target data.
483 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
489 IN UINTN TokenNumber
,
494 Sets an 8-bit value for a given PCD token.
496 When the PCD service sets a value, it will check to ensure that the
497 size of the value being set is compatible with the Token's existing definition.
498 If it is not, an error will be returned.
500 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
501 @param[in] TokenNumber The PCD token number.
502 @param[in] Value The value to set for the PCD token.
504 @retval EFI_SUCCESS Procedure returned successfully.
505 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
506 being set was incompatible with a call to this function.
507 Use GetSize() to retrieve the size of the target data.
508 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
514 IN CONST EFI_GUID
*Guid
,
515 IN UINTN TokenNumber
,
520 Sets an 16-bit value for a given PCD token.
522 When the PCD service sets a value, it will check to ensure that the
523 size of the value being set is compatible with the Token's existing definition.
524 If it is not, an error will be returned.
526 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
527 @param[in] TokenNumber The PCD token number.
528 @param[in] Value The value to set for the PCD token.
530 @retval EFI_SUCCESS Procedure returned successfully.
531 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
532 being set was incompatible with a call to this function.
533 Use GetSize() to retrieve the size of the target data.
534 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
540 IN CONST EFI_GUID
*Guid
,
541 IN UINTN TokenNumber
,
546 Sets an 32-bit value for a given PCD token.
548 When the PCD service sets a value, it will check to ensure that the
549 size of the value being set is compatible with the Token's existing definition.
550 If it is not, an error will be returned.
552 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
553 @param[in] TokenNumber The PCD token number.
554 @param[in] Value The value to set for the PCD token.
556 @retval EFI_SUCCESS Procedure returned successfully.
557 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
558 being set was incompatible with a call to this function.
559 Use GetSize() to retrieve the size of the target data.
560 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
566 IN CONST EFI_GUID
*Guid
,
567 IN UINTN TokenNumber
,
572 Sets an 64-bit value for a given PCD token.
574 When the PCD service sets a value, it will check to ensure that the
575 size of the value being set is compatible with the Token's existing definition.
576 If it is not, an error will be returned.
578 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
579 @param[in] TokenNumber The PCD token number.
580 @param[in] Value The value to set for the PCD token.
582 @retval EFI_SUCCESS Procedure returned successfully.
583 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
584 being set was incompatible with a call to this function.
585 Use GetSize() to retrieve the size of the target data.
586 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
592 IN CONST EFI_GUID
*Guid
,
593 IN UINTN TokenNumber
,
598 Sets a value of a specified size for a given PCD token.
600 When the PCD service sets a value, it will check to ensure that the
601 size of the value being set is compatible with the Token's existing definition.
602 If it is not, an error will be returned.
604 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
605 @param[in] TokenNumber The PCD token number.
606 @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
607 On input, if the SizeOfValue is greater than the maximum size supported
608 for this TokenNumber then the output value of SizeOfValue will reflect
609 the maximum size supported for this TokenNumber.
610 @param[in] Buffer The buffer to set for the PCD token.
612 @retval EFI_SUCCESS Procedure returned successfully.
613 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
614 being set was incompatible with a call to this function.
615 Use GetSize() to retrieve the size of the target data.
616 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
622 IN CONST EFI_GUID
*Guid
,
623 IN UINTN TokenNumber
,
624 IN OUT UINTN
*SizeOfBuffer
,
629 Sets an Boolean value for a given PCD token.
631 When the PCD service sets a value, it will check to ensure that the
632 size of the value being set is compatible with the Token's existing definition.
633 If it is not, an error will be returned.
635 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
636 @param[in] TokenNumber The PCD token number.
637 @param[in] Value The value to set for the PCD token.
639 @retval EFI_SUCCESS Procedure returned successfully.
640 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
641 being set was incompatible with a call to this function.
642 Use GetSize() to retrieve the size of the target data.
643 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
649 IN CONST EFI_GUID
*Guid
,
650 IN UINTN TokenNumber
,
655 Specifies a function to be called anytime the value of a designated token is changed.
657 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
658 @param[in] TokenNumber The PCD token number.
659 @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
661 @retval EFI_SUCCESS The PCD service has successfully established a call event
662 for the CallBackToken requested.
663 @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
668 PeiRegisterCallBackOnSet (
669 IN CONST EFI_GUID
*Guid
, OPTIONAL
670 IN UINTN TokenNumber
,
671 IN PCD_PPI_CALLBACK CallBackFunction
675 Cancels a previously set callback function for a particular PCD token number.
677 @param [in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
678 @param [in] TokenNumber The PCD token number.
679 @param [in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
681 @retval EFI_SUCCESS The PCD service has successfully established a call event
682 for the CallBackToken requested.
683 @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
688 PcdUnRegisterCallBackOnSet (
689 IN CONST EFI_GUID
*Guid
, OPTIONAL
690 IN UINTN TokenNumber
,
691 IN PCD_PPI_CALLBACK CallBackFunction
695 Retrieves the next valid PCD token for a given namespace.
697 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
698 @param[in, out] TokenNumber A pointer to the PCD token number to use to find the subsequent token number.
699 If the input token namespace or token number does not exist on the platform,
700 an error is returned and the value of *TokenNumber is undefined. To retrieve the "first" token,
701 have the pointer reference a TokenNumber value of 0. If the input token number is 0 and
702 there is no valid token number for this token namespace, *TokenNumber will be assigned to
703 0 and the function return EFI_SUCCESS. If the token number is the last valid token number,
704 *TokenNumber will be assigned to 0 and the function return EFI_SUCCESS.
706 @retval EFI_SUCCESS The PCD service retrieved the next valid token number. Or the input token number
707 is already the last valid token number in the PCD database.
708 In the later case, *TokenNumber is updated with the value of 0.
709 @retval EFI_NOT_FOUND If this input token number and token namespace does not exist on the platform.
715 IN CONST EFI_GUID
*Guid
, OPTIONAL
716 IN OUT UINTN
*TokenNumber
720 Retrieves the next valid PCD token namespace for a given namespace.
722 @param[in, out] Guid An indirect pointer to EFI_GUID. On input it designates
723 a known token namespace from which the search will start. On output,
724 it designates the next valid token namespace on the platform. If the input
725 token namespace does not exist on the platform, an error is returned and
726 the value of *Guid is undefined. If *Guid is NULL, then the GUID of the
727 first token space of the current platform is assigned to *Guid the function
728 return EFI_SUCCESS. If *Guid is NULL and there is no namespace exist in
729 the platform other than the default (NULL) tokennamespace, *Guid is unchanged
730 and the function return EFI_SUCCESS. If this input token namespace is the last
731 namespace on the platform, *Guid will be assigned to NULL and the function return
734 @retval EFI_SUCCESS The PCD service retrieved the next valid token space Guid.
735 Or the input token space Guid is already the last valid token space Guid
736 in the PCD database. In the later case, *Guid is updated with the value of NULL.
737 @retval EFI_NOT_FOUND If the input token namespace does not exist on the platform.
742 PeiPcdGetNextTokenSpace (
743 IN OUT CONST EFI_GUID
**Guid
747 /* Internal Function definitions */
749 Get PCD database from GUID HOB in PEI phase.
751 @return Pointer to PCD database.
760 Wrapper function for setting non-pointer type value for a PCD entry.
762 @param TokenNumber Pcd token number autogenerated by build tools.
763 @param Data Value want to be set for PCD entry
764 @param Size Size of value.
766 @return status of SetWorker.
771 IN UINTN TokenNumber
,
777 Set value for an PCD entry
779 @param TokenNumber Pcd token number autogenerated by build tools.
780 @param Data Value want to be set for PCD entry
781 @param Size Size of value.
782 @param PtrType If TRUE, the type of PCD entry's value is Pointer.
783 If False, the type of PCD entry's value is not Pointer.
785 @retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
786 @retval EFI_INVALID_PARAMETER If Size can not be set to size table.
787 @retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
788 range of UINT8, UINT16, UINT32, UINT64
789 @retval EFI_NOT_FOUND Can not find the PCD type according to token number.
793 IN UINTN TokenNumber
,
800 Wrapper function for set PCD value for non-Pointer type dynamic-ex PCD.
802 @param ExTokenNumber Token number for dynamic-ex PCD.
803 @param Guid Token space guid for dynamic-ex PCD.
804 @param Data Value want to be set.
805 @param SetSize The size of value.
807 @return status of ExSetWorker().
812 IN UINTN ExTokenNumber
,
813 IN CONST EFI_GUID
*Guid
,
819 Set value for a dynamic PCD entry.
821 This routine find the local token number according to dynamic-ex PCD's token
822 space guid and token number firstly, and invoke callback function if this PCD
823 entry registered callback function. Finally, invoken general SetWorker to set
826 @param ExTokenNumber Dynamic-ex PCD token number.
827 @param Guid Token space guid for dynamic-ex PCD.
828 @param Data PCD value want to be set
829 @param SetSize Size of value.
830 @param PtrType If TRUE, this PCD entry is pointer type.
831 If FALSE, this PCD entry is not pointer type.
833 @return status of SetWorker().
838 IN UINTN ExTokenNumber
,
839 IN CONST EFI_GUID
*Guid
,
846 Get the PCD entry pointer in PCD database.
848 This routine will visit PCD database to find the PCD entry according to given
849 token number. The given token number is autogened by build tools and it will be
850 translated to local token number. Local token number contains PCD's type and
851 offset of PCD entry in PCD database.
853 @param TokenNumber Token's number, it is autogened by build tools
854 @param GetSize The size of token's value
856 @return PCD entry pointer in PCD database
861 IN UINTN TokenNumber
,
866 Wrapper function for get PCD value for dynamic-ex PCD.
868 @param Guid Token space guid for dynamic-ex PCD.
869 @param ExTokenNumber Token number for dyanmic-ex PCD.
870 @param GetSize The size of dynamic-ex PCD value.
872 @return PCD entry in PCD database.
877 IN CONST EFI_GUID
*Guid
,
878 IN UINTN ExTokenNumber
,
885 UINT32 LocalTokenNumberAlias
;
886 } EX_PCD_ENTRY_ATTRIBUTE
;
889 Get local token number according to dynamic-ex PCD's {token space guid:token number}
891 A dynamic-ex type PCD, developer must provide pair of token space guid: token number
892 in DEC file. PCD database maintain a mapping table that translate pair of {token
893 space guid: token number} to local token number.
895 @param Guid Token space guid for dynamic-ex PCD entry.
896 @param ExTokenNumber Token number for dynamic-ex PCD.
898 @return local token number for dynamic-ex PCD.
902 GetExPcdTokenNumber (
903 IN CONST EFI_GUID
*Guid
,
904 IN UINTN ExTokenNumber
908 The function registers the CallBackOnSet fucntion
909 according to TokenNumber and EFI_GUID space.
911 @param TokenNumber The token number.
912 @param Guid The GUID space.
913 @param CallBackFunction The Callback function to be registered.
914 @param Register To register or unregister the callback function.
916 @retval EFI_SUCCESS If the Callback function is registered.
917 @retval EFI_NOT_FOUND If the PCD Entry is not found according to Token Number and GUID space.
918 @retval EFI_OUT_OF_RESOURCES If the callback function can't be registered because there is not free
919 slot left in the CallbackFnTable.
922 PeiRegisterCallBackWorker (
923 IN UINTN TokenNumber
,
924 IN CONST EFI_GUID
*Guid
, OPTIONAL
925 IN PCD_PPI_CALLBACK CallBackFunction
,
930 The function builds the PCD database.
938 Get SKU ID tabble from PCD database.
940 @param LocalTokenNumberTableIdx Index of local token number in token number table.
941 @param Database PCD Database in PEI phase
943 @return Pointer to SKU ID array table
948 IN UINTN LocalTokenNumberTableIdx
,
949 IN PEI_PCD_DATABASE
*Database
953 Get index of PCD entry in size table.
955 @param LocalTokenNumberTableIdx Index of this PCD in local token number table.
956 @param Database Pointer to PCD database.
958 @return index of PCD entry in size table.
963 IN UINTN LocalTokenNumberTableIdx
,
964 IN PEI_PCD_DATABASE
*Database
968 Get PCD value's size for POINTER type PCD.
970 The POINTER type PCD's value will be stored into a buffer in specificed size.
971 The max size of this PCD's value is described in PCD's definition in DEC file.
973 @param LocalTokenNumberTableIdx Index of PCD token number in PCD token table
974 @param MaxSize Maxmium size of PCD's value
975 @param Database Pcd database in PEI phase.
977 @return PCD value's size for POINTER type PCD.
982 IN UINTN LocalTokenNumberTableIdx
,
984 IN PEI_PCD_DATABASE
*Database
988 Set PCD value's size for POINTER type PCD.
990 The POINTER type PCD's value will be stored into a buffer in specificed size.
991 The max size of this PCD's value is described in PCD's definition in DEC file.
993 @param LocalTokenNumberTableIdx Index of PCD token number in PCD token table
994 @param CurrentSize Maxmium size of PCD's value
995 @param Database Pcd database in PEI phase.
997 @retval TRUE Success to set PCD's value size, which is not exceed maxmium size
998 @retval FALSE Fail to set PCD's value size, which maybe exceed maxmium size
1003 IN UINTN LocalTokenNumberTableIdx
,
1004 IN OUT UINTN
*CurrentSize
,
1005 IN PEI_PCD_DATABASE
*Database
1009 // The init Database created by PCD Database generation tool
1011 extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit
;