]>
Commit | Line | Data |
---|---|---|
bbfaace4 | 1 | /** @file\r |
2 | A emptry template implementation of PCD Library.\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 | \r | |
15 | #include <PiPei.h>\r | |
16 | #include <Library/DebugLib.h>\r | |
17 | #include <Library/PcdLib.h>\r | |
18 | #include <Library/BaseMemoryLib.h>\r | |
19 | \r | |
20 | \r | |
21 | /**\r | |
22 | Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.\r | |
23 | \r | |
24 | @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and \r | |
25 | set values associated with a PCD token.\r | |
26 | \r | |
27 | @retval SKU_ID Return the SKU ID that just be set.\r | |
28 | \r | |
29 | **/\r | |
30 | UINTN \r | |
31 | EFIAPI\r | |
32 | LibPcdSetSku (\r | |
33 | IN UINTN SkuId\r | |
34 | )\r | |
35 | {\r | |
cdebf6c6 | 36 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 37 | \r |
cdebf6c6 | 38 | return 0;\r |
bbfaace4 | 39 | }\r |
40 | \r | |
bbfaace4 | 41 | /**\r |
42 | Returns the 8-bit value for the token specified by TokenNumber. \r | |
43 | \r | |
23a36779 | 44 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
bbfaace4 | 45 | \r |
46 | @retval UINT8 Returns the 8-bit value for the token specified by TokenNumber. \r | |
47 | \r | |
48 | **/\r | |
49 | UINT8\r | |
50 | EFIAPI\r | |
51 | LibPcdGet8 (\r | |
52 | IN UINTN TokenNumber\r | |
53 | )\r | |
54 | {\r | |
cdebf6c6 | 55 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
56 | \r | |
bbfaace4 | 57 | return 0;\r |
58 | }\r | |
59 | \r | |
60 | \r | |
61 | \r | |
62 | /**\r | |
63 | Returns the 16-bit value for the token specified by TokenNumber. \r | |
64 | \r | |
23a36779 | 65 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r |
bbfaace4 | 66 | \r |
67 | @retval UINT16 Returns the 16-bit value for the token specified by TokenNumber. \r | |
68 | \r | |
69 | **/\r | |
70 | UINT16\r | |
71 | EFIAPI\r | |
72 | LibPcdGet16 (\r | |
73 | IN UINTN TokenNumber\r | |
74 | )\r | |
75 | {\r | |
cdebf6c6 | 76 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
77 | \r | |
bbfaace4 | 78 | return 0;\r |
79 | }\r | |
80 | \r | |
81 | \r | |
82 | \r | |
83 | /**\r | |
84 | Returns the 32-bit value for the token specified by TokenNumber. \r | |
85 | \r | |
86 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
87 | \r | |
88 | @retval UINT32 Returns the 32-bit value for the token specified by TokenNumber.\r | |
89 | \r | |
90 | **/\r | |
91 | UINT32\r | |
92 | EFIAPI\r | |
93 | LibPcdGet32 (\r | |
94 | IN UINTN TokenNumber\r | |
95 | )\r | |
96 | {\r | |
cdebf6c6 | 97 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
98 | \r | |
bbfaace4 | 99 | return 0;\r |
100 | }\r | |
101 | \r | |
102 | \r | |
103 | \r | |
104 | /**\r | |
105 | Returns the 64-bit value for the token specified by TokenNumber.\r | |
106 | \r | |
107 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
108 | \r | |
109 | @retval UINT64 Returns the 64-bit value for the token specified by TokenNumber.\r | |
110 | \r | |
111 | **/\r | |
112 | UINT64\r | |
113 | EFIAPI\r | |
114 | LibPcdGet64 (\r | |
115 | IN UINTN TokenNumber\r | |
116 | )\r | |
117 | {\r | |
cdebf6c6 | 118 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
119 | \r | |
bbfaace4 | 120 | return 0;\r |
121 | }\r | |
122 | \r | |
123 | \r | |
124 | \r | |
125 | /**\r | |
126 | Returns the pointer to the buffer of the token specified by TokenNumber.\r | |
127 | \r | |
128 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
129 | \r | |
130 | @retval VOID* Returns the pointer to the token specified by TokenNumber.\r | |
131 | \r | |
132 | **/\r | |
133 | VOID *\r | |
134 | EFIAPI\r | |
135 | LibPcdGetPtr (\r | |
136 | IN UINTN TokenNumber\r | |
137 | )\r | |
138 | {\r | |
cdebf6c6 | 139 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
140 | \r | |
bbfaace4 | 141 | return 0;\r |
142 | }\r | |
143 | \r | |
144 | \r | |
145 | \r | |
146 | /**\r | |
147 | Returns the Boolean value of the token specified by TokenNumber. \r | |
148 | \r | |
149 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
150 | \r | |
151 | @retval BOOLEAN Returns the Boolean value of the token specified by TokenNumber. \r | |
152 | \r | |
153 | **/\r | |
154 | BOOLEAN \r | |
155 | EFIAPI\r | |
156 | LibPcdGetBool (\r | |
157 | IN UINTN TokenNumber\r | |
158 | )\r | |
159 | {\r | |
cdebf6c6 | 160 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
161 | \r | |
bbfaace4 | 162 | return 0;\r |
163 | }\r | |
164 | \r | |
165 | \r | |
166 | \r | |
167 | /**\r | |
168 | Returns the size of the token specified by TokenNumber. \r | |
169 | \r | |
170 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
171 | \r | |
172 | @retval UINTN Returns the size of the token specified by TokenNumber. \r | |
173 | \r | |
174 | **/\r | |
175 | UINTN\r | |
176 | EFIAPI\r | |
177 | LibPcdGetSize (\r | |
178 | IN UINTN TokenNumber\r | |
179 | )\r | |
180 | {\r | |
cdebf6c6 | 181 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
182 | \r | |
bbfaace4 | 183 | return 0;\r |
184 | }\r | |
185 | \r | |
186 | \r | |
187 | \r | |
188 | /**\r | |
189 | Returns the 8-bit value for the token specified by TokenNumber and Guid.\r | |
190 | If Guid is NULL, then ASSERT(). \r | |
191 | \r | |
192 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
193 | which namespace to retrieve a value from.\r | |
194 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
195 | \r | |
196 | @retval UINT8 Return the UINT8.\r | |
197 | \r | |
198 | **/\r | |
199 | UINT8\r | |
200 | EFIAPI\r | |
201 | LibPcdGetEx8 (\r | |
202 | IN CONST GUID *Guid,\r | |
203 | IN UINTN TokenNumber\r | |
204 | )\r | |
205 | {\r | |
cdebf6c6 | 206 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 207 | \r |
208 | return 0;\r | |
209 | }\r | |
210 | \r | |
211 | \r | |
212 | \r | |
213 | /**\r | |
214 | Returns the 16-bit value for the token specified by TokenNumber and Guid.\r | |
215 | If Guid is NULL, then ASSERT(). \r | |
216 | \r | |
217 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
218 | which namespace to retrieve a value from.\r | |
219 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
220 | \r | |
221 | @retval UINT16 Return the UINT16.\r | |
222 | \r | |
223 | **/\r | |
224 | UINT16\r | |
225 | EFIAPI\r | |
226 | LibPcdGetEx16 (\r | |
227 | IN CONST GUID *Guid,\r | |
228 | IN UINTN TokenNumber\r | |
229 | )\r | |
230 | {\r | |
cdebf6c6 | 231 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 232 | \r |
233 | return 0;\r | |
234 | }\r | |
235 | \r | |
236 | \r | |
237 | \r | |
238 | /**\r | |
239 | Returns the 32-bit value for the token specified by TokenNumber and Guid.\r | |
240 | If Guid is NULL, then ASSERT(). \r | |
241 | \r | |
242 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
243 | which namespace to retrieve a value from.\r | |
244 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
245 | \r | |
246 | @retval UINT32 Return the UINT32.\r | |
247 | \r | |
248 | **/\r | |
249 | UINT32\r | |
250 | EFIAPI\r | |
251 | LibPcdGetEx32 (\r | |
252 | IN CONST GUID *Guid,\r | |
253 | IN UINTN TokenNumber\r | |
254 | )\r | |
255 | {\r | |
cdebf6c6 | 256 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 257 | \r |
258 | return 0;\r | |
259 | }\r | |
260 | \r | |
261 | \r | |
262 | \r | |
263 | /**\r | |
264 | Returns the 64-bit value for the token specified by TokenNumber and Guid.\r | |
265 | If Guid is NULL, then ASSERT(). \r | |
266 | \r | |
267 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
268 | which namespace to retrieve a value from.\r | |
269 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
270 | \r | |
271 | @retval UINT64 Return the UINT64.\r | |
272 | \r | |
273 | **/\r | |
274 | UINT64\r | |
275 | EFIAPI\r | |
276 | LibPcdGetEx64 (\r | |
277 | IN CONST GUID *Guid,\r | |
278 | IN UINTN TokenNumber\r | |
279 | )\r | |
280 | {\r | |
cdebf6c6 | 281 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 282 | \r |
283 | return 0;\r | |
284 | }\r | |
285 | \r | |
286 | \r | |
287 | \r | |
288 | /**\r | |
289 | Returns the pointer to the buffer of the token specified by TokenNumber and Guid.\r | |
290 | If Guid is NULL, then ASSERT(). \r | |
291 | \r | |
292 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
293 | which namespace to retrieve a value from.\r | |
294 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
295 | \r | |
296 | @retval VOID* Return the VOID* pointer.\r | |
297 | \r | |
298 | **/\r | |
299 | VOID *\r | |
300 | EFIAPI\r | |
301 | LibPcdGetExPtr (\r | |
302 | IN CONST GUID *Guid,\r | |
303 | IN UINTN TokenNumber\r | |
304 | )\r | |
305 | {\r | |
cdebf6c6 | 306 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 307 | \r |
308 | return 0;\r | |
309 | }\r | |
310 | \r | |
311 | \r | |
312 | \r | |
313 | /**\r | |
314 | Returns the Boolean value of the token specified by TokenNumber and Guid. \r | |
315 | If Guid is NULL, then ASSERT(). \r | |
316 | \r | |
317 | @param[in] Guid Pointer to a 128-bit unique value that designates \r | |
318 | which namespace to retrieve a value from.\r | |
319 | @param[in] TokenNumber The PCD token number to retrieve a current value for.\r | |
320 | \r | |
321 | @retval BOOLEAN Return the BOOLEAN.\r | |
322 | \r | |
323 | **/\r | |
324 | BOOLEAN\r | |
325 | EFIAPI\r | |
326 | LibPcdGetExBool (\r | |
327 | IN CONST GUID *Guid,\r | |
328 | IN UINTN TokenNumber\r | |
329 | )\r | |
330 | {\r | |
cdebf6c6 | 331 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 332 | \r |
333 | return 0;\r | |
334 | }\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 | |
cdebf6c6 | 356 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 357 | \r |
358 | return 0;\r | |
359 | }\r | |
360 | \r | |
361 | \r | |
362 | \r | |
363 | /**\r | |
364 | Sets the 8-bit value for the token specified by TokenNumber \r | |
365 | to the value specified by Value. Value is returned.\r | |
366 | \r | |
367 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
368 | @param[in] Value The 8-bit value to set.\r | |
369 | \r | |
370 | @retval UINT8 Return the value been set.\r | |
371 | \r | |
372 | **/\r | |
373 | UINT8\r | |
374 | EFIAPI\r | |
375 | LibPcdSet8 (\r | |
376 | IN UINTN TokenNumber,\r | |
377 | IN UINT8 Value\r | |
378 | )\r | |
379 | {\r | |
cdebf6c6 | 380 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
381 | \r | |
382 | return 0;\r | |
bbfaace4 | 383 | }\r |
384 | \r | |
385 | \r | |
386 | \r | |
387 | /**\r | |
388 | Sets the 16-bit value for the token specified by TokenNumber \r | |
389 | to the value specified by Value. Value is returned.\r | |
390 | \r | |
391 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
392 | @param[in] Value The 16-bit value to set.\r | |
393 | \r | |
394 | @retval UINT16 Return the value been set.\r | |
395 | \r | |
396 | **/\r | |
397 | UINT16\r | |
398 | EFIAPI\r | |
399 | LibPcdSet16 (\r | |
400 | IN UINTN TokenNumber,\r | |
401 | IN UINT16 Value\r | |
402 | )\r | |
403 | {\r | |
cdebf6c6 | 404 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
405 | \r | |
406 | return 0;\r | |
bbfaace4 | 407 | }\r |
408 | \r | |
409 | \r | |
410 | \r | |
411 | /**\r | |
412 | Sets the 32-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 32-bit value to set.\r | |
417 | \r | |
418 | @retval UINT32 Return the value been set.\r | |
419 | \r | |
420 | **/\r | |
421 | UINT32\r | |
422 | EFIAPI\r | |
423 | LibPcdSet32 (\r | |
424 | IN UINTN TokenNumber,\r | |
425 | IN UINT32 Value\r | |
426 | )\r | |
427 | {\r | |
cdebf6c6 | 428 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
429 | \r | |
430 | return 0;\r | |
bbfaace4 | 431 | }\r |
432 | \r | |
433 | \r | |
434 | \r | |
435 | /**\r | |
436 | Sets the 64-bit value for the token specified by TokenNumber \r | |
437 | to the value specified by Value. Value is returned.\r | |
438 | \r | |
439 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
440 | @param[in] Value The 64-bit value to set.\r | |
441 | \r | |
442 | @retval UINT64 Return the value been set.\r | |
443 | \r | |
444 | **/\r | |
445 | UINT64\r | |
446 | EFIAPI\r | |
447 | LibPcdSet64 (\r | |
448 | IN UINTN TokenNumber,\r | |
449 | IN UINT64 Value\r | |
450 | )\r | |
451 | {\r | |
cdebf6c6 | 452 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
453 | \r | |
454 | return 0;\r | |
bbfaace4 | 455 | }\r |
456 | \r | |
457 | \r | |
458 | \r | |
459 | /**\r | |
460 | Sets a buffer for the token specified by TokenNumber to \r | |
461 | the value specified by Buffer and SizeOfValue. Buffer to\r | |
462 | be set is returned. The content of the buffer could be \r | |
463 | overwritten if a Callback on SET is registered with this\r | |
464 | TokenNumber.\r | |
465 | \r | |
466 | If SizeOfValue is greater than the maximum \r | |
467 | size support by TokenNumber, then set SizeOfValue to the \r | |
468 | maximum size supported by TokenNumber and return NULL to \r | |
469 | indicate that the set operation was not actually performed. \r | |
470 | \r | |
471 | If SizeOfValue > 0 and Buffer is NULL, then ASSERT().\r | |
472 | \r | |
23a36779 | 473 | @param[in] TokenNumber The PCD token number to set a current value for.\r |
474 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
475 | @param[in] Buffer A pointer to the buffer to set.\r | |
bbfaace4 | 476 | \r |
477 | @retval VOID* Return the pointer for the buffer been set.\r | |
478 | \r | |
479 | **/\r | |
480 | VOID *\r | |
481 | EFIAPI\r | |
482 | LibPcdSetPtr (\r | |
483 | IN UINTN TokenNumber,\r | |
484 | IN OUT UINTN *SizeOfBuffer,\r | |
485 | IN VOID *Buffer\r | |
486 | )\r | |
487 | {\r | |
cdebf6c6 | 488 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 489 | \r |
cdebf6c6 | 490 | return NULL;\r |
bbfaace4 | 491 | }\r |
492 | \r | |
493 | \r | |
494 | \r | |
495 | /**\r | |
496 | Sets the Boolean value for the token specified by TokenNumber \r | |
497 | to the value specified by Value. Value is returned.\r | |
498 | \r | |
499 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
500 | @param[in] Value The boolean value to set.\r | |
501 | \r | |
502 | @retval BOOLEAN Return the value been set.\r | |
503 | \r | |
504 | **/\r | |
505 | BOOLEAN\r | |
506 | EFIAPI\r | |
507 | LibPcdSetBool (\r | |
508 | IN UINTN TokenNumber,\r | |
509 | IN BOOLEAN Value\r | |
510 | )\r | |
511 | {\r | |
cdebf6c6 | 512 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
513 | \r | |
514 | return FALSE;\r | |
bbfaace4 | 515 | }\r |
516 | \r | |
517 | \r | |
518 | \r | |
519 | /**\r | |
520 | Sets the 8-bit value for the token specified by TokenNumber and \r | |
521 | Guid to the value specified by Value. Value is returned.\r | |
522 | If Guid is NULL, then ASSERT().\r | |
523 | \r | |
524 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
525 | designates which namespace to set a value from.\r | |
526 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
527 | @param[in] Value The 8-bit value to set.\r | |
528 | \r | |
529 | @retval UINT8 Return the value been set.\r | |
530 | \r | |
531 | **/\r | |
532 | UINT8\r | |
533 | EFIAPI\r | |
534 | LibPcdSetEx8 (\r | |
535 | IN CONST GUID *Guid,\r | |
536 | IN UINTN TokenNumber,\r | |
537 | IN UINT8 Value\r | |
538 | )\r | |
539 | {\r | |
cdebf6c6 | 540 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 541 | \r |
cdebf6c6 | 542 | return 0;\r |
bbfaace4 | 543 | }\r |
544 | \r | |
545 | \r | |
546 | \r | |
547 | /**\r | |
548 | Sets the 16-bit value for the token specified by TokenNumber and \r | |
549 | Guid to the value specified by Value. Value is returned.\r | |
550 | If Guid is NULL, then ASSERT().\r | |
551 | \r | |
552 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
553 | designates which namespace to set a value from.\r | |
554 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
555 | @param[in] Value The 16-bit value to set.\r | |
556 | \r | |
557 | @retval UINT8 Return the value been set.\r | |
558 | \r | |
559 | **/\r | |
560 | UINT16\r | |
561 | EFIAPI\r | |
562 | LibPcdSetEx16 (\r | |
563 | IN CONST GUID *Guid,\r | |
564 | IN UINTN TokenNumber,\r | |
565 | IN UINT16 Value\r | |
566 | )\r | |
567 | {\r | |
cdebf6c6 | 568 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 569 | \r |
cdebf6c6 | 570 | return 0;\r |
bbfaace4 | 571 | }\r |
572 | \r | |
573 | \r | |
574 | \r | |
575 | /**\r | |
576 | Sets the 32-bit value for the token specified by TokenNumber and \r | |
577 | Guid to the value specified by Value. Value is returned.\r | |
578 | If Guid is NULL, then ASSERT().\r | |
579 | \r | |
580 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
581 | designates which namespace to set a value from.\r | |
582 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
583 | @param[in] Value The 32-bit value to set.\r | |
584 | \r | |
585 | @retval UINT32 Return the value been set.\r | |
586 | \r | |
587 | **/\r | |
588 | UINT32\r | |
589 | EFIAPI\r | |
590 | LibPcdSetEx32 (\r | |
591 | IN CONST GUID *Guid,\r | |
592 | IN UINTN TokenNumber,\r | |
593 | IN UINT32 Value\r | |
594 | )\r | |
595 | {\r | |
cdebf6c6 | 596 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 597 | \r |
cdebf6c6 | 598 | return 0;\r |
bbfaace4 | 599 | }\r |
600 | \r | |
601 | \r | |
602 | \r | |
603 | /**\r | |
604 | Sets the 64-bit value for the token specified by TokenNumber and \r | |
605 | Guid to the value specified by Value. Value is returned.\r | |
606 | If Guid is NULL, then ASSERT().\r | |
607 | \r | |
608 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
609 | designates which namespace to set a value from.\r | |
610 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
611 | @param[in] Value The 64-bit value to set.\r | |
612 | \r | |
613 | @retval UINT64 Return the value been set.\r | |
614 | \r | |
615 | **/\r | |
616 | UINT64\r | |
617 | EFIAPI\r | |
618 | LibPcdSetEx64 (\r | |
619 | IN CONST GUID *Guid,\r | |
620 | IN UINTN TokenNumber,\r | |
621 | IN UINT64 Value\r | |
622 | )\r | |
623 | {\r | |
cdebf6c6 | 624 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 625 | \r |
cdebf6c6 | 626 | return 0;\r |
bbfaace4 | 627 | }\r |
628 | \r | |
629 | \r | |
630 | \r | |
631 | /**\r | |
632 | Sets a buffer for the token specified by TokenNumber to the value specified by \r | |
633 | Buffer and SizeOfValue. Buffer is returned. If SizeOfValue is greater than \r | |
634 | the maximum size support by TokenNumber, then set SizeOfValue to the maximum size \r | |
635 | supported by TokenNumber and return NULL to indicate that the set operation \r | |
636 | was not actually performed. \r | |
637 | \r | |
638 | If SizeOfValue > 0 and Buffer is NULL, then ASSERT().\r | |
639 | \r | |
640 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
641 | designates which namespace to set a value from.\r | |
642 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
643 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.\r | |
644 | @param[in] Buffer A pointer to the buffer to set.\r | |
645 | \r | |
646 | @retval VOID * Return the pinter to the buffer been set.\r | |
647 | \r | |
648 | **/\r | |
649 | VOID *\r | |
650 | EFIAPI\r | |
651 | LibPcdSetExPtr (\r | |
652 | IN CONST GUID *Guid,\r | |
653 | IN UINTN TokenNumber,\r | |
654 | IN OUT UINTN *SizeOfBuffer,\r | |
655 | IN VOID *Buffer\r | |
656 | )\r | |
657 | {\r | |
cdebf6c6 | 658 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 659 | \r |
cdebf6c6 | 660 | return NULL;\r |
bbfaace4 | 661 | }\r |
662 | \r | |
663 | \r | |
664 | \r | |
665 | /**\r | |
666 | Sets the Boolean value for the token specified by TokenNumber and \r | |
667 | Guid to the value specified by Value. Value is returned.\r | |
668 | If Guid is NULL, then ASSERT().\r | |
669 | \r | |
670 | @param[in] Guid Pointer to a 128-bit unique value that \r | |
671 | designates which namespace to set a value from.\r | |
672 | @param[in] TokenNumber The PCD token number to set a current value for.\r | |
673 | @param[in] Value The Boolean value to set.\r | |
674 | \r | |
675 | @retval Boolean Return the value been set.\r | |
676 | \r | |
677 | **/\r | |
678 | BOOLEAN\r | |
679 | EFIAPI\r | |
680 | LibPcdSetExBool (\r | |
681 | IN CONST GUID *Guid,\r | |
682 | IN UINTN TokenNumber,\r | |
683 | IN BOOLEAN Value\r | |
684 | )\r | |
685 | {\r | |
cdebf6c6 | 686 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 687 | \r |
cdebf6c6 | 688 | return FALSE;\r |
bbfaace4 | 689 | }\r |
690 | \r | |
691 | \r | |
692 | \r | |
693 | /**\r | |
694 | When the token specified by TokenNumber and Guid is set, \r | |
695 | then notification function specified by NotificationFunction is called. \r | |
696 | If Guid is NULL, then the default token space is used. \r | |
697 | If NotificationFunction is NULL, then ASSERT().\r | |
698 | \r | |
699 | @param[in] Guid Pointer to a 128-bit unique value that designates which \r | |
700 | namespace to set a value from. If NULL, then the default \r | |
701 | token space is used.\r | |
702 | @param[in] TokenNumber The PCD token number to monitor.\r | |
703 | @param[in] NotificationFunction The function to call when the token \r | |
704 | specified by Guid and TokenNumber is set.\r | |
705 | \r | |
706 | @retval VOID\r | |
707 | \r | |
708 | **/\r | |
709 | VOID\r | |
710 | EFIAPI\r | |
711 | LibPcdCallbackOnSet (\r | |
712 | IN CONST GUID *Guid, OPTIONAL\r | |
713 | IN UINTN TokenNumber,\r | |
714 | IN PCD_CALLBACK NotificationFunction\r | |
715 | )\r | |
716 | {\r | |
cdebf6c6 | 717 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 718 | }\r |
719 | \r | |
720 | \r | |
721 | \r | |
722 | /**\r | |
723 | Disable a notification function that was established with LibPcdCallbackonSet().\r | |
724 | If NotificationFunction is NULL, then ASSERT().\r | |
725 | \r | |
726 | @param[in] Guid Specify the GUID token space.\r | |
727 | @param[in] TokenNumber Specify the token number.\r | |
728 | @param[in] NotificationFunction The callback function to be unregistered.\r | |
729 | \r | |
730 | @retval VOID\r | |
731 | \r | |
732 | **/\r | |
733 | VOID\r | |
734 | EFIAPI\r | |
735 | LibPcdCancelCallback (\r | |
736 | IN CONST GUID *Guid, OPTIONAL\r | |
737 | IN UINTN TokenNumber,\r | |
738 | IN PCD_CALLBACK NotificationFunction\r | |
739 | )\r | |
740 | {\r | |
cdebf6c6 | 741 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
bbfaace4 | 742 | }\r |
743 | \r | |
744 | \r | |
745 | \r | |
746 | /**\r | |
747 | Retrieves the next PCD token number from the token space specified by Guid. \r | |
748 | If Guid is NULL, then the default token space is used. If TokenNumber is 0, \r | |
749 | then the first token number is returned. Otherwise, the token number that \r | |
750 | follows TokenNumber in the token space is returned. If TokenNumber is the last \r | |
751 | token number in the token space, then 0 is returned. If TokenNumber is not 0 and \r | |
752 | is not in the token space specified by Guid, then ASSERT().\r | |
753 | \r | |
23a36779 | 754 | @param[in] Guid Pointer to a 128-bit unique value that designates which namespace \r |
755 | to set a value from. If NULL, then the default token space is used.\r | |
756 | @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD \r | |
757 | token number.\r | |
bbfaace4 | 758 | \r |
759 | @retval UINTN The next valid token number.\r | |
760 | \r | |
761 | **/\r | |
762 | UINTN \r | |
763 | EFIAPI\r | |
764 | LibPcdGetNextToken (\r | |
765 | IN CONST GUID *Guid, OPTIONAL\r | |
766 | IN UINTN TokenNumber\r | |
767 | )\r | |
768 | {\r | |
cdebf6c6 | 769 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
770 | \r | |
bbfaace4 | 771 | return 0;\r |
772 | }\r | |
773 | \r | |
774 | \r | |
775 | \r | |
776 | /**\r | |
777 | Retrieves the next PCD token space from a token space specified by Guid.\r | |
778 | Guid of NULL is reserved to mark the default local token namespace on the current\r | |
779 | platform. If Guid is NULL, then the GUID of the first non-local token space of the \r | |
780 | current platform is returned. If Guid is the last non-local token space, \r | |
781 | then NULL is returned. \r | |
782 | \r | |
783 | If Guid is not NULL and is not a valid token space in the current platform, then ASSERT().\r | |
784 | \r | |
785 | \r | |
786 | \r | |
23a36779 | 787 | @param[in] Guid Pointer to a 128-bit unique value that designates from which namespace \r |
788 | to start the search.\r | |
bbfaace4 | 789 | \r |
790 | @retval CONST GUID * The next valid token namespace.\r | |
791 | \r | |
792 | **/\r | |
793 | GUID * \r | |
794 | EFIAPI\r | |
795 | LibPcdGetNextTokenSpace (\r | |
796 | IN CONST GUID *Guid\r | |
797 | )\r | |
798 | {\r | |
cdebf6c6 | 799 | ASSERT_EFI_ERROR (EFI_UNSUPPORTED);\r |
800 | \r | |
bbfaace4 | 801 | return NULL;\r |
802 | }\r | |
803 | \r | |
804 | \r | |
805 | \r | |
806 | /**\r | |
807 | Sets the PCD entry specified by PatchVariable to the value specified by Buffer \r | |
808 | and SizeOfValue. Buffer is returned. If SizeOfValue is greater than \r | |
809 | MaximumDatumSize, then set SizeOfValue to MaximumDatumSize and return \r | |
810 | NULL to indicate that the set operation was not actually performed. \r | |
811 | If SizeOfValue is set to MAX_ADDRESS, then SizeOfValue must be set to \r | |
812 | MaximumDatumSize and NULL must be returned.\r | |
813 | \r | |
814 | If PatchVariable is NULL, then ASSERT().\r | |
815 | If SizeOfValue is NULL, then ASSERT().\r | |
816 | If SizeOfValue > 0 and Buffer is NULL, then ASSERT().\r | |
817 | \r | |
818 | @param[in] PatchVariable A pointer to the global variable in a module that is \r | |
819 | the target of the set operation.\r | |
820 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.\r | |
821 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.\r | |
822 | @param[in] Buffer A pointer to the buffer to used to set the target variable.\r | |
823 | \r | |
824 | **/\r | |
825 | VOID *\r | |
826 | EFIAPI\r | |
827 | LibPatchPcdSetPtr (\r | |
828 | IN VOID *PatchVariable,\r | |
829 | IN UINTN MaximumDatumSize,\r | |
830 | IN OUT UINTN *SizeOfBuffer,\r | |
831 | IN CONST VOID *Buffer\r | |
832 | )\r | |
833 | {\r | |
834 | ASSERT (PatchVariable != NULL);\r | |
835 | ASSERT (SizeOfBuffer != NULL);\r | |
836 | \r | |
837 | if (*SizeOfBuffer > 0) {\r | |
838 | ASSERT (Buffer != NULL);\r | |
839 | }\r | |
840 | \r | |
841 | if ((*SizeOfBuffer > MaximumDatumSize) ||\r | |
842 | (*SizeOfBuffer == MAX_ADDRESS)) {\r | |
843 | *SizeOfBuffer = MaximumDatumSize;\r | |
844 | return NULL;\r | |
845 | }\r | |
846 | \r | |
847 | CopyMem (PatchVariable, Buffer, *SizeOfBuffer);\r | |
848 | \r | |
849 | return (VOID *) Buffer;\r | |
850 | }\r | |
851 | \r |