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 <Guid/PcdPeiCallbackFnTableHobGuid.h>
23 #include <Library/DebugLib.h>
24 #include <Library/PeimEntryPoint.h>
25 #include <Library/BaseLib.h>
26 #include <Library/HobLib.h>
27 #include <Library/PeiServicesLib.h>
28 #include <Library/PcdLib.h>
29 #include <Library/BaseMemoryLib.h>
33 // Please make sure the PCD Serivce PEIM Version is consistent with
34 // the version of PCD Database generation tool
36 #define PCD_SERVICE_PEIM_VERSION 2
39 // PCD_PEI_DATABASE_GENTOOL_VERSION is defined in Autogen.h
40 // and generated by PCD Database generation tool.
42 //#if (PCD_SERVICE_PEIM_VERSION != PCD_PEI_SERVICE_DRIVER_AUTOGEN_VERSION )
43 // #error "Please make sure the version of PCD Service PEIM and PCD PEI Database Generation Tool matches"
47 // PPI Interface Implementation Declaration.
51 Sets the SKU value for subsequent calls to set or get PCD token values.
53 SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
54 SetSku() is normally called only once by the system.
56 For each item (token), the database can hold a single value that applies to all SKUs,
57 or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
58 SKU-specific values are called SKU enabled.
60 The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255.
61 For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
62 single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
63 last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token,
64 the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been
65 set for that Id, the results are unpredictable.
67 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
68 set values associated with a PCD token.
78 Retrieves an 8-bit value for a given PCD token.
80 Retrieves the current byte-sized value for a PCD token number.
81 If the TokenNumber is invalid, the results are unpredictable.
83 @param[in] TokenNumber The PCD token number.
85 @return The UINT8 value.
95 Retrieves an 16-bit value for a given PCD token.
97 Retrieves the current 16-bits value for a PCD token number.
98 If the TokenNumber is invalid, the results are unpredictable.
100 @param[in] TokenNumber The PCD token number.
102 @return The UINT16 value.
112 Retrieves an 32-bit value for a given PCD token.
114 Retrieves the current 32-bits value for a PCD token number.
115 If the TokenNumber is invalid, the results are unpredictable.
117 @param[in] TokenNumber The PCD token number.
119 @return The UINT32 value.
129 Retrieves an 64-bit value for a given PCD token.
131 Retrieves the current 64-bits value for a PCD token number.
132 If the TokenNumber is invalid, the results are unpredictable.
134 @param[in] TokenNumber The PCD token number.
136 @return The UINT64 value.
146 Retrieves a pointer to a value for a given PCD token.
148 Retrieves the current pointer to the buffer for a PCD token number.
149 Do not make any assumptions about the alignment of the pointer that
150 is returned by this function call. If the TokenNumber is invalid,
151 the results are unpredictable.
153 @param[in] TokenNumber The PCD token number.
155 @return The pointer to the buffer to be retrived.
165 Retrieves a Boolean value for a given PCD token.
167 Retrieves the current boolean value for a PCD token number.
168 Do not make any assumptions about the alignment of the pointer that
169 is returned by this function call. If the TokenNumber is invalid,
170 the results are unpredictable.
172 @param[in] TokenNumber The PCD token number.
174 @return The Boolean value.
184 Retrieves the size of the value for a given PCD token.
186 Retrieves the current size of a particular PCD token.
187 If the TokenNumber is invalid, the results are unpredictable.
189 @param[in] TokenNumber The PCD token number.
191 @return The size of the value for the PCD token.
201 Retrieves an 8-bit value for a given PCD token.
203 Retrieves the 8-bit value of a particular PCD token.
204 If the TokenNumber is invalid or the token space
205 specified by Guid does not exist, the results are
208 @param[in] Guid The token space for the token number.
209 @param[in] TokenNumber The PCD token number.
211 @return The size 8-bit value for the PCD token.
217 IN CONST EFI_GUID
*Guid
,
222 Retrieves an 16-bit value for a given PCD token.
224 Retrieves the 16-bit value of a particular PCD token.
225 If the TokenNumber is invalid or the token space
226 specified by Guid does not exist, the results are
229 @param[in] Guid The token space for the token number.
230 @param[in] TokenNumber The PCD token number.
232 @return The size 16-bit value for the PCD token.
238 IN CONST EFI_GUID
*Guid
,
243 Retrieves an 32-bit value for a given PCD token.
245 Retrieves the 32-bit value of a particular PCD token.
246 If the TokenNumber is invalid or the token space
247 specified by Guid does not exist, the results are
250 @param[in] Guid The token space for the token number.
251 @param[in] TokenNumber The PCD token number.
253 @return The size 32-bit value for the PCD token.
259 IN CONST EFI_GUID
*Guid
,
264 Retrieves an 64-bit value for a given PCD token.
266 Retrieves the 64-bit value of a particular PCD token.
267 If the TokenNumber is invalid or the token space
268 specified by Guid does not exist, the results are
271 @param[in] Guid The token space for the token number.
272 @param[in] TokenNumber The PCD token number.
274 @return The size 64-bit value for the PCD token.
280 IN CONST EFI_GUID
*Guid
,
285 Retrieves a pointer to a value for a given PCD token.
287 Retrieves the current pointer to the buffer for a PCD token number.
288 Do not make any assumptions about the alignment of the pointer that
289 is returned by this function call. If the TokenNumber is invalid,
290 the results are unpredictable.
292 @param[in] Guid The token space for the token number.
293 @param[in] TokenNumber The PCD token number.
295 @return The pointer to the buffer to be retrived.
301 IN CONST EFI_GUID
*Guid
,
306 Retrieves an Boolean value for a given PCD token.
308 Retrieves the Boolean value of a particular PCD token.
309 If the TokenNumber is invalid or the token space
310 specified by Guid does not exist, the results are
313 @param[in] Guid The token space for the token number.
314 @param[in] TokenNumber The PCD token number.
316 @return The size Boolean value for the PCD token.
322 IN CONST EFI_GUID
*Guid
,
327 Retrieves the size of the value for a given PCD token.
329 Retrieves the current size of a particular PCD token.
330 If the TokenNumber is invalid, the results are unpredictable.
332 @param[in] Guid The token space for the token number.
333 @param[in] TokenNumber The PCD token number.
335 @return The size of the value for the PCD token.
341 IN CONST EFI_GUID
*Guid
,
346 Sets an 8-bit value for a given PCD token.
348 When the PCD service sets a value, it will check to ensure that the
349 size of the value being set is compatible with the Token's existing definition.
350 If it is not, an error will be returned.
352 @param[in] TokenNumber The PCD token number.
353 @param[in] Value The value to set for the PCD token.
355 @retval EFI_SUCCESS Procedure returned successfully.
356 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
357 being set was incompatible with a call to this function.
358 Use GetSize() to retrieve the size of the target data.
359 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
365 IN UINTN TokenNumber
,
370 Sets an 16-bit value for a given PCD token.
372 When the PCD service sets a value, it will check to ensure that the
373 size of the value being set is compatible with the Token's existing definition.
374 If it is not, an error will be returned.
376 @param[in] TokenNumber The PCD token number.
377 @param[in] Value The value to set for the PCD token.
379 @retval EFI_SUCCESS Procedure returned successfully.
380 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
381 being set was incompatible with a call to this function.
382 Use GetSize() to retrieve the size of the target data.
383 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
389 IN UINTN TokenNumber
,
394 Sets an 32-bit value for a given PCD token.
396 When the PCD service sets a value, it will check to ensure that the
397 size of the value being set is compatible with the Token's existing definition.
398 If it is not, an error will be returned.
400 @param[in] TokenNumber The PCD token number.
401 @param[in] Value The value to set for the PCD token.
403 @retval EFI_SUCCESS Procedure returned successfully.
404 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
405 being set was incompatible with a call to this function.
406 Use GetSize() to retrieve the size of the target data.
407 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
413 IN UINTN TokenNumber
,
418 Sets an 64-bit value for a given PCD token.
420 When the PCD service sets a value, it will check to ensure that the
421 size of the value being set is compatible with the Token's existing definition.
422 If it is not, an error will be returned.
424 @param[in] TokenNumber The PCD token number.
425 @param[in] Value The value to set for the PCD token.
427 @retval EFI_SUCCESS Procedure returned successfully.
428 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
429 being set was incompatible with a call to this function.
430 Use GetSize() to retrieve the size of the target data.
431 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
437 IN UINTN TokenNumber
,
442 Sets a value of a specified size for a given PCD token.
444 When the PCD service sets a value, it will check to ensure that the
445 size of the value being set is compatible with the Token's existing definition.
446 If it is not, an error will be returned.
448 @param[in] TokenNumber The PCD token number.
449 @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
450 On input, if the SizeOfValue is greater than the maximum size supported
451 for this TokenNumber then the output value of SizeOfValue will reflect
452 the maximum size supported for this TokenNumber.
453 @param[in] Buffer The buffer to set for the PCD token.
455 @retval EFI_SUCCESS Procedure returned successfully.
456 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
457 being set was incompatible with a call to this function.
458 Use GetSize() to retrieve the size of the target data.
459 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
465 IN UINTN TokenNumber
,
466 IN OUT UINTN
*SizeOfBuffer
,
471 Sets an Boolean value for a given PCD token.
473 When the PCD service sets a value, it will check to ensure that the
474 size of the value being set is compatible with the Token's existing definition.
475 If it is not, an error will be returned.
477 @param[in] TokenNumber The PCD token number.
478 @param[in] Value The value to set for the PCD token.
480 @retval EFI_SUCCESS Procedure returned successfully.
481 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
482 being set was incompatible with a call to this function.
483 Use GetSize() to retrieve the size of the target data.
484 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
490 IN UINTN TokenNumber
,
495 Sets an 8-bit value for a given PCD token.
497 When the PCD service sets a value, it will check to ensure that the
498 size of the value being set is compatible with the Token's existing definition.
499 If it is not, an error will be returned.
501 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
502 @param[in] TokenNumber The PCD token number.
503 @param[in] Value The value to set for the PCD token.
505 @retval EFI_SUCCESS Procedure returned successfully.
506 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
507 being set was incompatible with a call to this function.
508 Use GetSize() to retrieve the size of the target data.
509 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
515 IN CONST EFI_GUID
*Guid
,
516 IN UINTN TokenNumber
,
521 Sets an 16-bit value for a given PCD token.
523 When the PCD service sets a value, it will check to ensure that the
524 size of the value being set is compatible with the Token's existing definition.
525 If it is not, an error will be returned.
527 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
528 @param[in] TokenNumber The PCD token number.
529 @param[in] Value The value to set for the PCD token.
531 @retval EFI_SUCCESS Procedure returned successfully.
532 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
533 being set was incompatible with a call to this function.
534 Use GetSize() to retrieve the size of the target data.
535 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
541 IN CONST EFI_GUID
*Guid
,
542 IN UINTN TokenNumber
,
547 Sets an 32-bit value for a given PCD token.
549 When the PCD service sets a value, it will check to ensure that the
550 size of the value being set is compatible with the Token's existing definition.
551 If it is not, an error will be returned.
553 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
554 @param[in] TokenNumber The PCD token number.
555 @param[in] Value The value to set for the PCD token.
557 @retval EFI_SUCCESS Procedure returned successfully.
558 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
559 being set was incompatible with a call to this function.
560 Use GetSize() to retrieve the size of the target data.
561 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
567 IN CONST EFI_GUID
*Guid
,
568 IN UINTN TokenNumber
,
573 Sets an 64-bit value for a given PCD token.
575 When the PCD service sets a value, it will check to ensure that the
576 size of the value being set is compatible with the Token's existing definition.
577 If it is not, an error will be returned.
579 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
580 @param[in] TokenNumber The PCD token number.
581 @param[in] Value The value to set for the PCD token.
583 @retval EFI_SUCCESS Procedure returned successfully.
584 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
585 being set was incompatible with a call to this function.
586 Use GetSize() to retrieve the size of the target data.
587 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
593 IN CONST EFI_GUID
*Guid
,
594 IN UINTN TokenNumber
,
599 Sets a value of a specified size for a given PCD token.
601 When the PCD service sets a value, it will check to ensure that the
602 size of the value being set is compatible with the Token's existing definition.
603 If it is not, an error will be returned.
605 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
606 @param[in] TokenNumber The PCD token number.
607 @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
608 On input, if the SizeOfValue is greater than the maximum size supported
609 for this TokenNumber then the output value of SizeOfValue will reflect
610 the maximum size supported for this TokenNumber.
611 @param[in] Buffer The buffer to set for the PCD token.
613 @retval EFI_SUCCESS Procedure returned successfully.
614 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
615 being set was incompatible with a call to this function.
616 Use GetSize() to retrieve the size of the target data.
617 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
623 IN CONST EFI_GUID
*Guid
,
624 IN UINTN TokenNumber
,
625 IN OUT UINTN
*SizeOfBuffer
,
630 Sets an Boolean value for a given PCD token.
632 When the PCD service sets a value, it will check to ensure that the
633 size of the value being set is compatible with the Token's existing definition.
634 If it is not, an error will be returned.
636 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
637 @param[in] TokenNumber The PCD token number.
638 @param[in] Value The value to set for the PCD token.
640 @retval EFI_SUCCESS Procedure returned successfully.
641 @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
642 being set was incompatible with a call to this function.
643 Use GetSize() to retrieve the size of the target data.
644 @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
650 IN CONST EFI_GUID
*Guid
,
651 IN UINTN TokenNumber
,
656 Specifies a function to be called anytime the value of a designated token is changed.
658 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
659 @param[in] TokenNumber The PCD token number.
660 @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
662 @retval EFI_SUCCESS The PCD service has successfully established a call event
663 for the CallBackToken requested.
664 @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
669 PeiRegisterCallBackOnSet (
670 IN CONST EFI_GUID
*Guid
, OPTIONAL
671 IN UINTN TokenNumber
,
672 IN PCD_PPI_CALLBACK CallBackFunction
676 Cancels a previously set callback function for a particular PCD token number.
678 @param [in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
679 @param [in] TokenNumber The PCD token number.
680 @param [in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
682 @retval EFI_SUCCESS The PCD service has successfully established a call event
683 for the CallBackToken requested.
684 @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
689 PcdUnRegisterCallBackOnSet (
690 IN CONST EFI_GUID
*Guid
, OPTIONAL
691 IN UINTN TokenNumber
,
692 IN PCD_PPI_CALLBACK CallBackFunction
696 Retrieves the next valid PCD token for a given namespace.
698 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
699 @param[in, out] TokenNumber A pointer to the PCD token number to use to find the subsequent token number.
700 If the input token namespace or token number does not exist on the platform,
701 an error is returned and the value of *TokenNumber is undefined. To retrieve the "first" token,
702 have the pointer reference a TokenNumber value of 0. If the input token number is 0 and
703 there is no valid token number for this token namespace, *TokenNumber will be assigned to
704 0 and the function return EFI_SUCCESS. If the token number is the last valid token number,
705 *TokenNumber will be assigned to 0 and the function return EFI_SUCCESS.
707 @retval EFI_SUCCESS The PCD service retrieved the next valid token number. Or the input token number
708 is already the last valid token number in the PCD database.
709 In the later case, *TokenNumber is updated with the value of 0.
710 @retval EFI_NOT_FOUND If this input token number and token namespace does not exist on the platform.
716 IN CONST EFI_GUID
*Guid
, OPTIONAL
717 IN OUT UINTN
*TokenNumber
721 Retrieves the next valid PCD token namespace for a given namespace.
723 @param[in, out] Guid An indirect pointer to EFI_GUID. On input it designates
724 a known token namespace from which the search will start. On output,
725 it designates the next valid token namespace on the platform. If the input
726 token namespace does not exist on the platform, an error is returned and
727 the value of *Guid is undefined. If *Guid is NULL, then the GUID of the
728 first token space of the current platform is assigned to *Guid the function
729 return EFI_SUCCESS. If *Guid is NULL and there is no namespace exist in
730 the platform other than the default (NULL) tokennamespace, *Guid is unchanged
731 and the function return EFI_SUCCESS. If this input token namespace is the last
732 namespace on the platform, *Guid will be assigned to NULL and the function return
735 @retval EFI_SUCCESS The PCD service retrieved the next valid token space Guid.
736 Or the input token space Guid is already the last valid token space Guid
737 in the PCD database. In the later case, *Guid is updated with the value of NULL.
738 @retval EFI_NOT_FOUND If the input token namespace does not exist on the platform.
743 PeiPcdGetNextTokenSpace (
744 IN OUT CONST EFI_GUID
**Guid
748 /* Internal Function definitions */
750 Get PCD database from GUID HOB in PEI phase.
752 @return Pointer to PCD database.
761 Wrapper function for setting non-pointer type value for a PCD entry.
763 @param TokenNumber Pcd token number autogenerated by build tools.
764 @param Data Value want to be set for PCD entry
765 @param Size Size of value.
767 @return status of SetWorker.
772 IN UINTN TokenNumber
,
778 Set value for an PCD entry
780 @param TokenNumber Pcd token number autogenerated by build tools.
781 @param Data Value want to be set for PCD entry
782 @param Size Size of value.
783 @param PtrType If TRUE, the type of PCD entry's value is Pointer.
784 If False, the type of PCD entry's value is not Pointer.
786 @retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
787 @retval EFI_INVALID_PARAMETER If Size can not be set to size table.
788 @retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
789 range of UINT8, UINT16, UINT32, UINT64
790 @retval EFI_NOT_FOUND Can not find the PCD type according to token number.
794 IN UINTN TokenNumber
,
801 Wrapper function for set PCD value for non-Pointer type dynamic-ex PCD.
803 @param ExTokenNumber Token number for dynamic-ex PCD.
804 @param Guid Token space guid for dynamic-ex PCD.
805 @param Data Value want to be set.
806 @param SetSize The size of value.
808 @return status of ExSetWorker().
813 IN UINTN ExTokenNumber
,
814 IN CONST EFI_GUID
*Guid
,
820 Set value for a dynamic PCD entry.
822 This routine find the local token number according to dynamic-ex PCD's token
823 space guid and token number firstly, and invoke callback function if this PCD
824 entry registered callback function. Finally, invoken general SetWorker to set
827 @param ExTokenNumber Dynamic-ex PCD token number.
828 @param Guid Token space guid for dynamic-ex PCD.
829 @param Data PCD value want to be set
830 @param SetSize Size of value.
831 @param PtrType If TRUE, this PCD entry is pointer type.
832 If FALSE, this PCD entry is not pointer type.
834 @return status of SetWorker().
839 IN UINTN ExTokenNumber
,
840 IN CONST EFI_GUID
*Guid
,
847 Get the PCD entry pointer in PCD database.
849 This routine will visit PCD database to find the PCD entry according to given
850 token number. The given token number is autogened by build tools and it will be
851 translated to local token number. Local token number contains PCD's type and
852 offset of PCD entry in PCD database.
854 @param TokenNumber Token's number, it is autogened by build tools
855 @param GetSize The size of token's value
857 @return PCD entry pointer in PCD database
862 IN UINTN TokenNumber
,
867 Wrapper function for get PCD value for dynamic-ex PCD.
869 @param Guid Token space guid for dynamic-ex PCD.
870 @param ExTokenNumber Token number for dyanmic-ex PCD.
871 @param GetSize The size of dynamic-ex PCD value.
873 @return PCD entry in PCD database.
878 IN CONST EFI_GUID
*Guid
,
879 IN UINTN ExTokenNumber
,
886 UINT32 LocalTokenNumberAlias
;
887 } EX_PCD_ENTRY_ATTRIBUTE
;
890 Get local token number according to dynamic-ex PCD's {token space guid:token number}
892 A dynamic-ex type PCD, developer must provide pair of token space guid: token number
893 in DEC file. PCD database maintain a mapping table that translate pair of {token
894 space guid: token number} to local token number.
896 @param Guid Token space guid for dynamic-ex PCD entry.
897 @param ExTokenNumber EDES_TODO: Add parameter description
899 @return local token number for dynamic-ex PCD.
903 GetExPcdTokenNumber (
904 IN CONST EFI_GUID
*Guid
,
905 IN UINTN ExTokenNumber
909 The function registers the CallBackOnSet fucntion
910 according to TokenNumber and EFI_GUID space.
912 @param TokenNumber The token number.
913 @param Guid The GUID space.
914 @param CallBackFunction The Callback function to be registered.
915 @param Register To register or unregister the callback function.
917 @retval EFI_SUCCESS If the Callback function is registered.
918 @retval EFI_NOT_FOUND If the PCD Entry is not found according to Token Number and GUID space.
919 @retval EFI_OUT_OF_RESOURCES If the callback function can't be registered because there is not free
920 slot left in the CallbackFnTable.
923 PeiRegisterCallBackWorker (
924 IN UINTN TokenNumber
,
925 IN CONST EFI_GUID
*Guid
, OPTIONAL
926 IN PCD_PPI_CALLBACK CallBackFunction
,
931 The function builds the PCD database.
939 Get SKU ID tabble from PCD database.
941 @param LocalTokenNumberTableIdx Index of local token number in token number table.
942 @param Database PCD Database in PEI phase
944 @return Pointer to SKU ID array table
949 IN UINTN LocalTokenNumberTableIdx
,
950 IN PEI_PCD_DATABASE
*Database
954 Get index of PCD entry in size table.
956 @param LocalTokenNumberTableIdx Index of this PCD in local token number table.
957 @param Database Pointer to PCD database.
959 @return index of PCD entry in size table.
964 IN UINTN LocalTokenNumberTableIdx
,
965 IN PEI_PCD_DATABASE
*Database
969 Get PCD value's size for POINTER type PCD.
971 The POINTER type PCD's value will be stored into a buffer in specificed size.
972 The max size of this PCD's value is described in PCD's definition in DEC file.
974 @param LocalTokenNumberTableIdx Index of PCD token number in PCD token table
975 @param MaxSize Maxmium size of PCD's value
976 @param Database Pcd database in PEI phase.
978 @return PCD value's size for POINTER type PCD.
983 IN UINTN LocalTokenNumberTableIdx
,
985 IN PEI_PCD_DATABASE
*Database
989 Set PCD value's size for POINTER type PCD.
991 The POINTER type PCD's value will be stored into a buffer in specificed size.
992 The max size of this PCD's value is described in PCD's definition in DEC file.
994 @param LocalTokenNumberTableIdx Index of PCD token number in PCD token table
995 @param CurrentSize Maxmium size of PCD's value
996 @param Database Pcd database in PEI phase.
998 @retval TRUE Success to set PCD's value size, which is not exceed maxmium size
999 @retval FALSE Fail to set PCD's value size, which maybe exceed maxmium size
1004 IN UINTN LocalTokenNumberTableIdx
,
1005 IN OUT UINTN
*CurrentSize
,
1006 IN PEI_PCD_DATABASE
*Database
1010 // The init Database created by PCD Database generation tool
1012 extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit
;