Try to clarify the gcc story a little bit.
[mirror_edk2.git] / EdkModulePkg / Universal / PCD / Dxe / Service.h
CommitLineData
878ddf1f 1/** @file\r
2Private functions used by PCD DXE driver.\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
52e1905d 21//\r
4acf8ce7 22// Please make sure the PCD Serivce PEIM Version is consistent with\r
23// the version of PCD Database generation tool\r
52e1905d 24//\r
4acf8ce7 25#define PCD_DXE_SERVICE_DRIVER_VERSION 1\r
52e1905d 26\r
27//\r
4acf8ce7 28// PCD_DXE_DATABASE_GENTOOL_VERSION is defined in Autogen.h\r
29// and generated by PCD Database generation tool.\r
52e1905d 30//\r
4acf8ce7 31#if (PCD_DXE_SERVICE_PEIM_VERSION != PCD_DXE_DATABASE_GENTOOL_VERSION)\r
32 #error "Please make sure the version of PCD Service DXE Driver and PCD DXE Database Generation Tool matches"\r
52e1905d 33#endif\r
34\r
4c114006 35\r
36typedef struct {\r
37 LIST_ENTRY Node;\r
38 PCD_PROTOCOL_CALLBACK CallbackFn;\r
39} CALLBACK_FN_ENTRY;\r
40\r
41#define CR_FNENTRY_FROM_LISTNODE(Record, Type, Field) _CR(Record, Type, Field)\r
42\r
52e1905d 43//\r
44// Internal Functions\r
45//\r
46\r
47EFI_STATUS\r
48SetWorker (\r
0653eb89 49 IN PCD_TOKEN_NUMBER TokenNumber,\r
50 IN VOID *Data,\r
51 IN UINTN Size,\r
52 IN BOOLEAN PtrType\r
52e1905d 53 )\r
54;\r
55\r
56EFI_STATUS\r
57ExSetWorker (\r
0653eb89 58 IN PCD_TOKEN_NUMBER ExTokenNumber,\r
52e1905d 59 IN CONST EFI_GUID *Guid,\r
60 VOID *Data,\r
61 UINTN Size,\r
62 BOOLEAN PtrType\r
63 )\r
64;\r
65\r
66\r
67VOID *\r
68GetWorker (\r
9d6d8b24 69 PCD_TOKEN_NUMBER TokenNumber,\r
70 UINTN GetSize\r
52e1905d 71 )\r
72;\r
73\r
74VOID *\r
75ExGetWorker (\r
76 IN CONST EFI_GUID *Guid,\r
0653eb89 77 IN PCD_TOKEN_NUMBER ExTokenNumber,\r
52e1905d 78 IN UINTN GetSize\r
79 ) \r
80;\r
81\r
82UINT32\r
83GetSkuEnabledTokenNumber (\r
84 UINT32 LocalTokenNumber,\r
85 UINTN Size,\r
86 BOOLEAN IsPeiDb\r
87 ) \r
88;\r
89\r
90EFI_STATUS\r
91GetHiiVariable (\r
92 IN EFI_GUID *VariableGuid,\r
93 IN UINT16 *VariableName,\r
0653eb89 94 OUT VOID **VariableData,\r
52e1905d 95 OUT UINTN *VariableSize\r
96 )\r
97;\r
878ddf1f 98\r
99EFI_STATUS\r
100DxeRegisterCallBackWorker (\r
0653eb89 101 IN PCD_TOKEN_NUMBER TokenNumber,\r
4c114006 102 IN CONST EFI_GUID *Guid, OPTIONAL\r
103 IN PCD_PROTOCOL_CALLBACK CallBackFunction\r
878ddf1f 104);\r
105\r
878ddf1f 106EFI_STATUS\r
4c114006 107DxeUnRegisterCallBackWorker (\r
0653eb89 108 IN PCD_TOKEN_NUMBER TokenNumber,\r
4c114006 109 IN CONST EFI_GUID *Guid, OPTIONAL\r
110 IN PCD_PROTOCOL_CALLBACK CallBackFunction\r
111);\r
878ddf1f 112\r
113VOID\r
52e1905d 114BuildPcdDxeDataBase (\r
878ddf1f 115 VOID\r
116);\r
117\r
52e1905d 118\r
9d6d8b24 119PCD_TOKEN_NUMBER\r
120GetExPcdTokenNumber (\r
52e1905d 121 IN CONST EFI_GUID *Guid,\r
9d6d8b24 122 IN PCD_TOKEN_NUMBER ExTokenNumber\r
52e1905d 123 )\r
124;\r
878ddf1f 125//\r
126// Protocol Interface function declaration.\r
127//\r
00b7af13 128VOID\r
878ddf1f 129EFIAPI\r
130DxePcdSetSku (\r
00b7af13 131 IN SKU_ID SkuId\r
878ddf1f 132 )\r
133;\r
134\r
135\r
136UINT8\r
137EFIAPI\r
138DxePcdGet8 (\r
00b7af13 139 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 140 )\r
141;\r
142\r
143\r
144UINT16\r
145EFIAPI\r
146DxePcdGet16 (\r
00b7af13 147 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 148 )\r
149;\r
150\r
151\r
152UINT32\r
153EFIAPI\r
154DxePcdGet32 (\r
00b7af13 155 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 156 )\r
157;\r
158\r
159\r
160UINT64\r
161EFIAPI\r
162DxePcdGet64 (\r
00b7af13 163 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 164 )\r
165;\r
166\r
167\r
168VOID *\r
169EFIAPI\r
170DxePcdGetPtr (\r
00b7af13 171 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 172 )\r
173;\r
174\r
175\r
176BOOLEAN\r
177EFIAPI\r
178DxePcdGetBool (\r
00b7af13 179 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 180 )\r
181;\r
182\r
183\r
184UINTN\r
185EFIAPI\r
186DxePcdGetSize (\r
00b7af13 187 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 188 )\r
189;\r
190\r
191\r
192UINT8\r
193EFIAPI\r
194DxePcdGet8Ex (\r
195 IN CONST EFI_GUID *Guid,\r
00b7af13 196 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 197 )\r
198;\r
199\r
200\r
201UINT16\r
202EFIAPI\r
203DxePcdGet16Ex (\r
204 IN CONST EFI_GUID *Guid,\r
00b7af13 205 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 206 )\r
207;\r
208\r
209\r
210UINT32\r
211EFIAPI\r
212DxePcdGet32Ex (\r
213 IN CONST EFI_GUID *Guid,\r
00b7af13 214 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 215 )\r
216;\r
217\r
218\r
219\r
220UINT64\r
221EFIAPI\r
222DxePcdGet64Ex (\r
223 IN CONST EFI_GUID *Guid,\r
00b7af13 224 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 225 )\r
226;\r
227\r
228\r
229\r
230VOID *\r
231EFIAPI\r
232DxePcdGetPtrEx (\r
233 IN CONST EFI_GUID *Guid,\r
00b7af13 234 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 235 )\r
236;\r
237\r
238\r
239BOOLEAN\r
240EFIAPI\r
241DxePcdGetBoolEx (\r
242 IN CONST EFI_GUID *Guid,\r
00b7af13 243 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 244 )\r
245;\r
246\r
247\r
248UINTN\r
249EFIAPI\r
250DxePcdGetSizeEx (\r
251 IN CONST EFI_GUID *Guid,\r
00b7af13 252 IN PCD_TOKEN_NUMBER TokenNumber\r
878ddf1f 253 )\r
254;\r
255\r
256\r
257EFI_STATUS\r
258EFIAPI\r
259DxePcdSet8 (\r
00b7af13 260 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 261 IN UINT8 Value\r
262 )\r
263;\r
264\r
265\r
266EFI_STATUS\r
267EFIAPI\r
268DxePcdSet16 (\r
00b7af13 269 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 270 IN UINT16 Value\r
271 )\r
272;\r
273\r
274\r
275EFI_STATUS\r
276EFIAPI\r
277DxePcdSet32 (\r
00b7af13 278 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 279 IN UINT32 Value\r
280 )\r
281;\r
282\r
283\r
284EFI_STATUS\r
285EFIAPI\r
286DxePcdSet64 (\r
00b7af13 287 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 288 IN UINT64 Value\r
289 )\r
290;\r
291\r
292\r
293EFI_STATUS\r
294EFIAPI\r
295DxePcdSetPtr (\r
00b7af13 296 IN PCD_TOKEN_NUMBER TokenNumber,\r
297 IN UINTN SizeOfBuffer,\r
298 IN VOID *Buffer\r
878ddf1f 299 )\r
300;\r
301\r
302\r
303EFI_STATUS\r
304EFIAPI\r
305DxePcdSetBool (\r
00b7af13 306 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 307 IN BOOLEAN Value\r
308 )\r
309;\r
310\r
311\r
312EFI_STATUS\r
313EFIAPI\r
314DxePcdSet8Ex (\r
315 IN CONST EFI_GUID *Guid,\r
00b7af13 316 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 317 IN UINT8 Value\r
318 )\r
319;\r
320\r
321\r
322EFI_STATUS\r
323EFIAPI\r
324DxePcdSet16Ex (\r
325 IN CONST EFI_GUID *Guid,\r
00b7af13 326 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 327 IN UINT16 Value\r
328 )\r
329;\r
330\r
331\r
332EFI_STATUS\r
333EFIAPI\r
334DxePcdSet32Ex (\r
335 IN CONST EFI_GUID *Guid,\r
00b7af13 336 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 337 IN UINT32 Value\r
338 )\r
339;\r
340\r
341\r
342EFI_STATUS\r
343EFIAPI\r
344DxePcdSet64Ex (\r
345 IN CONST EFI_GUID *Guid,\r
00b7af13 346 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 347 IN UINT64 Value\r
348 )\r
349;\r
350\r
351\r
352EFI_STATUS\r
353EFIAPI\r
354DxePcdSetPtrEx (\r
00b7af13 355 IN CONST EFI_GUID *Guid,\r
356 IN PCD_TOKEN_NUMBER TokenNumber,\r
357 IN UINTN SizeOfBuffer,\r
358 IN VOID *Buffer\r
878ddf1f 359 )\r
360;\r
361\r
362\r
363EFI_STATUS\r
364EFIAPI\r
365DxePcdSetBoolEx (\r
4c114006 366 IN CONST EFI_GUID *Guid,\r
00b7af13 367 IN PCD_TOKEN_NUMBER TokenNumber,\r
878ddf1f 368 IN BOOLEAN Value\r
369 )\r
370;\r
371\r
372\r
373\r
374EFI_STATUS\r
375EFIAPI\r
4c114006 376DxeRegisterCallBackOnSet (\r
00b7af13 377 IN PCD_TOKEN_NUMBER TokenNumber,\r
4c114006 378 IN CONST EFI_GUID *Guid, OPTIONAL\r
878ddf1f 379 IN PCD_PROTOCOL_CALLBACK CallBackFunction\r
380 )\r
381;\r
382\r
383\r
384EFI_STATUS\r
385EFIAPI\r
4c114006 386DxeUnRegisterCallBackOnSet (\r
00b7af13 387 IN PCD_TOKEN_NUMBER TokenNumber,\r
388 IN CONST EFI_GUID *Guid, OPTIONAL\r
878ddf1f 389 IN PCD_PROTOCOL_CALLBACK CallBackFunction\r
390 )\r
391;\r
392\r
393\r
394EFI_STATUS\r
395EFIAPI\r
396DxePcdGetNextToken (\r
397 IN CONST EFI_GUID *Guid, OPTIONAL\r
00b7af13 398 IN OUT PCD_TOKEN_NUMBER *TokenNumber\r
878ddf1f 399 )\r
400;\r
401\r
4c114006 402PCD_TOKEN_NUMBER\r
403ExGetNextTokeNumber (\r
404 IN CONST EFI_GUID *Guid,\r
405 IN PCD_TOKEN_NUMBER TokenNumber,\r
406 IN EFI_GUID *GuidTable,\r
407 IN UINTN SizeOfGuidTable,\r
408 IN DYNAMICEX_MAPPING *ExMapTable,\r
409 IN UINTN SizeOfExMapTable\r
410 )\r
411;\r
412\r
52e1905d 413extern EFI_GUID gPcdDataBaseHobGuid;\r
878ddf1f 414\r
4c114006 415extern PCD_DATABASE * mPcdDatabase;\r
878ddf1f 416\r
52e1905d 417extern DXE_PCD_DATABASE_INIT gDXEPcdDbInit;\r
878ddf1f 418\r
419#endif\r