]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/PcdLib.h
MdePkg: Refine the comments for FileHandleIsDirectory.
[mirror_edk2.git] / MdePkg / Include / Library / PcdLib.h
1 /** @file
2 Provides library services to get and set Platform Configuration Database entries.
3
4 PCD Library Class provides a PCD usage macro interface for all PCD types.
5 It should be included in any module that uses PCD. If a module uses dynamic/dynamicex
6 PCD, module should be linked to a PEIM/DXE library instance to access that PCD.
7 If a module uses PatchableInModule type PCD, it also needs the library instance to produce
8 LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, the macro interface is
9 translated to a variable or macro that is auto-generated by build tool in
10 module's autogen.h/autogen.c.
11 The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are
12 only available prior to ExitBootServices(). If access to PCD values are required
13 at runtime, then their values must be collected prior to ExitBootServices().
14 There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),
15 PatchPcdGetXX(), and PatchPcdSetXX().
16
17 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
18 This program and the accompanying materials
19 are licensed and made available under the terms and conditions of the BSD License
20 which accompanies this distribution. The full text of the license may be found at
21 http://opensource.org/licenses/bsd-license.php
22
23 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
24 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
25
26 **/
27
28 #ifndef __PCD_LIB_H__
29 #define __PCD_LIB_H__
30
31 #define PCD_MAX_SKU_ID 0x100
32
33
34 /**
35 Retrieves a token number based on a token name.
36
37 Returns the token number associated with the PCD token specified by TokenName.
38 If TokenName is not a valid token in the token space, then the module will not build.
39 If TokenName is not a feature flag, then the module will not build.
40
41 @param TokenName The name of the PCD token to retrieve the token number for.
42
43 @return The token number associated with the PCD.
44
45 **/
46 #define PcdToken(TokenName) _PCD_TOKEN_##TokenName
47
48
49 /**
50 Retrieves a Boolean PCD feature flag based on a token name.
51
52 Returns the Boolean value for the PCD feature flag specified by TokenName.
53 If TokenName is not a valid token in the token space, then the module will not build.
54 If TokenName is not a feature flag, then the module will not build.
55
56 @param TokenName The name of the PCD token to retrieve a current value for.
57
58 @return Boolean value for the PCD feature flag.
59
60 **/
61 #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
62
63
64 /**
65 Retrieves an 8-bit fixed PCD token value based on a token name.
66
67 Returns the 8-bit value for the token specified by TokenName.
68 If TokenName is not a valid token in the token space, then the module will not build.
69 If TokenName is not a feature flag, then the module will not build.
70
71 @param TokenName The name of the PCD token to retrieve a current value for.
72
73 @return 8-bit value for the token specified by TokenName.
74
75 **/
76 #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
77
78
79 /**
80 Retrieves a 16-bit fixed PCD token value based on a token name.
81
82 Returns the 16-bit value for the token specified by TokenName.
83 If TokenName is not a valid token in the token space, then the module will not build.
84 If TokenName is not a feature flag, then the module will not build.
85
86 @param TokenName The name of the PCD token to retrieve a current value for.
87
88 @return 16-bit value for the token specified by TokenName.
89
90 **/
91 #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
92
93
94 /**
95 Retrieves a 32-bit fixed PCD token value based on a token name.
96
97 Returns the 32-bit value for the token specified by TokenName.
98 If TokenName is not a valid token in the token space, then the module will not build.
99 If TokenName is not a feature flag, then the module will not build.
100
101 @param TokenName The name of the PCD token to retrieve a current value for.
102
103 @return 32-bit value for the token specified by TokenName.
104
105 **/
106 #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
107
108
109 /**
110 Retrieves a 64-bit fixed PCD token value based on a token name.
111
112 Returns the 64-bit value for the token specified by TokenName.
113 If TokenName is not a valid token in the token space, then the module will not build.
114 If TokenName is not a feature flag, then the module will not build.
115
116 @param TokenName The name of the PCD token to retrieve a current value for.
117
118 @return 64-bit value for the token specified by TokenName.
119
120 **/
121 #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
122
123
124 /**
125 Retrieves a Boolean fixed PCD token value based on a token name.
126
127 Returns the Boolean value for the token specified by TokenName.
128 If TokenName is not a valid token in the token space, then the module will not build.
129 If TokenName is not a feature flag, then the module will not build.
130
131 @param TokenName The name of the PCD token to retrieve a current value for.
132
133 @return The Boolean value for the token.
134
135 **/
136 #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
137
138
139 /**
140 Retrieves a pointer to a fixed PCD token buffer based on a token name.
141
142 Returns a pointer to the buffer for the token specified by TokenName.
143 If TokenName is not a valid token in the token space, then the module will not build.
144 If TokenName is not a feature flag, then the module will not build.
145
146 @param TokenName The name of the PCD token to retrieve a current value for.
147
148 @return A pointer to the buffer.
149
150 **/
151 #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
152
153
154 /**
155 Retrieves an 8-bit binary patchable PCD token value based on a token name.
156
157 Returns the 8-bit value for the token specified by TokenName.
158 If TokenName is not a valid token in the token space, then the module will not build.
159 If TokenName is not a feature flag, then the module will not build.
160
161 @param TokenName The name of the PCD token to retrieve a current value for.
162
163 @return An 8-bit binary patchable PCD token value.
164
165 **/
166 #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
167
168 /**
169 Retrieves a 16-bit binary patchable PCD token value based on a token name.
170
171 Returns the 16-bit value for the token specified by TokenName.
172 If TokenName is not a valid token in the token space, then the module will not build.
173 If TokenName is not a feature flag, then the module will not build.
174
175 @param TokenName The name of the PCD token to retrieve a current value for.
176
177 @return A 16-bit binary patchable PCD token value.
178
179 **/
180 #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
181
182
183 /**
184 Retrieves a 32-bit binary patchable PCD token value based on a token name.
185
186 Returns the 32-bit value for the token specified by TokenName.
187 If TokenName is not a valid token in the token space, then the module will not build.
188 If TokenName is not a feature flag, then the module will not build.
189
190 @param TokenName The name of the PCD token to retrieve a current value for.
191
192 @return A 32-bit binary patchable PCD token value.
193
194 **/
195 #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
196
197
198 /**
199 Retrieves a 64-bit binary patchable PCD token value based on a token name.
200
201 Returns the 64-bit value for the token specified by TokenName.
202 If TokenName is not a valid token in the token space, then the module will not build.
203 If TokenName is not a feature flag, then the module will not build.
204
205 @param TokenName The name of the PCD token to retrieve a current value for.
206
207 @return A 64-bit binary patchable PCD token value.
208
209 **/
210 #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
211
212
213 /**
214 Retrieves a Boolean binary patchable PCD token value based on a token name.
215
216 Returns the Boolean value for the token specified by TokenName.
217 If TokenName is not a valid token in the token space, then the module will not build.
218 If TokenName is not a feature flag, then the module will not build.
219
220 @param TokenName The name of the PCD token to retrieve a current value for.
221
222 @return The Boolean value for the token.
223
224 **/
225 #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
226
227
228 /**
229 Retrieves a pointer to a binary patchable PCD token buffer based on a token name.
230
231 Returns a pointer to the buffer for the token specified by TokenName.
232 If TokenName is not a valid token in the token space, then the module will not build.
233 If TokenName is not a feature flag, then the module will not build.
234
235 @param TokenName The name of the PCD token to retrieve a current value for.
236
237 @return A pointer to the buffer for the token.
238
239 **/
240 #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
241
242
243 /**
244 Sets an 8-bit binary patchable PCD token value based on a token name.
245
246 Sets the 8-bit value for the token specified by TokenName. Value is returned.
247 If TokenName is not a valid token in the token space, then the module will not build.
248 If TokenName is not a feature flag, then the module will not build.
249
250 @param TokenName The name of the binary patchable PCD token to set the current value for.
251 @param Value The 8-bit value to set.
252
253 @return Return the Value that was set.
254
255 **/
256 #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
257
258
259 /**
260 Sets a 16-bit binary patchable PCD token value based on a token name.
261
262 Sets the 16-bit value for the token specified by TokenName. Value is returned.
263 If TokenName is not a valid token in the token space, then the module will not build.
264 If TokenName is not a feature flag, then the module will not build.
265
266 @param TokenName The name of the binary patchable PCD token to set the current value for.
267 @param Value The 16-bit value to set.
268
269 @return Return the Value that was set.
270
271 **/
272 #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
273
274
275 /**
276 Sets a 32-bit binary patchable PCD token value based on a token name.
277
278 Sets the 32-bit value for the token specified by TokenName. Value is returned.
279 If TokenName is not a valid token in the token space, then the module will not build.
280 If TokenName is not a feature flag, then the module will not build.
281
282 @param TokenName The name of the binary patchable PCD token to set the current value for.
283 @param Value The 32-bit value to set.
284
285 @return Return the Value that was set.
286
287 **/
288 #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
289
290
291 /**
292 Sets a 64-bit binary patchable PCD token value based on a token name.
293
294 Sets the 64-bit value for the token specified by TokenName. Value is returned.
295 If TokenName is not a valid token in the token space, then the module will not build.
296 If TokenName is not a feature flag, then the module will not build.
297
298 @param TokenName The name of the binary patchable PCD token to set the current value for.
299 @param Value The 64-bit value to set.
300
301 @return Return the Value that was set.
302
303 **/
304 #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
305
306
307 /**
308 Sets a Boolean binary patchable PCD token value based on a token name.
309
310 Sets the Boolean value for the token specified by TokenName. Value is returned.
311 If TokenName is not a valid token in the token space, then the module will not build.
312 If TokenName is not a feature flag, then the module will not build.
313
314 @param TokenName The name of the binary patchable PCD token to set the current value for.
315 @param Value The boolean value to set.
316
317 @return Return the Value that was set.
318
319 **/
320 #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
321
322
323 /**
324 Sets a pointer to a binary patchable PCD token buffer based on a token name.
325
326 Sets the buffer for the token specified by TokenName. Buffer is returned.
327 If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer
328 to the maximum size supported by TokenName and return NULL to indicate that the set operation
329 was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be
330 set to the maximum size supported by TokenName and NULL must be returned.
331 If TokenName is not a valid token in the token space, then the module will not build.
332 If TokenName is not a feature flag, then the module will not build.
333
334 If SizeOfBuffer is NULL, then ASSERT().
335 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
336
337 @param TokenName The name of the binary patchable PCD token to set the current value for.
338 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
339 @param Buffer Pointer to the value to set.
340
341 @return Return the pointer to the Buffer that was set.
342
343 **/
344 #define PatchPcdSetPtr(TokenName, Size, Buffer) \
345 LibPatchPcdSetPtr ( \
346 _gPcd_BinaryPatch_##TokenName, \
347 (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \
348 (Size), \
349 (Buffer) \
350 )
351
352 /**
353 Retrieves an 8-bit PCD token value based on a token name.
354
355 Returns the 8-bit value for the token specified by TokenName.
356 If TokenName is not a valid token in the token space, then the module will not build.
357
358 @param TokenName The name of the PCD token to retrieve a current value for.
359
360 @return 8-bit value for the token specified by TokenName.
361
362 **/
363 #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
364
365
366 /**
367 Retrieves a 16-bit PCD token value based on a token name.
368
369 Returns the 16-bit value for the token specified by TokenName.
370 If TokenName is not a valid token in the token space, then the module will not build.
371
372 @param TokenName The name of the PCD token to retrieve a current value for.
373
374 @return 16-bit value for the token specified by TokenName.
375
376 **/
377 #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
378
379
380 /**
381 Retrieves a 32-bit PCD token value based on a token name.
382
383 Returns the 32-bit value for the token specified by TokenName.
384 If TokenName is not a valid token in the token space, then the module will not build.
385
386 @param TokenName The name of the PCD token to retrieve a current value for.
387
388 @return 32-bit value for the token specified by TokenName.
389
390 **/
391 #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
392
393
394 /**
395 Retrieves a 64-bit PCD token value based on a token name.
396
397 Returns the 64-bit value for the token specified by TokenName.
398 If TokenName is not a valid token in the token space, then the module will not build.
399
400 @param TokenName The name of the PCD token to retrieve a current value for.
401
402 @return 64-bit value for the token specified by TokenName.
403
404 **/
405 #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
406
407
408 /**
409 Retrieves a pointer to a PCD token buffer based on a token name.
410
411 Returns a pointer to the buffer for the token specified by TokenName.
412 If TokenName is not a valid token in the token space, then the module will not build.
413
414 @param TokenName The name of the PCD token to retrieve a current value for.
415
416 @return A pointer to the buffer.
417
418 **/
419 #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
420
421
422 /**
423 Retrieves a Boolean PCD token value based on a token name.
424
425 Returns the Boolean value for the token specified by TokenName.
426 If TokenName is not a valid token in the token space, then the module will not build.
427
428 @param TokenName The name of the PCD token to retrieve a current value for.
429
430 @return A Boolean PCD token value.
431
432 **/
433 #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
434
435
436 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
437 /**
438 Sets an 8-bit PCD token value based on a token name.
439
440 Sets the 8-bit value for the token specified by TokenName. Value is returned.
441 If TokenName is not a valid token in the token space, then the module will not build.
442
443 @param TokenName The name of the PCD token to retrieve a current value for.
444 @param Value The 8-bit value to set.
445
446 @return Return the Value that was set.
447
448 **/
449 #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))
450
451
452 /**
453 Sets a 16-bit PCD token value based on a token name.
454
455 Sets the 16-bit value for the token specified by TokenName. Value is returned.
456 If TokenName is not a valid token in the token space, then the module will not build.
457
458 @param TokenName The name of the PCD token to retrieve a current value for.
459 @param Value The 16-bit value to set.
460
461 @return Return the Value that was set.
462
463 **/
464 #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))
465
466
467 /**
468 Sets a 32-bit PCD token value based on a token name.
469
470 Sets the 32-bit value for the token specified by TokenName. Value is returned.
471 If TokenName is not a valid token in the token space, then the module will not build.
472
473 @param TokenName The name of the PCD token to retrieve a current value for.
474 @param Value The 32-bit value to set.
475
476 @return Return the Value that was set.
477
478 **/
479 #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))
480
481
482 /**
483 Sets a 64-bit PCD token value based on a token name.
484
485 Sets the 64-bit value for the token specified by TokenName. Value is returned.
486 If TokenName is not a valid token in the token space, then the module will not build.
487
488 @param TokenName The name of the PCD token to retrieve a current value for.
489 @param Value The 64-bit value to set.
490
491 @return Return the Value that was set.
492
493 **/
494 #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))
495
496
497 /**
498 Sets a pointer to a PCD token buffer based on a token name.
499
500 Sets the buffer for the token specified by TokenName. Buffer is returned.
501 If SizeOfBuffer is greater than the maximum size supported by TokenName,
502 then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
503 to indicate that the set operation was not actually performed. If SizeOfBuffer
504 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
505 by TokenName and NULL must be returned.
506 If TokenName is not a valid token in the token space, then the module will not build.
507
508 If SizeOfBuffer is NULL, then ASSERT().
509 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
510
511 @param TokenName The name of the PCD token to set the current value for.
512 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
513 @param Buffer A pointer to the buffer to set.
514
515 @return Return the pointer to the Buffer that was set.
516
517 **/
518 #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \
519 _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))
520
521 /**
522 Sets a Boolean PCD token value based on a token name.
523
524 Sets the Boolean value for the token specified by TokenName. Value is returned.
525 If TokenName is not a valid token in the token space, then the module will not build.
526
527 @param TokenName The name of the PCD token to set the current value for.
528 @param Buffer The Boolean value to set.
529
530 @return Return the Value that was set.
531
532 **/
533 #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
534 #endif
535
536 /**
537 Sets a 8-bit PCD token value based on a token name.
538
539 Sets the 8-bit value for the token specified by TokenName.
540 If TokenName is not a valid token in the token space, then the module will not build.
541
542 @param TokenName The name of the PCD token to retrieve a current value for.
543 @param Value The 8-bit value to set.
544
545 @return The status of the set operation.
546
547 **/
548 #define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
549
550 /**
551 Sets a 16-bit PCD token value based on a token name.
552
553 Sets the 16-bit value for the token specified by TokenName.
554 If TokenName is not a valid token in the token space, then the module will not build.
555
556 @param TokenName The name of the PCD token to retrieve a current value for.
557 @param Value The 16-bit value to set.
558
559 @return The status of the set operation.
560
561 **/
562 #define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
563
564 /**
565 Sets a 32-bit PCD token value based on a token name.
566
567 Sets the 32-bit value for the token specified by TokenName.
568 If TokenName is not a valid token in the token space, then the module will not build.
569
570 @param TokenName The name of the PCD token to retrieve a current value for.
571 @param Value The 32-bit value to set.
572
573 @return The status of the set operation.
574
575 **/
576 #define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
577
578 /**
579 Sets a 64-bit PCD token value based on a token name.
580
581 Sets the 64-bit value for the token specified by TokenName.
582 If TokenName is not a valid token in the token space, then the module will not build.
583
584 @param TokenName The name of the PCD token to retrieve a current value for.
585 @param Value The 64-bit value to set.
586
587 @return The status of the set operation.
588
589 **/
590 #define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
591
592 /**
593 Sets a pointer to a PCD token buffer based on a token name.
594
595 Sets the buffer for the token specified by TokenName.
596 If SizeOfBuffer is greater than the maximum size supported by TokenName,
597 then set SizeOfBuffer to the maximum size supported by TokenName and return
598 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
599 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
600 supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
601 If TokenName is not a valid token in the token space, then the module will not build.
602
603 If SizeOfBuffer is NULL, then ASSERT().
604 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
605
606 @param TokenName The name of the PCD token to set the current value for.
607 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
608 @param Buffer A pointer to the buffer to set.
609
610 @return The status of the set operation.
611
612 **/
613 #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
614 _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
615
616
617
618 /**
619 Sets a boolean PCD token value based on a token name.
620
621 Sets the boolean value for the token specified by TokenName.
622 If TokenName is not a valid token in the token space, then the module will not build.
623
624 @param TokenName The name of the PCD token to retrieve a current value for.
625 @param Value The boolean value to set.
626
627 @return The status of the set operation.
628
629 **/
630 #define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
631
632 /**
633 Retrieves a token number based on a GUID and a token name.
634
635 Returns the token number for the token specified by Guid and TokenName.
636
637 @param Guid Pointer to a 128-bit unique value that designates
638 which namespace to retrieve a value from.
639 @param TokenName The name of the PCD token to retrieve a current value for.
640
641 @return Return the token number.
642
643 **/
644 #define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
645
646 /**
647 Retrieves an 8-bit PCD token value based on a GUID and a token name.
648
649 Returns the 8-bit value for the token specified by Guid and TokenName.
650 If TokenName is not a valid token in the token space specified by Guid,
651 then the module will not build.
652
653 If Guid is NULL, then ASSERT().
654
655 @param Guid Pointer to a 128-bit unique value that designates
656 which namespace to retrieve a value from.
657 @param TokenName The name of the PCD token to retrieve a current value for.
658
659 @return An 8-bit PCD token value.
660
661 **/
662 #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
663
664 /**
665 Retrieves a 16-bit PCD token value based on a GUID and a token name.
666
667 Returns the 16-bit value for the token specified by Guid and TokenName.
668 If TokenName is not a valid token in the token space specified by Guid,
669 then the module will not build.
670
671 If Guid is NULL, then ASSERT().
672
673 @param Guid Pointer to a 128-bit unique value that designates
674 which namespace to retrieve a value from.
675 @param TokenName The name of the PCD token to retrieve a current value for.
676
677 @return A 16-bit PCD token value.
678
679 **/
680 #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
681
682
683 /**
684 Retrieves a 32-bit PCD token value based on a GUID and a token name.
685
686 Returns the 32-bit value for the token specified by Guid and TokenName.
687 If TokenName is not a valid token in the token space specified by Guid,
688 then the module will not build.
689
690 If Guid is NULL, then ASSERT().
691
692 @param Guid Pointer to a 128-bit unique value that designates
693 which namespace to retrieve a value from.
694 @param TokenName The name of the PCD token to retrieve a current value for.
695
696 @return A 32-bit PCD token value.
697
698 **/
699 #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
700
701
702 /**
703 Retrieves a 64-bit PCD token value based on a GUID and a token name.
704
705 Returns the 64-bit value for the token specified by Guid and TokenName.
706 If TokenName is not a valid token in the token space specified by Guid,
707 then the module will not build.
708
709 If Guid is NULL, then ASSERT().
710
711 @param Guid Pointer to a 128-bit unique value that designates
712 which namespace to retrieve a value from.
713 @param TokenName The name of the PCD token to retrieve a current value for.
714
715 @return A 64-bit PCD token value.
716
717 **/
718 #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
719
720
721 /**
722 Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
723
724 Returns a pointer to the buffer for the token specified by Guid and TokenName.
725 If TokenName is not a valid token in the token space specified by Guid,
726 then the module will not build.
727
728 If Guid is NULL, then ASSERT().
729
730 @param Guid Pointer to a 128-bit unique value that designates
731 which namespace to retrieve a value from.
732 @param TokenName The name of the PCD token to retrieve a current value for.
733
734 @return A pointer to a PCD token buffer.
735
736 **/
737 #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
738
739
740 /**
741 Retrieves a Boolean PCD token value based on a GUID and a token name.
742
743 Returns the Boolean value for the token specified by Guid and TokenName.
744 If TokenName is not a valid token in the token space specified by Guid,
745 then the module will not build.
746
747 If Guid is NULL, then ASSERT().
748
749 @param Guid Pointer to a 128-bit unique value that designates
750 which namespace to retrieve a value from.
751 @param TokenName The name of the PCD token to retrieve a current value for.
752
753 @return A Boolean PCD token value.
754
755 **/
756 #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
757
758
759
760 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
761 /**
762 Sets an 8-bit PCD token value based on a GUID and a token name.
763
764 Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.
765 If TokenName is not a valid token in the token space specified by Guid,
766 then the module will not build.
767
768 If Guid is NULL, then ASSERT().
769
770 @param Guid Pointer to a 128-bit unique value that designates
771 which namespace to retrieve a value from.
772 @param TokenName The name of the PCD token to set the current value for.
773 @param Value The 8-bit value to set.
774
775 @return Return the Value that was set.
776
777 **/
778 #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
779
780
781 /**
782 Sets a 16-bit PCD token value based on a GUID and a token name.
783
784 Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.
785 If TokenName is not a valid token in the token space specified by Guid,
786 then the module will not build.
787
788 If Guid is NULL, then ASSERT().
789
790 @param Guid Pointer to a 128-bit unique value that designates
791 which namespace to retrieve a value from.
792 @param TokenName The name of the PCD token to set the current value for.
793 @param Value The 16-bit value to set.
794
795 @return Return the Value that was set.
796
797 **/
798 #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
799
800
801 /**
802 Sets a 32-bit PCD token value based on a GUID and a token name.
803
804 Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.
805 If TokenName is not a valid token in the token space specified by Guid,
806 then the module will not build.
807
808 If Guid is NULL, then ASSERT().
809
810 @param Guid Pointer to a 128-bit unique value that designates
811 which namespace to retrieve a value from.
812 @param TokenName The name of the PCD token to set the current value for.
813 @param Value The 32-bit value to set.
814
815 @return Return the Value that was set.
816
817 **/
818 #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
819
820
821 /**
822 Sets a 64-bit PCD token value based on a GUID and a token name.
823
824 Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.
825 If TokenName is not a valid token in the token space specified by Guid,
826 then the module will not build.
827
828 If Guid is NULL, then ASSERT().
829
830 @param Guid Pointer to a 128-bit unique value that designates
831 which namespace to retrieve a value from.
832 @param TokenName The name of the PCD token to set the current value for.
833 @param Value The 64-bit value to set.
834
835 @return Return the Value that was set.
836
837 **/
838 #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
839
840
841 /**
842 Sets a pointer to a PCD token buffer based on a GUID and a token name.
843
844 Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.
845 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
846 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
847 NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
848 is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by
849 Guid and TokenName and NULL must be returned.
850 If TokenName is not a valid token in the token space specified by Guid,
851 then the module will not build.
852
853 If Guid is NULL, then ASSERT().
854 If SizeOfBuffer is NULL, then ASSERT().
855 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
856
857 @param Guid Pointer to a 128-bit unique value that designates
858 which namespace to retrieve a value from.
859 @param TokenName The name of the PCD token to set the current value for.
860 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
861 @param Buffer Pointer to the buffer to set.
862
863 @return Return the pointer to the Buffer that was set.
864
865 **/
866 #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \
867 LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
868
869
870 /**
871 Sets a Boolean PCD token value based on a GUID and a token name.
872
873 Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.
874 If TokenName is not a valid token in the token space specified by Guid,
875 then the module will not build.
876
877 If Guid is NULL, then ASSERT().
878
879 @param Guid Pointer to a 128-bit unique value that designates
880 which namespace to retrieve a value from.
881 @param TokenName The name of the PCD token to set the current value for.
882 @param Value The Boolean value to set.
883
884 @return Return the Value that was set.
885
886 **/
887 #define PcdSetExBool(Guid, TokenName, Value) \
888 LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
889 #endif
890
891 /**
892 Sets an 8-bit PCD token value based on a GUID and a token name.
893
894 Sets the 8-bit value for the token specified by Guid and TokenName.
895 If TokenName is not a valid token in the token space specified by Guid,
896 then the module will not build.
897
898 If Guid is NULL, then ASSERT().
899
900 @param Guid Pointer to a 128-bit unique value that designates
901 which namespace to retrieve a value from.
902 @param TokenName The name of the PCD token to set the current value for.
903 @param Value The 8-bit value to set.
904
905 @return The status of the set operation.
906
907 **/
908 #define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
909
910 /**
911 Sets an 16-bit PCD token value based on a GUID and a token name.
912
913 Sets the 16-bit value for the token specified by Guid and TokenName.
914 If TokenName is not a valid token in the token space specified by Guid,
915 then the module will not build.
916
917 If Guid is NULL, then ASSERT().
918
919 @param Guid Pointer to a 128-bit unique value that designates
920 which namespace to retrieve a value from.
921 @param TokenName The name of the PCD token to set the current value for.
922 @param Value The 16-bit value to set.
923
924 @return The status of the set operation.
925
926 **/
927 #define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
928
929 /**
930 Sets an 32-bit PCD token value based on a GUID and a token name.
931
932 Sets the 32-bit value for the token specified by Guid and TokenName.
933 If TokenName is not a valid token in the token space specified by Guid,
934 then the module will not build.
935
936 If Guid is NULL, then ASSERT().
937
938 @param Guid Pointer to a 128-bit unique value that designates
939 which namespace to retrieve a value from.
940 @param TokenName The name of the PCD token to set the current value for.
941 @param Value The 32-bit value to set.
942
943 @return The status of the set operation.
944
945 **/
946 #define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
947
948 /**
949 Sets an 64-bit PCD token value based on a GUID and a token name.
950
951 Sets the 64-bit value for the token specified by Guid and TokenName.
952 If TokenName is not a valid token in the token space specified by Guid,
953 then the module will not build.
954
955 If Guid is NULL, then ASSERT().
956
957 @param Guid Pointer to a 128-bit unique value that designates
958 which namespace to retrieve a value from.
959 @param TokenName The name of the PCD token to set the current value for.
960 @param Value The 64-bit value to set.
961
962 @return The status of the set operation.
963
964 **/
965 #define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
966
967 /**
968 Sets a pointer to a PCD token buffer based on a GUID and a token name.
969
970 Sets the buffer for the token specified by Guid and TokenName.
971 If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
972 then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
973 RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed.
974 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size
975 supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned.
976 If TokenName is not a valid token in the token space specified by Guid,
977 then the module will not build.
978
979 If Guid is NULL, then ASSERT().
980 If SizeOfBuffer is NULL, then ASSERT().
981 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
982
983 @param Guid Pointer to a 128-bit unique value that designates
984 which namespace to retrieve a value from.
985 @param TokenName The name of the PCD token to set the current value for.
986 @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
987 @param Buffer Pointer to the buffer to set.
988
989 @return The status of the set operation.
990
991 **/
992 #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
993 LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
994
995
996 /**
997 Sets an boolean PCD token value based on a GUID and a token name.
998
999 Sets the boolean value for the token specified by Guid and TokenName.
1000 If TokenName is not a valid token in the token space specified by Guid,
1001 then the module will not build.
1002
1003 If Guid is NULL, then ASSERT().
1004
1005 @param Guid Pointer to a 128-bit unique value that designates
1006 which namespace to retrieve a value from.
1007 @param TokenName The name of the PCD token to set the current value for.
1008 @param Value The boolean value to set.
1009
1010 @return The status of the set operation.
1011
1012 **/
1013 #define PcdSetExBoolS(Guid, TokenName, Value) \
1014 LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value))
1015
1016 /**
1017 This function provides a means by which SKU support can be established in the PCD infrastructure.
1018
1019 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
1020 If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
1021
1022 @param SkuId The SKU value that will be used when the PCD service retrieves and sets values
1023 associated with a PCD token.
1024
1025 @return Return the SKU ID that was set.
1026
1027 **/
1028 UINTN
1029 EFIAPI
1030 LibPcdSetSku (
1031 IN UINTN SkuId
1032 );
1033
1034
1035 /**
1036 This function provides a means by which to retrieve a value for a given PCD token.
1037
1038 Returns the 8-bit value for the token specified by TokenNumber.
1039
1040 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1041
1042 @return Returns the 8-bit value for the token specified by TokenNumber.
1043
1044 **/
1045 UINT8
1046 EFIAPI
1047 LibPcdGet8 (
1048 IN UINTN TokenNumber
1049 );
1050
1051
1052 /**
1053 This function provides a means by which to retrieve a value for a given PCD token.
1054
1055 Returns the 16-bit value for the token specified by TokenNumber.
1056
1057 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1058
1059 @return Returns the 16-bit value for the token specified by TokenNumber.
1060
1061 **/
1062 UINT16
1063 EFIAPI
1064 LibPcdGet16 (
1065 IN UINTN TokenNumber
1066 );
1067
1068
1069 /**
1070 This function provides a means by which to retrieve a value for a given PCD token.
1071
1072 Returns the 32-bit value for the token specified by TokenNumber.
1073
1074 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1075
1076 @return Returns the 32-bit value for the token specified by TokenNumber.
1077
1078 **/
1079 UINT32
1080 EFIAPI
1081 LibPcdGet32 (
1082 IN UINTN TokenNumber
1083 );
1084
1085
1086 /**
1087 This function provides a means by which to retrieve a value for a given PCD token.
1088
1089 Returns the 64-bit value for the token specified by TokenNumber.
1090
1091 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1092
1093 @return Returns the 64-bit value for the token specified by TokenNumber.
1094
1095 **/
1096 UINT64
1097 EFIAPI
1098 LibPcdGet64 (
1099 IN UINTN TokenNumber
1100 );
1101
1102
1103 /**
1104 This function provides a means by which to retrieve a value for a given PCD token.
1105
1106 Returns the pointer to the buffer of the token specified by TokenNumber.
1107
1108 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1109
1110 @return Returns the pointer to the token specified by TokenNumber.
1111
1112 **/
1113 VOID *
1114 EFIAPI
1115 LibPcdGetPtr (
1116 IN UINTN TokenNumber
1117 );
1118
1119
1120 /**
1121 This function provides a means by which to retrieve a value for a given PCD token.
1122
1123 Returns the Boolean value of the token specified by TokenNumber.
1124
1125 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1126
1127 @return Returns the Boolean value of the token specified by TokenNumber.
1128
1129 **/
1130 BOOLEAN
1131 EFIAPI
1132 LibPcdGetBool (
1133 IN UINTN TokenNumber
1134 );
1135
1136
1137 /**
1138 This function provides a means by which to retrieve the size of a given PCD token.
1139
1140 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1141
1142 @return Returns the size of the token specified by TokenNumber.
1143
1144 **/
1145 UINTN
1146 EFIAPI
1147 LibPcdGetSize (
1148 IN UINTN TokenNumber
1149 );
1150
1151
1152 /**
1153 This function provides a means by which to retrieve a value for a given PCD token.
1154
1155 Returns the 8-bit value for the token specified by TokenNumber and Guid.
1156
1157 If Guid is NULL, then ASSERT().
1158
1159 @param[in] Guid Pointer to a 128-bit unique value that designates
1160 which namespace to retrieve a value from.
1161 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1162
1163 @return Return the UINT8.
1164
1165 **/
1166 UINT8
1167 EFIAPI
1168 LibPcdGetEx8 (
1169 IN CONST GUID *Guid,
1170 IN UINTN TokenNumber
1171 );
1172
1173
1174 /**
1175 This function provides a means by which to retrieve a value for a given PCD token.
1176
1177 Returns the 16-bit value for the token specified by TokenNumber and Guid.
1178
1179 If Guid is NULL, then ASSERT().
1180
1181 @param[in] Guid Pointer to a 128-bit unique value that designates
1182 which namespace to retrieve a value from.
1183 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1184
1185 @return Return the UINT16.
1186
1187 **/
1188 UINT16
1189 EFIAPI
1190 LibPcdGetEx16 (
1191 IN CONST GUID *Guid,
1192 IN UINTN TokenNumber
1193 );
1194
1195
1196 /**
1197 Returns the 32-bit value for the token specified by TokenNumber and Guid.
1198 If Guid is NULL, then ASSERT().
1199
1200 @param[in] Guid Pointer to a 128-bit unique value that designates
1201 which namespace to retrieve a value from.
1202 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1203
1204 @return Return the UINT32.
1205
1206 **/
1207 UINT32
1208 EFIAPI
1209 LibPcdGetEx32 (
1210 IN CONST GUID *Guid,
1211 IN UINTN TokenNumber
1212 );
1213
1214
1215 /**
1216 This function provides a means by which to retrieve a value for a given PCD token.
1217
1218 Returns the 64-bit value for the token specified by TokenNumber and Guid.
1219
1220 If Guid is NULL, then ASSERT().
1221
1222 @param[in] Guid Pointer to a 128-bit unique value that designates
1223 which namespace to retrieve a value from.
1224 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1225
1226 @return Return the UINT64.
1227
1228 **/
1229 UINT64
1230 EFIAPI
1231 LibPcdGetEx64 (
1232 IN CONST GUID *Guid,
1233 IN UINTN TokenNumber
1234 );
1235
1236
1237 /**
1238 This function provides a means by which to retrieve a value for a given PCD token.
1239
1240 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
1241
1242 If Guid is NULL, then ASSERT().
1243
1244 @param[in] Guid Pointer to a 128-bit unique value that designates
1245 which namespace to retrieve a value from.
1246 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1247
1248 @return Return the VOID* pointer.
1249
1250 **/
1251 VOID *
1252 EFIAPI
1253 LibPcdGetExPtr (
1254 IN CONST GUID *Guid,
1255 IN UINTN TokenNumber
1256 );
1257
1258
1259 /**
1260 This function provides a means by which to retrieve a value for a given PCD token.
1261
1262 Returns the Boolean value of the token specified by TokenNumber and Guid.
1263
1264 If Guid is NULL, then ASSERT().
1265
1266 @param[in] Guid Pointer to a 128-bit unique value that designates
1267 which namespace to retrieve a value from.
1268 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1269
1270 @return Return the BOOLEAN.
1271
1272 **/
1273 BOOLEAN
1274 EFIAPI
1275 LibPcdGetExBool (
1276 IN CONST GUID *Guid,
1277 IN UINTN TokenNumber
1278 );
1279
1280
1281 /**
1282 This function provides a means by which to retrieve the size of a given PCD token.
1283
1284 Returns the size of the token specified by TokenNumber and Guid.
1285
1286 If Guid is NULL, then ASSERT().
1287
1288 @param[in] Guid Pointer to a 128-bit unique value that designates
1289 which namespace to retrieve a value from.
1290 @param[in] TokenNumber The PCD token number to retrieve a current value for.
1291
1292 @return Return the size.
1293
1294 **/
1295 UINTN
1296 EFIAPI
1297 LibPcdGetExSize (
1298 IN CONST GUID *Guid,
1299 IN UINTN TokenNumber
1300 );
1301
1302
1303 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1304 /**
1305 This function provides a means by which to set a value for a given PCD token.
1306
1307 Sets the 8-bit value for the token specified by TokenNumber
1308 to the value specified by Value. Value is returned.
1309
1310 @param[in] TokenNumber The PCD token number to set a current value for.
1311 @param[in] Value The 8-bit value to set.
1312
1313 @return Return the Value that was set.
1314
1315 **/
1316 UINT8
1317 EFIAPI
1318 LibPcdSet8 (
1319 IN UINTN TokenNumber,
1320 IN UINT8 Value
1321 );
1322
1323
1324 /**
1325 This function provides a means by which to set a value for a given PCD token.
1326
1327 Sets the 16-bit value for the token specified by TokenNumber
1328 to the value specified by Value. Value is returned.
1329
1330 @param[in] TokenNumber The PCD token number to set a current value for.
1331 @param[in] Value The 16-bit value to set.
1332
1333 @return Return the Value that was set.
1334
1335 **/
1336 UINT16
1337 EFIAPI
1338 LibPcdSet16 (
1339 IN UINTN TokenNumber,
1340 IN UINT16 Value
1341 );
1342
1343
1344 /**
1345 This function provides a means by which to set a value for a given PCD token.
1346
1347 Sets the 32-bit value for the token specified by TokenNumber
1348 to the value specified by Value. Value is returned.
1349
1350 @param[in] TokenNumber The PCD token number to set a current value for.
1351 @param[in] Value The 32-bit value to set.
1352
1353 @return Return the Value that was set.
1354
1355 **/
1356 UINT32
1357 EFIAPI
1358 LibPcdSet32 (
1359 IN UINTN TokenNumber,
1360 IN UINT32 Value
1361 );
1362
1363
1364 /**
1365 This function provides a means by which to set a value for a given PCD token.
1366
1367 Sets the 64-bit value for the token specified by TokenNumber
1368 to the value specified by Value. Value is returned.
1369
1370 @param[in] TokenNumber The PCD token number to set a current value for.
1371 @param[in] Value The 64-bit value to set.
1372
1373 @return Return the Value that was set.
1374
1375 **/
1376 UINT64
1377 EFIAPI
1378 LibPcdSet64 (
1379 IN UINTN TokenNumber,
1380 IN UINT64 Value
1381 );
1382
1383
1384 /**
1385 This function provides a means by which to set a value for a given PCD token.
1386
1387 Sets a buffer for the token specified by TokenNumber to the value
1388 specified by Buffer and SizeOfBuffer. Buffer is returned.
1389 If SizeOfBuffer is greater than the maximum size support by TokenNumber,
1390 then set SizeOfBuffer to the maximum size supported by TokenNumber and
1391 return NULL to indicate that the set operation was not actually performed.
1392
1393 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1394 maximum size supported by TokenName and NULL must be returned.
1395
1396 If SizeOfBuffer is NULL, then ASSERT().
1397 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1398
1399 @param[in] TokenNumber The PCD token number to set a current value for.
1400 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1401 @param[in] Buffer A pointer to the buffer to set.
1402
1403 @return Return the pointer for the Buffer that was set.
1404
1405 **/
1406 VOID *
1407 EFIAPI
1408 LibPcdSetPtr (
1409 IN UINTN TokenNumber,
1410 IN OUT UINTN *SizeOfBuffer,
1411 IN CONST VOID *Buffer
1412 );
1413
1414
1415 /**
1416 This function provides a means by which to set a value for a given PCD token.
1417
1418 Sets the Boolean value for the token specified by TokenNumber
1419 to the value specified by Value. Value is returned.
1420
1421 @param[in] TokenNumber The PCD token number to set a current value for.
1422 @param[in] Value The boolean value to set.
1423
1424 @return Return the Value that was set.
1425
1426 **/
1427 BOOLEAN
1428 EFIAPI
1429 LibPcdSetBool (
1430 IN UINTN TokenNumber,
1431 IN BOOLEAN Value
1432 );
1433
1434
1435 /**
1436 This function provides a means by which to set a value for a given PCD token.
1437
1438 Sets the 8-bit value for the token specified by TokenNumber and
1439 Guid to the value specified by Value. Value is returned.
1440
1441 If Guid is NULL, then ASSERT().
1442
1443 @param[in] Guid Pointer to a 128-bit unique value that
1444 designates which namespace to set a value from.
1445 @param[in] TokenNumber The PCD token number to set a current value for.
1446 @param[in] Value The 8-bit value to set.
1447
1448 @return Return the Value that was set.
1449
1450 **/
1451 UINT8
1452 EFIAPI
1453 LibPcdSetEx8 (
1454 IN CONST GUID *Guid,
1455 IN UINTN TokenNumber,
1456 IN UINT8 Value
1457 );
1458
1459
1460 /**
1461 This function provides a means by which to set a value for a given PCD token.
1462
1463 Sets the 16-bit value for the token specified by TokenNumber and
1464 Guid to the value specified by Value. Value is returned.
1465
1466 If Guid is NULL, then ASSERT().
1467
1468 @param[in] Guid Pointer to a 128-bit unique value that
1469 designates which namespace to set a value from.
1470 @param[in] TokenNumber The PCD token number to set a current value for.
1471 @param[in] Value The 16-bit value to set.
1472
1473 @return Return the Value that was set.
1474
1475 **/
1476 UINT16
1477 EFIAPI
1478 LibPcdSetEx16 (
1479 IN CONST GUID *Guid,
1480 IN UINTN TokenNumber,
1481 IN UINT16 Value
1482 );
1483
1484
1485 /**
1486 This function provides a means by which to set a value for a given PCD token.
1487
1488 Sets the 32-bit value for the token specified by TokenNumber and
1489 Guid to the value specified by Value. Value is returned.
1490
1491 If Guid is NULL, then ASSERT().
1492
1493 @param[in] Guid Pointer to a 128-bit unique value that
1494 designates which namespace to set a value from.
1495 @param[in] TokenNumber The PCD token number to set a current value for.
1496 @param[in] Value The 32-bit value to set.
1497
1498 @return Return the Value that was set.
1499
1500 **/
1501 UINT32
1502 EFIAPI
1503 LibPcdSetEx32 (
1504 IN CONST GUID *Guid,
1505 IN UINTN TokenNumber,
1506 IN UINT32 Value
1507 );
1508
1509
1510 /**
1511 This function provides a means by which to set a value for a given PCD token.
1512
1513 Sets the 64-bit value for the token specified by TokenNumber and
1514 Guid to the value specified by Value. Value is returned.
1515
1516 If Guid is NULL, then ASSERT().
1517
1518 @param[in] Guid Pointer to a 128-bit unique value that
1519 designates which namespace to set a value from.
1520 @param[in] TokenNumber The PCD token number to set a current value for.
1521 @param[in] Value The 64-bit value to set.
1522
1523 @return Return the Value that was set.
1524
1525 **/
1526 UINT64
1527 EFIAPI
1528 LibPcdSetEx64 (
1529 IN CONST GUID *Guid,
1530 IN UINTN TokenNumber,
1531 IN UINT64 Value
1532 );
1533
1534
1535 /**
1536 This function provides a means by which to set a value for a given PCD token.
1537
1538 Sets a buffer for the token specified by TokenNumber to the value specified by
1539 Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1540 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
1541 supported by TokenNumber and return NULL to indicate that the set operation
1542 was not actually performed.
1543
1544 If Guid is NULL, then ASSERT().
1545 If SizeOfBuffer is NULL, then ASSERT().
1546 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1547
1548 @param[in] Guid Pointer to a 128-bit unique value that
1549 designates which namespace to set a value from.
1550 @param[in] TokenNumber The PCD token number to set a current value for.
1551 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1552 @param[in] Buffer A pointer to the buffer to set.
1553
1554 @return Return the pointer to the Buffer that was set.
1555
1556 **/
1557 VOID *
1558 EFIAPI
1559 LibPcdSetExPtr (
1560 IN CONST GUID *Guid,
1561 IN UINTN TokenNumber,
1562 IN OUT UINTN *SizeOfBuffer,
1563 IN VOID *Buffer
1564 );
1565
1566
1567 /**
1568 This function provides a means by which to set a value for a given PCD token.
1569
1570 Sets the Boolean value for the token specified by TokenNumber and
1571 Guid to the value specified by Value. Value is returned.
1572
1573 If Guid is NULL, then ASSERT().
1574
1575 @param[in] Guid Pointer to a 128-bit unique value that
1576 designates which namespace to set a value from.
1577 @param[in] TokenNumber The PCD token number to set a current value for.
1578 @param[in] Value The Boolean value to set.
1579
1580 @return Return the Value that was set.
1581
1582 **/
1583 BOOLEAN
1584 EFIAPI
1585 LibPcdSetExBool (
1586 IN CONST GUID *Guid,
1587 IN UINTN TokenNumber,
1588 IN BOOLEAN Value
1589 );
1590 #endif
1591
1592 /**
1593 This function provides a means by which to set a value for a given PCD token.
1594
1595 Sets the 8-bit value for the token specified by TokenNumber
1596 to the value specified by Value.
1597
1598 @param[in] TokenNumber The PCD token number to set a current value for.
1599 @param[in] Value The 8-bit value to set.
1600
1601 @return The status of the set operation.
1602
1603 **/
1604 RETURN_STATUS
1605 EFIAPI
1606 LibPcdSet8S (
1607 IN UINTN TokenNumber,
1608 IN UINT8 Value
1609 );
1610
1611 /**
1612 This function provides a means by which to set a value for a given PCD token.
1613
1614 Sets the 16-bit value for the token specified by TokenNumber
1615 to the value specified by Value.
1616
1617 @param[in] TokenNumber The PCD token number to set a current value for.
1618 @param[in] Value The 16-bit value to set.
1619
1620 @return The status of the set operation.
1621
1622 **/
1623 RETURN_STATUS
1624 EFIAPI
1625 LibPcdSet16S (
1626 IN UINTN TokenNumber,
1627 IN UINT16 Value
1628 );
1629
1630 /**
1631 This function provides a means by which to set a value for a given PCD token.
1632
1633 Sets the 32-bit value for the token specified by TokenNumber
1634 to the value specified by Value.
1635
1636 @param[in] TokenNumber The PCD token number to set a current value for.
1637 @param[in] Value The 32-bit value to set.
1638
1639 @return The status of the set operation.
1640
1641 **/
1642 RETURN_STATUS
1643 EFIAPI
1644 LibPcdSet32S (
1645 IN UINTN TokenNumber,
1646 IN UINT32 Value
1647 );
1648
1649 /**
1650 This function provides a means by which to set a value for a given PCD token.
1651
1652 Sets the 64-bit value for the token specified by TokenNumber
1653 to the value specified by Value.
1654
1655 @param[in] TokenNumber The PCD token number to set a current value for.
1656 @param[in] Value The 64-bit value to set.
1657
1658 @return The status of the set operation.
1659
1660 **/
1661 RETURN_STATUS
1662 EFIAPI
1663 LibPcdSet64S (
1664 IN UINTN TokenNumber,
1665 IN UINT64 Value
1666 );
1667
1668 /**
1669 This function provides a means by which to set a value for a given PCD token.
1670
1671 Sets a buffer for the token specified by TokenNumber to the value specified
1672 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1673 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1674 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1675 was not actually performed.
1676
1677 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
1678 maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned.
1679
1680 If SizeOfBuffer is NULL, then ASSERT().
1681 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1682
1683 @param[in] TokenNumber The PCD token number to set a current value for.
1684 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1685 @param[in] Buffer A pointer to the buffer to set.
1686
1687 @return The status of the set operation.
1688
1689 **/
1690 RETURN_STATUS
1691 EFIAPI
1692 LibPcdSetPtrS (
1693 IN UINTN TokenNumber,
1694 IN OUT UINTN *SizeOfBuffer,
1695 IN CONST VOID *Buffer
1696 );
1697
1698 /**
1699 This function provides a means by which to set a value for a given PCD token.
1700
1701 Sets the boolean value for the token specified by TokenNumber
1702 to the value specified by Value.
1703
1704 @param[in] TokenNumber The PCD token number to set a current value for.
1705 @param[in] Value The boolean value to set.
1706
1707 @return The status of the set operation.
1708
1709 **/
1710 RETURN_STATUS
1711 EFIAPI
1712 LibPcdSetBoolS (
1713 IN UINTN TokenNumber,
1714 IN BOOLEAN Value
1715 );
1716
1717 /**
1718 This function provides a means by which to set a value for a given PCD token.
1719
1720 Sets the 8-bit value for the token specified by TokenNumber
1721 to the value specified by Value.
1722
1723 If Guid is NULL, then ASSERT().
1724
1725 @param[in] Guid The pointer to a 128-bit unique value that
1726 designates which namespace to set a value from.
1727 @param[in] TokenNumber The PCD token number to set a current value for.
1728 @param[in] Value The 8-bit value to set.
1729
1730 @return The status of the set operation.
1731
1732 **/
1733 RETURN_STATUS
1734 EFIAPI
1735 LibPcdSetEx8S (
1736 IN CONST GUID *Guid,
1737 IN UINTN TokenNumber,
1738 IN UINT8 Value
1739 );
1740
1741 /**
1742 This function provides a means by which to set a value for a given PCD token.
1743
1744 Sets the 16-bit value for the token specified by TokenNumber
1745 to the value specified by Value.
1746
1747 If Guid is NULL, then ASSERT().
1748
1749 @param[in] Guid The pointer to a 128-bit unique value that
1750 designates which namespace to set a value from.
1751 @param[in] TokenNumber The PCD token number to set a current value for.
1752 @param[in] Value The 16-bit value to set.
1753
1754 @return The status of the set operation.
1755
1756 **/
1757 RETURN_STATUS
1758 EFIAPI
1759 LibPcdSetEx16S (
1760 IN CONST GUID *Guid,
1761 IN UINTN TokenNumber,
1762 IN UINT16 Value
1763 );
1764
1765 /**
1766 This function provides a means by which to set a value for a given PCD token.
1767
1768 Sets the 32-bit value for the token specified by TokenNumber
1769 to the value specified by Value.
1770
1771 If Guid is NULL, then ASSERT().
1772
1773 @param[in] Guid The pointer to a 128-bit unique value that
1774 designates which namespace to set a value from.
1775 @param[in] TokenNumber The PCD token number to set a current value for.
1776 @param[in] Value The 32-bit value to set.
1777
1778 @return The status of the set operation.
1779
1780 **/
1781 RETURN_STATUS
1782 EFIAPI
1783 LibPcdSetEx32S (
1784 IN CONST GUID *Guid,
1785 IN UINTN TokenNumber,
1786 IN UINT32 Value
1787 );
1788
1789 /**
1790 This function provides a means by which to set a value for a given PCD token.
1791
1792 Sets the 64-bit value for the token specified by TokenNumber
1793 to the value specified by Value.
1794
1795 If Guid is NULL, then ASSERT().
1796
1797 @param[in] Guid The pointer to a 128-bit unique value that
1798 designates which namespace to set a value from.
1799 @param[in] TokenNumber The PCD token number to set a current value for.
1800 @param[in] Value The 64-bit value to set.
1801
1802 @return The status of the set operation.
1803
1804 **/
1805 RETURN_STATUS
1806 EFIAPI
1807 LibPcdSetEx64S (
1808 IN CONST GUID *Guid,
1809 IN UINTN TokenNumber,
1810 IN UINT64 Value
1811 );
1812
1813 /**
1814 This function provides a means by which to set a value for a given PCD token.
1815
1816 Sets a buffer for the token specified by TokenNumber to the value specified by
1817 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
1818 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
1819 TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation
1820 was not actually performed.
1821
1822 If Guid is NULL, then ASSERT().
1823 If SizeOfBuffer is NULL, then ASSERT().
1824 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
1825
1826 @param[in] Guid Pointer to a 128-bit unique value that
1827 designates which namespace to set a value from.
1828 @param[in] TokenNumber The PCD token number to set a current value for.
1829 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
1830 @param[in] Buffer A pointer to the buffer to set.
1831
1832 @return The status of the set operation.
1833
1834 **/
1835 RETURN_STATUS
1836 EFIAPI
1837 LibPcdSetExPtrS (
1838 IN CONST GUID *Guid,
1839 IN UINTN TokenNumber,
1840 IN OUT UINTN *SizeOfBuffer,
1841 IN VOID *Buffer
1842 );
1843
1844 /**
1845 This function provides a means by which to set a value for a given PCD token.
1846
1847 Sets the boolean value for the token specified by TokenNumber
1848 to the value specified by Value.
1849
1850 If Guid is NULL, then ASSERT().
1851
1852 @param[in] Guid The pointer to a 128-bit unique value that
1853 designates which namespace to set a value from.
1854 @param[in] TokenNumber The PCD token number to set a current value for.
1855 @param[in] Value The boolean value to set.
1856
1857 @return The status of the set operation.
1858
1859 **/
1860 RETURN_STATUS
1861 EFIAPI
1862 LibPcdSetExBoolS (
1863 IN CONST GUID *Guid,
1864 IN UINTN TokenNumber,
1865 IN BOOLEAN Value
1866 );
1867
1868 /**
1869 This notification function serves two purposes.
1870
1871 Firstly, it notifies the module that did the registration that the value of this
1872 PCD token has been set.
1873 Secondly, it provides a mechanism for the module that did the registration to intercept
1874 the set operation and override the value been set if necessary. After the invocation of
1875 the callback function, TokenData will be used by PCD service PEIM or driver to modify th
1876 internal data in PCD database.
1877
1878 @param[in] CallBackGuid The PCD token GUID being set.
1879 @param[in] CallBackToken The PCD token number being set.
1880 @param[in, out] TokenData A pointer to the token data being set.
1881 @param[in] TokenDataSize The size, in bytes, of the data being set.
1882
1883 **/
1884 typedef
1885 VOID
1886 (EFIAPI *PCD_CALLBACK)(
1887 IN CONST GUID *CallBackGuid, OPTIONAL
1888 IN UINTN CallBackToken,
1889 IN OUT VOID *TokenData,
1890 IN UINTN TokenDataSize
1891 );
1892
1893
1894 /**
1895 Set up a notification function that is called when a specified token is set.
1896
1897 When the token specified by TokenNumber and Guid is set,
1898 then notification function specified by NotificationFunction is called.
1899 If Guid is NULL, then the default token space is used.
1900 If NotificationFunction is NULL, then ASSERT().
1901
1902 @param[in] Guid Pointer to a 128-bit unique value that designates which
1903 namespace to set a value from. If NULL, then the default
1904 token space is used.
1905 @param[in] TokenNumber The PCD token number to monitor.
1906 @param[in] NotificationFunction The function to call when the token
1907 specified by Guid and TokenNumber is set.
1908
1909 **/
1910 VOID
1911 EFIAPI
1912 LibPcdCallbackOnSet (
1913 IN CONST GUID *Guid, OPTIONAL
1914 IN UINTN TokenNumber,
1915 IN PCD_CALLBACK NotificationFunction
1916 );
1917
1918
1919 /**
1920 Disable a notification function that was established with LibPcdCallbackonSet().
1921
1922 Disable a notification function that was previously established with LibPcdCallbackOnSet().
1923 If NotificationFunction is NULL, then ASSERT().
1924 If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
1925 and NotificationFunction, then ASSERT().
1926
1927 @param[in] Guid Specify the GUID token space.
1928 @param[in] TokenNumber Specify the token number.
1929 @param[in] NotificationFunction The callback function to be unregistered.
1930
1931 **/
1932 VOID
1933 EFIAPI
1934 LibPcdCancelCallback (
1935 IN CONST GUID *Guid, OPTIONAL
1936 IN UINTN TokenNumber,
1937 IN PCD_CALLBACK NotificationFunction
1938 );
1939
1940
1941 /**
1942 Retrieves the next token in a token space.
1943
1944 Retrieves the next PCD token number from the token space specified by Guid.
1945 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
1946 then the first token number is returned. Otherwise, the token number that
1947 follows TokenNumber in the token space is returned. If TokenNumber is the last
1948 token number in the token space, then 0 is returned.
1949
1950 If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
1951
1952 @param[in] Guid Pointer to a 128-bit unique value that designates which namespace
1953 to set a value from. If NULL, then the default token space is used.
1954 @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
1955 token number.
1956
1957 @return The next valid token number.
1958
1959 **/
1960 UINTN
1961 EFIAPI
1962 LibPcdGetNextToken (
1963 IN CONST GUID *Guid, OPTIONAL
1964 IN UINTN TokenNumber
1965 );
1966
1967
1968
1969 /**
1970 Used to retrieve the list of available PCD token space GUIDs.
1971
1972 Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
1973 in the platform.
1974 If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
1975 If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
1976
1977 @param TokenSpaceGuid Pointer to the a PCD token space GUID
1978
1979 @return The next valid token namespace.
1980
1981 **/
1982 GUID *
1983 EFIAPI
1984 LibPcdGetNextTokenSpace (
1985 IN CONST GUID *TokenSpaceGuid
1986 );
1987
1988
1989 /**
1990 Sets a value of a patchable PCD entry that is type pointer.
1991
1992 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
1993 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
1994 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
1995 NULL to indicate that the set operation was not actually performed.
1996 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
1997 MaximumDatumSize and NULL must be returned.
1998
1999 If PatchVariable is NULL, then ASSERT().
2000 If SizeOfBuffer is NULL, then ASSERT().
2001 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2002
2003 @param[in] PatchVariable A pointer to the global variable in a module that is
2004 the target of the set operation.
2005 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2006 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2007 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2008
2009 @return Return the pointer to the Buffer that was set.
2010
2011 **/
2012 VOID *
2013 EFIAPI
2014 LibPatchPcdSetPtr (
2015 IN VOID *PatchVariable,
2016 IN UINTN MaximumDatumSize,
2017 IN OUT UINTN *SizeOfBuffer,
2018 IN CONST VOID *Buffer
2019 );
2020
2021 /**
2022 Sets a value of a patchable PCD entry that is type pointer.
2023
2024 Sets the PCD entry specified by PatchVariable to the value specified
2025 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize,
2026 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER
2027 to indicate that the set operation was not actually performed.
2028 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
2029 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned.
2030
2031 If PatchVariable is NULL, then ASSERT().
2032 If SizeOfBuffer is NULL, then ASSERT().
2033 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
2034
2035 @param[in] PatchVariable A pointer to the global variable in a module that is
2036 the target of the set operation.
2037 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
2038 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
2039 @param[in] Buffer A pointer to the buffer to used to set the target variable.
2040
2041 @return The status of the set operation.
2042
2043 **/
2044 RETURN_STATUS
2045 EFIAPI
2046 LibPatchPcdSetPtrS (
2047 IN VOID *PatchVariable,
2048 IN UINTN MaximumDatumSize,
2049 IN OUT UINTN *SizeOfBuffer,
2050 IN CONST VOID *Buffer
2051 );
2052
2053 typedef enum {
2054 PCD_TYPE_8,
2055 PCD_TYPE_16,
2056 PCD_TYPE_32,
2057 PCD_TYPE_64,
2058 PCD_TYPE_BOOL,
2059 PCD_TYPE_PTR
2060 } PCD_TYPE;
2061
2062 typedef struct {
2063 ///
2064 /// The returned information associated with the requested TokenNumber. If
2065 /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.
2066 ///
2067 PCD_TYPE PcdType;
2068 ///
2069 /// The size of the data in bytes associated with the TokenNumber specified. If
2070 /// TokenNumber is 0, then PcdSize is set 0.
2071 ///
2072 UINTN PcdSize;
2073 ///
2074 /// The null-terminated ASCII string associated with a given token. If the
2075 /// TokenNumber specified was 0, then this field corresponds to the null-terminated
2076 /// ASCII string associated with the token's namespace Guid. If NULL, there is no
2077 /// name associated with this request.
2078 ///
2079 CHAR8 *PcdName;
2080 } PCD_INFO;
2081
2082
2083 /**
2084 Retrieve additional information associated with a PCD token.
2085
2086 This includes information such as the type of value the TokenNumber is associated with as well as possible
2087 human readable name that is associated with the token.
2088
2089 If TokenNumber is not in the default token space specified, then ASSERT().
2090
2091 @param[in] TokenNumber The PCD token number.
2092 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2093 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2094 **/
2095 VOID
2096 EFIAPI
2097 LibPcdGetInfo (
2098 IN UINTN TokenNumber,
2099 OUT PCD_INFO *PcdInfo
2100 );
2101
2102 /**
2103 Retrieve additional information associated with a PCD token.
2104
2105 This includes information such as the type of value the TokenNumber is associated with as well as possible
2106 human readable name that is associated with the token.
2107
2108 If TokenNumber is not in the token space specified by Guid, then ASSERT().
2109
2110 @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
2111 @param[in] TokenNumber The PCD token number.
2112 @param[out] PcdInfo The returned information associated with the requested TokenNumber.
2113 The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
2114 **/
2115 VOID
2116 EFIAPI
2117 LibPcdGetInfoEx (
2118 IN CONST GUID *Guid,
2119 IN UINTN TokenNumber,
2120 OUT PCD_INFO *PcdInfo
2121 );
2122
2123 /**
2124 Retrieve the currently set SKU Id.
2125
2126 If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
2127
2128 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the
2129 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
2130 Id is returned.
2131 **/
2132 UINTN
2133 EFIAPI
2134 LibPcdGetSku (
2135 VOID
2136 );
2137
2138 #endif