]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | PCD Library Class Interface Declarations\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation \r | |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
13 | \r | |
14 | Module Name: PcdLib.h\r | |
15 | \r | |
16 | **/\r | |
17 | \r | |
18 | #ifndef __PCD_LIB_H__\r | |
19 | #define __PCD_LIB_H__\r | |
20 | \r | |
21 | \r | |
22 | #define PcdToken(TokenName) _PCD_TOKEN_##TokenName\r | |
23 | \r | |
24 | \r | |
25 | //\r | |
26 | // Feature Flag is in the form of a global constant\r | |
27 | //\r | |
28 | #define FeaturePcdGet(TokenName) _gPcd_FixedAtBuild_##TokenName\r | |
29 | \r | |
30 | \r | |
31 | //\r | |
32 | // Fixed is fixed at build time\r | |
33 | //\r | |
34 | #define FixedPcdGet8(TokenName) _gPcd_FixedAtBuild_##TokenName\r | |
35 | #define FixedPcdGet16(TokenName) _gPcd_FixedAtBuild_##TokenName\r | |
36 | #define FixedPcdGet32(TokenName) _gPcd_FixedAtBuild_##TokenName\r | |
37 | #define FixedPcdGet64(TokenName) _gPcd_FixedAtBuild_##TokenName\r | |
38 | #define FixedPcdGetBool(TokenName) _gPcd_FixedAtBuild_##TokenName\r | |
39 | \r | |
40 | \r | |
41 | //\r | |
42 | // BugBug: This works for strings, but not constants.\r | |
43 | //\r | |
44 | #define FixedPcdGetPtr(TokenName) ((VOID *)_gPcd_FixedAtBuild_##TokenName)\r | |
45 | \r | |
46 | \r | |
47 | //\r | |
48 | // (Binary) Patch is in the form of a global variable\r | |
49 | //\r | |
50 | #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName\r | |
51 | #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName\r | |
52 | #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName\r | |
53 | #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName\r | |
54 | #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName\r | |
55 | #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)\r | |
56 | \r | |
57 | \r | |
58 | //\r | |
59 | // Dynamic is via the protocol with only the TokenNumber as argument\r | |
60 | // It can also be Patch or Fixed type based on a build option\r | |
61 | //\r | |
62 | #define PcdGet8(TokenName) _PCD_MODE_8_##TokenName\r | |
63 | #define PcdGet16(TokenName) _PCD_MODE_16_##TokenName\r | |
64 | #define PcdGet32(TokenName) _PCD_MODE_32_##TokenName\r | |
65 | #define PcdGet64(TokenName) _PCD_MODE_64_##TokenName\r | |
66 | #define PcdGetPtr(TokenName) _PCD_MODE_PTR_##TokenName\r | |
67 | #define PcdGetBool(TokenName) _PCD_MODE_BOOL_##TokenName\r | |
68 | \r | |
69 | \r | |
70 | //\r | |
71 | // Dynamic Ex is to support binary distribution\r | |
72 | //\r | |
73 | #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 (Guid, _PCD_TOKEN_##TokenName)\r | |
74 | #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 (Guid, _PCD_TOKEN_##TokenName)\r | |
75 | #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 (Guid, _PCD_TOKEN_##TokenName)\r | |
76 | #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 (Guid, _PCD_TOKEN_##TokenName)\r | |
77 | #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr (Guid, _PCD_TOKEN_##TokenName)\r | |
78 | #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool (Guid, _PCD_TOKEN_##TokenName)\r | |
79 | \r | |
80 | \r | |
81 | //\r | |
82 | // Dynamic Set\r | |
83 | //\r | |
84 | #define PcdSet8(TokenName, Value) LibPcdSet8 (_PCD_TOKEN_##TokenName, Value)\r | |
85 | #define PcdSet16(TokenName, Value) LibPcdSet16 (_PCD_TOKEN_##TokenName, Value)\r | |
86 | #define PcdSet32(TokenName, Value) LibPcdSet32 (_PCD_TOKEN_##TokenName, Value)\r | |
87 | #define PcdSet64(TokenName, Value) LibPcdSet64 (_PCD_TOKEN_##TokenName, Value)\r | |
88 | #define PcdSetPtr(TokenName, Value) LibPcdSetPtr (_PCD_TOKEN_##TokenName, Value)\r | |
89 | #define PcdSetBool(TokenName, Value) LibPcdSetBool(_PCD_TOKEN_##TokenName, Value)\r | |
90 | \r | |
91 | \r | |
92 | //\r | |
93 | // Dynamic Set Ex\r | |
94 | //\r | |
95 | #define PcdSetEx8 (Guid, TokenName, Value) LibPcdSetEx8 (Guid, _PCD_TOKEN_##TokenName, Value)\r | |
96 | #define PcdSetEx16 (Guid, TokenName, Value) LibPcdSetEx16 (Guid, _PCD_TOKEN_##TokenName, Value)\r | |
97 | #define PcdSetEx32 (Guid, TokenName, Value) LibPcdSetEx32 (Guid, _PCD_TOKEN_##TokenName, Value)\r | |
98 | #define PcdSetEx64 (Guid, TokenName, Value) LibPcdSetEx64 (Guid, _PCD_TOKEN_##TokenName, Value)\r | |
99 | #define PcdSetExPtr (Guid, TokenName, Value) LibPcdSetExPtr (Guid, _PCD_TOKEN_##TokenName, Value)\r | |
100 | #define PcdSetExBool(Guid, TokenName, Value) LibPcdSetExBool(Guid, _PCD_TOKEN_##TokenName, Value)\r | |
101 | \r | |
102 | \r | |
103 | /**\r | |
104 | Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r | |
105 | \r | |
106 | @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and \r | |
107 | set values associated with a PCD token.\r | |
108 | \r | |
109 | @retval UINTN Return the SKU ID that just be set.\r | |
110 | \r | |
111 | **/\r | |
112 | UINTN\r | |
113 | EFIAPI\r | |
114 | LibPcdSetSku (\r | |
115 | IN UINTN SkuId\r | |
116 | );\r | |
117 | \r | |
118 | \r | |
119 | /**\r | |
120 | Returns the 8-bit value for the token specified by TokenNumber. \r | |
121 | \r | |
122 | @param[in] The PCD token number to retrieve a current value for.\r | |
123 | \r | |
124 | @retval UINT8 Returns the 8-bit value for the token specified by TokenNumber. \r | |
125 | \r | |
126 | **/\r | |
127 | UINT8\r | |
128 | EFIAPI\r | |
129 | LibPcdGet8 (\r | |
130 | IN UINTN TokenNumber\r | |
131 | );\r | |
132 | \r | |
133 | \r | |
134 | /**\r | |
135 | Returns the 16-bit value for the token specified by TokenNumber. \r | |
136 | \r | |
137 | @param[in] The PCD token number to retrieve a current value for.\r | |
138 | \r | |
139 | @retval UINT16 Returns the 16-bit value for the token specified by TokenNumber. \r | |
140 | \r | |
141 | **/\r | |
142 | UINT16\r | |
143 | EFIAPI\r | |
144 | LibPcdGet16 (\r | |
145 | IN UINTN TokenNumber\r | |
146 | );\r | |
147 | \r | |
148 | \r | |
149 | /**\r | |
150 | Returns the 32-bit value for the token specified by TokenNumber. \r | |
151 | \r | |
152 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
153 | \r | |
154 | @retval UINT32 Returns the 32-bit value for the token specified by TokenNumber.\r | |
155 | \r | |
156 | **/\r | |
157 | UINT32\r | |
158 | EFIAPI\r | |
159 | LibPcdGet32 (\r | |
160 | IN UINTN TokenNumber\r | |
161 | );\r | |
162 | \r | |
163 | \r | |
164 | /**\r | |
165 | Returns the 64-bit value for the token specified by TokenNumber.\r | |
166 | \r | |
167 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
168 | \r | |
169 | @retval UINT64 Returns the 64-bit value for the token specified by TokenNumber.\r | |
170 | \r | |
171 | **/\r | |
172 | UINT64\r | |
173 | EFIAPI\r | |
174 | LibPcdGet64 (\r | |
175 | IN UINTN TokenNumber\r | |
176 | );\r | |
177 | \r | |
178 | \r | |
179 | /**\r | |
180 | Returns the pointer to the buffer of the token specified by TokenNumber.\r | |
181 | \r | |
182 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
183 | \r | |
184 | @retval VOID* Returns the pointer to the token specified by TokenNumber.\r | |
185 | \r | |
186 | **/\r | |
187 | VOID *\r | |
188 | EFIAPI\r | |
189 | LibPcdGetPtr (\r | |
190 | IN UINTN TokenNumber\r | |
191 | );\r | |
192 | \r | |
193 | \r | |
194 | /**\r | |
195 | Returns the Boolean value of the token specified by TokenNumber. \r | |
196 | \r | |
197 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
198 | \r | |
199 | @retval BOOLEAN Returns the Boolean value of the token specified by TokenNumber. \r | |
200 | \r | |
201 | **/\r | |
202 | BOOLEAN \r | |
203 | EFIAPI\r | |
204 | LibPcdGetBool (\r | |
205 | IN UINTN TokenNumber\r | |
206 | );\r | |
207 | \r | |
208 | \r | |
209 | /**\r | |
210 | Returns the size of the token specified by TokenNumber. \r | |
211 | \r | |
212 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
213 | \r | |
214 | @retval UINTN Returns the size of the token specified by TokenNumber. \r | |
215 | \r | |
216 | **/\r | |
217 | UINTN\r | |
218 | EFIAPI\r | |
219 | LibPcdGetSize (\r | |
220 | IN UINTN TokenNumber\r | |
221 | );\r | |
222 | \r | |
223 | \r | |
224 | /**\r | |
225 | Returns the 8-bit value for the token specified by TokenNumber and Guid.\r | |
226 | If Guid is NULL, then ASSERT(). \r | |
227 | \r | |
228 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
229 | which namespace to retrieve a value from.\r | |
230 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
231 | \r | |
232 | @retval UINT8 Return the UINT8.\r | |
233 | \r | |
234 | **/\r | |
235 | UINT8\r | |
236 | EFIAPI\r | |
237 | LibPcdGetEx8 (\r | |
238 | IN CONST GUID *Guid,\r | |
239 | IN UINTN TokenNumber\r | |
240 | );\r | |
241 | \r | |
242 | \r | |
243 | /**\r | |
244 | Returns the 16-bit value for the token specified by TokenNumber and Guid.\r | |
245 | If Guid is NULL, then ASSERT(). \r | |
246 | \r | |
247 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
248 | which namespace to retrieve a value from.\r | |
249 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
250 | \r | |
251 | @retval UINT16 Return the UINT16.\r | |
252 | \r | |
253 | **/\r | |
254 | UINT16\r | |
255 | EFIAPI\r | |
256 | LibPcdGetEx16 (\r | |
257 | IN CONST GUID *Guid,\r | |
258 | IN UINTN TokenNumber\r | |
259 | );\r | |
260 | \r | |
261 | \r | |
262 | /**\r | |
263 | Returns the 32-bit value for the token specified by TokenNumber and Guid.\r | |
264 | If Guid is NULL, then ASSERT(). \r | |
265 | \r | |
266 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
267 | which namespace to retrieve a value from.\r | |
268 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
269 | \r | |
270 | @retval UINT32 Return the UINT32.\r | |
271 | \r | |
272 | **/\r | |
273 | UINT32\r | |
274 | EFIAPI\r | |
275 | LibPcdGetEx32 (\r | |
276 | IN CONST GUID *Guid,\r | |
277 | IN UINTN TokenNumber\r | |
278 | );\r | |
279 | \r | |
280 | \r | |
281 | /**\r | |
282 | Returns the 64-bit value for the token specified by TokenNumber and Guid.\r | |
283 | If Guid is NULL, then ASSERT(). \r | |
284 | \r | |
285 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
286 | which namespace to retrieve a value from.\r | |
287 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
288 | \r | |
289 | @retval UINT64 Return the UINT64.\r | |
290 | \r | |
291 | **/\r | |
292 | UINT64\r | |
293 | EFIAPI\r | |
294 | LibPcdGetEx64 (\r | |
295 | IN CONST GUID *Guid,\r | |
296 | IN UINTN TokenNumber\r | |
297 | );\r | |
298 | \r | |
299 | \r | |
300 | /**\r | |
301 | Returns the pointer to the buffer of token specified by TokenNumber and Guid.\r | |
302 | If Guid is NULL, then ASSERT(). \r | |
303 | \r | |
304 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
305 | which namespace to retrieve a value from.\r | |
306 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
307 | \r | |
308 | @retval VOID* Return the VOID* pointer.\r | |
309 | \r | |
310 | **/\r | |
311 | VOID *\r | |
312 | EFIAPI\r | |
313 | LibPcdGetExPtr (\r | |
314 | IN CONST GUID *Guid,\r | |
315 | IN UINTN TokenNumber\r | |
316 | );\r | |
317 | \r | |
318 | \r | |
319 | /**\r | |
320 | Returns the Boolean value of the token specified by TokenNumber and Guid. \r | |
321 | If Guid is NULL, then ASSERT(). \r | |
322 | \r | |
323 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
324 | which namespace to retrieve a value from.\r | |
325 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
326 | \r | |
327 | @retval BOOLEAN Return the BOOLEAN.\r | |
328 | \r | |
329 | **/\r | |
330 | BOOLEAN\r | |
331 | EFIAPI\r | |
332 | LibPcdGetExBool (\r | |
333 | IN CONST GUID *Guid,\r | |
334 | IN UINTN TokenNumber\r | |
335 | );\r | |
336 | \r | |
337 | \r | |
338 | /**\r | |
339 | Returns the size of the token specified by TokenNumber and Guid. \r | |
340 | If Guid is NULL, then ASSERT(). \r | |
341 | \r | |
342 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
343 | which namespace to retrieve a value from.\r | |
344 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
345 | \r | |
346 | @retval UINTN Return the size.\r | |
347 | \r | |
348 | **/\r | |
349 | UINTN\r | |
350 | EFIAPI\r | |
351 | LibPcdGetExSize (\r | |
352 | IN CONST GUID *Guid,\r | |
353 | IN UINTN TokenNumber\r | |
354 | );\r | |
355 | \r | |
356 | \r | |
357 | /**\r | |
358 | Sets the 8-bit value for the token specified by TokenNumber \r | |
359 | to the value specified by Value. Value is returned.\r | |
360 | \r | |
361 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
362 | @param[in] Value The 8-bit value to set.\r | |
363 | \r | |
364 | @retval UINT8 Return the value been set.\r | |
365 | \r | |
366 | **/\r | |
367 | UINT8\r | |
368 | EFIAPI\r | |
369 | LibPcdSet8 (\r | |
370 | IN UINTN TokenNumber,\r | |
371 | IN UINT8 Value\r | |
372 | );\r | |
373 | \r | |
374 | \r | |
375 | /**\r | |
376 | Sets the 16-bit value for the token specified by TokenNumber \r | |
377 | to the value specified by Value. Value is returned.\r | |
378 | \r | |
379 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
380 | @param[in] Value The 16-bit value to set.\r | |
381 | \r | |
382 | @retval UINT16 Return the value been set.\r | |
383 | \r | |
384 | **/\r | |
385 | UINT16\r | |
386 | EFIAPI\r | |
387 | LibPcdSet16 (\r | |
388 | IN UINTN TokenNumber,\r | |
389 | IN UINT16 Value\r | |
390 | );\r | |
391 | \r | |
392 | \r | |
393 | /**\r | |
394 | Sets the 32-bit value for the token specified by TokenNumber \r | |
395 | to the value specified by Value. Value is returned.\r | |
396 | \r | |
397 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
398 | @param[in] Value The 32-bit value to set.\r | |
399 | \r | |
400 | @retval UINT32 Return the value been set.\r | |
401 | \r | |
402 | **/\r | |
403 | UINT32\r | |
404 | EFIAPI\r | |
405 | LibPcdSet32 (\r | |
406 | IN UINTN TokenNumber,\r | |
407 | IN UINT32 Value\r | |
408 | );\r | |
409 | \r | |
410 | \r | |
411 | /**\r | |
412 | Sets the 64-bit value for the token specified by TokenNumber \r | |
413 | to the value specified by Value. Value is returned.\r | |
414 | \r | |
415 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
416 | @param[in] Value The 64-bit value to set.\r | |
417 | \r | |
418 | @retval UINT64 Return the value been set.\r | |
419 | \r | |
420 | **/\r | |
421 | UINT64\r | |
422 | EFIAPI\r | |
423 | LibPcdSet64 (\r | |
424 | IN UINTN TokenNumber,\r | |
425 | IN UINT64 Value\r | |
426 | );\r | |
427 | \r | |
428 | \r | |
429 | /**\r | |
430 | Sets a buffer for the token specified by TokenNumber to \r | |
431 | the value specified by Value. Value is returned.\r | |
432 | If Value is NULL, then ASSERT().\r | |
433 | \r | |
434 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
435 | @param[in] Value A pointer to the buffer to set.\r | |
436 | \r | |
437 | @retval VOID* Return the pointer for the buffer been set.\r | |
438 | \r | |
439 | **/\r | |
440 | VOID*\r | |
441 | EFIAPI\r | |
442 | LibPcdSetPtr (\r | |
443 | IN UINTN TokenNumber,\r | |
444 | IN CONST VOID *Value\r | |
445 | );\r | |
446 | \r | |
447 | \r | |
448 | /**\r | |
449 | Sets the Boolean value for the token specified by TokenNumber \r | |
450 | to the value specified by Value. Value is returned.\r | |
451 | \r | |
452 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
453 | @param[in] Value The boolean value to set.\r | |
454 | \r | |
455 | @retval BOOLEAN Return the value been set.\r | |
456 | \r | |
457 | **/\r | |
458 | BOOLEAN\r | |
459 | EFIAPI\r | |
460 | LibPcdSetBool (\r | |
461 | IN UINTN TokenNumber,\r | |
462 | IN BOOLEAN Value\r | |
463 | );\r | |
464 | \r | |
465 | \r | |
466 | /**\r | |
467 | Sets the 8-bit value for the token specified by TokenNumber and \r | |
468 | Guid to the value specified by Value. Value is returned.\r | |
469 | If Guid is NULL, then ASSERT().\r | |
470 | \r | |
471 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
472 | designates which namespace to set a value from.\r | |
473 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
474 | @param[in] Value The 8-bit value to set.\r | |
475 | \r | |
476 | @retval UINT8 Return the value been set.\r | |
477 | \r | |
478 | **/\r | |
479 | UINT8\r | |
480 | EFIAPI\r | |
481 | LibPcdSetEx8 (\r | |
482 | IN CONST GUID *Guid,\r | |
483 | IN UINTN TokenNumber,\r | |
484 | IN UINT8 Value\r | |
485 | );\r | |
486 | \r | |
487 | \r | |
488 | /**\r | |
489 | Sets the 16-bit value for the token specified by TokenNumber and \r | |
490 | Guid to the value specified by Value. Value is returned.\r | |
491 | If Guid is NULL, then ASSERT().\r | |
492 | \r | |
493 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
494 | designates which namespace to set a value from.\r | |
495 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
496 | @param[in] Value The 16-bit value to set.\r | |
497 | \r | |
498 | @retval UINT8 Return the value been set.\r | |
499 | \r | |
500 | **/\r | |
501 | UINT16\r | |
502 | EFIAPI\r | |
503 | LibPcdSetEx16 (\r | |
504 | IN CONST GUID *Guid,\r | |
505 | IN UINTN TokenNumber,\r | |
506 | IN UINT16 Value\r | |
507 | );\r | |
508 | \r | |
509 | \r | |
510 | /**\r | |
511 | Sets the 32-bit value for the token specified by TokenNumber and \r | |
512 | Guid to the value specified by Value. Value is returned.\r | |
513 | If Guid is NULL, then ASSERT().\r | |
514 | \r | |
515 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
516 | designates which namespace to set a value from.\r | |
517 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
518 | @param[in] Value The 32-bit value to set.\r | |
519 | \r | |
520 | @retval UINT32 Return the value been set.\r | |
521 | \r | |
522 | **/\r | |
523 | UINT32\r | |
524 | EFIAPI\r | |
525 | LibPcdSetEx32 (\r | |
526 | IN CONST GUID *Guid,\r | |
527 | IN UINTN TokenNumber,\r | |
528 | IN UINT32 Value\r | |
529 | );\r | |
530 | \r | |
531 | \r | |
532 | /**\r | |
533 | Sets the 64-bit value for the token specified by TokenNumber and \r | |
534 | Guid to the value specified by Value. Value is returned.\r | |
535 | If Guid is NULL, then ASSERT().\r | |
536 | \r | |
537 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
538 | designates which namespace to set a value from.\r | |
539 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
540 | @param[in] Value The 64-bit value to set.\r | |
541 | \r | |
542 | @retval UINT64 Return the value been set.\r | |
543 | \r | |
544 | **/\r | |
545 | UINT64\r | |
546 | EFIAPI\r | |
547 | LibPcdSetEx64 (\r | |
548 | IN CONST GUID *Guid,\r | |
549 | IN UINTN TokenNumber,\r | |
550 | IN UINT64 Value\r | |
551 | );\r | |
552 | \r | |
553 | \r | |
554 | /**\r | |
555 | Sets a buffer for the token specified by TokenNumber and \r | |
556 | Guid to the value specified by Value. Value is returned.\r | |
557 | If Guid is NULL, then ASSERT().\r | |
558 | If Value is NULL, then ASSERT().\r | |
559 | \r | |
560 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
561 | designates which namespace to set a value from.\r | |
562 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
563 | @param[in] Value The 8-bit value to set.\r | |
564 | \r | |
565 | @retval VOID * Return the value been set.\r | |
566 | \r | |
567 | **/\r | |
568 | VOID *\r | |
569 | EFIAPI\r | |
570 | LibPcdSetExPtr (\r | |
571 | IN CONST GUID *Guid,\r | |
572 | IN UINTN TokenNumber,\r | |
573 | IN CONST VOID *Value\r | |
574 | );\r | |
575 | \r | |
576 | \r | |
577 | /**\r | |
578 | Sets the Boolean value for the token specified by TokenNumber and \r | |
579 | Guid to the value specified by Value. Value is returned.\r | |
580 | If Guid is NULL, then ASSERT().\r | |
581 | \r | |
582 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
583 | designates which namespace to set a value from.\r | |
584 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
585 | @param[in] Value The Boolean value to set.\r | |
586 | \r | |
587 | @retval Boolean Return the value been set.\r | |
588 | \r | |
589 | **/\r | |
590 | BOOLEAN\r | |
591 | EFIAPI\r | |
592 | LibPcdSetExBool (\r | |
593 | IN CONST GUID *Guid,\r | |
594 | IN UINTN TokenNumber,\r | |
595 | IN BOOLEAN Value\r | |
596 | );\r | |
597 | \r | |
598 | \r | |
599 | /**\r | |
600 | When the token specified by TokenNumber and Guid is set, \r | |
601 | then notification function specified by NotificationFunction is called. \r | |
602 | If Guid is NULL, then the default token space is used. \r | |
603 | If NotificationFunction is NULL, then ASSERT().\r | |
604 | \r | |
605 | @param[in] CallBackGuid The PCD token GUID being set.\r | |
606 | @param[in] CallBackToken The PCD token number being set.\r | |
607 | @param[in] TokenData A pointer to the token data being set.\r | |
608 | @param[in] TokenDataSize The size, in bytes, of the data being set.\r | |
609 | \r | |
610 | @retval VOID\r | |
611 | \r | |
612 | **/\r | |
613 | typedef\r | |
614 | VOID\r | |
615 | (EFIAPI *PCD_CALLBACK) (\r | |
616 | IN CONST GUID *CallBackGuid, OPTIONAL\r | |
617 | IN UINTN CallBackToken,\r | |
618 | IN VOID *TokenData,\r | |
619 | IN UINTN TokenDataSize\r | |
620 | );\r | |
621 | \r | |
622 | \r | |
623 | /**\r | |
624 | When the token specified by TokenNumber and Guid is set, \r | |
625 | then notification function specified by NotificationFunction is called. \r | |
626 | If Guid is NULL, then the default token space is used. \r | |
627 | If NotificationFunction is NULL, then ASSERT().\r | |
628 | \r | |
629 | @param[in] Guid Pointer to a 128-bit unique value that designates which \r | |
630 | namespace to set a value from. If NULL, then the default \r | |
631 | token space is used.\r | |
632 | @param[in] TokenNumber The PCD token number to monitor.\r | |
633 | @param[in] NotificationFunction The function to call when the token \r | |
634 | specified by Guid and TokenNumber is set.\r | |
635 | \r | |
636 | @retval VOID\r | |
637 | \r | |
638 | **/\r | |
639 | VOID\r | |
640 | EFIAPI\r | |
641 | LibPcdCallbackOnSet (\r | |
642 | IN CONST GUID *Guid, OPTIONAL\r | |
643 | IN UINTN TokenNumber,\r | |
644 | IN PCD_CALLBACK NotificationFunction\r | |
645 | );\r | |
646 | \r | |
647 | \r | |
648 | /**\r | |
649 | Disable a notification function that was established with LibPcdCallbackonSet().\r | |
650 | \r | |
651 | @param[in] Guid Specify the GUID token space.\r | |
652 | @param[in] TokenNumber Specify the token number.\r | |
653 | @param[in] NotificationFunction The callback function to be unregistered.\r | |
654 | \r | |
655 | @retval VOID\r | |
656 | \r | |
657 | **/\r | |
658 | VOID\r | |
659 | EFIAPI\r | |
660 | LibPcdCancelCallback (\r | |
661 | IN CONST GUID *Guid, OPTIONAL\r | |
662 | IN UINTN TokenNumber,\r | |
663 | IN PCD_CALLBACK NotificationFunction\r | |
664 | );\r | |
665 | \r | |
666 | \r | |
667 | /**\r | |
668 | Retrieves the next PCD token number from the token space specified by Guid. \r | |
669 | If Guid is NULL, then the default token space is used. If TokenNumber is 0, \r | |
670 | then the first token number is returned. Otherwise, the token number that \r | |
671 | follows TokenNumber in the token space is returned. If TokenNumber is the last \r | |
672 | token number in the token space, then 0 is returned. If TokenNumber is not 0 and \r | |
673 | is not in the token space specified by Guid, then ASSERT().\r | |
674 | \r | |
675 | @param[in] Pointer to a 128-bit unique value that designates which namespace \r | |
676 | to set a value from. If NULL, then the default token space is used.\r | |
677 | @param[in] The previous PCD token number. If 0, then retrieves the first PCD \r | |
678 | token number.\r | |
679 | \r | |
680 | @retval UINTN The next valid token number.\r | |
681 | \r | |
682 | **/\r | |
683 | UINTN\r | |
684 | EFIAPI\r | |
685 | LibPcdGetNextToken (\r | |
686 | IN CONST GUID *Guid, OPTIONAL\r | |
687 | IN UINTN *TokenNumber\r | |
688 | );\r | |
689 | \r | |
690 | #endif\r |