Sync up Pcd Library Instances and PCD Driver/PEIM with Pcd spec 0.51 and Mde 0.51
[mirror_edk2.git] / EdkModulePkg / Universal / PCD / Pei / Service.h
1 /** @file
2 Private functions used by PCD PEIM.
3
4 Copyright (c) 2006, 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
9
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.
12
13
14 Module Name: Service.h
15
16 **/
17
18 #ifndef _SERVICE_H
19 #define _SERVICE_H
20
21 /* Internal Function definitions */
22
23 PEI_PCD_DATABASE *
24 GetPcdDatabase (
25 VOID
26 )
27 ;
28
29 EFI_STATUS
30 SetWorker (
31 IN UINTN TokenNumber,
32 IN VOID *Data,
33 IN UINTN Size,
34 IN BOOLEAN PtrType
35 )
36 ;
37
38 EFI_STATUS
39 SetWorkerByLocalTokenNumber (
40 UINT32 LocalTokenNumber,
41 VOID *Data,
42 UINTN Size,
43 BOOLEAN PtrType
44 )
45 ;
46
47 EFI_STATUS
48 ExSetWorker (
49 IN UINT32 ExTokenNumber,
50 IN CONST EFI_GUID *Guid,
51 VOID *Data,
52 UINTN Size,
53 BOOLEAN PtrType
54 )
55 ;
56
57 VOID *
58 GetWorker (
59 UINTN TokenNumber,
60 UINTN GetSize
61 )
62 ;
63
64 VOID *
65 ExGetWorker (
66 IN CONST EFI_GUID *Guid,
67 IN UINT32 ExTokenNumber,
68 IN UINTN GetSize
69 )
70 ;
71
72 typedef struct {
73 UINTN TokenNumber;
74 UINTN Size;
75 UINT32 LocalTokenNumberAlias;
76 } EX_PCD_ENTRY_ATTRIBUTE;
77
78 VOID
79 GetExPcdTokenAttributes (
80 IN CONST EFI_GUID *Guid,
81 IN UINT32 ExTokenNumber,
82 OUT EX_PCD_ENTRY_ATTRIBUTE *ExAttr
83 )
84 ;
85
86 EFI_STATUS
87 PeiRegisterCallBackWorker (
88 IN UINTN TokenNumber,
89 IN CONST GUID *Guid, OPTIONAL
90 IN PCD_PPI_CALLBACK CallBackFunction,
91 IN BOOLEAN Register
92 );
93
94 VOID
95 BuildPcdDatabase (
96 VOID
97 )
98 ;
99
100
101 //
102 // PPI Interface Implementation Declaration.
103 //
104 VOID
105 EFIAPI
106 PeiPcdSetSku (
107 IN SKU_ID SkuId
108 )
109 ;
110
111
112 UINT8
113 EFIAPI
114 PeiPcdGet8 (
115 IN PCD_TOKEN_NUMBER TokenNumber
116 )
117 ;
118
119
120 UINT16
121 EFIAPI
122 PeiPcdGet16 (
123 IN PCD_TOKEN_NUMBER TokenNumber
124 )
125 ;
126
127
128 UINT32
129 EFIAPI
130 PeiPcdGet32 (
131 IN PCD_TOKEN_NUMBER TokenNumber
132 )
133 ;
134
135
136 UINT64
137 EFIAPI
138 PeiPcdGet64 (
139 IN PCD_TOKEN_NUMBER TokenNumber
140 )
141 ;
142
143
144 VOID *
145 EFIAPI
146 PeiPcdGetPtr (
147 IN PCD_TOKEN_NUMBER TokenNumber
148 )
149 ;
150
151
152 BOOLEAN
153 EFIAPI
154 PeiPcdGetBool (
155 IN PCD_TOKEN_NUMBER TokenNumber
156 )
157 ;
158
159
160 UINTN
161 EFIAPI
162 PeiPcdGetSize (
163 IN PCD_TOKEN_NUMBER TokenNumber
164 )
165 ;
166
167
168 UINT8
169 EFIAPI
170 PeiPcdGet8Ex (
171 IN CONST EFI_GUID *Guid,
172 IN PCD_TOKEN_NUMBER TokenNumber
173 )
174 ;
175
176
177 UINT16
178 EFIAPI
179 PeiPcdGet16Ex (
180 IN CONST EFI_GUID *Guid,
181 IN PCD_TOKEN_NUMBER TokenNumber
182 )
183 ;
184
185 UINT32
186 EFIAPI
187 PeiPcdGet32Ex (
188 IN CONST EFI_GUID *Guid,
189 IN PCD_TOKEN_NUMBER TokenNumber
190 )
191 ;
192
193
194 UINT64
195 EFIAPI
196 PeiPcdGet64Ex (
197 IN CONST EFI_GUID *Guid,
198 IN PCD_TOKEN_NUMBER TokenNumber
199 )
200 ;
201
202
203 VOID *
204 EFIAPI
205 PeiPcdGetPtrEx (
206 IN CONST EFI_GUID *Guid,
207 IN PCD_TOKEN_NUMBER TokenNumber
208 )
209 ;
210
211
212 BOOLEAN
213 EFIAPI
214 PeiPcdGetBoolEx (
215 IN CONST EFI_GUID *Guid,
216 IN PCD_TOKEN_NUMBER TokenNumber
217 )
218 ;
219
220
221 UINTN
222 EFIAPI
223 PeiPcdGetSizeEx (
224 IN CONST EFI_GUID *Guid,
225 IN PCD_TOKEN_NUMBER TokenNumber
226 )
227 ;
228
229
230 EFI_STATUS
231 EFIAPI
232 PeiPcdSet8 (
233 IN PCD_TOKEN_NUMBER TokenNumber,
234 IN UINT8 Value
235 )
236 ;
237
238
239 EFI_STATUS
240 EFIAPI
241 PeiPcdSet16 (
242 IN PCD_TOKEN_NUMBER TokenNumber,
243 IN UINT16 Value
244 )
245 ;
246
247
248 EFI_STATUS
249 EFIAPI
250 PeiPcdSet32 (
251 IN PCD_TOKEN_NUMBER TokenNumber,
252 IN UINT32 Value
253 )
254 ;
255
256
257 EFI_STATUS
258 EFIAPI
259 PeiPcdSet64 (
260 IN PCD_TOKEN_NUMBER TokenNumber,
261 IN UINT64 Value
262 )
263 ;
264
265 EFI_STATUS
266 EFIAPI
267 PeiPcdSetPtr (
268 IN PCD_TOKEN_NUMBER TokenNumber,
269 IN UINTN SizeOfBuffer,
270 IN VOID *Buffer
271 )
272 ;
273
274
275 EFI_STATUS
276 EFIAPI
277 PeiPcdSetBool (
278 IN PCD_TOKEN_NUMBER TokenNumber,
279 IN BOOLEAN Value
280 )
281 ;
282
283
284 EFI_STATUS
285 EFIAPI
286 PeiPcdSet8Ex (
287 IN CONST EFI_GUID *Guid,
288 IN PCD_TOKEN_NUMBER TokenNumber,
289 IN UINT8 Value
290 )
291 ;
292
293 EFI_STATUS
294 EFIAPI
295 PeiPcdSet16Ex (
296 IN CONST EFI_GUID *Guid,
297 IN PCD_TOKEN_NUMBER TokenNumber,
298 IN UINT16 Value
299 )
300 ;
301
302
303 EFI_STATUS
304 EFIAPI
305 PeiPcdSet32Ex (
306 IN CONST EFI_GUID *Guid,
307 IN PCD_TOKEN_NUMBER TokenNumber,
308 IN UINT32 Value
309 )
310 ;
311
312
313 EFI_STATUS
314 EFIAPI
315 PeiPcdSet64Ex (
316 IN CONST EFI_GUID *Guid,
317 IN PCD_TOKEN_NUMBER TokenNumber,
318 IN UINT64 Value
319 )
320 ;
321
322
323 EFI_STATUS
324 EFIAPI
325 PeiPcdSetPtrEx (
326 IN CONST EFI_GUID *Guid,
327 IN PCD_TOKEN_NUMBER TokenNumber,
328 IN UINTN SizeOfBuffer,
329 IN VOID *Buffer
330 )
331 ;
332
333
334 EFI_STATUS
335 EFIAPI
336 PeiPcdSetBoolEx (
337 IN CONST EFI_GUID *Guid,
338 IN PCD_TOKEN_NUMBER TokenNumber,
339 IN BOOLEAN Value
340 )
341 ;
342
343
344
345 EFI_STATUS
346 EFIAPI
347 PcdRegisterCallBackOnSet (
348 IN PCD_TOKEN_NUMBER TokenNumber,
349 IN CONST EFI_GUID *Guid, OPTIONAL
350 IN PCD_PPI_CALLBACK CallBackFunction
351 )
352 ;
353
354
355 EFI_STATUS
356 EFIAPI
357 PcdUnRegisterCallBackOnSet (
358 IN PCD_TOKEN_NUMBER TokenNumber,
359 IN CONST EFI_GUID *Guid, OPTIONAL
360 IN PCD_PPI_CALLBACK CallBackFunction
361 )
362 ;
363
364
365 EFI_STATUS
366 EFIAPI
367 PeiPcdGetNextToken (
368 IN CONST EFI_GUID *Guid, OPTIONAL
369 IN OUT PCD_TOKEN_NUMBER *TokenNumber
370 )
371 ;
372
373 extern EFI_GUID gPcdDataBaseHobGuid;
374
375 extern EFI_GUID gPcdPeiCallbackFnTableHobGuid;
376
377 extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;
378
379 #endif