Try to clarify the gcc story a little bit.
[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
25#define PCD_PEI_SERVICE_DRIVER_VERSION 1\r
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
43EFI_STATUS\r
52e1905d 44SetWorker (\r
0653eb89 45 IN PCD_TOKEN_NUMBER TokenNumber,\r
46 IN VOID *Data,\r
47 IN UINTN Size,\r
48 IN BOOLEAN PtrType\r
52e1905d 49 )\r
50;\r
878ddf1f 51\r
52e1905d 52EFI_STATUS\r
53ExSetWorker (\r
0653eb89 54 IN PCD_TOKEN_NUMBER ExTokenNumber,\r
52e1905d 55 IN CONST EFI_GUID *Guid,\r
0653eb89 56 IN VOID *Data,\r
57 IN UINTN Size,\r
58 IN BOOLEAN PtrType\r
52e1905d 59 )\r
60;\r
61\r
62VOID *\r
63GetWorker (\r
0653eb89 64 IN PCD_TOKEN_NUMBER TokenNumber,\r
65 IN UINTN GetSize\r
52e1905d 66 )\r
67;\r
68\r
69VOID *\r
70ExGetWorker (\r
71 IN CONST EFI_GUID *Guid,\r
0653eb89 72 IN PCD_TOKEN_NUMBER ExTokenNumber,\r
52e1905d 73 IN UINTN GetSize\r
74 )\r
75;\r
76\r
77typedef struct {\r
78 UINTN TokenNumber;\r
79 UINTN Size;\r
80 UINT32 LocalTokenNumberAlias;\r
81} EX_PCD_ENTRY_ATTRIBUTE;\r
82\r
9d6d8b24 83\r
84PCD_TOKEN_NUMBER\r
85GetExPcdTokenNumber (\r
52e1905d 86 IN CONST EFI_GUID *Guid,\r
9d6d8b24 87 IN PCD_TOKEN_NUMBER ExTokenNumber\r
52e1905d 88 )\r
89;\r
878ddf1f 90\r
0653eb89 91\r
92\r
93\r
878ddf1f 94EFI_STATUS\r
95PeiRegisterCallBackWorker (\r
0653eb89 96 IN PCD_TOKEN_NUMBER TokenNumber,\r
00b7af13 97 IN CONST GUID *Guid, OPTIONAL\r
878ddf1f 98 IN PCD_PPI_CALLBACK CallBackFunction,\r
00b7af13 99 IN BOOLEAN Register\r
878ddf1f 100);\r
101\r
0653eb89 102\r
103\r
104\r
878ddf1f 105VOID\r
106BuildPcdDatabase (\r
52e1905d 107 VOID\r
878ddf1f 108 )\r
109;\r
110\r
111\r
878ddf1f 112//\r
113// PPI Interface Implementation Declaration.\r
114//\r
00b7af13 115VOID\r
878ddf1f 116EFIAPI\r
117PeiPcdSetSku (\r
00b7af13 118 IN SKU_ID SkuId\r
878ddf1f 119 )\r
120;\r
121\r
122\r
123UINT8\r
124EFIAPI\r
125PeiPcdGet8 (\r
00b7af13 126 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 127 )\r
128;\r
129\r
130\r
131UINT16\r
132EFIAPI\r
133PeiPcdGet16 (\r
00b7af13 134 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 135 )\r
136;\r
137\r
138\r
139UINT32\r
140EFIAPI\r
141PeiPcdGet32 (\r
00b7af13 142 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 143 )\r
144;\r
145\r
146\r
147UINT64\r
148EFIAPI\r
149PeiPcdGet64 (\r
00b7af13 150 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 151 )\r
152;\r
153\r
154\r
155VOID *\r
156EFIAPI\r
157PeiPcdGetPtr (\r
00b7af13 158 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 159 )\r
160;\r
161\r
162\r
163BOOLEAN\r
164EFIAPI\r
165PeiPcdGetBool (\r
00b7af13 166 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 167 )\r
168;\r
169\r
170\r
171UINTN\r
172EFIAPI\r
173PeiPcdGetSize (\r
00b7af13 174 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 175 )\r
176;\r
177\r
178\r
179UINT8\r
180EFIAPI\r
181PeiPcdGet8Ex (\r
00b7af13 182 IN CONST EFI_GUID *Guid,\r
183 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 184 )\r
185;\r
186\r
187\r
188UINT16\r
189EFIAPI\r
190PeiPcdGet16Ex (\r
00b7af13 191 IN CONST EFI_GUID *Guid,\r
192 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 193 )\r
194;\r
195\r
196UINT32\r
197EFIAPI\r
198PeiPcdGet32Ex (\r
00b7af13 199 IN CONST EFI_GUID *Guid,\r
200 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 201 )\r
202;\r
203\r
204\r
205UINT64\r
206EFIAPI\r
207PeiPcdGet64Ex (\r
00b7af13 208 IN CONST EFI_GUID *Guid,\r
209 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 210 )\r
211;\r
212\r
213\r
214VOID *\r
215EFIAPI\r
216PeiPcdGetPtrEx (\r
00b7af13 217 IN CONST EFI_GUID *Guid,\r
218 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 219 )\r
220;\r
221\r
222\r
223BOOLEAN\r
224EFIAPI\r
225PeiPcdGetBoolEx (\r
00b7af13 226 IN CONST EFI_GUID *Guid,\r
227 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 228 )\r
229;\r
230\r
231\r
232UINTN\r
233EFIAPI\r
234PeiPcdGetSizeEx (\r
00b7af13 235 IN CONST EFI_GUID *Guid,\r
236 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 237 )\r
238;\r
239\r
240\r
241EFI_STATUS\r
242EFIAPI\r
243PeiPcdSet8 (\r
00b7af13 244 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 245 IN UINT8 Value\r
246 )\r
247;\r
248\r
249\r
250EFI_STATUS\r
251EFIAPI\r
252PeiPcdSet16 (\r
00b7af13 253 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 254 IN UINT16 Value\r
255 )\r
256;\r
257\r
258\r
259EFI_STATUS\r
260EFIAPI\r
261PeiPcdSet32 (\r
00b7af13 262 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 263 IN UINT32 Value\r
264 )\r
265;\r
266\r
267\r
268EFI_STATUS\r
269EFIAPI\r
270PeiPcdSet64 (\r
00b7af13 271 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 272 IN UINT64 Value\r
273 )\r
274;\r
275\r
276EFI_STATUS\r
277EFIAPI\r
278PeiPcdSetPtr (\r
00b7af13 279 IN PCD_TOKEN_NUMBER TokenNumber,\r
280 IN UINTN SizeOfBuffer,\r
281 IN VOID *Buffer\r
878ddf1f 282 )\r
283;\r
284\r
285\r
286EFI_STATUS\r
287EFIAPI\r
288PeiPcdSetBool (\r
00b7af13 289 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 290 IN BOOLEAN Value\r
291 )\r
292;\r
293\r
294\r
295EFI_STATUS\r
296EFIAPI\r
297PeiPcdSet8Ex (\r
00b7af13 298 IN CONST EFI_GUID *Guid,\r
299 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 300 IN UINT8 Value\r
301 )\r
302;\r
303\r
304EFI_STATUS\r
305EFIAPI\r
306PeiPcdSet16Ex (\r
00b7af13 307 IN CONST EFI_GUID *Guid,\r
308 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 309 IN UINT16 Value\r
310 )\r
311;\r
312\r
313\r
314EFI_STATUS\r
315EFIAPI\r
316PeiPcdSet32Ex (\r
00b7af13 317 IN CONST EFI_GUID *Guid,\r
318 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 319 IN UINT32 Value\r
320 )\r
321;\r
322\r
323\r
324EFI_STATUS\r
325EFIAPI\r
326PeiPcdSet64Ex (\r
00b7af13 327 IN CONST EFI_GUID *Guid,\r
328 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 329 IN UINT64 Value\r
330 )\r
331;\r
332\r
333\r
334EFI_STATUS\r
335EFIAPI\r
336PeiPcdSetPtrEx (\r
00b7af13 337 IN CONST EFI_GUID *Guid,\r
338 IN PCD_TOKEN_NUMBER TokenNumber,\r
339 IN UINTN SizeOfBuffer,\r
340 IN VOID *Buffer\r
878ddf1f 341 )\r
342;\r
343\r
344\r
345EFI_STATUS\r
346EFIAPI\r
347PeiPcdSetBoolEx (\r
00b7af13 348 IN CONST EFI_GUID *Guid,\r
349 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 350 IN BOOLEAN Value\r
351 )\r
352;\r
353\r
354\r
355\r
356EFI_STATUS\r
357EFIAPI\r
4c114006 358PeiRegisterCallBackOnSet (\r
00b7af13 359 IN PCD_TOKEN_NUMBER TokenNumber,\r
360 IN CONST EFI_GUID *Guid, OPTIONAL\r
361 IN PCD_PPI_CALLBACK CallBackFunction\r
878ddf1f 362 )\r
363;\r
364\r
365\r
366EFI_STATUS\r
367EFIAPI\r
368PcdUnRegisterCallBackOnSet (\r
00b7af13 369 IN PCD_TOKEN_NUMBER TokenNumber,\r
370 IN CONST EFI_GUID *Guid, OPTIONAL\r
371 IN PCD_PPI_CALLBACK CallBackFunction\r
878ddf1f 372 )\r
373;\r
374\r
375\r
376EFI_STATUS\r
377EFIAPI\r
378PeiPcdGetNextToken (\r
00b7af13 379 IN CONST EFI_GUID *Guid, OPTIONAL\r
380 IN OUT PCD_TOKEN_NUMBER *TokenNumber\r
878ddf1f 381 )\r
382;\r
52e1905d 383\r
384extern EFI_GUID gPcdDataBaseHobGuid;\r
385\r
386extern EFI_GUID gPcdPeiCallbackFnTableHobGuid;\r
387\r
388extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;\r
389\r
878ddf1f 390#endif\r