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