Corrected a typo error.
[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
58f1099f 25#define PCD_DXE_SERVICE_DRIVER_VERSION 2\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
1de04b4f 47EFI_STATUS\r
48SetValueWorker (\r
49 IN UINTN TokenNumber,\r
50 IN VOID *Data,\r
51 IN UINTN Size\r
52 )\r
53;\r
54\r
52e1905d 55EFI_STATUS\r
56SetWorker (\r
1de04b4f 57 IN UINTN TokenNumber,\r
58 IN VOID *Data,\r
59 IN OUT UINTN *Size,\r
60 IN BOOLEAN PtrType\r
61 )\r
62;\r
63\r
64\r
65EFI_STATUS\r
66ExSetValueWorker (\r
67 IN UINTN ExTokenNumber,\r
68 IN CONST EFI_GUID *Guid,\r
69 IN VOID *Data,\r
70 IN UINTN SetSize\r
52e1905d 71 )\r
72;\r
73\r
1de04b4f 74\r
75\r
52e1905d 76EFI_STATUS\r
77ExSetWorker (\r
1de04b4f 78 IN UINTN ExTokenNumber,\r
79 IN CONST EFI_GUID *Guid,\r
80 IN VOID *Data,\r
81 IN OUT UINTN *Size,\r
82 IN BOOLEAN PtrType\r
52e1905d 83 )\r
84;\r
85\r
86\r
87VOID *\r
88GetWorker (\r
1de04b4f 89 IN UINTN TokenNumber,\r
90 IN UINTN GetSize\r
52e1905d 91 )\r
92;\r
93\r
94VOID *\r
95ExGetWorker (\r
96 IN CONST EFI_GUID *Guid,\r
8a43e8dd 97 IN UINTN ExTokenNumber,\r
52e1905d 98 IN UINTN GetSize\r
99 ) \r
100;\r
101\r
102UINT32\r
103GetSkuEnabledTokenNumber (\r
104 UINT32 LocalTokenNumber,\r
105 UINTN Size,\r
106 BOOLEAN IsPeiDb\r
107 ) \r
108;\r
109\r
110EFI_STATUS\r
111GetHiiVariable (\r
112 IN EFI_GUID *VariableGuid,\r
113 IN UINT16 *VariableName,\r
0653eb89 114 OUT VOID **VariableData,\r
52e1905d 115 OUT UINTN *VariableSize\r
116 )\r
117;\r
878ddf1f 118\r
c0e96fed 119EFI_STATUS\r
120SetHiiVariable (\r
121 IN EFI_GUID *VariableGuid,\r
122 IN UINT16 *VariableName,\r
123 IN CONST VOID *Data,\r
124 IN UINTN DataSize,\r
125 IN UINTN Offset\r
126 )\r
127;\r
128\r
878ddf1f 129EFI_STATUS\r
130DxeRegisterCallBackWorker (\r
8a43e8dd 131 IN UINTN TokenNumber,\r
4c114006 132 IN CONST EFI_GUID *Guid, OPTIONAL\r
133 IN PCD_PROTOCOL_CALLBACK CallBackFunction\r
878ddf1f 134);\r
135\r
878ddf1f 136EFI_STATUS\r
4c114006 137DxeUnRegisterCallBackWorker (\r
8a43e8dd 138 IN UINTN TokenNumber,\r
4c114006 139 IN CONST EFI_GUID *Guid, OPTIONAL\r
140 IN PCD_PROTOCOL_CALLBACK CallBackFunction\r
141);\r
878ddf1f 142\r
143VOID\r
52e1905d 144BuildPcdDxeDataBase (\r
878ddf1f 145 VOID\r
146);\r
147\r
52e1905d 148\r
8a43e8dd 149UINTN \r
9d6d8b24 150GetExPcdTokenNumber (\r
52e1905d 151 IN CONST EFI_GUID *Guid,\r
4f242357 152 IN UINT32 ExTokenNumber\r
52e1905d 153 )\r
154;\r
1de04b4f 155\r
156\r
157UINTN\r
158GetPtrTypeSize (\r
159 IN UINTN LocalTokenNumberTableIdx,\r
160 OUT UINTN *MaxSize\r
161 )\r
162;\r
163\r
164\r
165\r
166BOOLEAN\r
167SetPtrTypeSize (\r
168 IN UINTN LocalTokenNumberTableIdx,\r
169 IN OUT UINTN *CurrentSize\r
170 )\r
171;\r
172\r
878ddf1f 173//\r
174// Protocol Interface function declaration.\r
175//\r
00b7af13 176VOID\r
878ddf1f 177EFIAPI\r
178DxePcdSetSku (\r
8a43e8dd 179 IN UINTN SkuId\r
878ddf1f 180 )\r
181;\r
182\r
183\r
184UINT8\r
185EFIAPI\r
186DxePcdGet8 (\r
8a43e8dd 187 IN UINTN TokenNumber\r
878ddf1f 188 )\r
189;\r
190\r
191\r
192UINT16\r
193EFIAPI\r
194DxePcdGet16 (\r
8a43e8dd 195 IN UINTN TokenNumber\r
878ddf1f 196 )\r
197;\r
198\r
199\r
200UINT32\r
201EFIAPI\r
202DxePcdGet32 (\r
8a43e8dd 203 IN UINTN TokenNumber\r
878ddf1f 204 )\r
205;\r
206\r
207\r
208UINT64\r
209EFIAPI\r
210DxePcdGet64 (\r
8a43e8dd 211 IN UINTN TokenNumber\r
878ddf1f 212 )\r
213;\r
214\r
215\r
216VOID *\r
217EFIAPI\r
218DxePcdGetPtr (\r
8a43e8dd 219 IN UINTN TokenNumber\r
878ddf1f 220 )\r
221;\r
222\r
223\r
224BOOLEAN\r
225EFIAPI\r
226DxePcdGetBool (\r
8a43e8dd 227 IN UINTN TokenNumber\r
878ddf1f 228 )\r
229;\r
230\r
231\r
232UINTN\r
233EFIAPI\r
234DxePcdGetSize (\r
8a43e8dd 235 IN UINTN TokenNumber\r
878ddf1f 236 )\r
237;\r
238\r
239\r
240UINT8\r
241EFIAPI\r
242DxePcdGet8Ex (\r
243 IN CONST EFI_GUID *Guid,\r
8a43e8dd 244 IN UINTN TokenNumber\r
878ddf1f 245 )\r
246;\r
247\r
248\r
249UINT16\r
250EFIAPI\r
251DxePcdGet16Ex (\r
252 IN CONST EFI_GUID *Guid,\r
8a43e8dd 253 IN UINTN TokenNumber\r
878ddf1f 254 )\r
255;\r
256\r
257\r
258UINT32\r
259EFIAPI\r
260DxePcdGet32Ex (\r
261 IN CONST EFI_GUID *Guid,\r
8a43e8dd 262 IN UINTN TokenNumber\r
878ddf1f 263 )\r
264;\r
265\r
266\r
267\r
268UINT64\r
269EFIAPI\r
270DxePcdGet64Ex (\r
271 IN CONST EFI_GUID *Guid,\r
8a43e8dd 272 IN UINTN TokenNumber\r
878ddf1f 273 )\r
274;\r
275\r
276\r
277\r
278VOID *\r
279EFIAPI\r
280DxePcdGetPtrEx (\r
281 IN CONST EFI_GUID *Guid,\r
8a43e8dd 282 IN UINTN TokenNumber\r
878ddf1f 283 )\r
284;\r
285\r
286\r
287BOOLEAN\r
288EFIAPI\r
289DxePcdGetBoolEx (\r
290 IN CONST EFI_GUID *Guid,\r
8a43e8dd 291 IN UINTN TokenNumber\r
878ddf1f 292 )\r
293;\r
294\r
295\r
296UINTN\r
297EFIAPI\r
298DxePcdGetSizeEx (\r
299 IN CONST EFI_GUID *Guid,\r
8a43e8dd 300 IN UINTN TokenNumber\r
878ddf1f 301 )\r
302;\r
303\r
304\r
305EFI_STATUS\r
306EFIAPI\r
307DxePcdSet8 (\r
8a43e8dd 308 IN UINTN TokenNumber,\r
878ddf1f 309 IN UINT8 Value\r
310 )\r
311;\r
312\r
313\r
314EFI_STATUS\r
315EFIAPI\r
316DxePcdSet16 (\r
8a43e8dd 317 IN UINTN TokenNumber,\r
878ddf1f 318 IN UINT16 Value\r
319 )\r
320;\r
321\r
322\r
323EFI_STATUS\r
324EFIAPI\r
325DxePcdSet32 (\r
8a43e8dd 326 IN UINTN TokenNumber,\r
878ddf1f 327 IN UINT32 Value\r
328 )\r
329;\r
330\r
331\r
332EFI_STATUS\r
333EFIAPI\r
334DxePcdSet64 (\r
8a43e8dd 335 IN UINTN TokenNumber,\r
878ddf1f 336 IN UINT64 Value\r
337 )\r
338;\r
339\r
340\r
341EFI_STATUS\r
342EFIAPI\r
343DxePcdSetPtr (\r
1de04b4f 344 IN UINTN TokenNumber,\r
345 IN UINTN *SizeOfBuffer,\r
346 IN VOID *Buffer\r
878ddf1f 347 )\r
348;\r
349\r
350\r
351EFI_STATUS\r
352EFIAPI\r
353DxePcdSetBool (\r
8a43e8dd 354 IN UINTN TokenNumber,\r
878ddf1f 355 IN BOOLEAN Value\r
356 )\r
357;\r
358\r
359\r
360EFI_STATUS\r
361EFIAPI\r
362DxePcdSet8Ex (\r
363 IN CONST EFI_GUID *Guid,\r
8a43e8dd 364 IN UINTN TokenNumber,\r
878ddf1f 365 IN UINT8 Value\r
366 )\r
367;\r
368\r
369\r
370EFI_STATUS\r
371EFIAPI\r
372DxePcdSet16Ex (\r
373 IN CONST EFI_GUID *Guid,\r
8a43e8dd 374 IN UINTN TokenNumber,\r
878ddf1f 375 IN UINT16 Value\r
376 )\r
377;\r
378\r
379\r
380EFI_STATUS\r
381EFIAPI\r
382DxePcdSet32Ex (\r
383 IN CONST EFI_GUID *Guid,\r
8a43e8dd 384 IN UINTN TokenNumber,\r
878ddf1f 385 IN UINT32 Value\r
386 )\r
387;\r
388\r
389\r
390EFI_STATUS\r
391EFIAPI\r
392DxePcdSet64Ex (\r
393 IN CONST EFI_GUID *Guid,\r
8a43e8dd 394 IN UINTN TokenNumber,\r
878ddf1f 395 IN UINT64 Value\r
396 )\r
397;\r
398\r
399\r
400EFI_STATUS\r
401EFIAPI\r
402DxePcdSetPtrEx (\r
1de04b4f 403 IN CONST EFI_GUID *Guid,\r
404 IN UINTN TokenNumber,\r
405 IN OUT UINTN *SizeOfBuffer,\r
406 IN VOID *Buffer\r
878ddf1f 407 )\r
408;\r
409\r
410\r
411EFI_STATUS\r
412EFIAPI\r
413DxePcdSetBoolEx (\r
4c114006 414 IN CONST EFI_GUID *Guid,\r
8a43e8dd 415 IN UINTN TokenNumber,\r
878ddf1f 416 IN BOOLEAN Value\r
417 )\r
418;\r
419\r
420\r
421\r
422EFI_STATUS\r
423EFIAPI\r
4c114006 424DxeRegisterCallBackOnSet (\r
8a43e8dd 425 IN UINTN TokenNumber,\r
4c114006 426 IN CONST EFI_GUID *Guid, OPTIONAL\r
878ddf1f 427 IN PCD_PROTOCOL_CALLBACK CallBackFunction\r
428 )\r
429;\r
430\r
431\r
432EFI_STATUS\r
433EFIAPI\r
4c114006 434DxeUnRegisterCallBackOnSet (\r
8a43e8dd 435 IN UINTN TokenNumber,\r
00b7af13 436 IN CONST EFI_GUID *Guid, OPTIONAL\r
878ddf1f 437 IN PCD_PROTOCOL_CALLBACK CallBackFunction\r
438 )\r
439;\r
440\r
441\r
442EFI_STATUS\r
443EFIAPI\r
444DxePcdGetNextToken (\r
445 IN CONST EFI_GUID *Guid, OPTIONAL\r
8a43e8dd 446 IN OUT UINTN *TokenNumber\r
878ddf1f 447 )\r
448;\r
449\r
8a43e8dd 450UINTN \r
4c114006 451ExGetNextTokeNumber (\r
452 IN CONST EFI_GUID *Guid,\r
8a43e8dd 453 IN UINTN TokenNumber,\r
4c114006 454 IN EFI_GUID *GuidTable,\r
455 IN UINTN SizeOfGuidTable,\r
456 IN DYNAMICEX_MAPPING *ExMapTable,\r
457 IN UINTN SizeOfExMapTable\r
458 )\r
459;\r
460\r
52e1905d 461extern EFI_GUID gPcdDataBaseHobGuid;\r
878ddf1f 462\r
4c114006 463extern PCD_DATABASE * mPcdDatabase;\r
878ddf1f 464\r
52e1905d 465extern DXE_PCD_DATABASE_INIT gDXEPcdDbInit;\r
878ddf1f 466\r
467#endif\r