Ronak Kanabar | 1ae366f | 2023-06-07 01:21:56 +0530 | [diff] [blame^] | 1 | /** @file |
| 2 | Native Platform Configuration Database (PCD) INFO PROTOCOL. |
| 3 | |
| 4 | The protocol that provides additional information about items that reside in the PCD database. |
| 5 | |
| 6 | Different with the EFI_GET_PCD_INFO_PROTOCOL defined in PI 1.2.1 specification, |
| 7 | the native PCD INFO PROTOCOL provide interfaces for dynamic and dynamic-ex type PCD. |
| 8 | The interfaces for dynamic type PCD do not require the token space guid as parameter, |
| 9 | but interfaces for dynamic-ex type PCD require token space guid as parameter. |
| 10 | |
| 11 | Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR> |
| 12 | SPDX-License-Identifier: BSD-2-Clause-Patent |
| 13 | |
| 14 | @par Revision Reference: |
| 15 | This Protocol was introduced in PI Specification 1.2. |
| 16 | |
| 17 | **/ |
| 18 | |
| 19 | #ifndef __PCD_INFO_H__ |
| 20 | #define __PCD_INFO_H__ |
| 21 | |
| 22 | extern EFI_GUID gGetPcdInfoProtocolGuid; |
| 23 | |
| 24 | #define GET_PCD_INFO_PROTOCOL_GUID \ |
| 25 | { 0x5be40f57, 0xfa68, 0x4610, { 0xbb, 0xbf, 0xe9, 0xc5, 0xfc, 0xda, 0xd3, 0x65 } } |
| 26 | |
| 27 | /// |
| 28 | /// The forward declaration for GET_PCD_INFO_PROTOCOL. |
| 29 | /// |
| 30 | typedef struct _GET_PCD_INFO_PROTOCOL GET_PCD_INFO_PROTOCOL; |
| 31 | |
| 32 | /** |
| 33 | Retrieve additional information associated with a PCD token. |
| 34 | |
| 35 | This includes information such as the type of value the TokenNumber is associated with as well as possible |
| 36 | human readable name that is associated with the token. |
| 37 | |
| 38 | @param[in] TokenNumber The PCD token number. |
| 39 | @param[out] PcdInfo The returned information associated with the requested TokenNumber. |
| 40 | |
| 41 | @retval EFI_SUCCESS The PCD information was returned successfully |
| 42 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number. |
| 43 | **/ |
| 44 | typedef |
| 45 | EFI_STATUS |
| 46 | (EFIAPI *GET_PCD_INFO_PROTOCOL_GET_INFO)( |
| 47 | IN UINTN TokenNumber, |
| 48 | OUT EFI_PCD_INFO *PcdInfo |
| 49 | ); |
| 50 | |
| 51 | /** |
| 52 | Retrieve additional information associated with a PCD token. |
| 53 | |
| 54 | This includes information such as the type of value the TokenNumber is associated with as well as possible |
| 55 | human readable name that is associated with the token. |
| 56 | |
| 57 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. |
| 58 | @param[in] TokenNumber The PCD token number. |
| 59 | @param[out] PcdInfo The returned information associated with the requested TokenNumber. |
| 60 | |
| 61 | @retval EFI_SUCCESS The PCD information was returned successfully |
| 62 | @retval EFI_NOT_FOUND The PCD service could not find the requested token number. |
| 63 | **/ |
| 64 | typedef |
| 65 | EFI_STATUS |
| 66 | (EFIAPI *GET_PCD_INFO_PROTOCOL_GET_INFO_EX)( |
| 67 | IN CONST EFI_GUID *Guid, |
| 68 | IN UINTN TokenNumber, |
| 69 | OUT EFI_PCD_INFO *PcdInfo |
| 70 | ); |
| 71 | |
| 72 | /** |
| 73 | Retrieve the currently set SKU Id. |
| 74 | |
| 75 | @return The currently set SKU Id. If the platform has not set at a SKU Id, then the |
| 76 | default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU |
| 77 | Id is returned. |
| 78 | **/ |
| 79 | typedef |
| 80 | UINTN |
| 81 | (EFIAPI *GET_PCD_INFO_PROTOCOL_GET_SKU)( |
| 82 | VOID |
| 83 | ); |
| 84 | |
| 85 | /// |
| 86 | /// This is the PCD service to use when querying for some additional data that can be contained in the |
| 87 | /// PCD database. |
| 88 | /// |
| 89 | struct _GET_PCD_INFO_PROTOCOL { |
| 90 | /// |
| 91 | /// Retrieve additional information associated with a PCD. |
| 92 | /// |
| 93 | GET_PCD_INFO_PROTOCOL_GET_INFO GetInfo; |
| 94 | GET_PCD_INFO_PROTOCOL_GET_INFO_EX GetInfoEx; |
| 95 | /// |
| 96 | /// Retrieve the currently set SKU Id. |
| 97 | /// |
| 98 | GET_PCD_INFO_PROTOCOL_GET_SKU GetSku; |
| 99 | }; |
| 100 | |
| 101 | #endif |