1*f439973dSWarner Losh /** @file 2*f439973dSWarner Losh Platform Configuration Database (PCD) Protocol defined in PI 1.2 Vol3 3*f439973dSWarner Losh 4*f439973dSWarner Losh A platform database that contains a variety of current platform settings or 5*f439973dSWarner Losh directives that can be accessed by a driver or application. 6*f439973dSWarner Losh PI PCD protocol only provide the accessing interfaces for Dynamic-Ex type PCD. 7*f439973dSWarner Losh 8*f439973dSWarner Losh Callers to this protocol must be at a TPL_APPLICATION task priority level. 9*f439973dSWarner Losh This is the base PCD service API that provides an abstraction for accessing configuration content in 10*f439973dSWarner Losh the platform. It a seamless mechanism for extracting information regardless of where the 11*f439973dSWarner Losh information is stored (such as in Read-only data, or an EFI Variable). 12*f439973dSWarner Losh This protocol allows access to data through size-granular APIs and provides a mechanism for a 13*f439973dSWarner Losh firmware component to monitor specific settings and be alerted when a setting is changed. 14*f439973dSWarner Losh 15*f439973dSWarner Losh Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR> 16*f439973dSWarner Losh SPDX-License-Identifier: BSD-2-Clause-Patent 17*f439973dSWarner Losh 18*f439973dSWarner Losh @par Revision Reference: 19*f439973dSWarner Losh PI Version 1.2 Vol 3. 20*f439973dSWarner Losh **/ 21*f439973dSWarner Losh 22*f439973dSWarner Losh #ifndef __PI_PCD_H__ 23*f439973dSWarner Losh #define __PI_PCD_H__ 24*f439973dSWarner Losh 25*f439973dSWarner Losh extern EFI_GUID gEfiPcdProtocolGuid; 26*f439973dSWarner Losh 27*f439973dSWarner Losh #define EFI_PCD_PROTOCOL_GUID \ 28*f439973dSWarner Losh { 0x13a3f0f6, 0x264a, 0x3ef0, { 0xf2, 0xe0, 0xde, 0xc5, 0x12, 0x34, 0x2f, 0x34 } } 29*f439973dSWarner Losh 30*f439973dSWarner Losh #define EFI_PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) 31*f439973dSWarner Losh 32*f439973dSWarner Losh /** 33*f439973dSWarner Losh SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. SetSku() is 34*f439973dSWarner Losh normally called only once by the system. 35*f439973dSWarner Losh For each item (token), the database can hold a single value that applies to all SKUs, or multiple 36*f439973dSWarner Losh values, where each value is associated with a specific SKU Id. Items with multiple, SKU-specific 37*f439973dSWarner Losh values are called SKU enabled. 38*f439973dSWarner Losh The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255. For tokens that are 39*f439973dSWarner Losh not SKU enabled, the system ignores any set SKU Id and works with the single value for that token. 40*f439973dSWarner Losh For SKU-enabled tokens, the system will use the SKU Id set by the last call to SetSku(). If no SKU 41*f439973dSWarner Losh Id is set or the currently set SKU Id isn't valid for the specified token, the system uses the default 42*f439973dSWarner Losh SKU Id. If the system attempts to use the default SKU Id and no value has been set for that Id, the 43*f439973dSWarner Losh results are unpredictable. 44*f439973dSWarner Losh 45*f439973dSWarner Losh @param[in] SkuId The SKU value to set. 46*f439973dSWarner Losh **/ 47*f439973dSWarner Losh typedef 48*f439973dSWarner Losh VOID 49*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_SET_SKU)( 50*f439973dSWarner Losh IN UINTN SkuId 51*f439973dSWarner Losh ); 52*f439973dSWarner Losh 53*f439973dSWarner Losh /** 54*f439973dSWarner Losh Retrieves an 8-bit value for a given PCD token. 55*f439973dSWarner Losh If the TokenNumber is invalid, the results are unpredictable. 56*f439973dSWarner Losh 57*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 58*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 59*f439973dSWarner Losh 60*f439973dSWarner Losh @return 8-bit value for a given PCD token. 61*f439973dSWarner Losh **/ 62*f439973dSWarner Losh typedef 63*f439973dSWarner Losh UINT8 64*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_8)( 65*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 66*f439973dSWarner Losh IN UINTN TokenNumber 67*f439973dSWarner Losh ); 68*f439973dSWarner Losh 69*f439973dSWarner Losh /** 70*f439973dSWarner Losh Retrieves the current word-sized value for a PCD token number. 71*f439973dSWarner Losh If the TokenNumber is invalid, the results are unpredictable. 72*f439973dSWarner Losh 73*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 74*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 75*f439973dSWarner Losh 76*f439973dSWarner Losh @return word-sized value for a given PCD token. 77*f439973dSWarner Losh **/ 78*f439973dSWarner Losh typedef 79*f439973dSWarner Losh UINT16 80*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_16)( 81*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 82*f439973dSWarner Losh IN UINTN TokenNumber 83*f439973dSWarner Losh ); 84*f439973dSWarner Losh 85*f439973dSWarner Losh /** 86*f439973dSWarner Losh Retrieves the current 32-bit sized value for a PCD token number. 87*f439973dSWarner Losh If the TokenNumber is invalid, the results are unpredictable. 88*f439973dSWarner Losh 89*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 90*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 91*f439973dSWarner Losh 92*f439973dSWarner Losh @return 32-bit value for a given PCD token. 93*f439973dSWarner Losh **/ 94*f439973dSWarner Losh typedef 95*f439973dSWarner Losh UINT32 96*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_32)( 97*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 98*f439973dSWarner Losh IN UINTN TokenNumber 99*f439973dSWarner Losh ); 100*f439973dSWarner Losh 101*f439973dSWarner Losh /** 102*f439973dSWarner Losh Retrieves the 64-bit sized value for a PCD token number. 103*f439973dSWarner Losh If the TokenNumber is invalid, the results are unpredictable. 104*f439973dSWarner Losh 105*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 106*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 107*f439973dSWarner Losh 108*f439973dSWarner Losh @return 64-bit value for a given PCD token. 109*f439973dSWarner Losh 110*f439973dSWarner Losh **/ 111*f439973dSWarner Losh typedef 112*f439973dSWarner Losh UINT64 113*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_64)( 114*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 115*f439973dSWarner Losh IN UINTN TokenNumber 116*f439973dSWarner Losh ); 117*f439973dSWarner Losh 118*f439973dSWarner Losh /** 119*f439973dSWarner Losh Retrieves the current pointer to the value for a PCD token number. Do not make any assumptions 120*f439973dSWarner Losh about the alignment of the pointer that is returned by this function call. If the TokenNumber is 121*f439973dSWarner Losh invalid, the results are unpredictable. 122*f439973dSWarner Losh 123*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 124*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 125*f439973dSWarner Losh 126*f439973dSWarner Losh @return pointer to a value for a given PCD token. 127*f439973dSWarner Losh **/ 128*f439973dSWarner Losh typedef 129*f439973dSWarner Losh VOID * 130*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_POINTER)( 131*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 132*f439973dSWarner Losh IN UINTN TokenNumber 133*f439973dSWarner Losh ); 134*f439973dSWarner Losh 135*f439973dSWarner Losh /** 136*f439973dSWarner Losh Retrieves the current BOOLEAN-sized value for a PCD token number. If the TokenNumber is 137*f439973dSWarner Losh invalid, the results are unpredictable. 138*f439973dSWarner Losh 139*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 140*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 141*f439973dSWarner Losh 142*f439973dSWarner Losh @return Boolean value for a given PCD token. 143*f439973dSWarner Losh **/ 144*f439973dSWarner Losh typedef 145*f439973dSWarner Losh BOOLEAN 146*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_BOOLEAN)( 147*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 148*f439973dSWarner Losh IN UINTN TokenNumber 149*f439973dSWarner Losh ); 150*f439973dSWarner Losh 151*f439973dSWarner Losh /** 152*f439973dSWarner Losh Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are 153*f439973dSWarner Losh unpredictable. 154*f439973dSWarner Losh 155*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 156*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 157*f439973dSWarner Losh 158*f439973dSWarner Losh @return the size of the value for a given PCD token. 159*f439973dSWarner Losh **/ 160*f439973dSWarner Losh typedef 161*f439973dSWarner Losh UINTN 162*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_SIZE)( 163*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 164*f439973dSWarner Losh IN UINTN TokenNumber 165*f439973dSWarner Losh ); 166*f439973dSWarner Losh 167*f439973dSWarner Losh /** 168*f439973dSWarner Losh Sets an 8-bit value for a given PCD token. 169*f439973dSWarner Losh 170*f439973dSWarner Losh When the PCD service sets a value, it will check to ensure that the size of the value being set is 171*f439973dSWarner Losh compatible with the Token's existing definition. If it is not, an error will be returned. 172*f439973dSWarner Losh 173*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 174*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 175*f439973dSWarner Losh @param[in] Value The value to set for the PCD token. 176*f439973dSWarner Losh 177*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has set the value requested 178*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was 179*f439973dSWarner Losh incompatible with a call to this function. Use GetSizeEx() to 180*f439973dSWarner Losh retrieve the size of the target data. 181*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the requested token number. 182*f439973dSWarner Losh **/ 183*f439973dSWarner Losh typedef 184*f439973dSWarner Losh EFI_STATUS 185*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_SET_8)( 186*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 187*f439973dSWarner Losh IN UINTN TokenNumber, 188*f439973dSWarner Losh IN UINT8 Value 189*f439973dSWarner Losh ); 190*f439973dSWarner Losh 191*f439973dSWarner Losh /** 192*f439973dSWarner Losh Sets an 16-bit value for a given PCD token. 193*f439973dSWarner Losh 194*f439973dSWarner Losh When the PCD service sets a value, it will check to ensure that the size of the value being set is 195*f439973dSWarner Losh compatible with the Token's existing definition. If it is not, an error will be returned. 196*f439973dSWarner Losh 197*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 198*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 199*f439973dSWarner Losh @param[in] Value The value to set for the PCD token. 200*f439973dSWarner Losh 201*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has set the value requested 202*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was 203*f439973dSWarner Losh incompatible with a call to this function. Use GetSizeEx() to 204*f439973dSWarner Losh retrieve the size of the target data. 205*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the requested token number. 206*f439973dSWarner Losh **/ 207*f439973dSWarner Losh typedef 208*f439973dSWarner Losh EFI_STATUS 209*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_SET_16)( 210*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 211*f439973dSWarner Losh IN UINTN TokenNumber, 212*f439973dSWarner Losh IN UINT16 Value 213*f439973dSWarner Losh ); 214*f439973dSWarner Losh 215*f439973dSWarner Losh /** 216*f439973dSWarner Losh Sets an 32-bit value for a given PCD token. 217*f439973dSWarner Losh 218*f439973dSWarner Losh When the PCD service sets a value, it will check to ensure that the size of the value being set is 219*f439973dSWarner Losh compatible with the Token's existing definition. If it is not, an error will be returned. 220*f439973dSWarner Losh 221*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 222*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 223*f439973dSWarner Losh @param[in] Value The value to set for the PCD token. 224*f439973dSWarner Losh 225*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has set the value requested 226*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was 227*f439973dSWarner Losh incompatible with a call to this function. Use GetSizeEx() to 228*f439973dSWarner Losh retrieve the size of the target data. 229*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the requested token number. 230*f439973dSWarner Losh **/ 231*f439973dSWarner Losh typedef 232*f439973dSWarner Losh EFI_STATUS 233*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_SET_32)( 234*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 235*f439973dSWarner Losh IN UINTN TokenNumber, 236*f439973dSWarner Losh IN UINT32 Value 237*f439973dSWarner Losh ); 238*f439973dSWarner Losh 239*f439973dSWarner Losh /** 240*f439973dSWarner Losh Sets an 64-bit value for a given PCD token. 241*f439973dSWarner Losh 242*f439973dSWarner Losh When the PCD service sets a value, it will check to ensure that the size of the value being set is 243*f439973dSWarner Losh compatible with the Token's existing definition. If it is not, an error will be returned. 244*f439973dSWarner Losh 245*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 246*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 247*f439973dSWarner Losh @param[in] Value The value to set for the PCD token. 248*f439973dSWarner Losh 249*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has set the value requested 250*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was 251*f439973dSWarner Losh incompatible with a call to this function. Use GetSizeEx() to 252*f439973dSWarner Losh retrieve the size of the target data. 253*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the requested token number. 254*f439973dSWarner Losh **/ 255*f439973dSWarner Losh typedef 256*f439973dSWarner Losh EFI_STATUS 257*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_SET_64)( 258*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 259*f439973dSWarner Losh IN UINTN TokenNumber, 260*f439973dSWarner Losh IN UINT64 Value 261*f439973dSWarner Losh ); 262*f439973dSWarner Losh 263*f439973dSWarner Losh /** 264*f439973dSWarner Losh Sets a value of a specified size for a given PCD token. 265*f439973dSWarner Losh 266*f439973dSWarner Losh When the PCD service sets a value, it will check to ensure that the size of the value being set is 267*f439973dSWarner Losh compatible with the Token's existing definition. If it is not, an error will be returned. 268*f439973dSWarner Losh 269*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 270*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 271*f439973dSWarner Losh @param[in] SizeOfValue The length of the value being set for the PCD token. If too large of a length is 272*f439973dSWarner Losh specified, upon return from this function the value of SizeOfValue will 273*f439973dSWarner Losh reflect the maximum size for the PCD token. 274*f439973dSWarner Losh @param[in] Buffer A pointer to the buffer containing the value to set for the PCD token. 275*f439973dSWarner Losh 276*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has set the value requested 277*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was 278*f439973dSWarner Losh incompatible with a call to this function. Use GetSizeEx() to 279*f439973dSWarner Losh retrieve the size of the target data. 280*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the requested token number. 281*f439973dSWarner Losh **/ 282*f439973dSWarner Losh typedef 283*f439973dSWarner Losh EFI_STATUS 284*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_SET_POINTER)( 285*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 286*f439973dSWarner Losh IN UINTN TokenNumber, 287*f439973dSWarner Losh IN OUT UINTN *SizeOfValue, 288*f439973dSWarner Losh IN VOID *Buffer 289*f439973dSWarner Losh ); 290*f439973dSWarner Losh 291*f439973dSWarner Losh /** 292*f439973dSWarner Losh Sets a Boolean value for a given PCD token. 293*f439973dSWarner Losh 294*f439973dSWarner Losh When the PCD service sets a value, it will check to ensure that the size of the value being set is 295*f439973dSWarner Losh compatible with the Token's existing definition. If it is not, an error will be returned. 296*f439973dSWarner Losh 297*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 298*f439973dSWarner Losh @param[in] TokenNumber The PCD token number. 299*f439973dSWarner Losh @param[in] Value The value to set for the PCD token. 300*f439973dSWarner Losh 301*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has set the value requested 302*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was 303*f439973dSWarner Losh incompatible with a call to this function. Use GetSizeEx() to 304*f439973dSWarner Losh retrieve the size of the target data. 305*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the requested token number. 306*f439973dSWarner Losh **/ 307*f439973dSWarner Losh typedef 308*f439973dSWarner Losh EFI_STATUS 309*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_SET_BOOLEAN)( 310*f439973dSWarner Losh IN CONST EFI_GUID *Guid, 311*f439973dSWarner Losh IN UINTN TokenNumber, 312*f439973dSWarner Losh IN BOOLEAN Value 313*f439973dSWarner Losh ); 314*f439973dSWarner Losh 315*f439973dSWarner Losh typedef 316*f439973dSWarner Losh VOID 317*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_CALLBACK)( 318*f439973dSWarner Losh IN EFI_GUID *Guid OPTIONAL, 319*f439973dSWarner Losh IN UINTN CallBackToken, 320*f439973dSWarner Losh IN OUT VOID *TokenData, 321*f439973dSWarner Losh IN UINTN TokenDataSize 322*f439973dSWarner Losh ); 323*f439973dSWarner Losh 324*f439973dSWarner Losh /** 325*f439973dSWarner Losh Specifies a function to be called anytime the value of a designated token is changed. 326*f439973dSWarner Losh 327*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 328*f439973dSWarner Losh @param[in] CallBackToken The PCD token number to monitor. 329*f439973dSWarner Losh @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. 330*f439973dSWarner Losh 331*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. 332*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. 333*f439973dSWarner Losh **/ 334*f439973dSWarner Losh typedef 335*f439973dSWarner Losh EFI_STATUS 336*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_CALLBACK_ON_SET)( 337*f439973dSWarner Losh IN CONST EFI_GUID *Guid OPTIONAL, 338*f439973dSWarner Losh IN UINTN CallBackToken, 339*f439973dSWarner Losh IN EFI_PCD_PROTOCOL_CALLBACK CallBackFunction 340*f439973dSWarner Losh ); 341*f439973dSWarner Losh 342*f439973dSWarner Losh /** 343*f439973dSWarner Losh Cancels a callback function that was set through a previous call to the CallBackOnSet function. 344*f439973dSWarner Losh 345*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 346*f439973dSWarner Losh @param[in] CallBackToken The PCD token number to monitor. 347*f439973dSWarner Losh @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. 348*f439973dSWarner Losh 349*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. 350*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. 351*f439973dSWarner Losh **/ 352*f439973dSWarner Losh typedef 353*f439973dSWarner Losh EFI_STATUS 354*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_CANCEL_CALLBACK)( 355*f439973dSWarner Losh IN CONST EFI_GUID *Guid OPTIONAL, 356*f439973dSWarner Losh IN UINTN CallBackToken, 357*f439973dSWarner Losh IN EFI_PCD_PROTOCOL_CALLBACK CallBackFunction 358*f439973dSWarner Losh ); 359*f439973dSWarner Losh 360*f439973dSWarner Losh /** 361*f439973dSWarner Losh Gets the next valid token number in a given namespace. This is useful since the PCD infrastructure 362*f439973dSWarner Losh contains a sparse list of token numbers, and one cannot a priori know what token numbers are valid 363*f439973dSWarner Losh in the database. 364*f439973dSWarner Losh 365*f439973dSWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token. 366*f439973dSWarner Losh @param[in] TokenNumber A pointer to the PCD token number to use to find the subsequent token number. To 367*f439973dSWarner Losh retrieve the "first" token, have the pointer reference a TokenNumber value of 0. 368*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service has retrieved the value requested 369*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find data from the requested token number. 370*f439973dSWarner Losh **/ 371*f439973dSWarner Losh typedef 372*f439973dSWarner Losh EFI_STATUS 373*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_NEXT_TOKEN)( 374*f439973dSWarner Losh IN CONST EFI_GUID *Guid OPTIONAL, 375*f439973dSWarner Losh IN UINTN *TokenNumber 376*f439973dSWarner Losh ); 377*f439973dSWarner Losh 378*f439973dSWarner Losh /** 379*f439973dSWarner Losh Gets the next valid token namespace for a given namespace. This is useful to traverse the valid 380*f439973dSWarner Losh token namespaces on a platform. 381*f439973dSWarner Losh 382*f439973dSWarner Losh @param[in, out] Guid An indirect pointer to EFI_GUID. On input it designates a known token namespace 383*f439973dSWarner Losh from which the search will start. On output, it designates the next valid token 384*f439973dSWarner Losh namespace on the platform. If *Guid is NULL, then the GUID of the first token 385*f439973dSWarner Losh space of the current platform is returned. If the search cannot locate the next valid 386*f439973dSWarner Losh token namespace, an error is returned and the value of *Guid is undefined. 387*f439973dSWarner Losh 388*f439973dSWarner Losh @retval EFI_SUCCESS The PCD service retrieved the value requested. 389*f439973dSWarner Losh @retval EFI_NOT_FOUND The PCD service could not find the next valid token namespace. 390*f439973dSWarner Losh **/ 391*f439973dSWarner Losh typedef 392*f439973dSWarner Losh EFI_STATUS 393*f439973dSWarner Losh (EFIAPI *EFI_PCD_PROTOCOL_GET_NEXT_TOKEN_SPACE)( 394*f439973dSWarner Losh IN OUT CONST EFI_GUID **Guid 395*f439973dSWarner Losh ); 396*f439973dSWarner Losh 397*f439973dSWarner Losh typedef struct _EFI_PCD_PROTOCOL { 398*f439973dSWarner Losh EFI_PCD_PROTOCOL_SET_SKU SetSku; 399*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_8 Get8; 400*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_16 Get16; 401*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_32 Get32; 402*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_64 Get64; 403*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_POINTER GetPtr; 404*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_BOOLEAN GetBool; 405*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_SIZE GetSize; 406*f439973dSWarner Losh EFI_PCD_PROTOCOL_SET_8 Set8; 407*f439973dSWarner Losh EFI_PCD_PROTOCOL_SET_16 Set16; 408*f439973dSWarner Losh EFI_PCD_PROTOCOL_SET_32 Set32; 409*f439973dSWarner Losh EFI_PCD_PROTOCOL_SET_64 Set64; 410*f439973dSWarner Losh EFI_PCD_PROTOCOL_SET_POINTER SetPtr; 411*f439973dSWarner Losh EFI_PCD_PROTOCOL_SET_BOOLEAN SetBool; 412*f439973dSWarner Losh EFI_PCD_PROTOCOL_CALLBACK_ON_SET CallbackOnSet; 413*f439973dSWarner Losh EFI_PCD_PROTOCOL_CANCEL_CALLBACK CancelCallback; 414*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_NEXT_TOKEN GetNextToken; 415*f439973dSWarner Losh EFI_PCD_PROTOCOL_GET_NEXT_TOKEN_SPACE GetNextTokenSpace; 416*f439973dSWarner Losh } EFI_PCD_PROTOCOL; 417*f439973dSWarner Losh 418*f439973dSWarner Losh #endif 419