]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/PcdLib.h
Correct parameter UINTN to UINT32
[mirror_edk2.git] / MdePkg / Include / Library / PcdLib.h
1 /** @file
2 PCD Library Class Interface Declarations
3
4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. 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 #ifndef __PCD_LIB_H__
16 #define __PCD_LIB_H__
17
18 #define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0)
19
20 #define PcdToken(TokenName) _PCD_TOKEN_##TokenName
21
22
23 //
24 // Feature Flag is in the form of a global constant
25 //
26 #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
27
28
29 //
30 // Fixed is fixed at build time
31 //
32 #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
33 #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
34 #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
35 #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
36 #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
37
38
39 #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
40
41
42 //
43 // (Binary) Patch is in the form of a global variable
44 //
45 #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
46 #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
47 #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
48 #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
49 #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
50 #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
51
52 #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
53 #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
54 #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
55 #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
56 #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
57 #define PatchPcdSetPtr(TokenName, Size, Buffer) \
58 LibPatchPcdSetPtr ( \
59 _gPcd_BinaryPatch_##TokenName, \
60 (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \
61 (Size), \
62 (Buffer) \
63 )
64
65 //
66 // Dynamic is via the protocol with only the TokenNumber as argument
67 // It can also be Patch or Fixed type based on a build option
68 //
69 #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
70 #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
71 #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
72 #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
73 #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
74 #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
75
76 //
77 // Dynamic Set
78 //
79 #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))
80 #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))
81 #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))
82 #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))
83 #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \
84 _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))
85 #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
86
87 //
88 // Dynamic Ex is to support binary distribution
89 //
90 #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), _PCD_TOKEN_##TokenName)
91 #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), _PCD_TOKEN_##TokenName)
92 #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), _PCD_TOKEN_##TokenName)
93 #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), _PCD_TOKEN_##TokenName)
94 #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), _PCD_TOKEN_##TokenName)
95 #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), _PCD_TOKEN_##TokenName)
96
97 //
98 // Dynamic Set Ex
99 //
100 #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), _PCD_TOKEN_##TokenName, (Value))
101 #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), _PCD_TOKEN_##TokenName, (Value))
102 #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), _PCD_TOKEN_##TokenName, (Value))
103 #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), _PCD_TOKEN_##TokenName, (Value))
104 #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \
105 LibPcdSetExPtr ((Guid), _PCD_TOKEN_##TokenName, (SizeOfBuffer), (Buffer))
106 #define PcdSetExBool(Guid, TokenName, Value) \
107 LibPcdSetExBool((Guid), _PCD_TOKEN_##TokenName, (Value))
108
109
110 /**
111 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
112
113 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
114 set values associated with a PCD token.
115
116 @retval SKU_ID Return the SKU ID that just be set.
117
118 **/
119 UINTN
120 EFIAPI
121 LibPcdSetSku (
122 IN UINTN SkuId
123 );
124
125
126 /**
127 Returns the 8-bit value for the token specified by TokenNumber.
128
129 @param[in] The PCD token number to retrieve a current value for.
130
131 @retval UINT8 Returns the 8-bit value for the token specified by TokenNumber.
132
133 **/
134 UINT8
135 EFIAPI
136 LibPcdGet8 (
137 IN UINTN TokenNumber
138 );
139
140
141 /**
142 Returns the 16-bit value for the token specified by TokenNumber.
143
144 @param[in] The PCD token number to retrieve a current value for.
145
146 @retval UINT16 Returns the 16-bit value for the token specified by TokenNumber.
147
148 **/
149 UINT16
150 EFIAPI
151 LibPcdGet16 (
152 IN UINTN TokenNumber
153 );
154
155
156 /**
157 Returns the 32-bit value for the token specified by TokenNumber.
158
159 @param[in] TokenNumber The PCD token number to retrieve a current value for.
160
161 @retval UINT32 Returns the 32-bit value for the token specified by TokenNumber.
162
163 **/
164 UINT32
165 EFIAPI
166 LibPcdGet32 (
167 IN UINTN TokenNumber
168 );
169
170
171 /**
172 Returns the 64-bit value for the token specified by TokenNumber.
173
174 @param[in] TokenNumber The PCD token number to retrieve a current value for.
175
176 @retval UINT64 Returns the 64-bit value for the token specified by TokenNumber.
177
178 **/
179 UINT64
180 EFIAPI
181 LibPcdGet64 (
182 IN UINTN TokenNumber
183 );
184
185
186 /**
187 Returns the pointer to the buffer of the token specified by TokenNumber.
188
189 @param[in] TokenNumber The PCD token number to retrieve a current value for.
190
191 @retval VOID* Returns the pointer to the token specified by TokenNumber.
192
193 **/
194 VOID *
195 EFIAPI
196 LibPcdGetPtr (
197 IN UINTN TokenNumber
198 );
199
200
201 /**
202 Returns the Boolean value of the token specified by TokenNumber.
203
204 @param[in] TokenNumber The PCD token number to retrieve a current value for.
205
206 @retval BOOLEAN Returns the Boolean value of the token specified by TokenNumber.
207
208 **/
209 BOOLEAN
210 EFIAPI
211 LibPcdGetBool (
212 IN UINTN TokenNumber
213 );
214
215
216 /**
217 Returns the size of the token specified by TokenNumber.
218
219 @param[in] TokenNumber The PCD token number to retrieve a current value for.
220
221 @retval UINTN Returns the size of the token specified by TokenNumber.
222
223 **/
224 UINTN
225 EFIAPI
226 LibPcdGetSize (
227 IN UINTN TokenNumber
228 );
229
230
231 /**
232 Returns the 8-bit value for the token specified by TokenNumber and Guid.
233 If Guid is NULL, then ASSERT().
234
235 @param[in] Guid Pointer to a 128-bit unique value that designates
236 which namespace to retrieve a value from.
237 @param[in] TokenNumber The PCD token number to retrieve a current value for.
238
239 @retval UINT8 Return the UINT8.
240
241 **/
242 UINT8
243 EFIAPI
244 LibPcdGetEx8 (
245 IN CONST GUID *Guid,
246 IN UINTN TokenNumber
247 );
248
249
250 /**
251 Returns the 16-bit value for the token specified by TokenNumber and Guid.
252 If Guid is NULL, then ASSERT().
253
254 @param[in] Guid Pointer to a 128-bit unique value that designates
255 which namespace to retrieve a value from.
256 @param[in] TokenNumber The PCD token number to retrieve a current value for.
257
258 @retval UINT16 Return the UINT16.
259
260 **/
261 UINT16
262 EFIAPI
263 LibPcdGetEx16 (
264 IN CONST GUID *Guid,
265 IN UINTN TokenNumber
266 );
267
268
269 /**
270 Returns the 32-bit value for the token specified by TokenNumber and Guid.
271 If Guid is NULL, then ASSERT().
272
273 @param[in] Guid Pointer to a 128-bit unique value that designates
274 which namespace to retrieve a value from.
275 @param[in] TokenNumber The PCD token number to retrieve a current value for.
276
277 @retval UINT32 Return the UINT32.
278
279 **/
280 UINT32
281 EFIAPI
282 LibPcdGetEx32 (
283 IN CONST GUID *Guid,
284 IN UINTN TokenNumber
285 );
286
287
288 /**
289 Returns the 64-bit value for the token specified by TokenNumber and Guid.
290 If Guid is NULL, then ASSERT().
291
292 @param[in] Guid Pointer to a 128-bit unique value that designates
293 which namespace to retrieve a value from.
294 @param[in] TokenNumber The PCD token number to retrieve a current value for.
295
296 @retval UINT64 Return the UINT64.
297
298 **/
299 UINT64
300 EFIAPI
301 LibPcdGetEx64 (
302 IN CONST GUID *Guid,
303 IN UINTN TokenNumber
304 );
305
306
307 /**
308 Returns the pointer to the buffer of token specified by TokenNumber and Guid.
309 If Guid is NULL, then ASSERT().
310
311 @param[in] Guid Pointer to a 128-bit unique value that designates
312 which namespace to retrieve a value from.
313 @param[in] TokenNumber The PCD token number to retrieve a current value for.
314
315 @retval VOID* Return the VOID* pointer.
316
317 **/
318 VOID *
319 EFIAPI
320 LibPcdGetExPtr (
321 IN CONST GUID *Guid,
322 IN UINTN TokenNumber
323 );
324
325
326 /**
327 Returns the Boolean value of the token specified by TokenNumber and Guid.
328 If Guid is NULL, then ASSERT().
329
330 @param[in] Guid Pointer to a 128-bit unique value that designates
331 which namespace to retrieve a value from.
332 @param[in] TokenNumber The PCD token number to retrieve a current value for.
333
334 @retval BOOLEAN Return the BOOLEAN.
335
336 **/
337 BOOLEAN
338 EFIAPI
339 LibPcdGetExBool (
340 IN CONST GUID *Guid,
341 IN UINTN TokenNumber
342 );
343
344
345 /**
346 Returns the size of the token specified by TokenNumber and Guid.
347 If Guid is NULL, then ASSERT().
348
349 @param[in] Guid 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 @retval UINTN Return the size.
354
355 **/
356 UINTN
357 EFIAPI
358 LibPcdGetExSize (
359 IN CONST GUID *Guid,
360 IN UINTN TokenNumber
361 );
362
363
364 /**
365 Sets the 8-bit value for the token specified by TokenNumber
366 to the value specified by Value. Value is returned.
367
368 @param[in] TokenNumber The PCD token number to set a current value for.
369 @param[in] Value The 8-bit value to set.
370
371 @retval UINT8 Return the value been set.
372
373 **/
374 UINT8
375 EFIAPI
376 LibPcdSet8 (
377 IN UINTN TokenNumber,
378 IN UINT8 Value
379 );
380
381
382 /**
383 Sets the 16-bit value for the token specified by TokenNumber
384 to the value specified by Value. Value is returned.
385
386 @param[in] TokenNumber The PCD token number to set a current value for.
387 @param[in] Value The 16-bit value to set.
388
389 @retval UINT16 Return the value been set.
390
391 **/
392 UINT16
393 EFIAPI
394 LibPcdSet16 (
395 IN UINTN TokenNumber,
396 IN UINT16 Value
397 );
398
399
400 /**
401 Sets the 32-bit value for the token specified by TokenNumber
402 to the value specified by Value. Value is returned.
403
404 @param[in] TokenNumber The PCD token number to set a current value for.
405 @param[in] Value The 32-bit value to set.
406
407 @retval UINT32 Return the value been set.
408
409 **/
410 UINT32
411 EFIAPI
412 LibPcdSet32 (
413 IN UINTN TokenNumber,
414 IN UINT32 Value
415 );
416
417
418 /**
419 Sets the 64-bit value for the token specified by TokenNumber
420 to the value specified by Value. Value is returned.
421
422 @param[in] TokenNumber The PCD token number to set a current value for.
423 @param[in] Value The 64-bit value to set.
424
425 @retval UINT64 Return the value been set.
426
427 **/
428 UINT64
429 EFIAPI
430 LibPcdSet64 (
431 IN UINTN TokenNumber,
432 IN UINT64 Value
433 );
434
435
436 /**
437 Sets a buffer for the token specified by TokenNumber to the value
438 specified by Buffer and SizeOfValue. Buffer is returned.
439 If SizeOfValue is greater than the maximum size support by TokenNumber,
440 then set SizeOfValue to the maximum size supported by TokenNumber and
441 return NULL to indicate that the set operation was not actually performed.
442
443 If SizeOfValue is set to MAX_ADDRESS, then SizeOfValue must be set to the
444 maximum size supported by TokenName and NULL must be returned.
445
446 If SizeOfValue is NULL, then ASSERT().
447 If SizeOfValue > 0 and Buffer is NULL, then ASSERT().
448
449 @param[in] TokenNumber The PCD token number to set a current value for.
450 @param[in,out] SizeOfBuffer The size, in bytes, of Buffer.
451 @param[in] Value A pointer to the buffer to set.
452
453 @retval VOID* Return the pointer for the buffer been set.
454
455 **/
456 VOID*
457 EFIAPI
458 LibPcdSetPtr (
459 IN UINTN TokenNumber,
460 IN OUT UINTN *SizeOfBuffer,
461 IN VOID *Buffer
462 );
463
464
465 /**
466 Sets the Boolean value for the token specified by TokenNumber
467 to the value specified by Value. Value is returned.
468
469 @param[in] TokenNumber The PCD token number to set a current value for.
470 @param[in] Value The boolean value to set.
471
472 @retval BOOLEAN Return the value been set.
473
474 **/
475 BOOLEAN
476 EFIAPI
477 LibPcdSetBool (
478 IN UINTN TokenNumber,
479 IN BOOLEAN Value
480 );
481
482
483 /**
484 Sets the 8-bit value for the token specified by TokenNumber and
485 Guid to the value specified by Value. Value is returned.
486 If Guid is NULL, then ASSERT().
487
488 @param[in] Guid Pointer to a 128-bit unique value that
489 designates which namespace to set a value from.
490 @param[in] TokenNumber The PCD token number to set a current value for.
491 @param[in] Value The 8-bit value to set.
492
493 @retval UINT8 Return the value been set.
494
495 **/
496 UINT8
497 EFIAPI
498 LibPcdSetEx8 (
499 IN CONST GUID *Guid,
500 IN UINTN TokenNumber,
501 IN UINT8 Value
502 );
503
504
505 /**
506 Sets the 16-bit value for the token specified by TokenNumber and
507 Guid to the value specified by Value. Value is returned.
508 If Guid is NULL, then ASSERT().
509
510 @param[in] Guid Pointer to a 128-bit unique value that
511 designates which namespace to set a value from.
512 @param[in] TokenNumber The PCD token number to set a current value for.
513 @param[in] Value The 16-bit value to set.
514
515 @retval UINT8 Return the value been set.
516
517 **/
518 UINT16
519 EFIAPI
520 LibPcdSetEx16 (
521 IN CONST GUID *Guid,
522 IN UINTN TokenNumber,
523 IN UINT16 Value
524 );
525
526
527 /**
528 Sets the 32-bit value for the token specified by TokenNumber and
529 Guid to the value specified by Value. Value is returned.
530 If Guid is NULL, then ASSERT().
531
532 @param[in] Guid Pointer to a 128-bit unique value that
533 designates which namespace to set a value from.
534 @param[in] TokenNumber The PCD token number to set a current value for.
535 @param[in] Value The 32-bit value to set.
536
537 @retval UINT32 Return the value been set.
538
539 **/
540 UINT32
541 EFIAPI
542 LibPcdSetEx32 (
543 IN CONST GUID *Guid,
544 IN UINTN TokenNumber,
545 IN UINT32 Value
546 );
547
548
549 /**
550 Sets the 64-bit value for the token specified by TokenNumber and
551 Guid to the value specified by Value. Value is returned.
552 If Guid is NULL, then ASSERT().
553
554 @param[in] Guid Pointer to a 128-bit unique value that
555 designates which namespace to set a value from.
556 @param[in] TokenNumber The PCD token number to set a current value for.
557 @param[in] Value The 64-bit value to set.
558
559 @retval UINT64 Return the value been set.
560
561 **/
562 UINT64
563 EFIAPI
564 LibPcdSetEx64 (
565 IN CONST GUID *Guid,
566 IN UINTN TokenNumber,
567 IN UINT64 Value
568 );
569
570
571 /**
572 Sets a buffer for the token specified by TokenNumber to the value specified by
573 Buffer and SizeOfValue. Buffer is returned. If SizeOfValue is greater than
574 the maximum size support by TokenNumber, then set SizeOfValue to the maximum size
575 supported by TokenNumber and return NULL to indicate that the set operation
576 was not actually performed.
577
578 If Guid is NULL, then ASSERT().
579 If SizeOfValue is NULL, then ASSERT().
580 If SizeOfValue > 0 and Buffer is NULL, then ASSERT().
581
582 @param[in] Guid Pointer to a 128-bit unique value that
583 designates which namespace to set a value from.
584 @param[in] TokenNumber The PCD token number to set a current value for.
585 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
586 @param[in] Buffer A pointer to the buffer to set.
587
588 @retval VOID * Return the pinter to the buffer been set.
589
590 **/
591 VOID *
592 EFIAPI
593 LibPcdSetExPtr (
594 IN CONST GUID *Guid,
595 IN UINTN TokenNumber,
596 IN OUT UINTN *SizeOfBuffer,
597 IN VOID *Buffer
598 );
599
600
601 /**
602 Sets the Boolean value for the token specified by TokenNumber and
603 Guid to the value specified by Value. Value is returned.
604 If Guid is NULL, then ASSERT().
605
606 @param[in] Guid Pointer to a 128-bit unique value that
607 designates which namespace to set a value from.
608 @param[in] TokenNumber The PCD token number to set a current value for.
609 @param[in] Value The Boolean value to set.
610
611 @retval Boolean Return the value been set.
612
613 **/
614 BOOLEAN
615 EFIAPI
616 LibPcdSetExBool (
617 IN CONST GUID *Guid,
618 IN UINTN TokenNumber,
619 IN BOOLEAN Value
620 );
621
622
623 /**
624 When the token specified by TokenNumber and Guid is set,
625 then notification function specified by NotificationFunction is called.
626 If Guid is NULL, then the default token space is used.
627 If NotificationFunction is NULL, then ASSERT().
628
629 This notification function serves two purposes. Firstly, it notifies the module which
630 did the registration that the value of this PCD token has been set. Secondly,
631 it provides a mechanism for the module which did the registration to intercept
632 the set operation and override the value been set if necessary. After the invocation
633 of the callback function, TokenData will be used by PCD service PEIM or driver to
634 modify the internal data in PCD database.
635
636
637 @param[in] CallBackGuid The PCD token GUID being set.
638 @param[in] CallBackToken The PCD token number being set.
639 @param[in, out] TokenData A pointer to the token data being set.
640 @param[in] TokenDataSize The size, in bytes, of the data being set.
641
642 @retval VOID
643
644 **/
645 typedef
646 VOID
647 (EFIAPI *PCD_CALLBACK) (
648 IN CONST GUID *CallBackGuid, OPTIONAL
649 IN UINTN CallBackToken,
650 IN OUT VOID *TokenData,
651 IN UINTN TokenDataSize
652 );
653
654
655 /**
656 When the token specified by TokenNumber and Guid is set,
657 then notification function specified by NotificationFunction is called.
658 If Guid is NULL, then the default token space is used.
659 If NotificationFunction is NULL, then ASSERT().
660
661 @param[in] Guid Pointer to a 128-bit unique value that designates which
662 namespace to set a value from. If NULL, then the default
663 token space is used.
664 @param[in] TokenNumber The PCD token number to monitor.
665 @param[in] NotificationFunction The function to call when the token
666 specified by Guid and TokenNumber is set.
667
668 @retval VOID
669
670 **/
671 VOID
672 EFIAPI
673 LibPcdCallbackOnSet (
674 IN CONST GUID *Guid, OPTIONAL
675 IN UINTN TokenNumber,
676 IN PCD_CALLBACK NotificationFunction
677 );
678
679
680 /**
681 Disable a notification function that was established with LibPcdCallbackonSet().
682
683 @param[in] Guid Specify the GUID token space.
684 @param[in] TokenNumber Specify the token number.
685 @param[in] NotificationFunction The callback function to be unregistered.
686
687 @retval VOID
688
689 **/
690 VOID
691 EFIAPI
692 LibPcdCancelCallback (
693 IN CONST GUID *Guid, OPTIONAL
694 IN UINTN TokenNumber,
695 IN PCD_CALLBACK NotificationFunction
696 );
697
698
699 /**
700 Retrieves the next PCD token number from the token space specified by Guid.
701 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
702 then the first token number is returned. Otherwise, the token number that
703 follows TokenNumber in the token space is returned. If TokenNumber is the last
704 token number in the token space, then 0 is returned. If TokenNumber is not 0 and
705 is not in the token space specified by Guid, then ASSERT().
706
707 @param[in] Pointer to a 128-bit unique value that designates which namespace
708 to set a value from. If NULL, then the default token space is used.
709 @param[in] The previous PCD token number. If 0, then retrieves the first PCD
710 token number.
711
712 @retval UINTN The next valid token number.
713
714 **/
715 UINTN
716 EFIAPI
717 LibPcdGetNextToken (
718 IN CONST GUID *Guid, OPTIONAL
719 IN UINTN TokenNumber
720 );
721
722
723
724 /**
725 Retrieves the next PCD token space from a token space specified by Guid.
726 Guid of NULL is reserved to mark the default local token namespace on the current
727 platform. If Guid is NULL, then the GUID of the first non-local token space of the
728 current platform is returned. If Guid is the last non-local token space,
729 then NULL is returned.
730
731 If Guid is not NULL and is not a valid token space in the current platform, then ASSERT().
732
733
734
735 @param[in] Guid Pointer to a 128-bit unique value that designates from which namespace
736 to start the search.
737
738 @retval CONST GUID * The next valid token namespace.
739
740 **/
741 GUID *
742 EFIAPI
743 LibPcdGetNextTokenSpace (
744 IN CONST GUID *Guid
745 );
746
747
748 /**
749 Sets the PCD entry specified by PatchVariable to the value specified by Buffer
750 and SizeOfValue. Buffer is returned. If SizeOfValue is greater than
751 MaximumDatumSize, then set SizeOfValue to MaximumDatumSize and return
752 NULL to indicate that the set operation was not actually performed.
753 If SizeOfValue is set to MAX_ADDRESS, then SizeOfValue must be set to
754 MaximumDatumSize and NULL must be returned.
755
756 If PatchVariable is NULL, then ASSERT().
757 If SizeOfValue is NULL, then ASSERT().
758 If SizeOfValue > 0 and Buffer is NULL, then ASSERT().
759
760 @param[in] PatchVariable A pointer to the global variable in a module that is
761 the target of the set operation.
762 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
763 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
764 @param[in] Buffer A pointer to the buffer to used to set the target variable.
765
766 **/
767 VOID *
768 EFIAPI
769 LibPatchPcdSetPtr (
770 IN VOID *PatchVariable,
771 IN UINTN MaximumDatumSize,
772 IN OUT UINTN *SizeOfBuffer,
773 IN CONST VOID *Buffer
774 );
775
776 #endif