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