1 | /** @file
|
---|
2 | A emptry template implementation of PCD Library.
|
---|
3 |
|
---|
4 | Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
---|
5 | This program and the accompanying materials
|
---|
6 | are licensed and made available under the terms and conditions of the BSD License
|
---|
7 | which accompanies this distribution. The full text of the license may be found at
|
---|
8 | http://opensource.org/licenses/bsd-license.php.
|
---|
9 |
|
---|
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
---|
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
---|
12 |
|
---|
13 | **/
|
---|
14 |
|
---|
15 | #include <Base.h>
|
---|
16 |
|
---|
17 | #include <Library/DebugLib.h>
|
---|
18 | #include <Library/PcdLib.h>
|
---|
19 | #include <Library/BaseMemoryLib.h>
|
---|
20 |
|
---|
21 |
|
---|
22 | /**
|
---|
23 | This function provides a means by which SKU support can be established in the PCD infrastructure.
|
---|
24 |
|
---|
25 | Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
|
---|
26 |
|
---|
27 | @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
|
---|
28 | set values associated with a PCD token.
|
---|
29 |
|
---|
30 | If SkuId >= 0x100, then ASSERT().
|
---|
31 |
|
---|
32 | @return Return the SKU ID that just be set.
|
---|
33 |
|
---|
34 | **/
|
---|
35 | UINTN
|
---|
36 | EFIAPI
|
---|
37 | LibPcdSetSku (
|
---|
38 | IN UINTN SkuId
|
---|
39 | )
|
---|
40 | {
|
---|
41 | ASSERT (FALSE);
|
---|
42 |
|
---|
43 | return 0;
|
---|
44 | }
|
---|
45 |
|
---|
46 | /**
|
---|
47 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
48 |
|
---|
49 | Returns the 8-bit value for the token specified by TokenNumber.
|
---|
50 |
|
---|
51 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
52 |
|
---|
53 | @return Returns the 8-bit value for the token specified by TokenNumber.
|
---|
54 |
|
---|
55 | **/
|
---|
56 | UINT8
|
---|
57 | EFIAPI
|
---|
58 | LibPcdGet8 (
|
---|
59 | IN UINTN TokenNumber
|
---|
60 | )
|
---|
61 | {
|
---|
62 | ASSERT (FALSE);
|
---|
63 |
|
---|
64 | return 0;
|
---|
65 | }
|
---|
66 |
|
---|
67 |
|
---|
68 |
|
---|
69 | /**
|
---|
70 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
71 |
|
---|
72 | Returns the 16-bit value for the token specified by TokenNumber.
|
---|
73 |
|
---|
74 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
75 |
|
---|
76 | @return Returns the 16-bit value for the token specified by TokenNumber.
|
---|
77 |
|
---|
78 | **/
|
---|
79 | UINT16
|
---|
80 | EFIAPI
|
---|
81 | LibPcdGet16 (
|
---|
82 | IN UINTN TokenNumber
|
---|
83 | )
|
---|
84 | {
|
---|
85 | ASSERT (FALSE);
|
---|
86 |
|
---|
87 | return 0;
|
---|
88 | }
|
---|
89 |
|
---|
90 |
|
---|
91 |
|
---|
92 | /**
|
---|
93 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
94 |
|
---|
95 | Returns the 32-bit value for the token specified by TokenNumber.
|
---|
96 |
|
---|
97 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
98 |
|
---|
99 | @return Returns the 32-bit value for the token specified by TokenNumber.
|
---|
100 |
|
---|
101 | **/
|
---|
102 | UINT32
|
---|
103 | EFIAPI
|
---|
104 | LibPcdGet32 (
|
---|
105 | IN UINTN TokenNumber
|
---|
106 | )
|
---|
107 | {
|
---|
108 | ASSERT (FALSE);
|
---|
109 |
|
---|
110 | return 0;
|
---|
111 | }
|
---|
112 |
|
---|
113 |
|
---|
114 |
|
---|
115 | /**
|
---|
116 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
117 |
|
---|
118 | Returns the 64-bit value for the token specified by TokenNumber.
|
---|
119 |
|
---|
120 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
121 |
|
---|
122 | @return Returns the 64-bit value for the token specified by TokenNumber.
|
---|
123 |
|
---|
124 | **/
|
---|
125 | UINT64
|
---|
126 | EFIAPI
|
---|
127 | LibPcdGet64 (
|
---|
128 | IN UINTN TokenNumber
|
---|
129 | )
|
---|
130 | {
|
---|
131 | ASSERT (FALSE);
|
---|
132 |
|
---|
133 | return 0;
|
---|
134 | }
|
---|
135 |
|
---|
136 |
|
---|
137 |
|
---|
138 | /**
|
---|
139 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
140 |
|
---|
141 | Returns the pointer to the buffer of the token specified by TokenNumber.
|
---|
142 |
|
---|
143 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
144 |
|
---|
145 | @return Returns the pointer to the token specified by TokenNumber.
|
---|
146 |
|
---|
147 | **/
|
---|
148 | VOID *
|
---|
149 | EFIAPI
|
---|
150 | LibPcdGetPtr (
|
---|
151 | IN UINTN TokenNumber
|
---|
152 | )
|
---|
153 | {
|
---|
154 | ASSERT (FALSE);
|
---|
155 |
|
---|
156 | return 0;
|
---|
157 | }
|
---|
158 |
|
---|
159 |
|
---|
160 |
|
---|
161 | /**
|
---|
162 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
163 |
|
---|
164 | Returns the Boolean value of the token specified by TokenNumber.
|
---|
165 |
|
---|
166 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
167 |
|
---|
168 | @return Returns the Boolean value of the token specified by TokenNumber.
|
---|
169 |
|
---|
170 | **/
|
---|
171 | BOOLEAN
|
---|
172 | EFIAPI
|
---|
173 | LibPcdGetBool (
|
---|
174 | IN UINTN TokenNumber
|
---|
175 | )
|
---|
176 | {
|
---|
177 | ASSERT (FALSE);
|
---|
178 |
|
---|
179 | return 0;
|
---|
180 | }
|
---|
181 |
|
---|
182 |
|
---|
183 |
|
---|
184 | /**
|
---|
185 | This function provides a means by which to retrieve the size of a given PCD token.
|
---|
186 |
|
---|
187 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
188 |
|
---|
189 | @return Returns the size of the token specified by TokenNumber.
|
---|
190 |
|
---|
191 | **/
|
---|
192 | UINTN
|
---|
193 | EFIAPI
|
---|
194 | LibPcdGetSize (
|
---|
195 | IN UINTN TokenNumber
|
---|
196 | )
|
---|
197 | {
|
---|
198 | ASSERT (FALSE);
|
---|
199 |
|
---|
200 | return 0;
|
---|
201 | }
|
---|
202 |
|
---|
203 |
|
---|
204 |
|
---|
205 | /**
|
---|
206 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
207 |
|
---|
208 | Returns the 8-bit value for the token specified by TokenNumber and Guid.
|
---|
209 |
|
---|
210 | If Guid is NULL, then ASSERT().
|
---|
211 |
|
---|
212 | @param[in] Guid The pointer to a 128-bit unique value that designates
|
---|
213 | which namespace to retrieve a value from.
|
---|
214 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
215 |
|
---|
216 | @return Return the UINT8.
|
---|
217 |
|
---|
218 | **/
|
---|
219 | UINT8
|
---|
220 | EFIAPI
|
---|
221 | LibPcdGetEx8 (
|
---|
222 | IN CONST GUID *Guid,
|
---|
223 | IN UINTN TokenNumber
|
---|
224 | )
|
---|
225 | {
|
---|
226 | ASSERT (FALSE);
|
---|
227 |
|
---|
228 | return 0;
|
---|
229 | }
|
---|
230 |
|
---|
231 |
|
---|
232 |
|
---|
233 | /**
|
---|
234 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
235 |
|
---|
236 | Returns the 16-bit value for the token specified by TokenNumber and Guid.
|
---|
237 |
|
---|
238 | If Guid is NULL, then ASSERT().
|
---|
239 |
|
---|
240 | @param[in] Guid The pointer to a 128-bit unique value that designates
|
---|
241 | which namespace to retrieve a value from.
|
---|
242 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
243 |
|
---|
244 | @return Return the UINT16.
|
---|
245 |
|
---|
246 | **/
|
---|
247 | UINT16
|
---|
248 | EFIAPI
|
---|
249 | LibPcdGetEx16 (
|
---|
250 | IN CONST GUID *Guid,
|
---|
251 | IN UINTN TokenNumber
|
---|
252 | )
|
---|
253 | {
|
---|
254 | ASSERT (FALSE);
|
---|
255 |
|
---|
256 | return 0;
|
---|
257 | }
|
---|
258 |
|
---|
259 |
|
---|
260 |
|
---|
261 | /**
|
---|
262 | Returns the 32-bit value for the token specified by TokenNumber and Guid.
|
---|
263 | If Guid is NULL, then ASSERT().
|
---|
264 |
|
---|
265 | @param[in] Guid The pointer to a 128-bit unique value that designates
|
---|
266 | which namespace to retrieve a value from.
|
---|
267 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
268 |
|
---|
269 | @return Return the UINT32.
|
---|
270 |
|
---|
271 | **/
|
---|
272 | UINT32
|
---|
273 | EFIAPI
|
---|
274 | LibPcdGetEx32 (
|
---|
275 | IN CONST GUID *Guid,
|
---|
276 | IN UINTN TokenNumber
|
---|
277 | )
|
---|
278 | {
|
---|
279 | ASSERT (FALSE);
|
---|
280 |
|
---|
281 | return 0;
|
---|
282 | }
|
---|
283 |
|
---|
284 |
|
---|
285 |
|
---|
286 | /**
|
---|
287 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
288 |
|
---|
289 | Returns the 64-bit value for the token specified by TokenNumber and Guid.
|
---|
290 |
|
---|
291 | If Guid is NULL, then ASSERT().
|
---|
292 |
|
---|
293 | @param[in] Guid The pointer to a 128-bit unique value that designates
|
---|
294 | which namespace to retrieve a value from.
|
---|
295 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
296 |
|
---|
297 | @return Return the UINT64.
|
---|
298 |
|
---|
299 | **/
|
---|
300 | UINT64
|
---|
301 | EFIAPI
|
---|
302 | LibPcdGetEx64 (
|
---|
303 | IN CONST GUID *Guid,
|
---|
304 | IN UINTN TokenNumber
|
---|
305 | )
|
---|
306 | {
|
---|
307 | ASSERT (FALSE);
|
---|
308 |
|
---|
309 | return 0;
|
---|
310 | }
|
---|
311 |
|
---|
312 |
|
---|
313 |
|
---|
314 | /**
|
---|
315 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
316 |
|
---|
317 | Returns the pointer to the buffer of token specified by TokenNumber and Guid.
|
---|
318 |
|
---|
319 | If Guid is NULL, then ASSERT().
|
---|
320 |
|
---|
321 | @param[in] Guid The pointer to a 128-bit unique value that designates
|
---|
322 | which namespace to retrieve a value from.
|
---|
323 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
324 |
|
---|
325 | @return Return the VOID* pointer.
|
---|
326 |
|
---|
327 | **/
|
---|
328 | VOID *
|
---|
329 | EFIAPI
|
---|
330 | LibPcdGetExPtr (
|
---|
331 | IN CONST GUID *Guid,
|
---|
332 | IN UINTN TokenNumber
|
---|
333 | )
|
---|
334 | {
|
---|
335 | ASSERT (FALSE);
|
---|
336 |
|
---|
337 | return 0;
|
---|
338 | }
|
---|
339 |
|
---|
340 |
|
---|
341 |
|
---|
342 | /**
|
---|
343 | This function provides a means by which to retrieve a value for a given PCD token.
|
---|
344 |
|
---|
345 | Returns the Boolean value of the token specified by TokenNumber and Guid.
|
---|
346 |
|
---|
347 | If Guid is NULL, then ASSERT().
|
---|
348 |
|
---|
349 | @param[in] Guid The pointer to a 128-bit unique value that designates
|
---|
350 | which namespace to retrieve a value from.
|
---|
351 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
352 |
|
---|
353 | @return Return the BOOLEAN.
|
---|
354 |
|
---|
355 | **/
|
---|
356 | BOOLEAN
|
---|
357 | EFIAPI
|
---|
358 | LibPcdGetExBool (
|
---|
359 | IN CONST GUID *Guid,
|
---|
360 | IN UINTN TokenNumber
|
---|
361 | )
|
---|
362 | {
|
---|
363 | ASSERT (FALSE);
|
---|
364 |
|
---|
365 | return 0;
|
---|
366 | }
|
---|
367 |
|
---|
368 |
|
---|
369 |
|
---|
370 | /**
|
---|
371 | This function provides a means by which to retrieve the size of a given PCD token.
|
---|
372 |
|
---|
373 | Returns the size of the token specified by TokenNumber and Guid.
|
---|
374 |
|
---|
375 | If Guid is NULL, then ASSERT().
|
---|
376 |
|
---|
377 | @param[in] Guid The pointer to a 128-bit unique value that designates
|
---|
378 | which namespace to retrieve a value from.
|
---|
379 | @param[in] TokenNumber The PCD token number to retrieve a current value for.
|
---|
380 |
|
---|
381 | @return Return the size.
|
---|
382 |
|
---|
383 | **/
|
---|
384 | UINTN
|
---|
385 | EFIAPI
|
---|
386 | LibPcdGetExSize (
|
---|
387 | IN CONST GUID *Guid,
|
---|
388 | IN UINTN TokenNumber
|
---|
389 | )
|
---|
390 | {
|
---|
391 | ASSERT (FALSE);
|
---|
392 |
|
---|
393 | return 0;
|
---|
394 | }
|
---|
395 |
|
---|
396 |
|
---|
397 |
|
---|
398 | /**
|
---|
399 | This function provides a means by which to set a value for a given PCD token.
|
---|
400 |
|
---|
401 | Sets the 8-bit value for the token specified by TokenNumber
|
---|
402 | to the value specified by Value. Value is returned.
|
---|
403 |
|
---|
404 | If the set operation was not correctly performed, then ASSERT().
|
---|
405 |
|
---|
406 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
407 | @param[in] Value The 8-bit value to set.
|
---|
408 |
|
---|
409 | @return Return the value that was set.
|
---|
410 |
|
---|
411 | **/
|
---|
412 | UINT8
|
---|
413 | EFIAPI
|
---|
414 | LibPcdSet8 (
|
---|
415 | IN UINTN TokenNumber,
|
---|
416 | IN UINT8 Value
|
---|
417 | )
|
---|
418 | {
|
---|
419 | ASSERT (FALSE);
|
---|
420 |
|
---|
421 | return 0;
|
---|
422 | }
|
---|
423 |
|
---|
424 |
|
---|
425 |
|
---|
426 | /**
|
---|
427 | This function provides a means by which to set a value for a given PCD token.
|
---|
428 |
|
---|
429 | Sets the 16-bit value for the token specified by TokenNumber
|
---|
430 | to the value specified by Value. Value is returned.
|
---|
431 |
|
---|
432 | If the set operation was not correctly performed, then ASSERT().
|
---|
433 |
|
---|
434 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
435 | @param[in] Value The 16-bit value to set.
|
---|
436 |
|
---|
437 | @return Return the value that was set.
|
---|
438 |
|
---|
439 | **/
|
---|
440 | UINT16
|
---|
441 | EFIAPI
|
---|
442 | LibPcdSet16 (
|
---|
443 | IN UINTN TokenNumber,
|
---|
444 | IN UINT16 Value
|
---|
445 | )
|
---|
446 | {
|
---|
447 | ASSERT (FALSE);
|
---|
448 |
|
---|
449 | return 0;
|
---|
450 | }
|
---|
451 |
|
---|
452 |
|
---|
453 |
|
---|
454 | /**
|
---|
455 | This function provides a means by which to set a value for a given PCD token.
|
---|
456 |
|
---|
457 | Sets the 32-bit value for the token specified by TokenNumber
|
---|
458 | to the value specified by Value. Value is returned.
|
---|
459 |
|
---|
460 | If the set operation was not correctly performed, then ASSERT().
|
---|
461 |
|
---|
462 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
463 | @param[in] Value The 32-bit value to set.
|
---|
464 |
|
---|
465 | @return Return the value that was set.
|
---|
466 |
|
---|
467 | **/
|
---|
468 | UINT32
|
---|
469 | EFIAPI
|
---|
470 | LibPcdSet32 (
|
---|
471 | IN UINTN TokenNumber,
|
---|
472 | IN UINT32 Value
|
---|
473 | )
|
---|
474 | {
|
---|
475 | ASSERT (FALSE);
|
---|
476 |
|
---|
477 | return 0;
|
---|
478 | }
|
---|
479 |
|
---|
480 |
|
---|
481 |
|
---|
482 | /**
|
---|
483 | This function provides a means by which to set a value for a given PCD token.
|
---|
484 |
|
---|
485 | Sets the 64-bit value for the token specified by TokenNumber
|
---|
486 | to the value specified by Value. Value is returned.
|
---|
487 |
|
---|
488 | If the set operation was not correctly performed, then ASSERT().
|
---|
489 |
|
---|
490 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
491 | @param[in] Value The 64-bit value to set.
|
---|
492 |
|
---|
493 | @return Return the value that was set.
|
---|
494 |
|
---|
495 | **/
|
---|
496 | UINT64
|
---|
497 | EFIAPI
|
---|
498 | LibPcdSet64 (
|
---|
499 | IN UINTN TokenNumber,
|
---|
500 | IN UINT64 Value
|
---|
501 | )
|
---|
502 | {
|
---|
503 | ASSERT (FALSE);
|
---|
504 |
|
---|
505 | return 0;
|
---|
506 | }
|
---|
507 |
|
---|
508 |
|
---|
509 |
|
---|
510 | /**
|
---|
511 | This function provides a means by which to set a value for a given PCD token.
|
---|
512 |
|
---|
513 | Sets a buffer for the token specified by TokenNumber to the value
|
---|
514 | specified by Buffer and SizeOfBuffer. Buffer is returned.
|
---|
515 | If SizeOfBuffer is greater than the maximum size support by TokenNumber,
|
---|
516 | then set SizeOfBuffer to the maximum size supported by TokenNumber and
|
---|
517 | return NULL to indicate that the set operation was not actually performed,
|
---|
518 | or ASSERT() if the set operation was not corretly performed.
|
---|
519 |
|
---|
520 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
|
---|
521 | maximum size supported by TokenName and NULL must be returned.
|
---|
522 |
|
---|
523 | If SizeOfBuffer is NULL, then ASSERT().
|
---|
524 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
|
---|
525 |
|
---|
526 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
527 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
|
---|
528 | @param[in] Buffer A pointer to the buffer to set.
|
---|
529 |
|
---|
530 | @return Return the pointer for the buffer been set.
|
---|
531 |
|
---|
532 | **/
|
---|
533 | VOID *
|
---|
534 | EFIAPI
|
---|
535 | LibPcdSetPtr (
|
---|
536 | IN UINTN TokenNumber,
|
---|
537 | IN OUT UINTN *SizeOfBuffer,
|
---|
538 | IN CONST VOID *Buffer
|
---|
539 | )
|
---|
540 | {
|
---|
541 | ASSERT (FALSE);
|
---|
542 |
|
---|
543 | return NULL;
|
---|
544 | }
|
---|
545 |
|
---|
546 |
|
---|
547 |
|
---|
548 | /**
|
---|
549 | This function provides a means by which to set a value for a given PCD token.
|
---|
550 |
|
---|
551 | Sets the Boolean value for the token specified by TokenNumber
|
---|
552 | to the value specified by Value. Value is returned.
|
---|
553 |
|
---|
554 | If the set operation was not correctly performed, then ASSERT().
|
---|
555 |
|
---|
556 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
557 | @param[in] Value The boolean value to set.
|
---|
558 |
|
---|
559 | @return Return the value that was set.
|
---|
560 |
|
---|
561 | **/
|
---|
562 | BOOLEAN
|
---|
563 | EFIAPI
|
---|
564 | LibPcdSetBool (
|
---|
565 | IN UINTN TokenNumber,
|
---|
566 | IN BOOLEAN Value
|
---|
567 | )
|
---|
568 | {
|
---|
569 | ASSERT (FALSE);
|
---|
570 |
|
---|
571 | return FALSE;
|
---|
572 | }
|
---|
573 |
|
---|
574 |
|
---|
575 |
|
---|
576 | /**
|
---|
577 | This function provides a means by which to set a value for a given PCD token.
|
---|
578 |
|
---|
579 | Sets the 8-bit value for the token specified by TokenNumber and
|
---|
580 | Guid to the value specified by Value. Value is returned.
|
---|
581 |
|
---|
582 | If Guid is NULL, then ASSERT().
|
---|
583 | If the set operation was not correctly performed, then ASSERT().
|
---|
584 |
|
---|
585 | @param[in] Guid The pointer to a 128-bit unique value that
|
---|
586 | designates which namespace to set a value from.
|
---|
587 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
588 | @param[in] Value The 8-bit value to set.
|
---|
589 |
|
---|
590 | @return Return the value that was set.
|
---|
591 |
|
---|
592 | **/
|
---|
593 | UINT8
|
---|
594 | EFIAPI
|
---|
595 | LibPcdSetEx8 (
|
---|
596 | IN CONST GUID *Guid,
|
---|
597 | IN UINTN TokenNumber,
|
---|
598 | IN UINT8 Value
|
---|
599 | )
|
---|
600 | {
|
---|
601 | ASSERT (FALSE);
|
---|
602 |
|
---|
603 | return 0;
|
---|
604 | }
|
---|
605 |
|
---|
606 |
|
---|
607 |
|
---|
608 | /**
|
---|
609 | This function provides a means by which to set a value for a given PCD token.
|
---|
610 |
|
---|
611 | Sets the 16-bit value for the token specified by TokenNumber and
|
---|
612 | Guid to the value specified by Value. Value is returned.
|
---|
613 |
|
---|
614 | If Guid is NULL, then ASSERT().
|
---|
615 | If the set operation was not correctly performed, then ASSERT().
|
---|
616 |
|
---|
617 | @param[in] Guid The pointer to a 128-bit unique value that
|
---|
618 | designates which namespace to set a value from.
|
---|
619 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
620 | @param[in] Value The 16-bit value to set.
|
---|
621 |
|
---|
622 | @return Return the value that was set.
|
---|
623 |
|
---|
624 | **/
|
---|
625 | UINT16
|
---|
626 | EFIAPI
|
---|
627 | LibPcdSetEx16 (
|
---|
628 | IN CONST GUID *Guid,
|
---|
629 | IN UINTN TokenNumber,
|
---|
630 | IN UINT16 Value
|
---|
631 | )
|
---|
632 | {
|
---|
633 | ASSERT (FALSE);
|
---|
634 |
|
---|
635 | return 0;
|
---|
636 | }
|
---|
637 |
|
---|
638 |
|
---|
639 |
|
---|
640 | /**
|
---|
641 | This function provides a means by which to set a value for a given PCD token.
|
---|
642 |
|
---|
643 | Sets the 32-bit value for the token specified by TokenNumber and
|
---|
644 | Guid to the value specified by Value. Value is returned.
|
---|
645 |
|
---|
646 | If Guid is NULL, then ASSERT().
|
---|
647 | If the set operation was not correctly performed, then ASSERT().
|
---|
648 |
|
---|
649 | @param[in] Guid The pointer to a 128-bit unique value that
|
---|
650 | designates which namespace to set a value from.
|
---|
651 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
652 | @param[in] Value The 32-bit value to set.
|
---|
653 |
|
---|
654 | @return Return the value that was set.
|
---|
655 |
|
---|
656 | **/
|
---|
657 | UINT32
|
---|
658 | EFIAPI
|
---|
659 | LibPcdSetEx32 (
|
---|
660 | IN CONST GUID *Guid,
|
---|
661 | IN UINTN TokenNumber,
|
---|
662 | IN UINT32 Value
|
---|
663 | )
|
---|
664 | {
|
---|
665 | ASSERT (FALSE);
|
---|
666 |
|
---|
667 | return 0;
|
---|
668 | }
|
---|
669 |
|
---|
670 |
|
---|
671 |
|
---|
672 | /**
|
---|
673 | This function provides a means by which to set a value for a given PCD token.
|
---|
674 |
|
---|
675 | Sets the 64-bit value for the token specified by TokenNumber and
|
---|
676 | Guid to the value specified by Value. Value is returned.
|
---|
677 |
|
---|
678 | If Guid is NULL, then ASSERT().
|
---|
679 | If the set operation was not correctly performed, then ASSERT().
|
---|
680 |
|
---|
681 | @param[in] Guid The pointer to a 128-bit unique value that
|
---|
682 | designates which namespace to set a value from.
|
---|
683 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
684 | @param[in] Value The 64-bit value to set.
|
---|
685 |
|
---|
686 | @return Return the value that was set.
|
---|
687 |
|
---|
688 | **/
|
---|
689 | UINT64
|
---|
690 | EFIAPI
|
---|
691 | LibPcdSetEx64 (
|
---|
692 | IN CONST GUID *Guid,
|
---|
693 | IN UINTN TokenNumber,
|
---|
694 | IN UINT64 Value
|
---|
695 | )
|
---|
696 | {
|
---|
697 | ASSERT (FALSE);
|
---|
698 |
|
---|
699 | return 0;
|
---|
700 | }
|
---|
701 |
|
---|
702 |
|
---|
703 |
|
---|
704 | /**
|
---|
705 | This function provides a means by which to set a value for a given PCD token.
|
---|
706 |
|
---|
707 | Sets a buffer for the token specified by TokenNumber to the value specified by
|
---|
708 | Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
|
---|
709 | the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
|
---|
710 | supported by TokenNumber and return NULL to indicate that the set operation
|
---|
711 | was not actually performed, or ASSERT() if the set operation was not corretly performed.
|
---|
712 |
|
---|
713 | If Guid is NULL, then ASSERT().
|
---|
714 | If SizeOfBuffer is NULL, then ASSERT().
|
---|
715 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
|
---|
716 |
|
---|
717 | @param[in] Guid The pointer to a 128-bit unique value that
|
---|
718 | designates which namespace to set a value from.
|
---|
719 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
720 | @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
|
---|
721 | @param[in] Buffer A pointer to the buffer to set.
|
---|
722 |
|
---|
723 | @return Return the pinter to the buffer been set.
|
---|
724 |
|
---|
725 | **/
|
---|
726 | VOID *
|
---|
727 | EFIAPI
|
---|
728 | LibPcdSetExPtr (
|
---|
729 | IN CONST GUID *Guid,
|
---|
730 | IN UINTN TokenNumber,
|
---|
731 | IN OUT UINTN *SizeOfBuffer,
|
---|
732 | IN VOID *Buffer
|
---|
733 | )
|
---|
734 | {
|
---|
735 | ASSERT (FALSE);
|
---|
736 |
|
---|
737 | return NULL;
|
---|
738 | }
|
---|
739 |
|
---|
740 |
|
---|
741 |
|
---|
742 | /**
|
---|
743 | This function provides a means by which to set a value for a given PCD token.
|
---|
744 |
|
---|
745 | Sets the Boolean value for the token specified by TokenNumber and
|
---|
746 | Guid to the value specified by Value. Value is returned.
|
---|
747 |
|
---|
748 | If Guid is NULL, then ASSERT().
|
---|
749 | If the set operation was not correctly performed, then ASSERT().
|
---|
750 |
|
---|
751 | @param[in] Guid The pointer to a 128-bit unique value that
|
---|
752 | designates which namespace to set a value from.
|
---|
753 | @param[in] TokenNumber The PCD token number to set a current value for.
|
---|
754 | @param[in] Value The Boolean value to set.
|
---|
755 |
|
---|
756 | @return Return the value that was set.
|
---|
757 |
|
---|
758 | **/
|
---|
759 | BOOLEAN
|
---|
760 | EFIAPI
|
---|
761 | LibPcdSetExBool (
|
---|
762 | IN CONST GUID *Guid,
|
---|
763 | IN UINTN TokenNumber,
|
---|
764 | IN BOOLEAN Value
|
---|
765 | )
|
---|
766 | {
|
---|
767 | ASSERT (FALSE);
|
---|
768 |
|
---|
769 | return FALSE;
|
---|
770 | }
|
---|
771 |
|
---|
772 |
|
---|
773 |
|
---|
774 | /**
|
---|
775 | Set up a notification function that is called when a specified token is set.
|
---|
776 |
|
---|
777 | When the token specified by TokenNumber and Guid is set,
|
---|
778 | then notification function specified by NotificationFunction is called.
|
---|
779 | If Guid is NULL, then the default token space is used.
|
---|
780 |
|
---|
781 | If NotificationFunction is NULL, then ASSERT().
|
---|
782 |
|
---|
783 | @param[in] Guid The pointer to a 128-bit unique value that designates which
|
---|
784 | namespace to set a value from. If NULL, then the default
|
---|
785 | token space is used.
|
---|
786 | @param[in] TokenNumber The PCD token number to monitor.
|
---|
787 | @param[in] NotificationFunction The function to call when the token
|
---|
788 | specified by Guid and TokenNumber is set.
|
---|
789 |
|
---|
790 | **/
|
---|
791 | VOID
|
---|
792 | EFIAPI
|
---|
793 | LibPcdCallbackOnSet (
|
---|
794 | IN CONST GUID *Guid, OPTIONAL
|
---|
795 | IN UINTN TokenNumber,
|
---|
796 | IN PCD_CALLBACK NotificationFunction
|
---|
797 | )
|
---|
798 | {
|
---|
799 | ASSERT (FALSE);
|
---|
800 | }
|
---|
801 |
|
---|
802 |
|
---|
803 |
|
---|
804 | /**
|
---|
805 | Disable a notification function that was established with LibPcdCallbackonSet().
|
---|
806 |
|
---|
807 | Disable a notification function that was previously established with LibPcdCallbackOnSet().
|
---|
808 |
|
---|
809 | If NotificationFunction is NULL, then ASSERT().
|
---|
810 | If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
|
---|
811 | and NotificationFunction, then ASSERT().
|
---|
812 |
|
---|
813 | @param[in] Guid Specify the GUID token space.
|
---|
814 | @param[in] TokenNumber Specify the token number.
|
---|
815 | @param[in] NotificationFunction The callback function to be unregistered.
|
---|
816 |
|
---|
817 | **/
|
---|
818 | VOID
|
---|
819 | EFIAPI
|
---|
820 | LibPcdCancelCallback (
|
---|
821 | IN CONST GUID *Guid, OPTIONAL
|
---|
822 | IN UINTN TokenNumber,
|
---|
823 | IN PCD_CALLBACK NotificationFunction
|
---|
824 | )
|
---|
825 | {
|
---|
826 | ASSERT (FALSE);
|
---|
827 | }
|
---|
828 |
|
---|
829 |
|
---|
830 |
|
---|
831 | /**
|
---|
832 | Retrieves the next token in a token space.
|
---|
833 |
|
---|
834 | Retrieves the next PCD token number from the token space specified by Guid.
|
---|
835 | If Guid is NULL, then the default token space is used. If TokenNumber is 0,
|
---|
836 | then the first token number is returned. Otherwise, the token number that
|
---|
837 | follows TokenNumber in the token space is returned. If TokenNumber is the last
|
---|
838 | token number in the token space, then 0 is returned.
|
---|
839 |
|
---|
840 | If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
|
---|
841 |
|
---|
842 | @param[in] Guid The pointer to a 128-bit unique value that designates which namespace
|
---|
843 | to set a value from. If NULL, then the default token space is used.
|
---|
844 | @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
|
---|
845 | token number.
|
---|
846 |
|
---|
847 | @return The next valid token number.
|
---|
848 |
|
---|
849 | **/
|
---|
850 | UINTN
|
---|
851 | EFIAPI
|
---|
852 | LibPcdGetNextToken (
|
---|
853 | IN CONST GUID *Guid, OPTIONAL
|
---|
854 | IN UINTN TokenNumber
|
---|
855 | )
|
---|
856 | {
|
---|
857 | ASSERT (FALSE);
|
---|
858 |
|
---|
859 | return 0;
|
---|
860 | }
|
---|
861 |
|
---|
862 |
|
---|
863 |
|
---|
864 | /**
|
---|
865 | Used to retrieve the list of available PCD token space GUIDs.
|
---|
866 |
|
---|
867 | Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
|
---|
868 | in the platform.
|
---|
869 | If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
|
---|
870 | If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
|
---|
871 |
|
---|
872 | @param TokenSpaceGuid The pointer to a PCD token space GUID.
|
---|
873 |
|
---|
874 | @return The next valid token namespace.
|
---|
875 |
|
---|
876 | **/
|
---|
877 | GUID *
|
---|
878 | EFIAPI
|
---|
879 | LibPcdGetNextTokenSpace (
|
---|
880 | IN CONST GUID *TokenSpaceGuid
|
---|
881 | )
|
---|
882 | {
|
---|
883 | ASSERT (FALSE);
|
---|
884 |
|
---|
885 | return NULL;
|
---|
886 | }
|
---|
887 |
|
---|
888 |
|
---|
889 | /**
|
---|
890 | Sets a value of a patchable PCD entry that is type pointer.
|
---|
891 |
|
---|
892 | Sets the PCD entry specified by PatchVariable to the value specified by Buffer
|
---|
893 | and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
|
---|
894 | MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
|
---|
895 | NULL to indicate that the set operation was not actually performed.
|
---|
896 | If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
|
---|
897 | MaximumDatumSize and NULL must be returned.
|
---|
898 |
|
---|
899 | If PatchVariable is NULL, then ASSERT().
|
---|
900 | If SizeOfBuffer is NULL, then ASSERT().
|
---|
901 | If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
|
---|
902 |
|
---|
903 | @param[in] PatchVariable A pointer to the global variable in a module that is
|
---|
904 | the target of the set operation.
|
---|
905 | @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
|
---|
906 | @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
|
---|
907 | @param[in] Buffer A pointer to the buffer to used to set the target variable.
|
---|
908 |
|
---|
909 | @return Return the pointer to the buffer that was set.
|
---|
910 |
|
---|
911 | **/
|
---|
912 | VOID *
|
---|
913 | EFIAPI
|
---|
914 | LibPatchPcdSetPtr (
|
---|
915 | IN VOID *PatchVariable,
|
---|
916 | IN UINTN MaximumDatumSize,
|
---|
917 | IN OUT UINTN *SizeOfBuffer,
|
---|
918 | IN CONST VOID *Buffer
|
---|
919 | )
|
---|
920 | {
|
---|
921 | ASSERT (PatchVariable != NULL);
|
---|
922 | ASSERT (SizeOfBuffer != NULL);
|
---|
923 |
|
---|
924 | if (*SizeOfBuffer > 0) {
|
---|
925 | ASSERT (Buffer != NULL);
|
---|
926 | }
|
---|
927 |
|
---|
928 | if ((*SizeOfBuffer > MaximumDatumSize) ||
|
---|
929 | (*SizeOfBuffer == MAX_ADDRESS)) {
|
---|
930 | *SizeOfBuffer = MaximumDatumSize;
|
---|
931 | return NULL;
|
---|
932 | }
|
---|
933 |
|
---|
934 | CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
|
---|
935 |
|
---|
936 | return (VOID *) Buffer;
|
---|
937 | }
|
---|
938 |
|
---|
939 | /**
|
---|
940 | Retrieve additional information associated with a PCD token.
|
---|
941 |
|
---|
942 | This includes information such as the type of value the TokenNumber is associated with as well as possible
|
---|
943 | human readable name that is associated with the token.
|
---|
944 |
|
---|
945 | If TokenNumber is not in the default token space specified, then ASSERT().
|
---|
946 |
|
---|
947 | @param[in] TokenNumber The PCD token number.
|
---|
948 | @param[out] PcdInfo The returned information associated with the requested TokenNumber.
|
---|
949 | The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
---|
950 | **/
|
---|
951 | VOID
|
---|
952 | EFIAPI
|
---|
953 | LibPcdGetInfo (
|
---|
954 | IN UINTN TokenNumber,
|
---|
955 | OUT PCD_INFO *PcdInfo
|
---|
956 | )
|
---|
957 | {
|
---|
958 | ASSERT (FALSE);
|
---|
959 | }
|
---|
960 |
|
---|
961 | /**
|
---|
962 | Retrieve additional information associated with a PCD token.
|
---|
963 |
|
---|
964 | This includes information such as the type of value the TokenNumber is associated with as well as possible
|
---|
965 | human readable name that is associated with the token.
|
---|
966 |
|
---|
967 | If TokenNumber is not in the token space specified by Guid, then ASSERT().
|
---|
968 |
|
---|
969 | @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
|
---|
970 | @param[in] TokenNumber The PCD token number.
|
---|
971 | @param[out] PcdInfo The returned information associated with the requested TokenNumber.
|
---|
972 | The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
---|
973 | **/
|
---|
974 | VOID
|
---|
975 | EFIAPI
|
---|
976 | LibPcdGetInfoEx (
|
---|
977 | IN CONST GUID *Guid,
|
---|
978 | IN UINTN TokenNumber,
|
---|
979 | OUT PCD_INFO *PcdInfo
|
---|
980 | )
|
---|
981 | {
|
---|
982 | ASSERT (FALSE);
|
---|
983 | }
|
---|
984 |
|
---|
985 | /**
|
---|
986 | Retrieve the currently set SKU Id.
|
---|
987 |
|
---|
988 | If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
|
---|
989 |
|
---|
990 | @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
---|
991 | default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
---|
992 | Id is returned.
|
---|
993 | **/
|
---|
994 | UINTN
|
---|
995 | EFIAPI
|
---|
996 | LibPcdGetSku (
|
---|
997 | VOID
|
---|
998 | )
|
---|
999 | {
|
---|
1000 | ASSERT (FALSE);
|
---|
1001 |
|
---|
1002 | return 0;
|
---|
1003 | }
|
---|
1004 |
|
---|