• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   Platform Configuration Database (PCD) Info Protocol defined in PI 1.2.1 Vol3.
3 
4   The protocol that provides additional information about items that reside in the PCD database.
5 
6   Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
7   This program and the accompanying materials
8   are licensed and made available under the terms and conditions of the BSD License
9   which accompanies this distribution.  The full text of the license may be found at
10   http://opensource.org/licenses/bsd-license.php
11 
12   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 
15   @par Revision Reference:
16   PI Version 1.2.1 Vol 3.
17 **/
18 
19 #ifndef __PI_PCD_INFO_H__
20 #define __PI_PCD_INFO_H__
21 
22 extern EFI_GUID gEfiGetPcdInfoProtocolGuid;
23 
24 #define EFI_GET_PCD_INFO_PROTOCOL_GUID \
25   { 0xfd0f4478,  0xefd, 0x461d, { 0xba, 0x2d, 0xe5, 0x8c, 0x45, 0xfd, 0x5f, 0x5e } }
26 
27 ///
28 /// The forward declaration for EFI_GET_PCD_INFO_PROTOCOL.
29 ///
30 typedef struct _EFI_GET_PCD_INFO_PROTOCOL  EFI_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]    Guid        The 128-bit unique value that designates the namespace from which to extract the value.
39   @param[in]    TokenNumber The PCD token number.
40   @param[out]   PcdInfo     The returned information associated with the requested TokenNumber.
41 
42   @retval  EFI_SUCCESS      The PCD information was returned successfully
43   @retval  EFI_NOT_FOUND    The PCD service could not find the requested token number.
44 **/
45 typedef
46 EFI_STATUS
47 (EFIAPI *EFI_GET_PCD_INFO_PROTOCOL_GET_INFO) (
48   IN CONST  EFI_GUID        *Guid,
49   IN        UINTN           TokenNumber,
50   OUT       EFI_PCD_INFO    *PcdInfo
51 );
52 
53 /**
54   Retrieve the currently set SKU Id.
55 
56   @return   The currently set SKU Id. If the platform has not set at a SKU Id, then the
57             default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
58             Id is returned.
59 **/
60 typedef
61 UINTN
62 (EFIAPI *EFI_GET_PCD_INFO_PROTOCOL_GET_SKU) (
63   VOID
64 );
65 
66 ///
67 /// Callers to this protocol must be at a TPL_APPLICATION task priority level.
68 /// This is the PCD service to use when querying for some additional data that can be contained in the
69 /// PCD database.
70 ///
71 struct _EFI_GET_PCD_INFO_PROTOCOL {
72   ///
73   /// Retrieve additional information associated with a PCD.
74   ///
75   EFI_GET_PCD_INFO_PROTOCOL_GET_INFO    GetInfo;
76   ///
77   /// Retrieve the currently set SKU Id.
78   ///
79   EFI_GET_PCD_INFO_PROTOCOL_GET_SKU     GetSku;
80 };
81 
82 #endif
83 
84