xref: /freebsd/sys/contrib/edk2/Include/Protocol/Pcd.h (revision f439973d6726c3be929c8fb3b1545b8b1744abc3)
1*f439973dSWarner Losh /** @file
2*f439973dSWarner Losh   Native Platform Configuration Database (PCD) Protocol
3*f439973dSWarner Losh 
4*f439973dSWarner Losh   Different with the EFI_PCD_PROTOCOL defined in PI 1.2 specification, the native
5*f439973dSWarner Losh   PCD protocol provide interfaces for dynamic and dynamic-ex type PCD.
6*f439973dSWarner Losh   The interfaces in dynamic type PCD do not require the token space guid as parameter,
7*f439973dSWarner Losh   but interfaces in dynamic-ex type PCD require token space guid as parameter.
8*f439973dSWarner Losh 
9*f439973dSWarner Losh Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
10*f439973dSWarner Losh SPDX-License-Identifier: BSD-2-Clause-Patent
11*f439973dSWarner Losh 
12*f439973dSWarner Losh   @par Revision Reference:
13*f439973dSWarner Losh   This Protocol was introduced in PI Specification 1.2.
14*f439973dSWarner Losh 
15*f439973dSWarner Losh **/
16*f439973dSWarner Losh 
17*f439973dSWarner Losh #ifndef __PCD_H__
18*f439973dSWarner Losh #define __PCD_H__
19*f439973dSWarner Losh 
20*f439973dSWarner Losh extern EFI_GUID  gPcdProtocolGuid;
21*f439973dSWarner Losh 
22*f439973dSWarner Losh #define PCD_PROTOCOL_GUID \
23*f439973dSWarner Losh   { 0x11b34006, 0xd85b, 0x4d0a, { 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0xe, 0xf7 } }
24*f439973dSWarner Losh 
25*f439973dSWarner Losh #define PCD_INVALID_TOKEN_NUMBER  ((UINTN) 0)
26*f439973dSWarner Losh 
27*f439973dSWarner Losh /**
28*f439973dSWarner Losh   Sets the SKU value for subsequent calls to set or get PCD token values.
29*f439973dSWarner Losh 
30*f439973dSWarner Losh   SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
31*f439973dSWarner Losh   SetSku() is normally called only once by the system.
32*f439973dSWarner Losh 
33*f439973dSWarner Losh   For each item (token), the database can hold a single value that applies to all SKUs,
34*f439973dSWarner Losh   or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
35*f439973dSWarner Losh   SKU-specific values are called SKU enabled.
36*f439973dSWarner Losh 
37*f439973dSWarner Losh   The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255.
38*f439973dSWarner Losh   For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
39*f439973dSWarner Losh   single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
40*f439973dSWarner Losh   last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token,
41*f439973dSWarner Losh   the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been
42*f439973dSWarner Losh   set for that Id, the results are unpredictable.
43*f439973dSWarner Losh 
44*f439973dSWarner Losh   @param[in]  SkuId The SKU value that will be used when the PCD service will retrieve and
45*f439973dSWarner Losh                     set values associated with a PCD token.
46*f439973dSWarner Losh 
47*f439973dSWarner Losh 
48*f439973dSWarner Losh **/
49*f439973dSWarner Losh typedef
50*f439973dSWarner Losh VOID
51*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_SKU)(
52*f439973dSWarner Losh   IN  UINTN                  SkuId
53*f439973dSWarner Losh   );
54*f439973dSWarner Losh 
55*f439973dSWarner Losh /**
56*f439973dSWarner Losh   Retrieves an 8-bit value for a given PCD token.
57*f439973dSWarner Losh 
58*f439973dSWarner Losh   Retrieves the current byte-sized value for a PCD token number.
59*f439973dSWarner Losh   If the TokenNumber is invalid, the results are unpredictable.
60*f439973dSWarner Losh 
61*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
62*f439973dSWarner Losh 
63*f439973dSWarner Losh   @return The UINT8 value.
64*f439973dSWarner Losh 
65*f439973dSWarner Losh **/
66*f439973dSWarner Losh typedef
67*f439973dSWarner Losh UINT8
68*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET8)(
69*f439973dSWarner Losh   IN UINTN             TokenNumber
70*f439973dSWarner Losh   );
71*f439973dSWarner Losh 
72*f439973dSWarner Losh /**
73*f439973dSWarner Losh   Retrieves a 16-bit value for a given PCD token.
74*f439973dSWarner Losh 
75*f439973dSWarner Losh   Retrieves the current 16-bit value for a PCD token number.
76*f439973dSWarner Losh   If the TokenNumber is invalid, the results are unpredictable.
77*f439973dSWarner Losh 
78*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
79*f439973dSWarner Losh 
80*f439973dSWarner Losh   @return The UINT16 value.
81*f439973dSWarner Losh 
82*f439973dSWarner Losh **/
83*f439973dSWarner Losh typedef
84*f439973dSWarner Losh UINT16
85*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET16)(
86*f439973dSWarner Losh   IN UINTN             TokenNumber
87*f439973dSWarner Losh   );
88*f439973dSWarner Losh 
89*f439973dSWarner Losh /**
90*f439973dSWarner Losh   Retrieves a 32-bit value for a given PCD token.
91*f439973dSWarner Losh 
92*f439973dSWarner Losh   Retrieves the current 32-bit value for a PCD token number.
93*f439973dSWarner Losh   If the TokenNumber is invalid, the results are unpredictable.
94*f439973dSWarner Losh 
95*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
96*f439973dSWarner Losh 
97*f439973dSWarner Losh   @return The UINT32 value.
98*f439973dSWarner Losh 
99*f439973dSWarner Losh **/
100*f439973dSWarner Losh typedef
101*f439973dSWarner Losh UINT32
102*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET32)(
103*f439973dSWarner Losh   IN UINTN             TokenNumber
104*f439973dSWarner Losh   );
105*f439973dSWarner Losh 
106*f439973dSWarner Losh /**
107*f439973dSWarner Losh   Retrieves a 64-bit value for a given PCD token.
108*f439973dSWarner Losh 
109*f439973dSWarner Losh   Retrieves the current 64-bit value for a PCD token number.
110*f439973dSWarner Losh   If the TokenNumber is invalid, the results are unpredictable.
111*f439973dSWarner Losh 
112*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
113*f439973dSWarner Losh 
114*f439973dSWarner Losh   @return The UINT64 value.
115*f439973dSWarner Losh 
116*f439973dSWarner Losh **/
117*f439973dSWarner Losh typedef
118*f439973dSWarner Losh UINT64
119*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET64)(
120*f439973dSWarner Losh   IN UINTN             TokenNumber
121*f439973dSWarner Losh   );
122*f439973dSWarner Losh 
123*f439973dSWarner Losh /**
124*f439973dSWarner Losh   Retrieves a pointer to a value for a given PCD token.
125*f439973dSWarner Losh 
126*f439973dSWarner Losh   Retrieves the current pointer to the buffer for a PCD token number.
127*f439973dSWarner Losh   Do not make any assumptions about the alignment of the pointer that
128*f439973dSWarner Losh   is returned by this function call.  If the TokenNumber is invalid,
129*f439973dSWarner Losh   the results are unpredictable.
130*f439973dSWarner Losh 
131*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
132*f439973dSWarner Losh 
133*f439973dSWarner Losh   @return The pointer to the buffer to be retrived.
134*f439973dSWarner Losh 
135*f439973dSWarner Losh **/
136*f439973dSWarner Losh typedef
137*f439973dSWarner Losh VOID *
138*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_POINTER)(
139*f439973dSWarner Losh   IN UINTN             TokenNumber
140*f439973dSWarner Losh   );
141*f439973dSWarner Losh 
142*f439973dSWarner Losh /**
143*f439973dSWarner Losh   Retrieves a Boolean value for a given PCD token.
144*f439973dSWarner Losh 
145*f439973dSWarner Losh   Retrieves the current boolean value for a PCD token number.
146*f439973dSWarner Losh   Do not make any assumptions about the alignment of the pointer that
147*f439973dSWarner Losh   is returned by this function call.  If the TokenNumber is invalid,
148*f439973dSWarner Losh   the results are unpredictable.
149*f439973dSWarner Losh 
150*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
151*f439973dSWarner Losh 
152*f439973dSWarner Losh   @return The Boolean value.
153*f439973dSWarner Losh 
154*f439973dSWarner Losh **/
155*f439973dSWarner Losh typedef
156*f439973dSWarner Losh BOOLEAN
157*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_BOOLEAN)(
158*f439973dSWarner Losh   IN UINTN             TokenNumber
159*f439973dSWarner Losh   );
160*f439973dSWarner Losh 
161*f439973dSWarner Losh /**
162*f439973dSWarner Losh   Retrieves the size of the value for a given PCD token.
163*f439973dSWarner Losh 
164*f439973dSWarner Losh   Retrieves the current size of a particular PCD token.
165*f439973dSWarner Losh   If the TokenNumber is invalid, the results are unpredictable.
166*f439973dSWarner Losh 
167*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
168*f439973dSWarner Losh 
169*f439973dSWarner Losh   @return The size of the value for the PCD token.
170*f439973dSWarner Losh 
171*f439973dSWarner Losh **/
172*f439973dSWarner Losh typedef
173*f439973dSWarner Losh UINTN
174*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_SIZE)(
175*f439973dSWarner Losh   IN UINTN             TokenNumber
176*f439973dSWarner Losh   );
177*f439973dSWarner Losh 
178*f439973dSWarner Losh /**
179*f439973dSWarner Losh   Retrieves an 8-bit value for a given PCD token.
180*f439973dSWarner Losh 
181*f439973dSWarner Losh   Retrieves the 8-bit value of a particular PCD token.
182*f439973dSWarner Losh   If the TokenNumber is invalid or the token space
183*f439973dSWarner Losh   specified by Guid does not exist, the results are
184*f439973dSWarner Losh   unpredictable.
185*f439973dSWarner Losh 
186*f439973dSWarner Losh   @param[in]  Guid        The token space for the token number.
187*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
188*f439973dSWarner Losh 
189*f439973dSWarner Losh   @return The size 8-bit value for the PCD token.
190*f439973dSWarner Losh 
191*f439973dSWarner Losh **/
192*f439973dSWarner Losh typedef
193*f439973dSWarner Losh UINT8
194*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_EX_8)(
195*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
196*f439973dSWarner Losh   IN UINTN             TokenNumber
197*f439973dSWarner Losh   );
198*f439973dSWarner Losh 
199*f439973dSWarner Losh /**
200*f439973dSWarner Losh   Retrieves a 16-bit value for a given PCD token.
201*f439973dSWarner Losh 
202*f439973dSWarner Losh   Retrieves the 16-bit value of a particular PCD token.
203*f439973dSWarner Losh   If the TokenNumber is invalid or the token space
204*f439973dSWarner Losh   specified by Guid does not exist, the results are
205*f439973dSWarner Losh   unpredictable.
206*f439973dSWarner Losh 
207*f439973dSWarner Losh   @param[in]  Guid        The token space for the token number.
208*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
209*f439973dSWarner Losh 
210*f439973dSWarner Losh   @return The size 16-bit value for the PCD token.
211*f439973dSWarner Losh 
212*f439973dSWarner Losh **/
213*f439973dSWarner Losh typedef
214*f439973dSWarner Losh UINT16
215*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_EX_16)(
216*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
217*f439973dSWarner Losh   IN UINTN             TokenNumber
218*f439973dSWarner Losh   );
219*f439973dSWarner Losh 
220*f439973dSWarner Losh /**
221*f439973dSWarner Losh   Retrieves a 32-bit value for a given PCD token.
222*f439973dSWarner Losh 
223*f439973dSWarner Losh   Retrieves the 32-bit value of a particular PCD token.
224*f439973dSWarner Losh   If the TokenNumber is invalid or the token space
225*f439973dSWarner Losh   specified by Guid does not exist, the results are
226*f439973dSWarner Losh   unpredictable.
227*f439973dSWarner Losh 
228*f439973dSWarner Losh   @param[in]  Guid        The token space for the token number.
229*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
230*f439973dSWarner Losh 
231*f439973dSWarner Losh   @return The size 32-bit value for the PCD token.
232*f439973dSWarner Losh 
233*f439973dSWarner Losh **/
234*f439973dSWarner Losh typedef
235*f439973dSWarner Losh UINT32
236*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_EX_32)(
237*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
238*f439973dSWarner Losh   IN UINTN             TokenNumber
239*f439973dSWarner Losh   );
240*f439973dSWarner Losh 
241*f439973dSWarner Losh /**
242*f439973dSWarner Losh   Retrieves an 64-bit value for a given PCD token.
243*f439973dSWarner Losh 
244*f439973dSWarner Losh   Retrieves the 64-bit value of a particular PCD token.
245*f439973dSWarner Losh   If the TokenNumber is invalid or the token space
246*f439973dSWarner Losh   specified by Guid does not exist, the results are
247*f439973dSWarner Losh   unpredictable.
248*f439973dSWarner Losh 
249*f439973dSWarner Losh   @param[in]  Guid        The token space for the token number.
250*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
251*f439973dSWarner Losh 
252*f439973dSWarner Losh   @return The size 64-bit value for the PCD token.
253*f439973dSWarner Losh 
254*f439973dSWarner Losh **/
255*f439973dSWarner Losh typedef
256*f439973dSWarner Losh UINT64
257*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_EX_64)(
258*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
259*f439973dSWarner Losh   IN UINTN             TokenNumber
260*f439973dSWarner Losh   );
261*f439973dSWarner Losh 
262*f439973dSWarner Losh /**
263*f439973dSWarner Losh   Retrieves a pointer to a value for a given PCD token.
264*f439973dSWarner Losh 
265*f439973dSWarner Losh   Retrieves the current pointer to the buffer for a PCD token number.
266*f439973dSWarner Losh   Do not make any assumptions about the alignment of the pointer that
267*f439973dSWarner Losh   is returned by this function call.  If the TokenNumber is invalid,
268*f439973dSWarner Losh   the results are unpredictable.
269*f439973dSWarner Losh 
270*f439973dSWarner Losh   @param[in]  Guid        The token space for the token number.
271*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
272*f439973dSWarner Losh 
273*f439973dSWarner Losh   @return The pointer to the buffer to be retrieved.
274*f439973dSWarner Losh 
275*f439973dSWarner Losh **/
276*f439973dSWarner Losh typedef
277*f439973dSWarner Losh VOID *
278*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_EX_POINTER)(
279*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
280*f439973dSWarner Losh   IN UINTN             TokenNumber
281*f439973dSWarner Losh   );
282*f439973dSWarner Losh 
283*f439973dSWarner Losh /**
284*f439973dSWarner Losh   Retrieves a Boolean value for a given PCD token.
285*f439973dSWarner Losh 
286*f439973dSWarner Losh   Retrieves the Boolean value of a particular PCD token.
287*f439973dSWarner Losh   If the TokenNumber is invalid or the token space
288*f439973dSWarner Losh   specified by Guid does not exist, the results are
289*f439973dSWarner Losh   unpredictable.
290*f439973dSWarner Losh 
291*f439973dSWarner Losh   @param[in]  Guid        The token space for the token number.
292*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
293*f439973dSWarner Losh 
294*f439973dSWarner Losh   @return The size Boolean value for the PCD token.
295*f439973dSWarner Losh 
296*f439973dSWarner Losh **/
297*f439973dSWarner Losh typedef
298*f439973dSWarner Losh BOOLEAN
299*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_EX_BOOLEAN)(
300*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
301*f439973dSWarner Losh   IN UINTN             TokenNumber
302*f439973dSWarner Losh   );
303*f439973dSWarner Losh 
304*f439973dSWarner Losh /**
305*f439973dSWarner Losh   Retrieves the size of the value for a given PCD token.
306*f439973dSWarner Losh 
307*f439973dSWarner Losh   Retrieves the current size of a particular PCD token.
308*f439973dSWarner Losh   If the TokenNumber is invalid, the results are unpredictable.
309*f439973dSWarner Losh 
310*f439973dSWarner Losh   @param[in]  Guid        The token space for the token number.
311*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
312*f439973dSWarner Losh 
313*f439973dSWarner Losh   @return The size of the value for the PCD token.
314*f439973dSWarner Losh 
315*f439973dSWarner Losh **/
316*f439973dSWarner Losh typedef
317*f439973dSWarner Losh UINTN
318*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_EX_SIZE)(
319*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
320*f439973dSWarner Losh   IN UINTN             TokenNumber
321*f439973dSWarner Losh   );
322*f439973dSWarner Losh 
323*f439973dSWarner Losh /**
324*f439973dSWarner Losh   Sets an 8-bit value for a given PCD token.
325*f439973dSWarner Losh 
326*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
327*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
328*f439973dSWarner Losh   If it is not, an error will be returned.
329*f439973dSWarner Losh 
330*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
331*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
332*f439973dSWarner Losh 
333*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
334*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
335*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
336*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
337*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
338*f439973dSWarner Losh 
339*f439973dSWarner Losh **/
340*f439973dSWarner Losh typedef
341*f439973dSWarner Losh EFI_STATUS
342*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET8)(
343*f439973dSWarner Losh   IN UINTN             TokenNumber,
344*f439973dSWarner Losh   IN UINT8             Value
345*f439973dSWarner Losh   );
346*f439973dSWarner Losh 
347*f439973dSWarner Losh /**
348*f439973dSWarner Losh   Sets a 16-bit value for a given PCD token.
349*f439973dSWarner Losh 
350*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
351*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
352*f439973dSWarner Losh   If it is not, an error will be returned.
353*f439973dSWarner Losh 
354*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
355*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
356*f439973dSWarner Losh 
357*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
358*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
359*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
360*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
361*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
362*f439973dSWarner Losh 
363*f439973dSWarner Losh **/
364*f439973dSWarner Losh typedef
365*f439973dSWarner Losh EFI_STATUS
366*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET16)(
367*f439973dSWarner Losh   IN UINTN              TokenNumber,
368*f439973dSWarner Losh   IN UINT16             Value
369*f439973dSWarner Losh   );
370*f439973dSWarner Losh 
371*f439973dSWarner Losh /**
372*f439973dSWarner Losh   Sets a 32-bit value for a given PCD token.
373*f439973dSWarner Losh 
374*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
375*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
376*f439973dSWarner Losh   If it is not, an error will be returned.
377*f439973dSWarner Losh 
378*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
379*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
380*f439973dSWarner Losh 
381*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
382*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
383*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
384*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
385*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
386*f439973dSWarner Losh 
387*f439973dSWarner Losh **/
388*f439973dSWarner Losh typedef
389*f439973dSWarner Losh EFI_STATUS
390*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET32)(
391*f439973dSWarner Losh   IN UINTN              TokenNumber,
392*f439973dSWarner Losh   IN UINT32             Value
393*f439973dSWarner Losh   );
394*f439973dSWarner Losh 
395*f439973dSWarner Losh /**
396*f439973dSWarner Losh   Sets a 64-bit value for a given PCD token.
397*f439973dSWarner Losh 
398*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
399*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
400*f439973dSWarner Losh   If it is not, an error will be returned.
401*f439973dSWarner Losh 
402*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
403*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
404*f439973dSWarner Losh 
405*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
406*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
407*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
408*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
409*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
410*f439973dSWarner Losh 
411*f439973dSWarner Losh **/
412*f439973dSWarner Losh typedef
413*f439973dSWarner Losh EFI_STATUS
414*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET64)(
415*f439973dSWarner Losh   IN UINTN             TokenNumber,
416*f439973dSWarner Losh   IN UINT64            Value
417*f439973dSWarner Losh   );
418*f439973dSWarner Losh 
419*f439973dSWarner Losh /**
420*f439973dSWarner Losh   Sets a value of a specified size for a given PCD token.
421*f439973dSWarner Losh 
422*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
423*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
424*f439973dSWarner Losh   If it is not, an error will be returned.
425*f439973dSWarner Losh 
426*f439973dSWarner Losh   @param[in]      TokenNumber  The PCD token number.
427*f439973dSWarner Losh   @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
428*f439973dSWarner Losh                                On input, if the SizeOfValue is greater than the maximum size supported
429*f439973dSWarner Losh                                for this TokenNumber then the output value of SizeOfValue will reflect
430*f439973dSWarner Losh                                the maximum size supported for this TokenNumber.
431*f439973dSWarner Losh   @param[in]      Buffer       The buffer to set for the PCD token.
432*f439973dSWarner Losh 
433*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
434*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
435*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
436*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
437*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
438*f439973dSWarner Losh 
439*f439973dSWarner Losh **/
440*f439973dSWarner Losh typedef
441*f439973dSWarner Losh EFI_STATUS
442*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_POINTER)(
443*f439973dSWarner Losh   IN      UINTN             TokenNumber,
444*f439973dSWarner Losh   IN OUT  UINTN             *SizeOfBuffer,
445*f439973dSWarner Losh   IN      VOID              *Buffer
446*f439973dSWarner Losh   );
447*f439973dSWarner Losh 
448*f439973dSWarner Losh /**
449*f439973dSWarner Losh   Sets a Boolean value for a given PCD token.
450*f439973dSWarner Losh 
451*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
452*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
453*f439973dSWarner Losh   If it is not, an error will be returned.
454*f439973dSWarner Losh 
455*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
456*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
457*f439973dSWarner Losh 
458*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
459*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
460*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
461*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
462*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
463*f439973dSWarner Losh 
464*f439973dSWarner Losh **/
465*f439973dSWarner Losh typedef
466*f439973dSWarner Losh EFI_STATUS
467*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_BOOLEAN)(
468*f439973dSWarner Losh   IN UINTN             TokenNumber,
469*f439973dSWarner Losh   IN BOOLEAN           Value
470*f439973dSWarner Losh   );
471*f439973dSWarner Losh 
472*f439973dSWarner Losh /**
473*f439973dSWarner Losh   Sets an 8-bit value for a given PCD token.
474*f439973dSWarner Losh 
475*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
476*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
477*f439973dSWarner Losh   If it is not, an error will be returned.
478*f439973dSWarner Losh 
479*f439973dSWarner Losh   @param[in]  Guid        The 128-bit unique value that designates the namespace from which to extract the value.
480*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
481*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
482*f439973dSWarner Losh 
483*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
484*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
485*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
486*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
487*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
488*f439973dSWarner Losh 
489*f439973dSWarner Losh **/
490*f439973dSWarner Losh typedef
491*f439973dSWarner Losh EFI_STATUS
492*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_EX_8)(
493*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
494*f439973dSWarner Losh   IN UINTN             TokenNumber,
495*f439973dSWarner Losh   IN UINT8             Value
496*f439973dSWarner Losh   );
497*f439973dSWarner Losh 
498*f439973dSWarner Losh /**
499*f439973dSWarner Losh   Sets an 16-bit value for a given PCD token.
500*f439973dSWarner Losh 
501*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
502*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
503*f439973dSWarner Losh   If it is not, an error will be returned.
504*f439973dSWarner Losh 
505*f439973dSWarner Losh   @param[in]  Guid        The 128-bit unique value that designates the namespace from which to extract the value.
506*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
507*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
508*f439973dSWarner Losh 
509*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
510*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
511*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
512*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
513*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
514*f439973dSWarner Losh 
515*f439973dSWarner Losh **/
516*f439973dSWarner Losh typedef
517*f439973dSWarner Losh EFI_STATUS
518*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_EX_16)(
519*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
520*f439973dSWarner Losh   IN UINTN             TokenNumber,
521*f439973dSWarner Losh   IN UINT16            Value
522*f439973dSWarner Losh   );
523*f439973dSWarner Losh 
524*f439973dSWarner Losh /**
525*f439973dSWarner Losh   Sets a 32-bit value for a given PCD token.
526*f439973dSWarner Losh 
527*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
528*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
529*f439973dSWarner Losh   If it is not, an error will be returned.
530*f439973dSWarner Losh 
531*f439973dSWarner Losh   @param[in]  Guid        The 128-bit unique value that designates the namespace from which to extract the value.
532*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
533*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
534*f439973dSWarner Losh 
535*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
536*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
537*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
538*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
539*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
540*f439973dSWarner Losh 
541*f439973dSWarner Losh **/
542*f439973dSWarner Losh typedef
543*f439973dSWarner Losh EFI_STATUS
544*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_EX_32)(
545*f439973dSWarner Losh   IN CONST EFI_GUID     *Guid,
546*f439973dSWarner Losh   IN UINTN              TokenNumber,
547*f439973dSWarner Losh   IN UINT32             Value
548*f439973dSWarner Losh   );
549*f439973dSWarner Losh 
550*f439973dSWarner Losh /**
551*f439973dSWarner Losh   Sets a 64-bit value for a given PCD token.
552*f439973dSWarner Losh 
553*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
554*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
555*f439973dSWarner Losh   If it is not, an error will be returned.
556*f439973dSWarner Losh 
557*f439973dSWarner Losh   @param[in]  Guid        The 128-bit unique value that designates the namespace from which to extract the value.
558*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
559*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
560*f439973dSWarner Losh 
561*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
562*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
563*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
564*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
565*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
566*f439973dSWarner Losh 
567*f439973dSWarner Losh **/
568*f439973dSWarner Losh typedef
569*f439973dSWarner Losh EFI_STATUS
570*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_EX_64)(
571*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
572*f439973dSWarner Losh   IN UINTN             TokenNumber,
573*f439973dSWarner Losh   IN UINT64            Value
574*f439973dSWarner Losh   );
575*f439973dSWarner Losh 
576*f439973dSWarner Losh /**
577*f439973dSWarner Losh   Sets a value of a specified size for a given PCD token.
578*f439973dSWarner Losh 
579*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
580*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
581*f439973dSWarner Losh   If it is not, an error will be returned.
582*f439973dSWarner Losh 
583*f439973dSWarner Losh   @param[in]  Guid            The 128-bit unique value that designates the namespace from which to extract the value.
584*f439973dSWarner Losh   @param[in]  TokenNumber     The PCD token number.
585*f439973dSWarner Losh   @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
586*f439973dSWarner Losh                               On input, if the SizeOfValue is greater than the maximum size supported
587*f439973dSWarner Losh                               for this TokenNumber then the output value of SizeOfValue will reflect
588*f439973dSWarner Losh                               the maximum size supported for this TokenNumber.
589*f439973dSWarner Losh   @param[in]  Buffer          The buffer to set for the PCD token.
590*f439973dSWarner Losh 
591*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
592*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
593*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
594*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
595*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
596*f439973dSWarner Losh 
597*f439973dSWarner Losh **/
598*f439973dSWarner Losh typedef
599*f439973dSWarner Losh EFI_STATUS
600*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_EX_POINTER)(
601*f439973dSWarner Losh   IN CONST EFI_GUID          *Guid,
602*f439973dSWarner Losh   IN       UINTN             TokenNumber,
603*f439973dSWarner Losh   IN OUT   UINTN             *SizeOfBuffer,
604*f439973dSWarner Losh   IN       VOID              *Buffer
605*f439973dSWarner Losh   );
606*f439973dSWarner Losh 
607*f439973dSWarner Losh /**
608*f439973dSWarner Losh   Sets a Boolean value for a given PCD token.
609*f439973dSWarner Losh 
610*f439973dSWarner Losh   When the PCD service sets a value, it will check to ensure that the
611*f439973dSWarner Losh   size of the value being set is compatible with the Token's existing definition.
612*f439973dSWarner Losh   If it is not, an error will be returned.
613*f439973dSWarner Losh 
614*f439973dSWarner Losh   @param[in]  Guid        The 128-bit unique value that designates the namespace from which to extract the value.
615*f439973dSWarner Losh   @param[in]  TokenNumber The PCD token number.
616*f439973dSWarner Losh   @param[in]  Value       The value to set for the PCD token.
617*f439973dSWarner Losh 
618*f439973dSWarner Losh   @retval EFI_SUCCESS  The procedure returned successfully.
619*f439973dSWarner Losh   @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
620*f439973dSWarner Losh                                   being set was incompatible with a call to this function.
621*f439973dSWarner Losh                                   Use GetSize() to retrieve the size of the target data.
622*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
623*f439973dSWarner Losh 
624*f439973dSWarner Losh **/
625*f439973dSWarner Losh typedef
626*f439973dSWarner Losh EFI_STATUS
627*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_SET_EX_BOOLEAN)(
628*f439973dSWarner Losh   IN CONST EFI_GUID    *Guid,
629*f439973dSWarner Losh   IN UINTN             TokenNumber,
630*f439973dSWarner Losh   IN BOOLEAN           Value
631*f439973dSWarner Losh   );
632*f439973dSWarner Losh 
633*f439973dSWarner Losh /**
634*f439973dSWarner Losh   Callback on SET function prototype definition.
635*f439973dSWarner Losh 
636*f439973dSWarner Losh   This notification function serves two purposes.
637*f439973dSWarner Losh   Firstly, it notifies the module which did the registration that the value
638*f439973dSWarner Losh   of this PCD token has been set. Secondly, it provides a mechanism for the
639*f439973dSWarner Losh   module that did the registration to intercept the set operation and override
640*f439973dSWarner Losh   the value that has been set, if necessary. After the invocation of the callback function,
641*f439973dSWarner Losh   TokenData will be used by PCD service DXE driver to modify the internal data in
642*f439973dSWarner Losh   PCD database.
643*f439973dSWarner Losh 
644*f439973dSWarner Losh   @param[in]  CallBackGuid    The PCD token GUID being set.
645*f439973dSWarner Losh   @param[in]  CallBackToken   The PCD token number being set.
646*f439973dSWarner Losh   @param[in, out] TokenData   A pointer to the token data being set.
647*f439973dSWarner Losh   @param[in]  TokenDataSize   The size, in bytes, of the data being set.
648*f439973dSWarner Losh 
649*f439973dSWarner Losh   @retval VOID
650*f439973dSWarner Losh 
651*f439973dSWarner Losh **/
652*f439973dSWarner Losh typedef
653*f439973dSWarner Losh VOID
654*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_CALLBACK)(
655*f439973dSWarner Losh   IN CONST EFI_GUID         *CallBackGuid  OPTIONAL,
656*f439973dSWarner Losh   IN       UINTN            CallBackToken,
657*f439973dSWarner Losh   IN OUT   VOID             *TokenData,
658*f439973dSWarner Losh   IN       UINTN            TokenDataSize
659*f439973dSWarner Losh   );
660*f439973dSWarner Losh 
661*f439973dSWarner Losh /**
662*f439973dSWarner Losh   Specifies a function to be called anytime the value of a designated token is changed.
663*f439973dSWarner Losh 
664*f439973dSWarner Losh   @param[in]  TokenNumber       The PCD token number.
665*f439973dSWarner Losh   @param[in]  Guid              The 128-bit unique value that designates the namespace from which to extract the value.
666*f439973dSWarner Losh   @param[in]  CallBackFunction  The function prototype called when the value associated with the CallBackToken is set.
667*f439973dSWarner Losh 
668*f439973dSWarner Losh   @retval EFI_SUCCESS   The PCD service has successfully established a call event
669*f439973dSWarner Losh                         for the CallBackToken requested.
670*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
671*f439973dSWarner Losh 
672*f439973dSWarner Losh **/
673*f439973dSWarner Losh typedef
674*f439973dSWarner Losh EFI_STATUS
675*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_CALLBACK_ONSET)(
676*f439973dSWarner Losh   IN  CONST EFI_GUID          *Guid  OPTIONAL,
677*f439973dSWarner Losh   IN  UINTN                   TokenNumber,
678*f439973dSWarner Losh   IN  PCD_PROTOCOL_CALLBACK   CallBackFunction
679*f439973dSWarner Losh   );
680*f439973dSWarner Losh 
681*f439973dSWarner Losh /**
682*f439973dSWarner Losh   Cancels a previously set callback function for a particular PCD token number.
683*f439973dSWarner Losh 
684*f439973dSWarner Losh   @param[in]  TokenNumber      The PCD token number.
685*f439973dSWarner Losh   @param[in]  Guid             The 128-bit unique value that designates the namespace from which to extract the value.
686*f439973dSWarner Losh   @param[in]  CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
687*f439973dSWarner Losh 
688*f439973dSWarner Losh   @retval EFI_SUCCESS   The PCD service has successfully established a call event
689*f439973dSWarner Losh                         for the CallBackToken requested.
690*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
691*f439973dSWarner Losh 
692*f439973dSWarner Losh **/
693*f439973dSWarner Losh typedef
694*f439973dSWarner Losh EFI_STATUS
695*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_CANCEL_CALLBACK)(
696*f439973dSWarner Losh   IN  CONST EFI_GUID          *Guid  OPTIONAL,
697*f439973dSWarner Losh   IN  UINTN                   TokenNumber,
698*f439973dSWarner Losh   IN  PCD_PROTOCOL_CALLBACK   CallBackFunction
699*f439973dSWarner Losh   );
700*f439973dSWarner Losh 
701*f439973dSWarner Losh /**
702*f439973dSWarner Losh   Retrieves the next valid token number in a given namespace.
703*f439973dSWarner Losh 
704*f439973dSWarner Losh   This is useful since the PCD infrastructure contains a sparse list of token numbers,
705*f439973dSWarner Losh   and one cannot a priori know what token numbers are valid in the database.
706*f439973dSWarner Losh 
707*f439973dSWarner Losh   If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
708*f439973dSWarner Losh   If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
709*f439973dSWarner Losh   If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
710*f439973dSWarner Losh   If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
711*f439973dSWarner Losh   The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
712*f439973dSWarner Losh   If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
713*f439973dSWarner Losh   If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
714*f439973dSWarner Losh   If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned.
715*f439973dSWarner Losh 
716*f439973dSWarner Losh 
717*f439973dSWarner Losh   @param[in]      Guid    The 128-bit unique value that designates the namespace from which to retrieve the next token.
718*f439973dSWarner Losh                           This is an optional parameter that may be NULL. If this parameter is NULL, then a request is
719*f439973dSWarner Losh                           being made to retrieve tokens from the default token space.
720*f439973dSWarner Losh   @param[in,out]  TokenNumber
721*f439973dSWarner Losh                           A pointer to the PCD token number to use to find the subsequent token number.
722*f439973dSWarner Losh 
723*f439973dSWarner Losh   @retval EFI_SUCCESS   The PCD service has retrieved the next valid token number.
724*f439973dSWarner Losh   @retval EFI_NOT_FOUND The PCD service could not find data from the requested token number.
725*f439973dSWarner Losh 
726*f439973dSWarner Losh **/
727*f439973dSWarner Losh typedef
728*f439973dSWarner Losh EFI_STATUS
729*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_NEXT_TOKEN)(
730*f439973dSWarner Losh   IN      CONST EFI_GUID      *Guid  OPTIONAL,
731*f439973dSWarner Losh   IN OUT  UINTN               *TokenNumber
732*f439973dSWarner Losh   );
733*f439973dSWarner Losh 
734*f439973dSWarner Losh /**
735*f439973dSWarner Losh   Retrieves the next valid PCD token namespace for a given namespace.
736*f439973dSWarner Losh 
737*f439973dSWarner Losh   Gets the next valid token namespace for a given namespace. This is useful to traverse the valid
738*f439973dSWarner Losh   token namespaces on a platform.
739*f439973dSWarner Losh 
740*f439973dSWarner Losh   @param[in, out]   Guid    An indirect pointer to EFI_GUID. On input it designates a known token namespace
741*f439973dSWarner Losh                             from which the search will start. On output, it designates the next valid token
742*f439973dSWarner Losh                             namespace on the platform. If *Guid is NULL, then the GUID of the first token
743*f439973dSWarner Losh                             space of the current platform is returned. If the search cannot locate the next valid
744*f439973dSWarner Losh                             token namespace, an error is returned and the value of *Guid is undefined.
745*f439973dSWarner Losh 
746*f439973dSWarner Losh   @retval   EFI_SUCCESS   The PCD service retrieved the value requested.
747*f439973dSWarner Losh   @retval   EFI_NOT_FOUND The PCD service could not find the next valid token namespace.
748*f439973dSWarner Losh 
749*f439973dSWarner Losh **/
750*f439973dSWarner Losh typedef
751*f439973dSWarner Losh EFI_STATUS
752*f439973dSWarner Losh (EFIAPI *PCD_PROTOCOL_GET_NEXT_TOKENSPACE)(
753*f439973dSWarner Losh   IN  OUT    CONST EFI_GUID      **Guid
754*f439973dSWarner Losh   );
755*f439973dSWarner Losh 
756*f439973dSWarner Losh ///
757*f439973dSWarner Losh /// This service abstracts the ability to set/get Platform Configuration Database (PCD).
758*f439973dSWarner Losh ///
759*f439973dSWarner Losh typedef struct {
760*f439973dSWarner Losh   PCD_PROTOCOL_SET_SKU                SetSku;
761*f439973dSWarner Losh 
762*f439973dSWarner Losh   PCD_PROTOCOL_GET8                   Get8;
763*f439973dSWarner Losh   PCD_PROTOCOL_GET16                  Get16;
764*f439973dSWarner Losh   PCD_PROTOCOL_GET32                  Get32;
765*f439973dSWarner Losh   PCD_PROTOCOL_GET64                  Get64;
766*f439973dSWarner Losh   PCD_PROTOCOL_GET_POINTER            GetPtr;
767*f439973dSWarner Losh   PCD_PROTOCOL_GET_BOOLEAN            GetBool;
768*f439973dSWarner Losh   PCD_PROTOCOL_GET_SIZE               GetSize;
769*f439973dSWarner Losh 
770*f439973dSWarner Losh   PCD_PROTOCOL_GET_EX_8               Get8Ex;
771*f439973dSWarner Losh   PCD_PROTOCOL_GET_EX_16              Get16Ex;
772*f439973dSWarner Losh   PCD_PROTOCOL_GET_EX_32              Get32Ex;
773*f439973dSWarner Losh   PCD_PROTOCOL_GET_EX_64              Get64Ex;
774*f439973dSWarner Losh   PCD_PROTOCOL_GET_EX_POINTER         GetPtrEx;
775*f439973dSWarner Losh   PCD_PROTOCOL_GET_EX_BOOLEAN         GetBoolEx;
776*f439973dSWarner Losh   PCD_PROTOCOL_GET_EX_SIZE            GetSizeEx;
777*f439973dSWarner Losh 
778*f439973dSWarner Losh   PCD_PROTOCOL_SET8                   Set8;
779*f439973dSWarner Losh   PCD_PROTOCOL_SET16                  Set16;
780*f439973dSWarner Losh   PCD_PROTOCOL_SET32                  Set32;
781*f439973dSWarner Losh   PCD_PROTOCOL_SET64                  Set64;
782*f439973dSWarner Losh   PCD_PROTOCOL_SET_POINTER            SetPtr;
783*f439973dSWarner Losh   PCD_PROTOCOL_SET_BOOLEAN            SetBool;
784*f439973dSWarner Losh 
785*f439973dSWarner Losh   PCD_PROTOCOL_SET_EX_8               Set8Ex;
786*f439973dSWarner Losh   PCD_PROTOCOL_SET_EX_16              Set16Ex;
787*f439973dSWarner Losh   PCD_PROTOCOL_SET_EX_32              Set32Ex;
788*f439973dSWarner Losh   PCD_PROTOCOL_SET_EX_64              Set64Ex;
789*f439973dSWarner Losh   PCD_PROTOCOL_SET_EX_POINTER         SetPtrEx;
790*f439973dSWarner Losh   PCD_PROTOCOL_SET_EX_BOOLEAN         SetBoolEx;
791*f439973dSWarner Losh 
792*f439973dSWarner Losh   PCD_PROTOCOL_CALLBACK_ONSET         CallbackOnSet;
793*f439973dSWarner Losh   PCD_PROTOCOL_CANCEL_CALLBACK        CancelCallback;
794*f439973dSWarner Losh   PCD_PROTOCOL_GET_NEXT_TOKEN         GetNextToken;
795*f439973dSWarner Losh   PCD_PROTOCOL_GET_NEXT_TOKENSPACE    GetNextTokenSpace;
796*f439973dSWarner Losh } PCD_PROTOCOL;
797*f439973dSWarner Losh 
798*f439973dSWarner Losh #endif
799