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