2 A emptry template implementation of PCD Library.
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
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.
20 Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
22 @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
23 set values associated with a PCD token.
25 @retval UINTN Return the SKU ID that just be set.
40 Returns the 8-bit value for the token specified by TokenNumber.
42 @param[in] The PCD token number to retrieve a current value for.
44 @retval UINT8 Returns the 8-bit value for the token specified by TokenNumber.
59 Returns the 16-bit value for the token specified by TokenNumber.
61 @param[in] The PCD token number to retrieve a current value for.
63 @retval UINT16 Returns the 16-bit value for the token specified by TokenNumber.
78 Returns the 32-bit value for the token specified by TokenNumber.
80 @param[in] TokenNumber The PCD token number to retrieve a current value for.
82 @retval UINT32 Returns the 32-bit value for the token specified by TokenNumber.
97 Returns the 64-bit value for the token specified by TokenNumber.
99 @param[in] TokenNumber The PCD token number to retrieve a current value for.
101 @retval UINT64 Returns the 64-bit value for the token specified by TokenNumber.
116 Returns the pointer to the buffer of the token specified by TokenNumber.
118 @param[in] TokenNumber The PCD token number to retrieve a current value for.
120 @retval VOID* Returns the pointer to the token specified by TokenNumber.
135 Returns the Boolean value of the token specified by TokenNumber.
137 @param[in] TokenNumber The PCD token number to retrieve a current value for.
139 @retval BOOLEAN Returns the Boolean value of the token specified by TokenNumber.
154 Returns the size of the token specified by TokenNumber.
156 @param[in] TokenNumber The PCD token number to retrieve a current value for.
158 @retval UINTN Returns the size of the token specified by TokenNumber.
173 Returns the 8-bit value for the token specified by TokenNumber and Guid.
174 If Guid is NULL, then ASSERT().
176 @param[in] Guid Pointer to a 128-bit unique value that designates
177 which namespace to retrieve a value from.
178 @param[in] TokenNumber The PCD token number to retrieve a current value for.
180 @retval UINT8 Return the UINT8.
190 ASSERT (Guid
!= NULL
);
198 Returns the 16-bit value for the token specified by TokenNumber and Guid.
199 If Guid is NULL, then ASSERT().
201 @param[in] Guid Pointer to a 128-bit unique value that designates
202 which namespace to retrieve a value from.
203 @param[in] TokenNumber The PCD token number to retrieve a current value for.
205 @retval UINT16 Return the UINT16.
215 ASSERT (Guid
!= NULL
);
223 Returns the 32-bit value for the token specified by TokenNumber and Guid.
224 If Guid is NULL, then ASSERT().
226 @param[in] Guid Pointer to a 128-bit unique value that designates
227 which namespace to retrieve a value from.
228 @param[in] TokenNumber The PCD token number to retrieve a current value for.
230 @retval UINT32 Return the UINT32.
240 ASSERT (Guid
!= NULL
);
248 Returns the 64-bit value for the token specified by TokenNumber and Guid.
249 If Guid is NULL, then ASSERT().
251 @param[in] Guid Pointer to a 128-bit unique value that designates
252 which namespace to retrieve a value from.
253 @param[in] TokenNumber The PCD token number to retrieve a current value for.
255 @retval UINT64 Return the UINT64.
265 ASSERT (Guid
!= NULL
);
273 Returns the pointer to the buffer of the token specified by TokenNumber and Guid.
274 If Guid is NULL, then ASSERT().
276 @param[in] Guid Pointer to a 128-bit unique value that designates
277 which namespace to retrieve a value from.
278 @param[in] TokenNumber The PCD token number to retrieve a current value for.
280 @retval VOID* Return the VOID* pointer.
290 ASSERT (Guid
!= NULL
);
298 Returns the Boolean value of the token specified by TokenNumber and Guid.
299 If Guid is NULL, then ASSERT().
301 @param[in] Guid Pointer to a 128-bit unique value that designates
302 which namespace to retrieve a value from.
303 @param[in] TokenNumber The PCD token number to retrieve a current value for.
305 @retval BOOLEAN Return the BOOLEAN.
315 ASSERT (Guid
!= NULL
);
323 Returns the size of the token specified by TokenNumber and Guid.
324 If Guid is NULL, then ASSERT().
326 @param[in] Guid Pointer to a 128-bit unique value that designates
327 which namespace to retrieve a value from.
328 @param[in] TokenNumber The PCD token number to retrieve a current value for.
330 @retval UINTN Return the size.
340 ASSERT (Guid
!= NULL
);
348 Sets the 8-bit value for the token specified by TokenNumber
349 to the value specified by Value. Value is returned.
351 @param[in] TokenNumber The PCD token number to set a current value for.
352 @param[in] Value The 8-bit value to set.
354 @retval UINT8 Return the value been set.
360 IN UINTN TokenNumber
,
370 Sets the 16-bit value for the token specified by TokenNumber
371 to the value specified by Value. Value is returned.
373 @param[in] TokenNumber The PCD token number to set a current value for.
374 @param[in] Value The 16-bit value to set.
376 @retval UINT16 Return the value been set.
382 IN UINTN TokenNumber
,
392 Sets the 32-bit value for the token specified by TokenNumber
393 to the value specified by Value. Value is returned.
395 @param[in] TokenNumber The PCD token number to set a current value for.
396 @param[in] Value The 32-bit value to set.
398 @retval UINT32 Return the value been set.
404 IN UINTN TokenNumber
,
414 Sets the 64-bit value for the token specified by TokenNumber
415 to the value specified by Value. Value is returned.
417 @param[in] TokenNumber The PCD token number to set a current value for.
418 @param[in] Value The 64-bit value to set.
420 @retval UINT64 Return the value been set.
426 IN UINTN TokenNumber
,
436 Sets a buffer for the token specified by TokenNumber to
437 the value specified by Value. Value is returned.
438 If Value is NULL, then ASSERT().
440 @param[in] TokenNumber The PCD token number to set a current value for.
441 @param[in] Value A pointer to the buffer to set.
443 @retval VOID* Return the pointer for the buffer been set.
449 IN UINTN TokenNumber
,
453 ASSERT (Value
!= NULL
);
457 return (VOID
*)Value
;
463 Sets the Boolean value for the token specified by TokenNumber
464 to the value specified by Value. Value is returned.
466 @param[in] TokenNumber The PCD token number to set a current value for.
467 @param[in] Value The boolean value to set.
469 @retval BOOLEAN Return the value been set.
475 IN UINTN TokenNumber
,
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().
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.
494 @retval UINT8 Return the value been set.
501 IN UINTN TokenNumber
,
505 ASSERT (Guid
!= NULL
);
513 Sets the 16-bit value for the token specified by TokenNumber and
514 Guid to the value specified by Value. Value is returned.
515 If Guid is NULL, then ASSERT().
517 @param[in] Guid Pointer to a 128-bit unique value that
518 designates which namespace to set a value from.
519 @param[in] TokenNumber The PCD token number to set a current value for.
520 @param[in] Value The 16-bit value to set.
522 @retval UINT8 Return the value been set.
529 IN UINTN TokenNumber
,
533 ASSERT (Guid
!= NULL
);
541 Sets the 32-bit value for the token specified by TokenNumber and
542 Guid to the value specified by Value. Value is returned.
543 If Guid is NULL, then ASSERT().
545 @param[in] Guid Pointer to a 128-bit unique value that
546 designates which namespace to set a value from.
547 @param[in] TokenNumber The PCD token number to set a current value for.
548 @param[in] Value The 32-bit value to set.
550 @retval UINT32 Return the value been set.
557 IN UINTN TokenNumber
,
561 ASSERT (Guid
!= NULL
);
569 Sets the 64-bit value for the token specified by TokenNumber and
570 Guid to the value specified by Value. Value is returned.
571 If Guid is NULL, then ASSERT().
573 @param[in] Guid Pointer to a 128-bit unique value that
574 designates which namespace to set a value from.
575 @param[in] TokenNumber The PCD token number to set a current value for.
576 @param[in] Value The 64-bit value to set.
578 @retval UINT64 Return the value been set.
585 IN UINTN TokenNumber
,
589 ASSERT (Guid
!= NULL
);
597 Sets a buffer for the token specified by TokenNumber and
598 Guid to the value specified by Value. Value is returned.
599 If Guid is NULL, then ASSERT().
600 If Value is NULL, then ASSERT().
602 @param[in] Guid Pointer to a 128-bit unique value that
603 designates which namespace to set a value from.
604 @param[in] TokenNumber The PCD token number to set a current value for.
605 @param[in] Value The 8-bit value to set.
607 @retval VOID * Return the value been set.
614 IN UINTN TokenNumber
,
621 ASSERT (Guid
!= NULL
);
622 ASSERT (Value
!= NULL
);
624 return (VOID
*)Value
;
630 Sets the Boolean value for the token specified by TokenNumber and
631 Guid to the value specified by Value. Value is returned.
632 If Guid is NULL, then ASSERT().
634 @param[in] Guid Pointer to a 128-bit unique value that
635 designates which namespace to set a value from.
636 @param[in] TokenNumber The PCD token number to set a current value for.
637 @param[in] Value The Boolean value to set.
639 @retval Boolean Return the value been set.
646 IN UINTN TokenNumber
,
650 ASSERT (Guid
!= NULL
);
658 When the token specified by TokenNumber and Guid is set,
659 then notification function specified by NotificationFunction is called.
660 If Guid is NULL, then the default token space is used.
661 If NotificationFunction is NULL, then ASSERT().
663 @param[in] Guid Pointer to a 128-bit unique value that designates which
664 namespace to set a value from. If NULL, then the default
666 @param[in] TokenNumber The PCD token number to monitor.
667 @param[in] NotificationFunction The function to call when the token
668 specified by Guid and TokenNumber is set.
675 LibPcdCallbackOnSet (
676 IN CONST GUID
*Guid
, OPTIONAL
677 IN UINTN TokenNumber
,
678 IN PCD_CALLBACK NotificationFunction
681 ASSERT (NotificationFunction
!= NULL
);
687 Disable a notification function that was established with LibPcdCallbackonSet().
688 If NotificationFunction is NULL, then ASSERT().
690 @param[in] Guid Specify the GUID token space.
691 @param[in] TokenNumber Specify the token number.
692 @param[in] NotificationFunction The callback function to be unregistered.
699 LibPcdCancelCallback (
700 IN CONST GUID
*Guid
, OPTIONAL
701 IN UINTN TokenNumber
,
702 IN PCD_CALLBACK NotificationFunction
705 ASSERT (NotificationFunction
!= NULL
);
711 Retrieves the next PCD token number from the token space specified by Guid.
712 If Guid is NULL, then the default token space is used. If TokenNumber is 0,
713 then the first token number is returned. Otherwise, the token number that
714 follows TokenNumber in the token space is returned. If TokenNumber is the last
715 token number in the token space, then 0 is returned. If TokenNumber is not 0 and
716 is not in the token space specified by Guid, then ASSERT().
718 @param[in] Pointer to a 128-bit unique value that designates which namespace
719 to set a value from. If NULL, then the default token space is used.
720 @param[in] The previous PCD token number. If 0, then retrieves the first PCD
723 @retval UINTN The next valid token number.
729 IN CONST GUID
*Guid
, OPTIONAL
730 IN OUT UINTN
*TokenNumber