Corrected a typo error.
[mirror_edk2.git] / EdkModulePkg / Universal / PCD / Pei / Service.h
CommitLineData
878ddf1f 1/** @file\r
2Private functions used by PCD PEIM.\r
3\r
4Copyright (c) 2006, Intel Corporation \r
5All rights reserved. This program and the accompanying materials \r
6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php \r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13\r
14Module Name: Service.h\r
15\r
16**/\r
17\r
18#ifndef _SERVICE_H\r
19#define _SERVICE_H\r
20\r
4acf8ce7 21//\r
22// Please make sure the PCD Serivce PEIM Version is consistent with\r
23// the version of PCD Database generation tool\r
24//\r
58f1099f 25#define PCD_PEI_SERVICE_DRIVER_VERSION 2\r
4acf8ce7 26\r
27//\r
28// PCD_PEI_DATABASE_GENTOOL_VERSION is defined in Autogen.h\r
29// and generated by PCD Database generation tool.\r
30//\r
31#if (PCD_PEI_SERVICE_PEIM_VERSION != PCD_PEI_DATABASE_GENTOOL_VERSION)\r
32 #error "Please make sure the version of PCD Service PEIM and PCD PEI Database Generation Tool matches"\r
33#endif\r
34\r
878ddf1f 35/* Internal Function definitions */\r
36\r
52e1905d 37PEI_PCD_DATABASE *\r
38GetPcdDatabase (\r
39 VOID\r
40 )\r
41;\r
878ddf1f 42\r
1de04b4f 43\r
44EFI_STATUS\r
45SetValueWorker (\r
46 IN UINTN TokenNumber,\r
47 IN VOID *Data,\r
48 IN UINTN Size\r
49 )\r
50;\r
51\r
52\r
878ddf1f 53EFI_STATUS\r
52e1905d 54SetWorker (\r
1de04b4f 55 IN UINTN TokenNumber,\r
56 IN VOID *Data,\r
57 IN OUT UINTN *Size,\r
58 IN BOOLEAN PtrType\r
52e1905d 59 )\r
60;\r
878ddf1f 61\r
1de04b4f 62\r
63EFI_STATUS\r
64ExSetValueWorker (\r
65 IN UINTN ExTokenNumber,\r
66 IN CONST EFI_GUID *Guid,\r
67 IN VOID *Data,\r
68 IN UINTN Size\r
69 )\r
70;\r
71\r
72\r
73\r
52e1905d 74EFI_STATUS\r
75ExSetWorker (\r
1de04b4f 76 IN UINTN ExTokenNumber,\r
77 IN CONST EFI_GUID *Guid,\r
78 IN VOID *Data,\r
79 IN OUT UINTN *Size,\r
80 IN BOOLEAN PtrType\r
52e1905d 81 )\r
82;\r
83\r
1de04b4f 84\r
85\r
52e1905d 86VOID *\r
87GetWorker (\r
8a43e8dd 88 IN UINTN TokenNumber,\r
0653eb89 89 IN UINTN GetSize\r
52e1905d 90 )\r
91;\r
92\r
1de04b4f 93\r
94\r
52e1905d 95VOID *\r
96ExGetWorker (\r
97 IN CONST EFI_GUID *Guid,\r
8a43e8dd 98 IN UINTN ExTokenNumber,\r
52e1905d 99 IN UINTN GetSize\r
100 )\r
101;\r
102\r
103typedef struct {\r
104 UINTN TokenNumber;\r
105 UINTN Size;\r
106 UINT32 LocalTokenNumberAlias;\r
107} EX_PCD_ENTRY_ATTRIBUTE;\r
108\r
9d6d8b24 109\r
8a43e8dd 110UINTN \r
9d6d8b24 111GetExPcdTokenNumber (\r
52e1905d 112 IN CONST EFI_GUID *Guid,\r
8a43e8dd 113 IN UINTN ExTokenNumber\r
52e1905d 114 )\r
115;\r
878ddf1f 116\r
0653eb89 117\r
118\r
119\r
878ddf1f 120EFI_STATUS\r
121PeiRegisterCallBackWorker (\r
8a43e8dd 122 IN UINTN TokenNumber,\r
00b7af13 123 IN CONST GUID *Guid, OPTIONAL\r
878ddf1f 124 IN PCD_PPI_CALLBACK CallBackFunction,\r
00b7af13 125 IN BOOLEAN Register\r
878ddf1f 126);\r
127\r
0653eb89 128\r
129\r
130\r
878ddf1f 131VOID\r
132BuildPcdDatabase (\r
52e1905d 133 VOID\r
878ddf1f 134 )\r
135;\r
136\r
137\r
1de04b4f 138\r
139\r
140UINTN\r
141GetPtrTypeSize (\r
142 IN UINTN LocalTokenNumberTableIdx,\r
143 OUT UINTN *MaxSize,\r
144 IN PEI_PCD_DATABASE *Database\r
145 )\r
146;\r
147\r
148\r
149\r
150BOOLEAN\r
151SetPtrTypeSize (\r
152 IN UINTN LocalTokenNumberTableIdx,\r
153 IN OUT UINTN *CurrentSize,\r
154 IN PEI_PCD_DATABASE *Database\r
155 )\r
156;\r
157\r
158\r
878ddf1f 159//\r
160// PPI Interface Implementation Declaration.\r
161//\r
00b7af13 162VOID\r
878ddf1f 163EFIAPI\r
164PeiPcdSetSku (\r
8a43e8dd 165 IN UINTN SkuId\r
878ddf1f 166 )\r
167;\r
168\r
169\r
170UINT8\r
171EFIAPI\r
172PeiPcdGet8 (\r
8a43e8dd 173 IN UINTN TokenNumber\r
878ddf1f 174 )\r
175;\r
176\r
177\r
178UINT16\r
179EFIAPI\r
180PeiPcdGet16 (\r
8a43e8dd 181 IN UINTN TokenNumber\r
878ddf1f 182 )\r
183;\r
184\r
185\r
186UINT32\r
187EFIAPI\r
188PeiPcdGet32 (\r
8a43e8dd 189 IN UINTN TokenNumber\r
878ddf1f 190 )\r
191;\r
192\r
193\r
194UINT64\r
195EFIAPI\r
196PeiPcdGet64 (\r
8a43e8dd 197 IN UINTN TokenNumber\r
878ddf1f 198 )\r
199;\r
200\r
201\r
202VOID *\r
203EFIAPI\r
204PeiPcdGetPtr (\r
8a43e8dd 205 IN UINTN TokenNumber\r
878ddf1f 206 )\r
207;\r
208\r
209\r
210BOOLEAN\r
211EFIAPI\r
212PeiPcdGetBool (\r
8a43e8dd 213 IN UINTN TokenNumber\r
878ddf1f 214 )\r
215;\r
216\r
217\r
218UINTN\r
219EFIAPI\r
220PeiPcdGetSize (\r
8a43e8dd 221 IN UINTN TokenNumber\r
878ddf1f 222 )\r
223;\r
224\r
225\r
226UINT8\r
227EFIAPI\r
228PeiPcdGet8Ex (\r
00b7af13 229 IN CONST EFI_GUID *Guid,\r
8a43e8dd 230 IN UINTN TokenNumber\r
878ddf1f 231 )\r
232;\r
233\r
234\r
235UINT16\r
236EFIAPI\r
237PeiPcdGet16Ex (\r
00b7af13 238 IN CONST EFI_GUID *Guid,\r
8a43e8dd 239 IN UINTN TokenNumber\r
878ddf1f 240 )\r
241;\r
242\r
243UINT32\r
244EFIAPI\r
245PeiPcdGet32Ex (\r
00b7af13 246 IN CONST EFI_GUID *Guid,\r
8a43e8dd 247 IN UINTN TokenNumber\r
878ddf1f 248 )\r
249;\r
250\r
251\r
252UINT64\r
253EFIAPI\r
254PeiPcdGet64Ex (\r
00b7af13 255 IN CONST EFI_GUID *Guid,\r
8a43e8dd 256 IN UINTN TokenNumber\r
878ddf1f 257 )\r
258;\r
259\r
260\r
261VOID *\r
262EFIAPI\r
263PeiPcdGetPtrEx (\r
00b7af13 264 IN CONST EFI_GUID *Guid,\r
8a43e8dd 265 IN UINTN TokenNumber\r
878ddf1f 266 )\r
267;\r
268\r
269\r
270BOOLEAN\r
271EFIAPI\r
272PeiPcdGetBoolEx (\r
00b7af13 273 IN CONST EFI_GUID *Guid,\r
8a43e8dd 274 IN UINTN TokenNumber\r
878ddf1f 275 )\r
276;\r
277\r
278\r
279UINTN\r
280EFIAPI\r
281PeiPcdGetSizeEx (\r
00b7af13 282 IN CONST EFI_GUID *Guid,\r
8a43e8dd 283 IN UINTN TokenNumber\r
878ddf1f 284 )\r
285;\r
286\r
287\r
288EFI_STATUS\r
289EFIAPI\r
290PeiPcdSet8 (\r
8a43e8dd 291 IN UINTN TokenNumber,\r
878ddf1f 292 IN UINT8 Value\r
293 )\r
294;\r
295\r
296\r
297EFI_STATUS\r
298EFIAPI\r
299PeiPcdSet16 (\r
8a43e8dd 300 IN UINTN TokenNumber,\r
878ddf1f 301 IN UINT16 Value\r
302 )\r
303;\r
304\r
305\r
306EFI_STATUS\r
307EFIAPI\r
308PeiPcdSet32 (\r
8a43e8dd 309 IN UINTN TokenNumber,\r
878ddf1f 310 IN UINT32 Value\r
311 )\r
312;\r
313\r
314\r
315EFI_STATUS\r
316EFIAPI\r
317PeiPcdSet64 (\r
8a43e8dd 318 IN UINTN TokenNumber,\r
878ddf1f 319 IN UINT64 Value\r
320 )\r
321;\r
322\r
323EFI_STATUS\r
324EFIAPI\r
325PeiPcdSetPtr (\r
1de04b4f 326 IN UINTN TokenNumber,\r
327 IN OUT UINTN *SizeOfBuffer,\r
328 IN VOID *Buffer\r
878ddf1f 329 )\r
330;\r
331\r
332\r
333EFI_STATUS\r
334EFIAPI\r
335PeiPcdSetBool (\r
8a43e8dd 336 IN UINTN TokenNumber,\r
878ddf1f 337 IN BOOLEAN Value\r
338 )\r
339;\r
340\r
341\r
342EFI_STATUS\r
343EFIAPI\r
344PeiPcdSet8Ex (\r
00b7af13 345 IN CONST EFI_GUID *Guid,\r
8a43e8dd 346 IN UINTN TokenNumber,\r
878ddf1f 347 IN UINT8 Value\r
348 )\r
349;\r
350\r
351EFI_STATUS\r
352EFIAPI\r
353PeiPcdSet16Ex (\r
00b7af13 354 IN CONST EFI_GUID *Guid,\r
8a43e8dd 355 IN UINTN TokenNumber,\r
878ddf1f 356 IN UINT16 Value\r
357 )\r
358;\r
359\r
360\r
361EFI_STATUS\r
362EFIAPI\r
363PeiPcdSet32Ex (\r
00b7af13 364 IN CONST EFI_GUID *Guid,\r
8a43e8dd 365 IN UINTN TokenNumber,\r
878ddf1f 366 IN UINT32 Value\r
367 )\r
368;\r
369\r
370\r
371EFI_STATUS\r
372EFIAPI\r
373PeiPcdSet64Ex (\r
00b7af13 374 IN CONST EFI_GUID *Guid,\r
8a43e8dd 375 IN UINTN TokenNumber,\r
878ddf1f 376 IN UINT64 Value\r
377 )\r
378;\r
379\r
380\r
381EFI_STATUS\r
382EFIAPI\r
383PeiPcdSetPtrEx (\r
1de04b4f 384 IN CONST EFI_GUID *Guid,\r
385 IN UINTN TokenNumber,\r
386 IN OUT UINTN *SizeOfBuffer,\r
387 IN VOID *Buffer\r
878ddf1f 388 )\r
389;\r
390\r
391\r
392EFI_STATUS\r
393EFIAPI\r
394PeiPcdSetBoolEx (\r
00b7af13 395 IN CONST EFI_GUID *Guid,\r
8a43e8dd 396 IN UINTN TokenNumber,\r
878ddf1f 397 IN BOOLEAN Value\r
398 )\r
399;\r
400\r
401\r
402\r
403EFI_STATUS\r
404EFIAPI\r
4c114006 405PeiRegisterCallBackOnSet (\r
8a43e8dd 406 IN UINTN TokenNumber,\r
00b7af13 407 IN CONST EFI_GUID *Guid, OPTIONAL\r
408 IN PCD_PPI_CALLBACK CallBackFunction\r
878ddf1f 409 )\r
410;\r
411\r
412\r
413EFI_STATUS\r
414EFIAPI\r
415PcdUnRegisterCallBackOnSet (\r
8a43e8dd 416 IN UINTN TokenNumber,\r
00b7af13 417 IN CONST EFI_GUID *Guid, OPTIONAL\r
418 IN PCD_PPI_CALLBACK CallBackFunction\r
878ddf1f 419 )\r
420;\r
421\r
422\r
423EFI_STATUS\r
424EFIAPI\r
425PeiPcdGetNextToken (\r
00b7af13 426 IN CONST EFI_GUID *Guid, OPTIONAL\r
8a43e8dd 427 IN OUT UINTN *TokenNumber\r
878ddf1f 428 )\r
429;\r
52e1905d 430\r
4276d5da 431\r
432EFI_STATUS\r
433EFIAPI\r
434PeiPcdGetNextTokenSpace (\r
435 IN CONST EFI_GUID **Guid\r
436 )\r
437;\r
438\r
52e1905d 439extern EFI_GUID gPcdDataBaseHobGuid;\r
440\r
441extern EFI_GUID gPcdPeiCallbackFnTableHobGuid;\r
442\r
443extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;\r
444\r
878ddf1f 445#endif\r