10d1ba665SWarner Losh /** @file 20d1ba665SWarner Losh Provides library services to get and set Platform Configuration Database entries. 30d1ba665SWarner Losh 40d1ba665SWarner Losh PCD Library Class provides a PCD usage macro interface for all PCD types. 50d1ba665SWarner Losh It should be included in any module that uses PCD. If a module uses dynamic/dynamicex 60d1ba665SWarner Losh PCD, module should be linked to a PEIM/DXE library instance to access that PCD. 70d1ba665SWarner Losh If a module uses PatchableInModule type PCD, it also needs the library instance to produce 80d1ba665SWarner Losh LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, the macro interface is 90d1ba665SWarner Losh translated to a variable or macro that is auto-generated by build tool in 100d1ba665SWarner Losh module's autogen.h/autogen.c. 110d1ba665SWarner Losh The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are 120d1ba665SWarner Losh only available prior to ExitBootServices(). If access to PCD values are required 130d1ba665SWarner Losh at runtime, then their values must be collected prior to ExitBootServices(). 140d1ba665SWarner Losh There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(), 150d1ba665SWarner Losh PatchPcdGetXX(), and PatchPcdSetXX(). 160d1ba665SWarner Losh 17*3245fa21SMitchell Horne Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> 18*3245fa21SMitchell Horne SPDX-License-Identifier: BSD-2-Clause-Patent 190d1ba665SWarner Losh 200d1ba665SWarner Losh **/ 210d1ba665SWarner Losh 220d1ba665SWarner Losh #ifndef __PCD_LIB_H__ 230d1ba665SWarner Losh #define __PCD_LIB_H__ 240d1ba665SWarner Losh 250d1ba665SWarner Losh 260d1ba665SWarner Losh /** 270d1ba665SWarner Losh Retrieves a token number based on a token name. 280d1ba665SWarner Losh 290d1ba665SWarner Losh Returns the token number associated with the PCD token specified by TokenName. 300d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 310d1ba665SWarner Losh 320d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve the token number for. 330d1ba665SWarner Losh 340d1ba665SWarner Losh @return The token number associated with the PCD. 350d1ba665SWarner Losh 360d1ba665SWarner Losh **/ 370d1ba665SWarner Losh #define PcdToken(TokenName) _PCD_TOKEN_##TokenName 380d1ba665SWarner Losh 390d1ba665SWarner Losh 400d1ba665SWarner Losh /** 410d1ba665SWarner Losh Retrieves a Boolean PCD feature flag based on a token name. 420d1ba665SWarner Losh 430d1ba665SWarner Losh Returns the Boolean value for the PCD feature flag specified by TokenName. 440d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 450d1ba665SWarner Losh If TokenName is not a feature flag PCD, then the module will not build. 460d1ba665SWarner Losh 470d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 480d1ba665SWarner Losh 490d1ba665SWarner Losh @return Boolean value for the PCD feature flag. 500d1ba665SWarner Losh 510d1ba665SWarner Losh **/ 520d1ba665SWarner Losh #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName 530d1ba665SWarner Losh 540d1ba665SWarner Losh 550d1ba665SWarner Losh /** 560d1ba665SWarner Losh Retrieves an 8-bit fixed PCD token value based on a token name. 570d1ba665SWarner Losh 580d1ba665SWarner Losh Returns the 8-bit value for the token specified by TokenName. 590d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 600d1ba665SWarner Losh If TokenName is not a fixed at build PCD, then the module will not build. 610d1ba665SWarner Losh 620d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 630d1ba665SWarner Losh 640d1ba665SWarner Losh @return 8-bit value for the token specified by TokenName. 650d1ba665SWarner Losh 660d1ba665SWarner Losh **/ 670d1ba665SWarner Losh #define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName 680d1ba665SWarner Losh 690d1ba665SWarner Losh 700d1ba665SWarner Losh /** 710d1ba665SWarner Losh Retrieves a 16-bit fixed PCD token value based on a token name. 720d1ba665SWarner Losh 730d1ba665SWarner Losh Returns the 16-bit value for the token specified by TokenName. 740d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 750d1ba665SWarner Losh If TokenName is not a fixed at build PCD, then the module will not build. 760d1ba665SWarner Losh 770d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 780d1ba665SWarner Losh 790d1ba665SWarner Losh @return 16-bit value for the token specified by TokenName. 800d1ba665SWarner Losh 810d1ba665SWarner Losh **/ 820d1ba665SWarner Losh #define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName 830d1ba665SWarner Losh 840d1ba665SWarner Losh 850d1ba665SWarner Losh /** 860d1ba665SWarner Losh Retrieves a 32-bit fixed PCD token value based on a token name. 870d1ba665SWarner Losh 880d1ba665SWarner Losh Returns the 32-bit value for the token specified by TokenName. 890d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 900d1ba665SWarner Losh If TokenName is not a fixed at build PCD, then the module will not build. 910d1ba665SWarner Losh 920d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 930d1ba665SWarner Losh 940d1ba665SWarner Losh @return 32-bit value for the token specified by TokenName. 950d1ba665SWarner Losh 960d1ba665SWarner Losh **/ 970d1ba665SWarner Losh #define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName 980d1ba665SWarner Losh 990d1ba665SWarner Losh 1000d1ba665SWarner Losh /** 1010d1ba665SWarner Losh Retrieves a 64-bit fixed PCD token value based on a token name. 1020d1ba665SWarner Losh 1030d1ba665SWarner Losh Returns the 64-bit value for the token specified by TokenName. 1040d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 1050d1ba665SWarner Losh If TokenName is not a fixed at build PCD, then the module will not build. 1060d1ba665SWarner Losh 1070d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 1080d1ba665SWarner Losh 1090d1ba665SWarner Losh @return 64-bit value for the token specified by TokenName. 1100d1ba665SWarner Losh 1110d1ba665SWarner Losh **/ 1120d1ba665SWarner Losh #define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName 1130d1ba665SWarner Losh 1140d1ba665SWarner Losh 1150d1ba665SWarner Losh /** 1160d1ba665SWarner Losh Retrieves a Boolean fixed PCD token value based on a token name. 1170d1ba665SWarner Losh 1180d1ba665SWarner Losh Returns the Boolean value for the token specified by TokenName. 1190d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 1200d1ba665SWarner Losh If TokenName is not a fixed at build PCD, then the module will not build. 1210d1ba665SWarner Losh 1220d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 1230d1ba665SWarner Losh 1240d1ba665SWarner Losh @return The Boolean value for the token. 1250d1ba665SWarner Losh 1260d1ba665SWarner Losh **/ 1270d1ba665SWarner Losh #define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName 1280d1ba665SWarner Losh 1290d1ba665SWarner Losh 1300d1ba665SWarner Losh /** 1310d1ba665SWarner Losh Retrieves a pointer to a fixed PCD token buffer based on a token name. 1320d1ba665SWarner Losh 1330d1ba665SWarner Losh Returns a pointer to the buffer for the token specified by TokenName. 1340d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 1350d1ba665SWarner Losh If TokenName is not a fixed at build PCD, then the module will not build. 1360d1ba665SWarner Losh 1370d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 1380d1ba665SWarner Losh 1390d1ba665SWarner Losh @return A pointer to the buffer. 1400d1ba665SWarner Losh 1410d1ba665SWarner Losh **/ 1420d1ba665SWarner Losh #define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName) 1430d1ba665SWarner Losh 1440d1ba665SWarner Losh 1450d1ba665SWarner Losh /** 1460d1ba665SWarner Losh Retrieves an 8-bit binary patchable PCD token value based on a token name. 1470d1ba665SWarner Losh 1480d1ba665SWarner Losh Returns the 8-bit value for the token specified by TokenName. 1490d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 1500d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 1510d1ba665SWarner Losh 1520d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 1530d1ba665SWarner Losh 1540d1ba665SWarner Losh @return An 8-bit binary patchable PCD token value. 1550d1ba665SWarner Losh 1560d1ba665SWarner Losh **/ 1570d1ba665SWarner Losh #define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName 1580d1ba665SWarner Losh 1590d1ba665SWarner Losh /** 1600d1ba665SWarner Losh Retrieves a 16-bit binary patchable PCD token value based on a token name. 1610d1ba665SWarner Losh 1620d1ba665SWarner Losh Returns the 16-bit value for the token specified by TokenName. 1630d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 1640d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 1650d1ba665SWarner Losh 1660d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 1670d1ba665SWarner Losh 1680d1ba665SWarner Losh @return A 16-bit binary patchable PCD token value. 1690d1ba665SWarner Losh 1700d1ba665SWarner Losh **/ 1710d1ba665SWarner Losh #define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName 1720d1ba665SWarner Losh 1730d1ba665SWarner Losh 1740d1ba665SWarner Losh /** 1750d1ba665SWarner Losh Retrieves a 32-bit binary patchable PCD token value based on a token name. 1760d1ba665SWarner Losh 1770d1ba665SWarner Losh Returns the 32-bit value for the token specified by TokenName. 1780d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 1790d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 1800d1ba665SWarner Losh 1810d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 1820d1ba665SWarner Losh 1830d1ba665SWarner Losh @return A 32-bit binary patchable PCD token value. 1840d1ba665SWarner Losh 1850d1ba665SWarner Losh **/ 1860d1ba665SWarner Losh #define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName 1870d1ba665SWarner Losh 1880d1ba665SWarner Losh 1890d1ba665SWarner Losh /** 1900d1ba665SWarner Losh Retrieves a 64-bit binary patchable PCD token value based on a token name. 1910d1ba665SWarner Losh 1920d1ba665SWarner Losh Returns the 64-bit value for the token specified by TokenName. 1930d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 1940d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 1950d1ba665SWarner Losh 1960d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 1970d1ba665SWarner Losh 1980d1ba665SWarner Losh @return A 64-bit binary patchable PCD token value. 1990d1ba665SWarner Losh 2000d1ba665SWarner Losh **/ 2010d1ba665SWarner Losh #define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName 2020d1ba665SWarner Losh 2030d1ba665SWarner Losh 2040d1ba665SWarner Losh /** 2050d1ba665SWarner Losh Retrieves a Boolean binary patchable PCD token value based on a token name. 2060d1ba665SWarner Losh 2070d1ba665SWarner Losh Returns the Boolean value for the token specified by TokenName. 2080d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 2090d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 2100d1ba665SWarner Losh 2110d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 2120d1ba665SWarner Losh 2130d1ba665SWarner Losh @return The Boolean value for the token. 2140d1ba665SWarner Losh 2150d1ba665SWarner Losh **/ 2160d1ba665SWarner Losh #define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName 2170d1ba665SWarner Losh 2180d1ba665SWarner Losh 2190d1ba665SWarner Losh /** 2200d1ba665SWarner Losh Retrieves a pointer to a binary patchable PCD token buffer based on a token name. 2210d1ba665SWarner Losh 2220d1ba665SWarner Losh Returns a pointer to the buffer for the token specified by TokenName. 2230d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 2240d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 2250d1ba665SWarner Losh 2260d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 2270d1ba665SWarner Losh 2280d1ba665SWarner Losh @return A pointer to the buffer for the token. 2290d1ba665SWarner Losh 2300d1ba665SWarner Losh **/ 2310d1ba665SWarner Losh #define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName) 2320d1ba665SWarner Losh 2330d1ba665SWarner Losh 2340d1ba665SWarner Losh /** 2350d1ba665SWarner Losh Sets an 8-bit binary patchable PCD token value based on a token name. 2360d1ba665SWarner Losh 2370d1ba665SWarner Losh Sets the 8-bit value for the token specified by TokenName. Value is returned. 2380d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 2390d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 2400d1ba665SWarner Losh 2410d1ba665SWarner Losh @param TokenName The name of the binary patchable PCD token to set the current value for. 2420d1ba665SWarner Losh @param Value The 8-bit value to set. 2430d1ba665SWarner Losh 2440d1ba665SWarner Losh @return Return the Value that was set. 2450d1ba665SWarner Losh 2460d1ba665SWarner Losh **/ 2470d1ba665SWarner Losh #define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) 2480d1ba665SWarner Losh 2490d1ba665SWarner Losh 2500d1ba665SWarner Losh /** 2510d1ba665SWarner Losh Sets a 16-bit binary patchable PCD token value based on a token name. 2520d1ba665SWarner Losh 2530d1ba665SWarner Losh Sets the 16-bit value for the token specified by TokenName. Value is returned. 2540d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 2550d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 2560d1ba665SWarner Losh 2570d1ba665SWarner Losh @param TokenName The name of the binary patchable PCD token to set the current value for. 2580d1ba665SWarner Losh @param Value The 16-bit value to set. 2590d1ba665SWarner Losh 2600d1ba665SWarner Losh @return Return the Value that was set. 2610d1ba665SWarner Losh 2620d1ba665SWarner Losh **/ 2630d1ba665SWarner Losh #define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) 2640d1ba665SWarner Losh 2650d1ba665SWarner Losh 2660d1ba665SWarner Losh /** 2670d1ba665SWarner Losh Sets a 32-bit binary patchable PCD token value based on a token name. 2680d1ba665SWarner Losh 2690d1ba665SWarner Losh Sets the 32-bit value for the token specified by TokenName. Value is returned. 2700d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 2710d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 2720d1ba665SWarner Losh 2730d1ba665SWarner Losh @param TokenName The name of the binary patchable PCD token to set the current value for. 2740d1ba665SWarner Losh @param Value The 32-bit value to set. 2750d1ba665SWarner Losh 2760d1ba665SWarner Losh @return Return the Value that was set. 2770d1ba665SWarner Losh 2780d1ba665SWarner Losh **/ 2790d1ba665SWarner Losh #define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) 2800d1ba665SWarner Losh 2810d1ba665SWarner Losh 2820d1ba665SWarner Losh /** 2830d1ba665SWarner Losh Sets a 64-bit binary patchable PCD token value based on a token name. 2840d1ba665SWarner Losh 2850d1ba665SWarner Losh Sets the 64-bit value for the token specified by TokenName. Value is returned. 2860d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 2870d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 2880d1ba665SWarner Losh 2890d1ba665SWarner Losh @param TokenName The name of the binary patchable PCD token to set the current value for. 2900d1ba665SWarner Losh @param Value The 64-bit value to set. 2910d1ba665SWarner Losh 2920d1ba665SWarner Losh @return Return the Value that was set. 2930d1ba665SWarner Losh 2940d1ba665SWarner Losh **/ 2950d1ba665SWarner Losh #define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) 2960d1ba665SWarner Losh 2970d1ba665SWarner Losh 2980d1ba665SWarner Losh /** 2990d1ba665SWarner Losh Sets a Boolean binary patchable PCD token value based on a token name. 3000d1ba665SWarner Losh 3010d1ba665SWarner Losh Sets the Boolean value for the token specified by TokenName. Value is returned. 3020d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 3030d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 3040d1ba665SWarner Losh 3050d1ba665SWarner Losh @param TokenName The name of the binary patchable PCD token to set the current value for. 3060d1ba665SWarner Losh @param Value The boolean value to set. 3070d1ba665SWarner Losh 3080d1ba665SWarner Losh @return Return the Value that was set. 3090d1ba665SWarner Losh 3100d1ba665SWarner Losh **/ 3110d1ba665SWarner Losh #define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) 3120d1ba665SWarner Losh 3130d1ba665SWarner Losh 3140d1ba665SWarner Losh /** 3150d1ba665SWarner Losh Sets a pointer to a binary patchable PCD token buffer based on a token name. 3160d1ba665SWarner Losh 3170d1ba665SWarner Losh Sets the buffer for the token specified by TokenName. Buffer is returned. 3180d1ba665SWarner Losh If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer 3190d1ba665SWarner Losh to the maximum size supported by TokenName and return NULL to indicate that the set operation 3200d1ba665SWarner Losh was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be 3210d1ba665SWarner Losh set to the maximum size supported by TokenName and NULL must be returned. 3220d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 3230d1ba665SWarner Losh If TokenName is not a patchable in module PCD, then the module will not build. 3240d1ba665SWarner Losh 3250d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 3260d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 3270d1ba665SWarner Losh 3280d1ba665SWarner Losh @param TokenName The name of the binary patchable PCD token to set the current value for. 3290d1ba665SWarner Losh @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. 3300d1ba665SWarner Losh @param Buffer Pointer to the value to set. 3310d1ba665SWarner Losh 3320d1ba665SWarner Losh @return Return the pointer to the Buffer that was set. 3330d1ba665SWarner Losh 3340d1ba665SWarner Losh **/ 3350d1ba665SWarner Losh #define PatchPcdSetPtr(TokenName, Size, Buffer) \ 3360d1ba665SWarner Losh LibPatchPcdSetPtrAndSize ( \ 3370d1ba665SWarner Losh (VOID *)_gPcd_BinaryPatch_##TokenName, \ 3380d1ba665SWarner Losh &_gPcd_BinaryPatch_Size_##TokenName, \ 3390d1ba665SWarner Losh (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \ 3400d1ba665SWarner Losh (Size), \ 3410d1ba665SWarner Losh (Buffer) \ 3420d1ba665SWarner Losh ) 3430d1ba665SWarner Losh /** 3440d1ba665SWarner Losh Retrieves an 8-bit PCD token value based on a token name. 3450d1ba665SWarner Losh 3460d1ba665SWarner Losh Returns the 8-bit value for the token specified by TokenName. 3470d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 3480d1ba665SWarner Losh 3490d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 3500d1ba665SWarner Losh 3510d1ba665SWarner Losh @return 8-bit value for the token specified by TokenName. 3520d1ba665SWarner Losh 3530d1ba665SWarner Losh **/ 3540d1ba665SWarner Losh #define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName 3550d1ba665SWarner Losh 3560d1ba665SWarner Losh 3570d1ba665SWarner Losh /** 3580d1ba665SWarner Losh Retrieves a 16-bit PCD token value based on a token name. 3590d1ba665SWarner Losh 3600d1ba665SWarner Losh Returns the 16-bit value for the token specified by TokenName. 3610d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 3620d1ba665SWarner Losh 3630d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 3640d1ba665SWarner Losh 3650d1ba665SWarner Losh @return 16-bit value for the token specified by TokenName. 3660d1ba665SWarner Losh 3670d1ba665SWarner Losh **/ 3680d1ba665SWarner Losh #define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName 3690d1ba665SWarner Losh 3700d1ba665SWarner Losh 3710d1ba665SWarner Losh /** 3720d1ba665SWarner Losh Retrieves a 32-bit PCD token value based on a token name. 3730d1ba665SWarner Losh 3740d1ba665SWarner Losh Returns the 32-bit value for the token specified by TokenName. 3750d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 3760d1ba665SWarner Losh 3770d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 3780d1ba665SWarner Losh 3790d1ba665SWarner Losh @return 32-bit value for the token specified by TokenName. 3800d1ba665SWarner Losh 3810d1ba665SWarner Losh **/ 3820d1ba665SWarner Losh #define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName 3830d1ba665SWarner Losh 3840d1ba665SWarner Losh 3850d1ba665SWarner Losh /** 3860d1ba665SWarner Losh Retrieves a 64-bit PCD token value based on a token name. 3870d1ba665SWarner Losh 3880d1ba665SWarner Losh Returns the 64-bit value for the token specified by TokenName. 3890d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 3900d1ba665SWarner Losh 3910d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 3920d1ba665SWarner Losh 3930d1ba665SWarner Losh @return 64-bit value for the token specified by TokenName. 3940d1ba665SWarner Losh 3950d1ba665SWarner Losh **/ 3960d1ba665SWarner Losh #define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName 3970d1ba665SWarner Losh 3980d1ba665SWarner Losh 3990d1ba665SWarner Losh /** 4000d1ba665SWarner Losh Retrieves a pointer to a PCD token buffer based on a token name. 4010d1ba665SWarner Losh 4020d1ba665SWarner Losh Returns a pointer to the buffer for the token specified by TokenName. 4030d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 4040d1ba665SWarner Losh 4050d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 4060d1ba665SWarner Losh 4070d1ba665SWarner Losh @return A pointer to the buffer. 4080d1ba665SWarner Losh 4090d1ba665SWarner Losh **/ 4100d1ba665SWarner Losh #define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName 4110d1ba665SWarner Losh 4120d1ba665SWarner Losh 4130d1ba665SWarner Losh /** 4140d1ba665SWarner Losh Retrieves a Boolean PCD token value based on a token name. 4150d1ba665SWarner Losh 4160d1ba665SWarner Losh Returns the Boolean value for the token specified by TokenName. 4170d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 4180d1ba665SWarner Losh 4190d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 4200d1ba665SWarner Losh 4210d1ba665SWarner Losh @return A Boolean PCD token value. 4220d1ba665SWarner Losh 4230d1ba665SWarner Losh **/ 4240d1ba665SWarner Losh #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName 4250d1ba665SWarner Losh 4260d1ba665SWarner Losh 4270d1ba665SWarner Losh /** 4280d1ba665SWarner Losh Retrieves the size of a fixed PCD token based on a token name. 4290d1ba665SWarner Losh 4300d1ba665SWarner Losh Returns the size of the token specified by TokenName. 4310d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 4320d1ba665SWarner Losh 4330d1ba665SWarner Losh @param[in] TokenName The name of the PCD token to retrieve a current value size for. 4340d1ba665SWarner Losh 4350d1ba665SWarner Losh @return Return the size 4360d1ba665SWarner Losh 4370d1ba665SWarner Losh **/ 4380d1ba665SWarner Losh #define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName 4390d1ba665SWarner Losh 4400d1ba665SWarner Losh 4410d1ba665SWarner Losh /** 4420d1ba665SWarner Losh Retrieves the size of a binary patchable PCD token based on a token name. 4430d1ba665SWarner Losh 4440d1ba665SWarner Losh Returns the size of the token specified by TokenName. 4450d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 4460d1ba665SWarner Losh 4470d1ba665SWarner Losh @param[in] TokenName The name of the PCD token to retrieve a current value size for. 4480d1ba665SWarner Losh 4490d1ba665SWarner Losh @return Return the size 4500d1ba665SWarner Losh 4510d1ba665SWarner Losh **/ 4520d1ba665SWarner Losh #define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName 4530d1ba665SWarner Losh 4540d1ba665SWarner Losh 4550d1ba665SWarner Losh /** 4560d1ba665SWarner Losh Retrieves the size of the PCD token based on a token name. 4570d1ba665SWarner Losh 4580d1ba665SWarner Losh Returns the size of the token specified by TokenName. 4590d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 4600d1ba665SWarner Losh 4610d1ba665SWarner Losh @param[in] TokenName The name of the PCD token to retrieve a current value size for. 4620d1ba665SWarner Losh 4630d1ba665SWarner Losh @return Return the size 4640d1ba665SWarner Losh 4650d1ba665SWarner Losh **/ 4660d1ba665SWarner Losh #define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName 4670d1ba665SWarner Losh 4680d1ba665SWarner Losh 4690d1ba665SWarner Losh /** 4700d1ba665SWarner Losh Retrieve the size of a given PCD token. 4710d1ba665SWarner Losh 4720d1ba665SWarner Losh Returns the size of the token specified by TokenNumber and Guid. 4730d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 4740d1ba665SWarner Losh 4750d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates 4760d1ba665SWarner Losh which namespace to retrieve a value from. 4770d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value size for. 4780d1ba665SWarner Losh 4790d1ba665SWarner Losh @return Return the size. 4800d1ba665SWarner Losh 4810d1ba665SWarner Losh **/ 4820d1ba665SWarner Losh #define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName)) 4830d1ba665SWarner Losh 4840d1ba665SWarner Losh #ifndef DISABLE_NEW_DEPRECATED_INTERFACES 4850d1ba665SWarner Losh /** 4860d1ba665SWarner Losh Sets an 8-bit PCD token value based on a token name. 4870d1ba665SWarner Losh 4880d1ba665SWarner Losh Sets the 8-bit value for the token specified by TokenName. Value is returned. 4890d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 4900d1ba665SWarner Losh 4910d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 4920d1ba665SWarner Losh @param Value The 8-bit value to set. 4930d1ba665SWarner Losh 4940d1ba665SWarner Losh @return Return the Value that was set. 4950d1ba665SWarner Losh 4960d1ba665SWarner Losh **/ 4970d1ba665SWarner Losh #define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value)) 4980d1ba665SWarner Losh 4990d1ba665SWarner Losh 5000d1ba665SWarner Losh /** 5010d1ba665SWarner Losh Sets a 16-bit PCD token value based on a token name. 5020d1ba665SWarner Losh 5030d1ba665SWarner Losh Sets the 16-bit value for the token specified by TokenName. Value is returned. 5040d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 5050d1ba665SWarner Losh 5060d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 5070d1ba665SWarner Losh @param Value The 16-bit value to set. 5080d1ba665SWarner Losh 5090d1ba665SWarner Losh @return Return the Value that was set. 5100d1ba665SWarner Losh 5110d1ba665SWarner Losh **/ 5120d1ba665SWarner Losh #define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value)) 5130d1ba665SWarner Losh 5140d1ba665SWarner Losh 5150d1ba665SWarner Losh /** 5160d1ba665SWarner Losh Sets a 32-bit PCD token value based on a token name. 5170d1ba665SWarner Losh 5180d1ba665SWarner Losh Sets the 32-bit value for the token specified by TokenName. Value is returned. 5190d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 5200d1ba665SWarner Losh 5210d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 5220d1ba665SWarner Losh @param Value The 32-bit value to set. 5230d1ba665SWarner Losh 5240d1ba665SWarner Losh @return Return the Value that was set. 5250d1ba665SWarner Losh 5260d1ba665SWarner Losh **/ 5270d1ba665SWarner Losh #define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value)) 5280d1ba665SWarner Losh 5290d1ba665SWarner Losh 5300d1ba665SWarner Losh /** 5310d1ba665SWarner Losh Sets a 64-bit PCD token value based on a token name. 5320d1ba665SWarner Losh 5330d1ba665SWarner Losh Sets the 64-bit value for the token specified by TokenName. Value is returned. 5340d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 5350d1ba665SWarner Losh 5360d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 5370d1ba665SWarner Losh @param Value The 64-bit value to set. 5380d1ba665SWarner Losh 5390d1ba665SWarner Losh @return Return the Value that was set. 5400d1ba665SWarner Losh 5410d1ba665SWarner Losh **/ 5420d1ba665SWarner Losh #define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value)) 5430d1ba665SWarner Losh 5440d1ba665SWarner Losh 5450d1ba665SWarner Losh /** 5460d1ba665SWarner Losh Sets a pointer to a PCD token buffer based on a token name. 5470d1ba665SWarner Losh 5480d1ba665SWarner Losh Sets the buffer for the token specified by TokenName. Buffer is returned. 5490d1ba665SWarner Losh If SizeOfBuffer is greater than the maximum size supported by TokenName, 5500d1ba665SWarner Losh then set SizeOfBuffer to the maximum size supported by TokenName and return NULL 5510d1ba665SWarner Losh to indicate that the set operation was not actually performed. If SizeOfBuffer 5520d1ba665SWarner Losh is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported 5530d1ba665SWarner Losh by TokenName and NULL must be returned. 5540d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 5550d1ba665SWarner Losh 5560d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 5570d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 5580d1ba665SWarner Losh 5590d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 5600d1ba665SWarner Losh @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. 5610d1ba665SWarner Losh @param Buffer A pointer to the buffer to set. 5620d1ba665SWarner Losh 5630d1ba665SWarner Losh @return Return the pointer to the Buffer that was set. 5640d1ba665SWarner Losh 5650d1ba665SWarner Losh **/ 5660d1ba665SWarner Losh #define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \ 5670d1ba665SWarner Losh _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer)) 5680d1ba665SWarner Losh 5690d1ba665SWarner Losh /** 5700d1ba665SWarner Losh Sets a Boolean PCD token value based on a token name. 5710d1ba665SWarner Losh 5720d1ba665SWarner Losh Sets the Boolean value for the token specified by TokenName. Value is returned. 5730d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 5740d1ba665SWarner Losh 5750d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 5760d1ba665SWarner Losh @param Buffer The Boolean value to set. 5770d1ba665SWarner Losh 5780d1ba665SWarner Losh @return Return the Value that was set. 5790d1ba665SWarner Losh 5800d1ba665SWarner Losh **/ 5810d1ba665SWarner Losh #define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value)) 5820d1ba665SWarner Losh #endif 5830d1ba665SWarner Losh 5840d1ba665SWarner Losh /** 5850d1ba665SWarner Losh Sets a 8-bit PCD token value based on a token name. 5860d1ba665SWarner Losh 5870d1ba665SWarner Losh Sets the 8-bit value for the token specified by TokenName. 5880d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 5890d1ba665SWarner Losh 5900d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 5910d1ba665SWarner Losh @param Value The 8-bit value to set. 5920d1ba665SWarner Losh 5930d1ba665SWarner Losh @return The status of the set operation. 5940d1ba665SWarner Losh 5950d1ba665SWarner Losh **/ 5960d1ba665SWarner Losh #define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value)) 5970d1ba665SWarner Losh 5980d1ba665SWarner Losh /** 5990d1ba665SWarner Losh Sets a 16-bit PCD token value based on a token name. 6000d1ba665SWarner Losh 6010d1ba665SWarner Losh Sets the 16-bit value for the token specified by TokenName. 6020d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 6030d1ba665SWarner Losh 6040d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 6050d1ba665SWarner Losh @param Value The 16-bit value to set. 6060d1ba665SWarner Losh 6070d1ba665SWarner Losh @return The status of the set operation. 6080d1ba665SWarner Losh 6090d1ba665SWarner Losh **/ 6100d1ba665SWarner Losh #define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value)) 6110d1ba665SWarner Losh 6120d1ba665SWarner Losh /** 6130d1ba665SWarner Losh Sets a 32-bit PCD token value based on a token name. 6140d1ba665SWarner Losh 6150d1ba665SWarner Losh Sets the 32-bit value for the token specified by TokenName. 6160d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 6170d1ba665SWarner Losh 6180d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 6190d1ba665SWarner Losh @param Value The 32-bit value to set. 6200d1ba665SWarner Losh 6210d1ba665SWarner Losh @return The status of the set operation. 6220d1ba665SWarner Losh 6230d1ba665SWarner Losh **/ 6240d1ba665SWarner Losh #define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value)) 6250d1ba665SWarner Losh 6260d1ba665SWarner Losh /** 6270d1ba665SWarner Losh Sets a 64-bit PCD token value based on a token name. 6280d1ba665SWarner Losh 6290d1ba665SWarner Losh Sets the 64-bit value for the token specified by TokenName. 6300d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 6310d1ba665SWarner Losh 6320d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 6330d1ba665SWarner Losh @param Value The 64-bit value to set. 6340d1ba665SWarner Losh 6350d1ba665SWarner Losh @return The status of the set operation. 6360d1ba665SWarner Losh 6370d1ba665SWarner Losh **/ 6380d1ba665SWarner Losh #define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value)) 6390d1ba665SWarner Losh 6400d1ba665SWarner Losh /** 6410d1ba665SWarner Losh Sets a pointer to a PCD token buffer based on a token name. 6420d1ba665SWarner Losh 6430d1ba665SWarner Losh Sets the buffer for the token specified by TokenName. 6440d1ba665SWarner Losh If SizeOfBuffer is greater than the maximum size supported by TokenName, 6450d1ba665SWarner Losh then set SizeOfBuffer to the maximum size supported by TokenName and return 6460d1ba665SWarner Losh RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed. 6470d1ba665SWarner Losh If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size 6480d1ba665SWarner Losh supported by TokenName and RETURN_INVALID_PARAMETER must be returned. 6490d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 6500d1ba665SWarner Losh 6510d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 6520d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 6530d1ba665SWarner Losh 6540d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 6550d1ba665SWarner Losh @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. 6560d1ba665SWarner Losh @param Buffer A pointer to the buffer to set. 6570d1ba665SWarner Losh 6580d1ba665SWarner Losh @return The status of the set operation. 6590d1ba665SWarner Losh 6600d1ba665SWarner Losh **/ 6610d1ba665SWarner Losh #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \ 6620d1ba665SWarner Losh _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer)) 6630d1ba665SWarner Losh 6640d1ba665SWarner Losh 6650d1ba665SWarner Losh 6660d1ba665SWarner Losh /** 6670d1ba665SWarner Losh Sets a boolean PCD token value based on a token name. 6680d1ba665SWarner Losh 6690d1ba665SWarner Losh Sets the boolean value for the token specified by TokenName. 6700d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 6710d1ba665SWarner Losh 6720d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 6730d1ba665SWarner Losh @param Value The boolean value to set. 6740d1ba665SWarner Losh 6750d1ba665SWarner Losh @return The status of the set operation. 6760d1ba665SWarner Losh 6770d1ba665SWarner Losh **/ 6780d1ba665SWarner Losh #define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value)) 6790d1ba665SWarner Losh 6800d1ba665SWarner Losh /** 6810d1ba665SWarner Losh Retrieves a token number based on a GUID and a token name. 6820d1ba665SWarner Losh 6830d1ba665SWarner Losh Returns the token number for the token specified by Guid and TokenName. 6840d1ba665SWarner Losh If TokenName is not a valid token in the token space, then the module will not build. 6850d1ba665SWarner Losh 6860d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 6870d1ba665SWarner Losh which namespace to retrieve a value from. 6880d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 6890d1ba665SWarner Losh 6900d1ba665SWarner Losh @return Return the token number. 6910d1ba665SWarner Losh 6920d1ba665SWarner Losh **/ 6930d1ba665SWarner Losh #define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid) 6940d1ba665SWarner Losh 6950d1ba665SWarner Losh /** 6960d1ba665SWarner Losh Retrieves an 8-bit PCD token value based on a GUID and a token name. 6970d1ba665SWarner Losh 6980d1ba665SWarner Losh Returns the 8-bit value for the token specified by Guid and TokenName. 6990d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 7000d1ba665SWarner Losh then the module will not build. 7010d1ba665SWarner Losh 7020d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 7030d1ba665SWarner Losh 7040d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 7050d1ba665SWarner Losh which namespace to retrieve a value from. 7060d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 7070d1ba665SWarner Losh 7080d1ba665SWarner Losh @return An 8-bit PCD token value. 7090d1ba665SWarner Losh 7100d1ba665SWarner Losh **/ 7110d1ba665SWarner Losh #define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName)) 7120d1ba665SWarner Losh 7130d1ba665SWarner Losh /** 7140d1ba665SWarner Losh Retrieves a 16-bit PCD token value based on a GUID and a token name. 7150d1ba665SWarner Losh 7160d1ba665SWarner Losh Returns the 16-bit value for the token specified by Guid and TokenName. 7170d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 7180d1ba665SWarner Losh then the module will not build. 7190d1ba665SWarner Losh 7200d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 7210d1ba665SWarner Losh 7220d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 7230d1ba665SWarner Losh which namespace to retrieve a value from. 7240d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 7250d1ba665SWarner Losh 7260d1ba665SWarner Losh @return A 16-bit PCD token value. 7270d1ba665SWarner Losh 7280d1ba665SWarner Losh **/ 7290d1ba665SWarner Losh #define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName)) 7300d1ba665SWarner Losh 7310d1ba665SWarner Losh 7320d1ba665SWarner Losh /** 7330d1ba665SWarner Losh Retrieves a 32-bit PCD token value based on a GUID and a token name. 7340d1ba665SWarner Losh 7350d1ba665SWarner Losh Returns the 32-bit value for the token specified by Guid and TokenName. 7360d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 7370d1ba665SWarner Losh then the module will not build. 7380d1ba665SWarner Losh 7390d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 7400d1ba665SWarner Losh 7410d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 7420d1ba665SWarner Losh which namespace to retrieve a value from. 7430d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 7440d1ba665SWarner Losh 7450d1ba665SWarner Losh @return A 32-bit PCD token value. 7460d1ba665SWarner Losh 7470d1ba665SWarner Losh **/ 7480d1ba665SWarner Losh #define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName)) 7490d1ba665SWarner Losh 7500d1ba665SWarner Losh 7510d1ba665SWarner Losh /** 7520d1ba665SWarner Losh Retrieves a 64-bit PCD token value based on a GUID and a token name. 7530d1ba665SWarner Losh 7540d1ba665SWarner Losh Returns the 64-bit value for the token specified by Guid and TokenName. 7550d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 7560d1ba665SWarner Losh then the module will not build. 7570d1ba665SWarner Losh 7580d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 7590d1ba665SWarner Losh 7600d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 7610d1ba665SWarner Losh which namespace to retrieve a value from. 7620d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 7630d1ba665SWarner Losh 7640d1ba665SWarner Losh @return A 64-bit PCD token value. 7650d1ba665SWarner Losh 7660d1ba665SWarner Losh **/ 7670d1ba665SWarner Losh #define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName)) 7680d1ba665SWarner Losh 7690d1ba665SWarner Losh 7700d1ba665SWarner Losh /** 7710d1ba665SWarner Losh Retrieves a pointer to a PCD token buffer based on a GUID and a token name. 7720d1ba665SWarner Losh 7730d1ba665SWarner Losh Returns a pointer to the buffer for the token specified by Guid and TokenName. 7740d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 7750d1ba665SWarner Losh then the module will not build. 7760d1ba665SWarner Losh 7770d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 7780d1ba665SWarner Losh 7790d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 7800d1ba665SWarner Losh which namespace to retrieve a value from. 7810d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 7820d1ba665SWarner Losh 7830d1ba665SWarner Losh @return A pointer to a PCD token buffer. 7840d1ba665SWarner Losh 7850d1ba665SWarner Losh **/ 7860d1ba665SWarner Losh #define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName)) 7870d1ba665SWarner Losh 7880d1ba665SWarner Losh 7890d1ba665SWarner Losh /** 7900d1ba665SWarner Losh Retrieves a Boolean PCD token value based on a GUID and a token name. 7910d1ba665SWarner Losh 7920d1ba665SWarner Losh Returns the Boolean value for the token specified by Guid and TokenName. 7930d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 7940d1ba665SWarner Losh then the module will not build. 7950d1ba665SWarner Losh 7960d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 7970d1ba665SWarner Losh 7980d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 7990d1ba665SWarner Losh which namespace to retrieve a value from. 8000d1ba665SWarner Losh @param TokenName The name of the PCD token to retrieve a current value for. 8010d1ba665SWarner Losh 8020d1ba665SWarner Losh @return A Boolean PCD token value. 8030d1ba665SWarner Losh 8040d1ba665SWarner Losh **/ 8050d1ba665SWarner Losh #define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName)) 8060d1ba665SWarner Losh 8070d1ba665SWarner Losh 8080d1ba665SWarner Losh 8090d1ba665SWarner Losh #ifndef DISABLE_NEW_DEPRECATED_INTERFACES 8100d1ba665SWarner Losh /** 8110d1ba665SWarner Losh Sets an 8-bit PCD token value based on a GUID and a token name. 8120d1ba665SWarner Losh 8130d1ba665SWarner Losh Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned. 8140d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 8150d1ba665SWarner Losh then the module will not build. 8160d1ba665SWarner Losh 8170d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 8180d1ba665SWarner Losh 8190d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 8200d1ba665SWarner Losh which namespace to retrieve a value from. 8210d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 8220d1ba665SWarner Losh @param Value The 8-bit value to set. 8230d1ba665SWarner Losh 8240d1ba665SWarner Losh @return Return the Value that was set. 8250d1ba665SWarner Losh 8260d1ba665SWarner Losh **/ 8270d1ba665SWarner Losh #define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 8280d1ba665SWarner Losh 8290d1ba665SWarner Losh 8300d1ba665SWarner Losh /** 8310d1ba665SWarner Losh Sets a 16-bit PCD token value based on a GUID and a token name. 8320d1ba665SWarner Losh 8330d1ba665SWarner Losh Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned. 8340d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 8350d1ba665SWarner Losh then the module will not build. 8360d1ba665SWarner Losh 8370d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 8380d1ba665SWarner Losh 8390d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 8400d1ba665SWarner Losh which namespace to retrieve a value from. 8410d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 8420d1ba665SWarner Losh @param Value The 16-bit value to set. 8430d1ba665SWarner Losh 8440d1ba665SWarner Losh @return Return the Value that was set. 8450d1ba665SWarner Losh 8460d1ba665SWarner Losh **/ 8470d1ba665SWarner Losh #define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 8480d1ba665SWarner Losh 8490d1ba665SWarner Losh 8500d1ba665SWarner Losh /** 8510d1ba665SWarner Losh Sets a 32-bit PCD token value based on a GUID and a token name. 8520d1ba665SWarner Losh 8530d1ba665SWarner Losh Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned. 8540d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 8550d1ba665SWarner Losh then the module will not build. 8560d1ba665SWarner Losh 8570d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 8580d1ba665SWarner Losh 8590d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 8600d1ba665SWarner Losh which namespace to retrieve a value from. 8610d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 8620d1ba665SWarner Losh @param Value The 32-bit value to set. 8630d1ba665SWarner Losh 8640d1ba665SWarner Losh @return Return the Value that was set. 8650d1ba665SWarner Losh 8660d1ba665SWarner Losh **/ 8670d1ba665SWarner Losh #define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 8680d1ba665SWarner Losh 8690d1ba665SWarner Losh 8700d1ba665SWarner Losh /** 8710d1ba665SWarner Losh Sets a 64-bit PCD token value based on a GUID and a token name. 8720d1ba665SWarner Losh 8730d1ba665SWarner Losh Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned. 8740d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 8750d1ba665SWarner Losh then the module will not build. 8760d1ba665SWarner Losh 8770d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 8780d1ba665SWarner Losh 8790d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 8800d1ba665SWarner Losh which namespace to retrieve a value from. 8810d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 8820d1ba665SWarner Losh @param Value The 64-bit value to set. 8830d1ba665SWarner Losh 8840d1ba665SWarner Losh @return Return the Value that was set. 8850d1ba665SWarner Losh 8860d1ba665SWarner Losh **/ 8870d1ba665SWarner Losh #define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 8880d1ba665SWarner Losh 8890d1ba665SWarner Losh 8900d1ba665SWarner Losh /** 8910d1ba665SWarner Losh Sets a pointer to a PCD token buffer based on a GUID and a token name. 8920d1ba665SWarner Losh 8930d1ba665SWarner Losh Sets the buffer for the token specified by Guid and TokenName. Buffer is returned. 8940d1ba665SWarner Losh If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName, 8950d1ba665SWarner Losh then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return 8960d1ba665SWarner Losh NULL to indicate that the set operation was not actually performed. If SizeOfBuffer 8970d1ba665SWarner Losh is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by 8980d1ba665SWarner Losh Guid and TokenName and NULL must be returned. 8990d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 9000d1ba665SWarner Losh then the module will not build. 9010d1ba665SWarner Losh 9020d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 9030d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 9040d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 9050d1ba665SWarner Losh 9060d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 9070d1ba665SWarner Losh which namespace to retrieve a value from. 9080d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 9090d1ba665SWarner Losh @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. 9100d1ba665SWarner Losh @param Buffer Pointer to the buffer to set. 9110d1ba665SWarner Losh 9120d1ba665SWarner Losh @return Return the pointer to the Buffer that was set. 9130d1ba665SWarner Losh 9140d1ba665SWarner Losh **/ 9150d1ba665SWarner Losh #define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \ 9160d1ba665SWarner Losh LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer)) 9170d1ba665SWarner Losh 9180d1ba665SWarner Losh 9190d1ba665SWarner Losh /** 9200d1ba665SWarner Losh Sets a Boolean PCD token value based on a GUID and a token name. 9210d1ba665SWarner Losh 9220d1ba665SWarner Losh Sets the Boolean value for the token specified by Guid and TokenName. Value is returned. 9230d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 9240d1ba665SWarner Losh then the module will not build. 9250d1ba665SWarner Losh 9260d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 9270d1ba665SWarner Losh 9280d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 9290d1ba665SWarner Losh which namespace to retrieve a value from. 9300d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 9310d1ba665SWarner Losh @param Value The Boolean value to set. 9320d1ba665SWarner Losh 9330d1ba665SWarner Losh @return Return the Value that was set. 9340d1ba665SWarner Losh 9350d1ba665SWarner Losh **/ 9360d1ba665SWarner Losh #define PcdSetExBool(Guid, TokenName, Value) \ 9370d1ba665SWarner Losh LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value)) 9380d1ba665SWarner Losh #endif 9390d1ba665SWarner Losh 9400d1ba665SWarner Losh /** 9410d1ba665SWarner Losh Sets an 8-bit PCD token value based on a GUID and a token name. 9420d1ba665SWarner Losh 9430d1ba665SWarner Losh Sets the 8-bit value for the token specified by Guid and TokenName. 9440d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 9450d1ba665SWarner Losh then the module will not build. 9460d1ba665SWarner Losh 9470d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 9480d1ba665SWarner Losh 9490d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 9500d1ba665SWarner Losh which namespace to retrieve a value from. 9510d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 9520d1ba665SWarner Losh @param Value The 8-bit value to set. 9530d1ba665SWarner Losh 9540d1ba665SWarner Losh @return The status of the set operation. 9550d1ba665SWarner Losh 9560d1ba665SWarner Losh **/ 9570d1ba665SWarner Losh #define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 9580d1ba665SWarner Losh 9590d1ba665SWarner Losh /** 9600d1ba665SWarner Losh Sets an 16-bit PCD token value based on a GUID and a token name. 9610d1ba665SWarner Losh 9620d1ba665SWarner Losh Sets the 16-bit value for the token specified by Guid and TokenName. 9630d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 9640d1ba665SWarner Losh then the module will not build. 9650d1ba665SWarner Losh 9660d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 9670d1ba665SWarner Losh 9680d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 9690d1ba665SWarner Losh which namespace to retrieve a value from. 9700d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 9710d1ba665SWarner Losh @param Value The 16-bit value to set. 9720d1ba665SWarner Losh 9730d1ba665SWarner Losh @return The status of the set operation. 9740d1ba665SWarner Losh 9750d1ba665SWarner Losh **/ 9760d1ba665SWarner Losh #define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 9770d1ba665SWarner Losh 9780d1ba665SWarner Losh /** 9790d1ba665SWarner Losh Sets an 32-bit PCD token value based on a GUID and a token name. 9800d1ba665SWarner Losh 9810d1ba665SWarner Losh Sets the 32-bit value for the token specified by Guid and TokenName. 9820d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 9830d1ba665SWarner Losh then the module will not build. 9840d1ba665SWarner Losh 9850d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 9860d1ba665SWarner Losh 9870d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 9880d1ba665SWarner Losh which namespace to retrieve a value from. 9890d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 9900d1ba665SWarner Losh @param Value The 32-bit value to set. 9910d1ba665SWarner Losh 9920d1ba665SWarner Losh @return The status of the set operation. 9930d1ba665SWarner Losh 9940d1ba665SWarner Losh **/ 9950d1ba665SWarner Losh #define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 9960d1ba665SWarner Losh 9970d1ba665SWarner Losh /** 9980d1ba665SWarner Losh Sets an 64-bit PCD token value based on a GUID and a token name. 9990d1ba665SWarner Losh 10000d1ba665SWarner Losh Sets the 64-bit value for the token specified by Guid and TokenName. 10010d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 10020d1ba665SWarner Losh then the module will not build. 10030d1ba665SWarner Losh 10040d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 10050d1ba665SWarner Losh 10060d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 10070d1ba665SWarner Losh which namespace to retrieve a value from. 10080d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 10090d1ba665SWarner Losh @param Value The 64-bit value to set. 10100d1ba665SWarner Losh 10110d1ba665SWarner Losh @return The status of the set operation. 10120d1ba665SWarner Losh 10130d1ba665SWarner Losh **/ 10140d1ba665SWarner Losh #define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 10150d1ba665SWarner Losh 10160d1ba665SWarner Losh /** 10170d1ba665SWarner Losh Sets a pointer to a PCD token buffer based on a GUID and a token name. 10180d1ba665SWarner Losh 10190d1ba665SWarner Losh Sets the buffer for the token specified by Guid and TokenName. 10200d1ba665SWarner Losh If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName, 10210d1ba665SWarner Losh then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return 10220d1ba665SWarner Losh RETURN_INVALID_PARAMETER to indicate that the set operation was not actually performed. 10230d1ba665SWarner Losh If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size 10240d1ba665SWarner Losh supported by Guid and TokenName and RETURN_INVALID_PARAMETER must be returned. 10250d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 10260d1ba665SWarner Losh then the module will not build. 10270d1ba665SWarner Losh 10280d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 10290d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 10300d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 10310d1ba665SWarner Losh 10320d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 10330d1ba665SWarner Losh which namespace to retrieve a value from. 10340d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 10350d1ba665SWarner Losh @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. 10360d1ba665SWarner Losh @param Buffer Pointer to the buffer to set. 10370d1ba665SWarner Losh 10380d1ba665SWarner Losh @return The status of the set operation. 10390d1ba665SWarner Losh 10400d1ba665SWarner Losh **/ 10410d1ba665SWarner Losh #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \ 10420d1ba665SWarner Losh LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer)) 10430d1ba665SWarner Losh 10440d1ba665SWarner Losh 10450d1ba665SWarner Losh /** 10460d1ba665SWarner Losh Sets an boolean PCD token value based on a GUID and a token name. 10470d1ba665SWarner Losh 10480d1ba665SWarner Losh Sets the boolean value for the token specified by Guid and TokenName. 10490d1ba665SWarner Losh If TokenName is not a valid token in the token space specified by Guid, 10500d1ba665SWarner Losh then the module will not build. 10510d1ba665SWarner Losh 10520d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 10530d1ba665SWarner Losh 10540d1ba665SWarner Losh @param Guid Pointer to a 128-bit unique value that designates 10550d1ba665SWarner Losh which namespace to retrieve a value from. 10560d1ba665SWarner Losh @param TokenName The name of the PCD token to set the current value for. 10570d1ba665SWarner Losh @param Value The boolean value to set. 10580d1ba665SWarner Losh 10590d1ba665SWarner Losh @return The status of the set operation. 10600d1ba665SWarner Losh 10610d1ba665SWarner Losh **/ 10620d1ba665SWarner Losh #define PcdSetExBoolS(Guid, TokenName, Value) \ 10630d1ba665SWarner Losh LibPcdSetExBoolS ((Guid), PcdTokenEx(Guid,TokenName), (Value)) 10640d1ba665SWarner Losh 10650d1ba665SWarner Losh /** 10660d1ba665SWarner Losh This function provides a means by which SKU support can be established in the PCD infrastructure. 10670d1ba665SWarner Losh 10680d1ba665SWarner Losh Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned. 10690d1ba665SWarner Losh 10700d1ba665SWarner Losh @param SkuId The SKU value that will be used when the PCD service retrieves and sets values 10710d1ba665SWarner Losh associated with a PCD token. 10720d1ba665SWarner Losh 10730d1ba665SWarner Losh @return Return the SKU ID that was set. 10740d1ba665SWarner Losh 10750d1ba665SWarner Losh **/ 10760d1ba665SWarner Losh UINTN 10770d1ba665SWarner Losh EFIAPI 10780d1ba665SWarner Losh LibPcdSetSku ( 10790d1ba665SWarner Losh IN UINTN SkuId 10800d1ba665SWarner Losh ); 10810d1ba665SWarner Losh 10820d1ba665SWarner Losh 10830d1ba665SWarner Losh /** 10840d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 10850d1ba665SWarner Losh 10860d1ba665SWarner Losh Returns the 8-bit value for the token specified by TokenNumber. 10870d1ba665SWarner Losh 10880d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 10890d1ba665SWarner Losh 10900d1ba665SWarner Losh @return Returns the 8-bit value for the token specified by TokenNumber. 10910d1ba665SWarner Losh 10920d1ba665SWarner Losh **/ 10930d1ba665SWarner Losh UINT8 10940d1ba665SWarner Losh EFIAPI 10950d1ba665SWarner Losh LibPcdGet8 ( 10960d1ba665SWarner Losh IN UINTN TokenNumber 10970d1ba665SWarner Losh ); 10980d1ba665SWarner Losh 10990d1ba665SWarner Losh 11000d1ba665SWarner Losh /** 11010d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 11020d1ba665SWarner Losh 11030d1ba665SWarner Losh Returns the 16-bit value for the token specified by TokenNumber. 11040d1ba665SWarner Losh 11050d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 11060d1ba665SWarner Losh 11070d1ba665SWarner Losh @return Returns the 16-bit value for the token specified by TokenNumber. 11080d1ba665SWarner Losh 11090d1ba665SWarner Losh **/ 11100d1ba665SWarner Losh UINT16 11110d1ba665SWarner Losh EFIAPI 11120d1ba665SWarner Losh LibPcdGet16 ( 11130d1ba665SWarner Losh IN UINTN TokenNumber 11140d1ba665SWarner Losh ); 11150d1ba665SWarner Losh 11160d1ba665SWarner Losh 11170d1ba665SWarner Losh /** 11180d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 11190d1ba665SWarner Losh 11200d1ba665SWarner Losh Returns the 32-bit value for the token specified by TokenNumber. 11210d1ba665SWarner Losh 11220d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 11230d1ba665SWarner Losh 11240d1ba665SWarner Losh @return Returns the 32-bit value for the token specified by TokenNumber. 11250d1ba665SWarner Losh 11260d1ba665SWarner Losh **/ 11270d1ba665SWarner Losh UINT32 11280d1ba665SWarner Losh EFIAPI 11290d1ba665SWarner Losh LibPcdGet32 ( 11300d1ba665SWarner Losh IN UINTN TokenNumber 11310d1ba665SWarner Losh ); 11320d1ba665SWarner Losh 11330d1ba665SWarner Losh 11340d1ba665SWarner Losh /** 11350d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 11360d1ba665SWarner Losh 11370d1ba665SWarner Losh Returns the 64-bit value for the token specified by TokenNumber. 11380d1ba665SWarner Losh 11390d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 11400d1ba665SWarner Losh 11410d1ba665SWarner Losh @return Returns the 64-bit value for the token specified by TokenNumber. 11420d1ba665SWarner Losh 11430d1ba665SWarner Losh **/ 11440d1ba665SWarner Losh UINT64 11450d1ba665SWarner Losh EFIAPI 11460d1ba665SWarner Losh LibPcdGet64 ( 11470d1ba665SWarner Losh IN UINTN TokenNumber 11480d1ba665SWarner Losh ); 11490d1ba665SWarner Losh 11500d1ba665SWarner Losh 11510d1ba665SWarner Losh /** 11520d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 11530d1ba665SWarner Losh 11540d1ba665SWarner Losh Returns the pointer to the buffer of the token specified by TokenNumber. 11550d1ba665SWarner Losh 11560d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 11570d1ba665SWarner Losh 11580d1ba665SWarner Losh @return Returns the pointer to the token specified by TokenNumber. 11590d1ba665SWarner Losh 11600d1ba665SWarner Losh **/ 11610d1ba665SWarner Losh VOID * 11620d1ba665SWarner Losh EFIAPI 11630d1ba665SWarner Losh LibPcdGetPtr ( 11640d1ba665SWarner Losh IN UINTN TokenNumber 11650d1ba665SWarner Losh ); 11660d1ba665SWarner Losh 11670d1ba665SWarner Losh 11680d1ba665SWarner Losh /** 11690d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 11700d1ba665SWarner Losh 11710d1ba665SWarner Losh Returns the Boolean value of the token specified by TokenNumber. 11720d1ba665SWarner Losh 11730d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 11740d1ba665SWarner Losh 11750d1ba665SWarner Losh @return Returns the Boolean value of the token specified by TokenNumber. 11760d1ba665SWarner Losh 11770d1ba665SWarner Losh **/ 11780d1ba665SWarner Losh BOOLEAN 11790d1ba665SWarner Losh EFIAPI 11800d1ba665SWarner Losh LibPcdGetBool ( 11810d1ba665SWarner Losh IN UINTN TokenNumber 11820d1ba665SWarner Losh ); 11830d1ba665SWarner Losh 11840d1ba665SWarner Losh 11850d1ba665SWarner Losh /** 11860d1ba665SWarner Losh This function provides a means by which to retrieve the size of a given PCD token. 11870d1ba665SWarner Losh 11880d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 11890d1ba665SWarner Losh 11900d1ba665SWarner Losh @return Returns the size of the token specified by TokenNumber. 11910d1ba665SWarner Losh 11920d1ba665SWarner Losh **/ 11930d1ba665SWarner Losh UINTN 11940d1ba665SWarner Losh EFIAPI 11950d1ba665SWarner Losh LibPcdGetSize ( 11960d1ba665SWarner Losh IN UINTN TokenNumber 11970d1ba665SWarner Losh ); 11980d1ba665SWarner Losh 11990d1ba665SWarner Losh 12000d1ba665SWarner Losh /** 12010d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 12020d1ba665SWarner Losh 12030d1ba665SWarner Losh Returns the 8-bit value for the token specified by TokenNumber and Guid. 12040d1ba665SWarner Losh 12050d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 12060d1ba665SWarner Losh 12070d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates 12080d1ba665SWarner Losh which namespace to retrieve a value from. 12090d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 12100d1ba665SWarner Losh 12110d1ba665SWarner Losh @return Return the UINT8. 12120d1ba665SWarner Losh 12130d1ba665SWarner Losh **/ 12140d1ba665SWarner Losh UINT8 12150d1ba665SWarner Losh EFIAPI 12160d1ba665SWarner Losh LibPcdGetEx8 ( 12170d1ba665SWarner Losh IN CONST GUID *Guid, 12180d1ba665SWarner Losh IN UINTN TokenNumber 12190d1ba665SWarner Losh ); 12200d1ba665SWarner Losh 12210d1ba665SWarner Losh 12220d1ba665SWarner Losh /** 12230d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 12240d1ba665SWarner Losh 12250d1ba665SWarner Losh Returns the 16-bit value for the token specified by TokenNumber and Guid. 12260d1ba665SWarner Losh 12270d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 12280d1ba665SWarner Losh 12290d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates 12300d1ba665SWarner Losh which namespace to retrieve a value from. 12310d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 12320d1ba665SWarner Losh 12330d1ba665SWarner Losh @return Return the UINT16. 12340d1ba665SWarner Losh 12350d1ba665SWarner Losh **/ 12360d1ba665SWarner Losh UINT16 12370d1ba665SWarner Losh EFIAPI 12380d1ba665SWarner Losh LibPcdGetEx16 ( 12390d1ba665SWarner Losh IN CONST GUID *Guid, 12400d1ba665SWarner Losh IN UINTN TokenNumber 12410d1ba665SWarner Losh ); 12420d1ba665SWarner Losh 12430d1ba665SWarner Losh 12440d1ba665SWarner Losh /** 12450d1ba665SWarner Losh Returns the 32-bit value for the token specified by TokenNumber and Guid. 12460d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 12470d1ba665SWarner Losh 12480d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates 12490d1ba665SWarner Losh which namespace to retrieve a value from. 12500d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 12510d1ba665SWarner Losh 12520d1ba665SWarner Losh @return Return the UINT32. 12530d1ba665SWarner Losh 12540d1ba665SWarner Losh **/ 12550d1ba665SWarner Losh UINT32 12560d1ba665SWarner Losh EFIAPI 12570d1ba665SWarner Losh LibPcdGetEx32 ( 12580d1ba665SWarner Losh IN CONST GUID *Guid, 12590d1ba665SWarner Losh IN UINTN TokenNumber 12600d1ba665SWarner Losh ); 12610d1ba665SWarner Losh 12620d1ba665SWarner Losh 12630d1ba665SWarner Losh /** 12640d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 12650d1ba665SWarner Losh 12660d1ba665SWarner Losh Returns the 64-bit value for the token specified by TokenNumber and Guid. 12670d1ba665SWarner Losh 12680d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 12690d1ba665SWarner Losh 12700d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates 12710d1ba665SWarner Losh which namespace to retrieve a value from. 12720d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 12730d1ba665SWarner Losh 12740d1ba665SWarner Losh @return Return the UINT64. 12750d1ba665SWarner Losh 12760d1ba665SWarner Losh **/ 12770d1ba665SWarner Losh UINT64 12780d1ba665SWarner Losh EFIAPI 12790d1ba665SWarner Losh LibPcdGetEx64 ( 12800d1ba665SWarner Losh IN CONST GUID *Guid, 12810d1ba665SWarner Losh IN UINTN TokenNumber 12820d1ba665SWarner Losh ); 12830d1ba665SWarner Losh 12840d1ba665SWarner Losh 12850d1ba665SWarner Losh /** 12860d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 12870d1ba665SWarner Losh 12880d1ba665SWarner Losh Returns the pointer to the buffer of token specified by TokenNumber and Guid. 12890d1ba665SWarner Losh 12900d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 12910d1ba665SWarner Losh 12920d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates 12930d1ba665SWarner Losh which namespace to retrieve a value from. 12940d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 12950d1ba665SWarner Losh 12960d1ba665SWarner Losh @return Return the VOID* pointer. 12970d1ba665SWarner Losh 12980d1ba665SWarner Losh **/ 12990d1ba665SWarner Losh VOID * 13000d1ba665SWarner Losh EFIAPI 13010d1ba665SWarner Losh LibPcdGetExPtr ( 13020d1ba665SWarner Losh IN CONST GUID *Guid, 13030d1ba665SWarner Losh IN UINTN TokenNumber 13040d1ba665SWarner Losh ); 13050d1ba665SWarner Losh 13060d1ba665SWarner Losh 13070d1ba665SWarner Losh /** 13080d1ba665SWarner Losh This function provides a means by which to retrieve a value for a given PCD token. 13090d1ba665SWarner Losh 13100d1ba665SWarner Losh Returns the Boolean value of the token specified by TokenNumber and Guid. 13110d1ba665SWarner Losh 13120d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 13130d1ba665SWarner Losh 13140d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates 13150d1ba665SWarner Losh which namespace to retrieve a value from. 13160d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 13170d1ba665SWarner Losh 13180d1ba665SWarner Losh @return Return the BOOLEAN. 13190d1ba665SWarner Losh 13200d1ba665SWarner Losh **/ 13210d1ba665SWarner Losh BOOLEAN 13220d1ba665SWarner Losh EFIAPI 13230d1ba665SWarner Losh LibPcdGetExBool ( 13240d1ba665SWarner Losh IN CONST GUID *Guid, 13250d1ba665SWarner Losh IN UINTN TokenNumber 13260d1ba665SWarner Losh ); 13270d1ba665SWarner Losh 13280d1ba665SWarner Losh 13290d1ba665SWarner Losh /** 13300d1ba665SWarner Losh This function provides a means by which to retrieve the size of a given PCD token. 13310d1ba665SWarner Losh 13320d1ba665SWarner Losh Returns the size of the token specified by TokenNumber and Guid. 13330d1ba665SWarner Losh 13340d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 13350d1ba665SWarner Losh 13360d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates 13370d1ba665SWarner Losh which namespace to retrieve a value from. 13380d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to retrieve a current value for. 13390d1ba665SWarner Losh 13400d1ba665SWarner Losh @return Return the size. 13410d1ba665SWarner Losh 13420d1ba665SWarner Losh **/ 13430d1ba665SWarner Losh UINTN 13440d1ba665SWarner Losh EFIAPI 13450d1ba665SWarner Losh LibPcdGetExSize ( 13460d1ba665SWarner Losh IN CONST GUID *Guid, 13470d1ba665SWarner Losh IN UINTN TokenNumber 13480d1ba665SWarner Losh ); 13490d1ba665SWarner Losh 13500d1ba665SWarner Losh 13510d1ba665SWarner Losh #ifndef DISABLE_NEW_DEPRECATED_INTERFACES 13520d1ba665SWarner Losh /** 13530d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 13540d1ba665SWarner Losh 13550d1ba665SWarner Losh Sets the 8-bit value for the token specified by TokenNumber 13560d1ba665SWarner Losh to the value specified by Value. Value is returned. 13570d1ba665SWarner Losh 13580d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 13590d1ba665SWarner Losh @param[in] Value The 8-bit value to set. 13600d1ba665SWarner Losh 13610d1ba665SWarner Losh @return Return the Value that was set. 13620d1ba665SWarner Losh 13630d1ba665SWarner Losh **/ 13640d1ba665SWarner Losh UINT8 13650d1ba665SWarner Losh EFIAPI 13660d1ba665SWarner Losh LibPcdSet8 ( 13670d1ba665SWarner Losh IN UINTN TokenNumber, 13680d1ba665SWarner Losh IN UINT8 Value 13690d1ba665SWarner Losh ); 13700d1ba665SWarner Losh 13710d1ba665SWarner Losh 13720d1ba665SWarner Losh /** 13730d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 13740d1ba665SWarner Losh 13750d1ba665SWarner Losh Sets the 16-bit value for the token specified by TokenNumber 13760d1ba665SWarner Losh to the value specified by Value. Value is returned. 13770d1ba665SWarner Losh 13780d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 13790d1ba665SWarner Losh @param[in] Value The 16-bit value to set. 13800d1ba665SWarner Losh 13810d1ba665SWarner Losh @return Return the Value that was set. 13820d1ba665SWarner Losh 13830d1ba665SWarner Losh **/ 13840d1ba665SWarner Losh UINT16 13850d1ba665SWarner Losh EFIAPI 13860d1ba665SWarner Losh LibPcdSet16 ( 13870d1ba665SWarner Losh IN UINTN TokenNumber, 13880d1ba665SWarner Losh IN UINT16 Value 13890d1ba665SWarner Losh ); 13900d1ba665SWarner Losh 13910d1ba665SWarner Losh 13920d1ba665SWarner Losh /** 13930d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 13940d1ba665SWarner Losh 13950d1ba665SWarner Losh Sets the 32-bit value for the token specified by TokenNumber 13960d1ba665SWarner Losh to the value specified by Value. Value is returned. 13970d1ba665SWarner Losh 13980d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 13990d1ba665SWarner Losh @param[in] Value The 32-bit value to set. 14000d1ba665SWarner Losh 14010d1ba665SWarner Losh @return Return the Value that was set. 14020d1ba665SWarner Losh 14030d1ba665SWarner Losh **/ 14040d1ba665SWarner Losh UINT32 14050d1ba665SWarner Losh EFIAPI 14060d1ba665SWarner Losh LibPcdSet32 ( 14070d1ba665SWarner Losh IN UINTN TokenNumber, 14080d1ba665SWarner Losh IN UINT32 Value 14090d1ba665SWarner Losh ); 14100d1ba665SWarner Losh 14110d1ba665SWarner Losh 14120d1ba665SWarner Losh /** 14130d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 14140d1ba665SWarner Losh 14150d1ba665SWarner Losh Sets the 64-bit value for the token specified by TokenNumber 14160d1ba665SWarner Losh to the value specified by Value. Value is returned. 14170d1ba665SWarner Losh 14180d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 14190d1ba665SWarner Losh @param[in] Value The 64-bit value to set. 14200d1ba665SWarner Losh 14210d1ba665SWarner Losh @return Return the Value that was set. 14220d1ba665SWarner Losh 14230d1ba665SWarner Losh **/ 14240d1ba665SWarner Losh UINT64 14250d1ba665SWarner Losh EFIAPI 14260d1ba665SWarner Losh LibPcdSet64 ( 14270d1ba665SWarner Losh IN UINTN TokenNumber, 14280d1ba665SWarner Losh IN UINT64 Value 14290d1ba665SWarner Losh ); 14300d1ba665SWarner Losh 14310d1ba665SWarner Losh 14320d1ba665SWarner Losh /** 14330d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 14340d1ba665SWarner Losh 14350d1ba665SWarner Losh Sets a buffer for the token specified by TokenNumber to the value 14360d1ba665SWarner Losh specified by Buffer and SizeOfBuffer. Buffer is returned. 14370d1ba665SWarner Losh If SizeOfBuffer is greater than the maximum size support by TokenNumber, 14380d1ba665SWarner Losh then set SizeOfBuffer to the maximum size supported by TokenNumber and 14390d1ba665SWarner Losh return NULL to indicate that the set operation was not actually performed. 14400d1ba665SWarner Losh 14410d1ba665SWarner Losh If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the 14420d1ba665SWarner Losh maximum size supported by TokenName and NULL must be returned. 14430d1ba665SWarner Losh 14440d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 14450d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 14460d1ba665SWarner Losh 14470d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 14480d1ba665SWarner Losh @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. 14490d1ba665SWarner Losh @param[in] Buffer A pointer to the buffer to set. 14500d1ba665SWarner Losh 14510d1ba665SWarner Losh @return Return the pointer for the Buffer that was set. 14520d1ba665SWarner Losh 14530d1ba665SWarner Losh **/ 14540d1ba665SWarner Losh VOID * 14550d1ba665SWarner Losh EFIAPI 14560d1ba665SWarner Losh LibPcdSetPtr ( 14570d1ba665SWarner Losh IN UINTN TokenNumber, 14580d1ba665SWarner Losh IN OUT UINTN *SizeOfBuffer, 14590d1ba665SWarner Losh IN CONST VOID *Buffer 14600d1ba665SWarner Losh ); 14610d1ba665SWarner Losh 14620d1ba665SWarner Losh 14630d1ba665SWarner Losh /** 14640d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 14650d1ba665SWarner Losh 14660d1ba665SWarner Losh Sets the Boolean value for the token specified by TokenNumber 14670d1ba665SWarner Losh to the value specified by Value. Value is returned. 14680d1ba665SWarner Losh 14690d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 14700d1ba665SWarner Losh @param[in] Value The boolean value to set. 14710d1ba665SWarner Losh 14720d1ba665SWarner Losh @return Return the Value that was set. 14730d1ba665SWarner Losh 14740d1ba665SWarner Losh **/ 14750d1ba665SWarner Losh BOOLEAN 14760d1ba665SWarner Losh EFIAPI 14770d1ba665SWarner Losh LibPcdSetBool ( 14780d1ba665SWarner Losh IN UINTN TokenNumber, 14790d1ba665SWarner Losh IN BOOLEAN Value 14800d1ba665SWarner Losh ); 14810d1ba665SWarner Losh 14820d1ba665SWarner Losh 14830d1ba665SWarner Losh /** 14840d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 14850d1ba665SWarner Losh 14860d1ba665SWarner Losh Sets the 8-bit value for the token specified by TokenNumber and 14870d1ba665SWarner Losh Guid to the value specified by Value. Value is returned. 14880d1ba665SWarner Losh 14890d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 14900d1ba665SWarner Losh 14910d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that 14920d1ba665SWarner Losh designates which namespace to set a value from. 14930d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 14940d1ba665SWarner Losh @param[in] Value The 8-bit value to set. 14950d1ba665SWarner Losh 14960d1ba665SWarner Losh @return Return the Value that was set. 14970d1ba665SWarner Losh 14980d1ba665SWarner Losh **/ 14990d1ba665SWarner Losh UINT8 15000d1ba665SWarner Losh EFIAPI 15010d1ba665SWarner Losh LibPcdSetEx8 ( 15020d1ba665SWarner Losh IN CONST GUID *Guid, 15030d1ba665SWarner Losh IN UINTN TokenNumber, 15040d1ba665SWarner Losh IN UINT8 Value 15050d1ba665SWarner Losh ); 15060d1ba665SWarner Losh 15070d1ba665SWarner Losh 15080d1ba665SWarner Losh /** 15090d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 15100d1ba665SWarner Losh 15110d1ba665SWarner Losh Sets the 16-bit value for the token specified by TokenNumber and 15120d1ba665SWarner Losh Guid to the value specified by Value. Value is returned. 15130d1ba665SWarner Losh 15140d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 15150d1ba665SWarner Losh 15160d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that 15170d1ba665SWarner Losh designates which namespace to set a value from. 15180d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 15190d1ba665SWarner Losh @param[in] Value The 16-bit value to set. 15200d1ba665SWarner Losh 15210d1ba665SWarner Losh @return Return the Value that was set. 15220d1ba665SWarner Losh 15230d1ba665SWarner Losh **/ 15240d1ba665SWarner Losh UINT16 15250d1ba665SWarner Losh EFIAPI 15260d1ba665SWarner Losh LibPcdSetEx16 ( 15270d1ba665SWarner Losh IN CONST GUID *Guid, 15280d1ba665SWarner Losh IN UINTN TokenNumber, 15290d1ba665SWarner Losh IN UINT16 Value 15300d1ba665SWarner Losh ); 15310d1ba665SWarner Losh 15320d1ba665SWarner Losh 15330d1ba665SWarner Losh /** 15340d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 15350d1ba665SWarner Losh 15360d1ba665SWarner Losh Sets the 32-bit value for the token specified by TokenNumber and 15370d1ba665SWarner Losh Guid to the value specified by Value. Value is returned. 15380d1ba665SWarner Losh 15390d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 15400d1ba665SWarner Losh 15410d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that 15420d1ba665SWarner Losh designates which namespace to set a value from. 15430d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 15440d1ba665SWarner Losh @param[in] Value The 32-bit value to set. 15450d1ba665SWarner Losh 15460d1ba665SWarner Losh @return Return the Value that was set. 15470d1ba665SWarner Losh 15480d1ba665SWarner Losh **/ 15490d1ba665SWarner Losh UINT32 15500d1ba665SWarner Losh EFIAPI 15510d1ba665SWarner Losh LibPcdSetEx32 ( 15520d1ba665SWarner Losh IN CONST GUID *Guid, 15530d1ba665SWarner Losh IN UINTN TokenNumber, 15540d1ba665SWarner Losh IN UINT32 Value 15550d1ba665SWarner Losh ); 15560d1ba665SWarner Losh 15570d1ba665SWarner Losh 15580d1ba665SWarner Losh /** 15590d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 15600d1ba665SWarner Losh 15610d1ba665SWarner Losh Sets the 64-bit value for the token specified by TokenNumber and 15620d1ba665SWarner Losh Guid to the value specified by Value. Value is returned. 15630d1ba665SWarner Losh 15640d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 15650d1ba665SWarner Losh 15660d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that 15670d1ba665SWarner Losh designates which namespace to set a value from. 15680d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 15690d1ba665SWarner Losh @param[in] Value The 64-bit value to set. 15700d1ba665SWarner Losh 15710d1ba665SWarner Losh @return Return the Value that was set. 15720d1ba665SWarner Losh 15730d1ba665SWarner Losh **/ 15740d1ba665SWarner Losh UINT64 15750d1ba665SWarner Losh EFIAPI 15760d1ba665SWarner Losh LibPcdSetEx64 ( 15770d1ba665SWarner Losh IN CONST GUID *Guid, 15780d1ba665SWarner Losh IN UINTN TokenNumber, 15790d1ba665SWarner Losh IN UINT64 Value 15800d1ba665SWarner Losh ); 15810d1ba665SWarner Losh 15820d1ba665SWarner Losh 15830d1ba665SWarner Losh /** 15840d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 15850d1ba665SWarner Losh 15860d1ba665SWarner Losh Sets a buffer for the token specified by TokenNumber to the value specified by 15870d1ba665SWarner Losh Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than 15880d1ba665SWarner Losh the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size 15890d1ba665SWarner Losh supported by TokenNumber and return NULL to indicate that the set operation 15900d1ba665SWarner Losh was not actually performed. 15910d1ba665SWarner Losh 15920d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 15930d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 15940d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 15950d1ba665SWarner Losh 15960d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that 15970d1ba665SWarner Losh designates which namespace to set a value from. 15980d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 15990d1ba665SWarner Losh @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. 16000d1ba665SWarner Losh @param[in] Buffer A pointer to the buffer to set. 16010d1ba665SWarner Losh 16020d1ba665SWarner Losh @return Return the pointer to the Buffer that was set. 16030d1ba665SWarner Losh 16040d1ba665SWarner Losh **/ 16050d1ba665SWarner Losh VOID * 16060d1ba665SWarner Losh EFIAPI 16070d1ba665SWarner Losh LibPcdSetExPtr ( 16080d1ba665SWarner Losh IN CONST GUID *Guid, 16090d1ba665SWarner Losh IN UINTN TokenNumber, 16100d1ba665SWarner Losh IN OUT UINTN *SizeOfBuffer, 16110d1ba665SWarner Losh IN VOID *Buffer 16120d1ba665SWarner Losh ); 16130d1ba665SWarner Losh 16140d1ba665SWarner Losh 16150d1ba665SWarner Losh /** 16160d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 16170d1ba665SWarner Losh 16180d1ba665SWarner Losh Sets the Boolean value for the token specified by TokenNumber and 16190d1ba665SWarner Losh Guid to the value specified by Value. Value is returned. 16200d1ba665SWarner Losh 16210d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 16220d1ba665SWarner Losh 16230d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that 16240d1ba665SWarner Losh designates which namespace to set a value from. 16250d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 16260d1ba665SWarner Losh @param[in] Value The Boolean value to set. 16270d1ba665SWarner Losh 16280d1ba665SWarner Losh @return Return the Value that was set. 16290d1ba665SWarner Losh 16300d1ba665SWarner Losh **/ 16310d1ba665SWarner Losh BOOLEAN 16320d1ba665SWarner Losh EFIAPI 16330d1ba665SWarner Losh LibPcdSetExBool ( 16340d1ba665SWarner Losh IN CONST GUID *Guid, 16350d1ba665SWarner Losh IN UINTN TokenNumber, 16360d1ba665SWarner Losh IN BOOLEAN Value 16370d1ba665SWarner Losh ); 16380d1ba665SWarner Losh #endif 16390d1ba665SWarner Losh 16400d1ba665SWarner Losh /** 16410d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 16420d1ba665SWarner Losh 16430d1ba665SWarner Losh Sets the 8-bit value for the token specified by TokenNumber 16440d1ba665SWarner Losh to the value specified by Value. 16450d1ba665SWarner Losh 16460d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 16470d1ba665SWarner Losh @param[in] Value The 8-bit value to set. 16480d1ba665SWarner Losh 16490d1ba665SWarner Losh @return The status of the set operation. 16500d1ba665SWarner Losh 16510d1ba665SWarner Losh **/ 16520d1ba665SWarner Losh RETURN_STATUS 16530d1ba665SWarner Losh EFIAPI 16540d1ba665SWarner Losh LibPcdSet8S ( 16550d1ba665SWarner Losh IN UINTN TokenNumber, 16560d1ba665SWarner Losh IN UINT8 Value 16570d1ba665SWarner Losh ); 16580d1ba665SWarner Losh 16590d1ba665SWarner Losh /** 16600d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 16610d1ba665SWarner Losh 16620d1ba665SWarner Losh Sets the 16-bit value for the token specified by TokenNumber 16630d1ba665SWarner Losh to the value specified by Value. 16640d1ba665SWarner Losh 16650d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 16660d1ba665SWarner Losh @param[in] Value The 16-bit value to set. 16670d1ba665SWarner Losh 16680d1ba665SWarner Losh @return The status of the set operation. 16690d1ba665SWarner Losh 16700d1ba665SWarner Losh **/ 16710d1ba665SWarner Losh RETURN_STATUS 16720d1ba665SWarner Losh EFIAPI 16730d1ba665SWarner Losh LibPcdSet16S ( 16740d1ba665SWarner Losh IN UINTN TokenNumber, 16750d1ba665SWarner Losh IN UINT16 Value 16760d1ba665SWarner Losh ); 16770d1ba665SWarner Losh 16780d1ba665SWarner Losh /** 16790d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 16800d1ba665SWarner Losh 16810d1ba665SWarner Losh Sets the 32-bit value for the token specified by TokenNumber 16820d1ba665SWarner Losh to the value specified by Value. 16830d1ba665SWarner Losh 16840d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 16850d1ba665SWarner Losh @param[in] Value The 32-bit value to set. 16860d1ba665SWarner Losh 16870d1ba665SWarner Losh @return The status of the set operation. 16880d1ba665SWarner Losh 16890d1ba665SWarner Losh **/ 16900d1ba665SWarner Losh RETURN_STATUS 16910d1ba665SWarner Losh EFIAPI 16920d1ba665SWarner Losh LibPcdSet32S ( 16930d1ba665SWarner Losh IN UINTN TokenNumber, 16940d1ba665SWarner Losh IN UINT32 Value 16950d1ba665SWarner Losh ); 16960d1ba665SWarner Losh 16970d1ba665SWarner Losh /** 16980d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 16990d1ba665SWarner Losh 17000d1ba665SWarner Losh Sets the 64-bit value for the token specified by TokenNumber 17010d1ba665SWarner Losh to the value specified by Value. 17020d1ba665SWarner Losh 17030d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 17040d1ba665SWarner Losh @param[in] Value The 64-bit value to set. 17050d1ba665SWarner Losh 17060d1ba665SWarner Losh @return The status of the set operation. 17070d1ba665SWarner Losh 17080d1ba665SWarner Losh **/ 17090d1ba665SWarner Losh RETURN_STATUS 17100d1ba665SWarner Losh EFIAPI 17110d1ba665SWarner Losh LibPcdSet64S ( 17120d1ba665SWarner Losh IN UINTN TokenNumber, 17130d1ba665SWarner Losh IN UINT64 Value 17140d1ba665SWarner Losh ); 17150d1ba665SWarner Losh 17160d1ba665SWarner Losh /** 17170d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 17180d1ba665SWarner Losh 17190d1ba665SWarner Losh Sets a buffer for the token specified by TokenNumber to the value specified 17200d1ba665SWarner Losh by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size 17210d1ba665SWarner Losh support by TokenNumber, then set SizeOfBuffer to the maximum size supported by 17220d1ba665SWarner Losh TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation 17230d1ba665SWarner Losh was not actually performed. 17240d1ba665SWarner Losh 17250d1ba665SWarner Losh If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the 17260d1ba665SWarner Losh maximum size supported by TokenName and RETURN_INVALID_PARAMETER must be returned. 17270d1ba665SWarner Losh 17280d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 17290d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 17300d1ba665SWarner Losh 17310d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 17320d1ba665SWarner Losh @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. 17330d1ba665SWarner Losh @param[in] Buffer A pointer to the buffer to set. 17340d1ba665SWarner Losh 17350d1ba665SWarner Losh @return The status of the set operation. 17360d1ba665SWarner Losh 17370d1ba665SWarner Losh **/ 17380d1ba665SWarner Losh RETURN_STATUS 17390d1ba665SWarner Losh EFIAPI 17400d1ba665SWarner Losh LibPcdSetPtrS ( 17410d1ba665SWarner Losh IN UINTN TokenNumber, 17420d1ba665SWarner Losh IN OUT UINTN *SizeOfBuffer, 17430d1ba665SWarner Losh IN CONST VOID *Buffer 17440d1ba665SWarner Losh ); 17450d1ba665SWarner Losh 17460d1ba665SWarner Losh /** 17470d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 17480d1ba665SWarner Losh 17490d1ba665SWarner Losh Sets the boolean value for the token specified by TokenNumber 17500d1ba665SWarner Losh to the value specified by Value. 17510d1ba665SWarner Losh 17520d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 17530d1ba665SWarner Losh @param[in] Value The boolean value to set. 17540d1ba665SWarner Losh 17550d1ba665SWarner Losh @return The status of the set operation. 17560d1ba665SWarner Losh 17570d1ba665SWarner Losh **/ 17580d1ba665SWarner Losh RETURN_STATUS 17590d1ba665SWarner Losh EFIAPI 17600d1ba665SWarner Losh LibPcdSetBoolS ( 17610d1ba665SWarner Losh IN UINTN TokenNumber, 17620d1ba665SWarner Losh IN BOOLEAN Value 17630d1ba665SWarner Losh ); 17640d1ba665SWarner Losh 17650d1ba665SWarner Losh /** 17660d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 17670d1ba665SWarner Losh 17680d1ba665SWarner Losh Sets the 8-bit value for the token specified by TokenNumber 17690d1ba665SWarner Losh to the value specified by Value. 17700d1ba665SWarner Losh 17710d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 17720d1ba665SWarner Losh 17730d1ba665SWarner Losh @param[in] Guid The pointer to a 128-bit unique value that 17740d1ba665SWarner Losh designates which namespace to set a value from. 17750d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 17760d1ba665SWarner Losh @param[in] Value The 8-bit value to set. 17770d1ba665SWarner Losh 17780d1ba665SWarner Losh @return The status of the set operation. 17790d1ba665SWarner Losh 17800d1ba665SWarner Losh **/ 17810d1ba665SWarner Losh RETURN_STATUS 17820d1ba665SWarner Losh EFIAPI 17830d1ba665SWarner Losh LibPcdSetEx8S ( 17840d1ba665SWarner Losh IN CONST GUID *Guid, 17850d1ba665SWarner Losh IN UINTN TokenNumber, 17860d1ba665SWarner Losh IN UINT8 Value 17870d1ba665SWarner Losh ); 17880d1ba665SWarner Losh 17890d1ba665SWarner Losh /** 17900d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 17910d1ba665SWarner Losh 17920d1ba665SWarner Losh Sets the 16-bit value for the token specified by TokenNumber 17930d1ba665SWarner Losh to the value specified by Value. 17940d1ba665SWarner Losh 17950d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 17960d1ba665SWarner Losh 17970d1ba665SWarner Losh @param[in] Guid The pointer to a 128-bit unique value that 17980d1ba665SWarner Losh designates which namespace to set a value from. 17990d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 18000d1ba665SWarner Losh @param[in] Value The 16-bit value to set. 18010d1ba665SWarner Losh 18020d1ba665SWarner Losh @return The status of the set operation. 18030d1ba665SWarner Losh 18040d1ba665SWarner Losh **/ 18050d1ba665SWarner Losh RETURN_STATUS 18060d1ba665SWarner Losh EFIAPI 18070d1ba665SWarner Losh LibPcdSetEx16S ( 18080d1ba665SWarner Losh IN CONST GUID *Guid, 18090d1ba665SWarner Losh IN UINTN TokenNumber, 18100d1ba665SWarner Losh IN UINT16 Value 18110d1ba665SWarner Losh ); 18120d1ba665SWarner Losh 18130d1ba665SWarner Losh /** 18140d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 18150d1ba665SWarner Losh 18160d1ba665SWarner Losh Sets the 32-bit value for the token specified by TokenNumber 18170d1ba665SWarner Losh to the value specified by Value. 18180d1ba665SWarner Losh 18190d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 18200d1ba665SWarner Losh 18210d1ba665SWarner Losh @param[in] Guid The pointer to a 128-bit unique value that 18220d1ba665SWarner Losh designates which namespace to set a value from. 18230d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 18240d1ba665SWarner Losh @param[in] Value The 32-bit value to set. 18250d1ba665SWarner Losh 18260d1ba665SWarner Losh @return The status of the set operation. 18270d1ba665SWarner Losh 18280d1ba665SWarner Losh **/ 18290d1ba665SWarner Losh RETURN_STATUS 18300d1ba665SWarner Losh EFIAPI 18310d1ba665SWarner Losh LibPcdSetEx32S ( 18320d1ba665SWarner Losh IN CONST GUID *Guid, 18330d1ba665SWarner Losh IN UINTN TokenNumber, 18340d1ba665SWarner Losh IN UINT32 Value 18350d1ba665SWarner Losh ); 18360d1ba665SWarner Losh 18370d1ba665SWarner Losh /** 18380d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 18390d1ba665SWarner Losh 18400d1ba665SWarner Losh Sets the 64-bit value for the token specified by TokenNumber 18410d1ba665SWarner Losh to the value specified by Value. 18420d1ba665SWarner Losh 18430d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 18440d1ba665SWarner Losh 18450d1ba665SWarner Losh @param[in] Guid The pointer to a 128-bit unique value that 18460d1ba665SWarner Losh designates which namespace to set a value from. 18470d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 18480d1ba665SWarner Losh @param[in] Value The 64-bit value to set. 18490d1ba665SWarner Losh 18500d1ba665SWarner Losh @return The status of the set operation. 18510d1ba665SWarner Losh 18520d1ba665SWarner Losh **/ 18530d1ba665SWarner Losh RETURN_STATUS 18540d1ba665SWarner Losh EFIAPI 18550d1ba665SWarner Losh LibPcdSetEx64S ( 18560d1ba665SWarner Losh IN CONST GUID *Guid, 18570d1ba665SWarner Losh IN UINTN TokenNumber, 18580d1ba665SWarner Losh IN UINT64 Value 18590d1ba665SWarner Losh ); 18600d1ba665SWarner Losh 18610d1ba665SWarner Losh /** 18620d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 18630d1ba665SWarner Losh 18640d1ba665SWarner Losh Sets a buffer for the token specified by TokenNumber to the value specified by 18650d1ba665SWarner Losh Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size 18660d1ba665SWarner Losh support by TokenNumber, then set SizeOfBuffer to the maximum size supported by 18670d1ba665SWarner Losh TokenNumber and return RETURN_INVALID_PARAMETER to indicate that the set operation 18680d1ba665SWarner Losh was not actually performed. 18690d1ba665SWarner Losh 18700d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 18710d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 18720d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 18730d1ba665SWarner Losh 18740d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that 18750d1ba665SWarner Losh designates which namespace to set a value from. 18760d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 18770d1ba665SWarner Losh @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. 18780d1ba665SWarner Losh @param[in] Buffer A pointer to the buffer to set. 18790d1ba665SWarner Losh 18800d1ba665SWarner Losh @return The status of the set operation. 18810d1ba665SWarner Losh 18820d1ba665SWarner Losh **/ 18830d1ba665SWarner Losh RETURN_STATUS 18840d1ba665SWarner Losh EFIAPI 18850d1ba665SWarner Losh LibPcdSetExPtrS ( 18860d1ba665SWarner Losh IN CONST GUID *Guid, 18870d1ba665SWarner Losh IN UINTN TokenNumber, 18880d1ba665SWarner Losh IN OUT UINTN *SizeOfBuffer, 18890d1ba665SWarner Losh IN VOID *Buffer 18900d1ba665SWarner Losh ); 18910d1ba665SWarner Losh 18920d1ba665SWarner Losh /** 18930d1ba665SWarner Losh This function provides a means by which to set a value for a given PCD token. 18940d1ba665SWarner Losh 18950d1ba665SWarner Losh Sets the boolean value for the token specified by TokenNumber 18960d1ba665SWarner Losh to the value specified by Value. 18970d1ba665SWarner Losh 18980d1ba665SWarner Losh If Guid is NULL, then ASSERT(). 18990d1ba665SWarner Losh 19000d1ba665SWarner Losh @param[in] Guid The pointer to a 128-bit unique value that 19010d1ba665SWarner Losh designates which namespace to set a value from. 19020d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to set a current value for. 19030d1ba665SWarner Losh @param[in] Value The boolean value to set. 19040d1ba665SWarner Losh 19050d1ba665SWarner Losh @return The status of the set operation. 19060d1ba665SWarner Losh 19070d1ba665SWarner Losh **/ 19080d1ba665SWarner Losh RETURN_STATUS 19090d1ba665SWarner Losh EFIAPI 19100d1ba665SWarner Losh LibPcdSetExBoolS ( 19110d1ba665SWarner Losh IN CONST GUID *Guid, 19120d1ba665SWarner Losh IN UINTN TokenNumber, 19130d1ba665SWarner Losh IN BOOLEAN Value 19140d1ba665SWarner Losh ); 19150d1ba665SWarner Losh 19160d1ba665SWarner Losh /** 19170d1ba665SWarner Losh This notification function serves two purposes. 19180d1ba665SWarner Losh 19190d1ba665SWarner Losh Firstly, it notifies the module that did the registration that the value of this 19200d1ba665SWarner Losh PCD token has been set. 19210d1ba665SWarner Losh Secondly, it provides a mechanism for the module that did the registration to intercept 19220d1ba665SWarner Losh the set operation and override the value been set if necessary. After the invocation of 19230d1ba665SWarner Losh the callback function, TokenData will be used by PCD service PEIM or driver to modify th 19240d1ba665SWarner Losh internal data in PCD database. 19250d1ba665SWarner Losh 19260d1ba665SWarner Losh @param[in] CallBackGuid The PCD token GUID being set. 19270d1ba665SWarner Losh @param[in] CallBackToken The PCD token number being set. 19280d1ba665SWarner Losh @param[in, out] TokenData A pointer to the token data being set. 19290d1ba665SWarner Losh @param[in] TokenDataSize The size, in bytes, of the data being set. 19300d1ba665SWarner Losh 19310d1ba665SWarner Losh **/ 19320d1ba665SWarner Losh typedef 19330d1ba665SWarner Losh VOID 19340d1ba665SWarner Losh (EFIAPI *PCD_CALLBACK)( 19350d1ba665SWarner Losh IN CONST GUID *CallBackGuid, OPTIONAL 19360d1ba665SWarner Losh IN UINTN CallBackToken, 19370d1ba665SWarner Losh IN OUT VOID *TokenData, 19380d1ba665SWarner Losh IN UINTN TokenDataSize 19390d1ba665SWarner Losh ); 19400d1ba665SWarner Losh 19410d1ba665SWarner Losh 19420d1ba665SWarner Losh /** 19430d1ba665SWarner Losh Set up a notification function that is called when a specified token is set. 19440d1ba665SWarner Losh 19450d1ba665SWarner Losh When the token specified by TokenNumber and Guid is set, 19460d1ba665SWarner Losh then notification function specified by NotificationFunction is called. 19470d1ba665SWarner Losh If Guid is NULL, then the default token space is used. 19480d1ba665SWarner Losh If NotificationFunction is NULL, then ASSERT(). 19490d1ba665SWarner Losh 19500d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates which 19510d1ba665SWarner Losh namespace to set a value from. If NULL, then the default 19520d1ba665SWarner Losh token space is used. 19530d1ba665SWarner Losh @param[in] TokenNumber The PCD token number to monitor. 19540d1ba665SWarner Losh @param[in] NotificationFunction The function to call when the token 19550d1ba665SWarner Losh specified by Guid and TokenNumber is set. 19560d1ba665SWarner Losh 19570d1ba665SWarner Losh **/ 19580d1ba665SWarner Losh VOID 19590d1ba665SWarner Losh EFIAPI 19600d1ba665SWarner Losh LibPcdCallbackOnSet ( 19610d1ba665SWarner Losh IN CONST GUID *Guid, OPTIONAL 19620d1ba665SWarner Losh IN UINTN TokenNumber, 19630d1ba665SWarner Losh IN PCD_CALLBACK NotificationFunction 19640d1ba665SWarner Losh ); 19650d1ba665SWarner Losh 19660d1ba665SWarner Losh 19670d1ba665SWarner Losh /** 19680d1ba665SWarner Losh Disable a notification function that was established with LibPcdCallbackonSet(). 19690d1ba665SWarner Losh 19700d1ba665SWarner Losh Disable a notification function that was previously established with LibPcdCallbackOnSet(). 19710d1ba665SWarner Losh If NotificationFunction is NULL, then ASSERT(). 19720d1ba665SWarner Losh If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, 19730d1ba665SWarner Losh and NotificationFunction, then ASSERT(). 19740d1ba665SWarner Losh 19750d1ba665SWarner Losh @param[in] Guid Specify the GUID token space. 19760d1ba665SWarner Losh @param[in] TokenNumber Specify the token number. 19770d1ba665SWarner Losh @param[in] NotificationFunction The callback function to be unregistered. 19780d1ba665SWarner Losh 19790d1ba665SWarner Losh **/ 19800d1ba665SWarner Losh VOID 19810d1ba665SWarner Losh EFIAPI 19820d1ba665SWarner Losh LibPcdCancelCallback ( 19830d1ba665SWarner Losh IN CONST GUID *Guid, OPTIONAL 19840d1ba665SWarner Losh IN UINTN TokenNumber, 19850d1ba665SWarner Losh IN PCD_CALLBACK NotificationFunction 19860d1ba665SWarner Losh ); 19870d1ba665SWarner Losh 19880d1ba665SWarner Losh 19890d1ba665SWarner Losh /** 19900d1ba665SWarner Losh Retrieves the next token in a token space. 19910d1ba665SWarner Losh 19920d1ba665SWarner Losh Retrieves the next PCD token number from the token space specified by Guid. 19930d1ba665SWarner Losh If Guid is NULL, then the default token space is used. If TokenNumber is 0, 19940d1ba665SWarner Losh then the first token number is returned. Otherwise, the token number that 19950d1ba665SWarner Losh follows TokenNumber in the token space is returned. If TokenNumber is the last 19960d1ba665SWarner Losh token number in the token space, then 0 is returned. 19970d1ba665SWarner Losh 19980d1ba665SWarner Losh If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT(). 19990d1ba665SWarner Losh 20000d1ba665SWarner Losh @param[in] Guid Pointer to a 128-bit unique value that designates which namespace 20010d1ba665SWarner Losh to set a value from. If NULL, then the default token space is used. 20020d1ba665SWarner Losh @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD 20030d1ba665SWarner Losh token number. 20040d1ba665SWarner Losh 20050d1ba665SWarner Losh @return The next valid token number. 20060d1ba665SWarner Losh 20070d1ba665SWarner Losh **/ 20080d1ba665SWarner Losh UINTN 20090d1ba665SWarner Losh EFIAPI 20100d1ba665SWarner Losh LibPcdGetNextToken ( 20110d1ba665SWarner Losh IN CONST GUID *Guid, OPTIONAL 20120d1ba665SWarner Losh IN UINTN TokenNumber 20130d1ba665SWarner Losh ); 20140d1ba665SWarner Losh 20150d1ba665SWarner Losh 20160d1ba665SWarner Losh 20170d1ba665SWarner Losh /** 20180d1ba665SWarner Losh Used to retrieve the list of available PCD token space GUIDs. 20190d1ba665SWarner Losh 20200d1ba665SWarner Losh Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces 20210d1ba665SWarner Losh in the platform. 20220d1ba665SWarner Losh If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned. 20230d1ba665SWarner Losh If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned. 20240d1ba665SWarner Losh 20250d1ba665SWarner Losh @param TokenSpaceGuid Pointer to the a PCD token space GUID 20260d1ba665SWarner Losh 20270d1ba665SWarner Losh @return The next valid token namespace. 20280d1ba665SWarner Losh 20290d1ba665SWarner Losh **/ 20300d1ba665SWarner Losh GUID * 20310d1ba665SWarner Losh EFIAPI 20320d1ba665SWarner Losh LibPcdGetNextTokenSpace ( 20330d1ba665SWarner Losh IN CONST GUID *TokenSpaceGuid 20340d1ba665SWarner Losh ); 20350d1ba665SWarner Losh 20360d1ba665SWarner Losh 20370d1ba665SWarner Losh /** 20380d1ba665SWarner Losh Sets a value of a patchable PCD entry that is type pointer. 20390d1ba665SWarner Losh 20400d1ba665SWarner Losh Sets the PCD entry specified by PatchVariable to the value specified by Buffer 20410d1ba665SWarner Losh and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than 20420d1ba665SWarner Losh MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return 20430d1ba665SWarner Losh NULL to indicate that the set operation was not actually performed. 20440d1ba665SWarner Losh If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 20450d1ba665SWarner Losh MaximumDatumSize and NULL must be returned. 20460d1ba665SWarner Losh 20470d1ba665SWarner Losh If PatchVariable is NULL, then ASSERT(). 20480d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 20490d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 20500d1ba665SWarner Losh 20510d1ba665SWarner Losh @param[out] PatchVariable A pointer to the global variable in a module that is 20520d1ba665SWarner Losh the target of the set operation. 20530d1ba665SWarner Losh @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. 20540d1ba665SWarner Losh @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. 20550d1ba665SWarner Losh @param[in] Buffer A pointer to the buffer to used to set the target variable. 20560d1ba665SWarner Losh 20570d1ba665SWarner Losh @return Return the pointer to the Buffer that was set. 20580d1ba665SWarner Losh 20590d1ba665SWarner Losh **/ 20600d1ba665SWarner Losh VOID * 20610d1ba665SWarner Losh EFIAPI 20620d1ba665SWarner Losh LibPatchPcdSetPtr ( 20630d1ba665SWarner Losh OUT VOID *PatchVariable, 20640d1ba665SWarner Losh IN UINTN MaximumDatumSize, 20650d1ba665SWarner Losh IN OUT UINTN *SizeOfBuffer, 20660d1ba665SWarner Losh IN CONST VOID *Buffer 20670d1ba665SWarner Losh ); 20680d1ba665SWarner Losh 20690d1ba665SWarner Losh /** 20700d1ba665SWarner Losh Sets a value of a patchable PCD entry that is type pointer. 20710d1ba665SWarner Losh 20720d1ba665SWarner Losh Sets the PCD entry specified by PatchVariable to the value specified 20730d1ba665SWarner Losh by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize, 20740d1ba665SWarner Losh then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER 20750d1ba665SWarner Losh to indicate that the set operation was not actually performed. 20760d1ba665SWarner Losh If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 20770d1ba665SWarner Losh MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned. 20780d1ba665SWarner Losh 20790d1ba665SWarner Losh If PatchVariable is NULL, then ASSERT(). 20800d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 20810d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 20820d1ba665SWarner Losh 20830d1ba665SWarner Losh @param[out] PatchVariable A pointer to the global variable in a module that is 20840d1ba665SWarner Losh the target of the set operation. 20850d1ba665SWarner Losh @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. 20860d1ba665SWarner Losh @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. 20870d1ba665SWarner Losh @param[in] Buffer A pointer to the buffer to used to set the target variable. 20880d1ba665SWarner Losh 20890d1ba665SWarner Losh @return The status of the set operation. 20900d1ba665SWarner Losh 20910d1ba665SWarner Losh **/ 20920d1ba665SWarner Losh RETURN_STATUS 20930d1ba665SWarner Losh EFIAPI 20940d1ba665SWarner Losh LibPatchPcdSetPtrS ( 20950d1ba665SWarner Losh OUT VOID *PatchVariable, 20960d1ba665SWarner Losh IN UINTN MaximumDatumSize, 20970d1ba665SWarner Losh IN OUT UINTN *SizeOfBuffer, 20980d1ba665SWarner Losh IN CONST VOID *Buffer 20990d1ba665SWarner Losh ); 21000d1ba665SWarner Losh 21010d1ba665SWarner Losh /** 21020d1ba665SWarner Losh Sets a value and size of a patchable PCD entry that is type pointer. 21030d1ba665SWarner Losh 21040d1ba665SWarner Losh Sets the PCD entry specified by PatchVariable to the value specified by Buffer 21050d1ba665SWarner Losh and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than 21060d1ba665SWarner Losh MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return 21070d1ba665SWarner Losh NULL to indicate that the set operation was not actually performed. 21080d1ba665SWarner Losh If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 21090d1ba665SWarner Losh MaximumDatumSize and NULL must be returned. 21100d1ba665SWarner Losh 21110d1ba665SWarner Losh If PatchVariable is NULL, then ASSERT(). 21120d1ba665SWarner Losh If SizeOfPatchVariable is NULL, then ASSERT(). 21130d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 21140d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 21150d1ba665SWarner Losh 21160d1ba665SWarner Losh @param[out] PatchVariable A pointer to the global variable in a module that is 21170d1ba665SWarner Losh the target of the set operation. 21180d1ba665SWarner Losh @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable. 21190d1ba665SWarner Losh @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. 21200d1ba665SWarner Losh @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. 21210d1ba665SWarner Losh @param[in] Buffer A pointer to the buffer to used to set the target variable. 21220d1ba665SWarner Losh 21230d1ba665SWarner Losh @return Return the pointer to the Buffer that was set. 21240d1ba665SWarner Losh 21250d1ba665SWarner Losh **/ 21260d1ba665SWarner Losh VOID * 21270d1ba665SWarner Losh EFIAPI 21280d1ba665SWarner Losh LibPatchPcdSetPtrAndSize ( 21290d1ba665SWarner Losh OUT VOID *PatchVariable, 21300d1ba665SWarner Losh OUT UINTN *SizeOfPatchVariable, 21310d1ba665SWarner Losh IN UINTN MaximumDatumSize, 21320d1ba665SWarner Losh IN OUT UINTN *SizeOfBuffer, 21330d1ba665SWarner Losh IN CONST VOID *Buffer 21340d1ba665SWarner Losh ); 21350d1ba665SWarner Losh 21360d1ba665SWarner Losh /** 21370d1ba665SWarner Losh Sets a value and size of a patchable PCD entry that is type pointer. 21380d1ba665SWarner Losh 21390d1ba665SWarner Losh Sets the PCD entry specified by PatchVariable to the value specified 21400d1ba665SWarner Losh by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize, 21410d1ba665SWarner Losh then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER 21420d1ba665SWarner Losh to indicate that the set operation was not actually performed. 21430d1ba665SWarner Losh If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 21440d1ba665SWarner Losh MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned. 21450d1ba665SWarner Losh 21460d1ba665SWarner Losh If PatchVariable is NULL, then ASSERT(). 21470d1ba665SWarner Losh If SizeOfPatchVariable is NULL, then ASSERT(). 21480d1ba665SWarner Losh If SizeOfBuffer is NULL, then ASSERT(). 21490d1ba665SWarner Losh If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 21500d1ba665SWarner Losh 21510d1ba665SWarner Losh @param[out] PatchVariable A pointer to the global variable in a module that is 21520d1ba665SWarner Losh the target of the set operation. 21530d1ba665SWarner Losh @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable. 21540d1ba665SWarner Losh @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. 21550d1ba665SWarner Losh @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. 21560d1ba665SWarner Losh @param[in] Buffer A pointer to the buffer to used to set the target variable. 21570d1ba665SWarner Losh 21580d1ba665SWarner Losh @return The status of the set operation. 21590d1ba665SWarner Losh 21600d1ba665SWarner Losh **/ 21610d1ba665SWarner Losh RETURN_STATUS 21620d1ba665SWarner Losh EFIAPI 21630d1ba665SWarner Losh LibPatchPcdSetPtrAndSizeS ( 21640d1ba665SWarner Losh OUT VOID *PatchVariable, 21650d1ba665SWarner Losh OUT UINTN *SizeOfPatchVariable, 21660d1ba665SWarner Losh IN UINTN MaximumDatumSize, 21670d1ba665SWarner Losh IN OUT UINTN *SizeOfBuffer, 21680d1ba665SWarner Losh IN CONST VOID *Buffer 21690d1ba665SWarner Losh ); 21700d1ba665SWarner Losh 21710d1ba665SWarner Losh typedef enum { 21720d1ba665SWarner Losh PCD_TYPE_8, 21730d1ba665SWarner Losh PCD_TYPE_16, 21740d1ba665SWarner Losh PCD_TYPE_32, 21750d1ba665SWarner Losh PCD_TYPE_64, 21760d1ba665SWarner Losh PCD_TYPE_BOOL, 21770d1ba665SWarner Losh PCD_TYPE_PTR 21780d1ba665SWarner Losh } PCD_TYPE; 21790d1ba665SWarner Losh 21800d1ba665SWarner Losh typedef struct { 21810d1ba665SWarner Losh /// 21820d1ba665SWarner Losh /// The returned information associated with the requested TokenNumber. If 21830d1ba665SWarner Losh /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8. 21840d1ba665SWarner Losh /// 21850d1ba665SWarner Losh PCD_TYPE PcdType; 21860d1ba665SWarner Losh /// 21870d1ba665SWarner Losh /// The size of the data in bytes associated with the TokenNumber specified. If 21880d1ba665SWarner Losh /// TokenNumber is 0, then PcdSize is set 0. 21890d1ba665SWarner Losh /// 21900d1ba665SWarner Losh UINTN PcdSize; 21910d1ba665SWarner Losh /// 21920d1ba665SWarner Losh /// The null-terminated ASCII string associated with a given token. If the 21930d1ba665SWarner Losh /// TokenNumber specified was 0, then this field corresponds to the null-terminated 21940d1ba665SWarner Losh /// ASCII string associated with the token's namespace Guid. If NULL, there is no 21950d1ba665SWarner Losh /// name associated with this request. 21960d1ba665SWarner Losh /// 21970d1ba665SWarner Losh CHAR8 *PcdName; 21980d1ba665SWarner Losh } PCD_INFO; 21990d1ba665SWarner Losh 22000d1ba665SWarner Losh 22010d1ba665SWarner Losh /** 22020d1ba665SWarner Losh Retrieve additional information associated with a PCD token. 22030d1ba665SWarner Losh 22040d1ba665SWarner Losh This includes information such as the type of value the TokenNumber is associated with as well as possible 22050d1ba665SWarner Losh human readable name that is associated with the token. 22060d1ba665SWarner Losh 22070d1ba665SWarner Losh If TokenNumber is not in the default token space specified, then ASSERT(). 22080d1ba665SWarner Losh 22090d1ba665SWarner Losh @param[in] TokenNumber The PCD token number. 22100d1ba665SWarner Losh @param[out] PcdInfo The returned information associated with the requested TokenNumber. 22110d1ba665SWarner Losh The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. 22120d1ba665SWarner Losh **/ 22130d1ba665SWarner Losh VOID 22140d1ba665SWarner Losh EFIAPI 22150d1ba665SWarner Losh LibPcdGetInfo ( 22160d1ba665SWarner Losh IN UINTN TokenNumber, 22170d1ba665SWarner Losh OUT PCD_INFO *PcdInfo 22180d1ba665SWarner Losh ); 22190d1ba665SWarner Losh 22200d1ba665SWarner Losh /** 22210d1ba665SWarner Losh Retrieve additional information associated with a PCD token. 22220d1ba665SWarner Losh 22230d1ba665SWarner Losh This includes information such as the type of value the TokenNumber is associated with as well as possible 22240d1ba665SWarner Losh human readable name that is associated with the token. 22250d1ba665SWarner Losh 22260d1ba665SWarner Losh If TokenNumber is not in the token space specified by Guid, then ASSERT(). 22270d1ba665SWarner Losh 22280d1ba665SWarner Losh @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. 22290d1ba665SWarner Losh @param[in] TokenNumber The PCD token number. 22300d1ba665SWarner Losh @param[out] PcdInfo The returned information associated with the requested TokenNumber. 22310d1ba665SWarner Losh The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. 22320d1ba665SWarner Losh **/ 22330d1ba665SWarner Losh VOID 22340d1ba665SWarner Losh EFIAPI 22350d1ba665SWarner Losh LibPcdGetInfoEx ( 22360d1ba665SWarner Losh IN CONST GUID *Guid, 22370d1ba665SWarner Losh IN UINTN TokenNumber, 22380d1ba665SWarner Losh OUT PCD_INFO *PcdInfo 22390d1ba665SWarner Losh ); 22400d1ba665SWarner Losh 22410d1ba665SWarner Losh /** 22420d1ba665SWarner Losh Retrieve the currently set SKU Id. 22430d1ba665SWarner Losh 22440d1ba665SWarner Losh @return The currently set SKU Id. If the platform has not set at a SKU Id, then the 22450d1ba665SWarner Losh default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU 22460d1ba665SWarner Losh Id is returned. 22470d1ba665SWarner Losh **/ 22480d1ba665SWarner Losh UINTN 22490d1ba665SWarner Losh EFIAPI 22500d1ba665SWarner Losh LibPcdGetSku ( 22510d1ba665SWarner Losh VOID 22520d1ba665SWarner Losh ); 22530d1ba665SWarner Losh 22540d1ba665SWarner Losh #endif 2255