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