mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Enable Firmware to retrieve the default setting
https://bugzilla.tianocore.org/show_bug.cgi?id=611 Add two PCDs and new PCD DB format definition Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
a37044efba
commit
fef4cfa7ca
|
@ -146,5 +146,74 @@ typedef struct {
|
|||
DXE_PCD_DATABASE *DxeDb;
|
||||
} PCD_DATABASE;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Offset:24;
|
||||
UINT32 Value:8;
|
||||
} PCD_DATA_DELTA;
|
||||
|
||||
typedef struct {
|
||||
SKU_ID SkuId;
|
||||
UINT16 DefaultId;
|
||||
UINT8 Reserved[6];
|
||||
} PCD_DEFAULT_INFO;
|
||||
|
||||
typedef struct {
|
||||
//
|
||||
// Full size, it must be at 8 byte alignment.
|
||||
//
|
||||
UINT32 DataSize;
|
||||
//
|
||||
// HeaderSize includes HeaderSize fields and DefaultInfo arrays
|
||||
//
|
||||
UINT32 HeaderSize;
|
||||
//
|
||||
// DefaultInfo arrays those have the same default setting.
|
||||
//
|
||||
PCD_DEFAULT_INFO DefaultInfo[1];
|
||||
//
|
||||
// Default data is stored as variable storage or the array of DATA_DELTA.
|
||||
//
|
||||
} PCD_DEFAULT_DATA;
|
||||
|
||||
#define PCD_NV_STORE_DEFAULT_BUFFER_SIGNATURE SIGNATURE_32('N', 'S', 'D', 'B')
|
||||
|
||||
typedef struct {
|
||||
//
|
||||
// PCD_NV_STORE_DEFAULT_BUFFER_SIGNATURE
|
||||
//
|
||||
UINT32 Signature;
|
||||
//
|
||||
// Length of the taken default buffer
|
||||
//
|
||||
UINT32 Length;
|
||||
//
|
||||
// Length of the total reserved buffer
|
||||
//
|
||||
UINT32 MaxLength;
|
||||
//
|
||||
// Reserved for 8 byte alignment
|
||||
//
|
||||
UINT32 Reserved;
|
||||
// one or more PCD_DEFAULT_DATA
|
||||
} PCD_NV_STORE_DEFAULT_BUFFER_HEADER;
|
||||
|
||||
//
|
||||
// NvStoreDefaultValueBuffer layout:
|
||||
// +-------------------------------------+
|
||||
// | PCD_NV_STORE_DEFAULT_BUFFER_HEADER |
|
||||
// +-------------------------------------+
|
||||
// | PCD_DEFAULT_DATA (DEFAULT, Standard)|
|
||||
// +-------------------------------------+
|
||||
// | PCD_DATA_DELTA (DEFAULT, Standard)|
|
||||
// +-------------------------------------+
|
||||
// | ...... |
|
||||
// +-------------------------------------+
|
||||
// | PCD_DEFAULT_DATA (SKU A, Standard) |
|
||||
// +-------------------------------------+
|
||||
// | PCD_DATA_DELTA (SKU A, Standard) |
|
||||
// +-------------------------------------+
|
||||
// | ...... |
|
||||
// +-------------------------------------+
|
||||
//
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1907,5 +1907,16 @@
|
|||
# @Prompt If there is any test key used by the platform.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003
|
||||
|
||||
[PcdsDynamicEx]
|
||||
## This dynamic PCD enables the default variable setting.
|
||||
# Its value is the default store ID value. The default value is zero as Standard default.
|
||||
# When its value is set in PEI, it will trig the default setting to be applied as the default EFI variable.
|
||||
# @Prompt NV Storage DefaultId
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNvStoreDefaultId|0x0|UINT16|0x00030004
|
||||
|
||||
## This dynamic PCD holds the DynamicHii PCD value. Its value is the auto generated.
|
||||
# @Prompt NV Storage Default Value Buffer
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdNvStoreDefaultValueBuffer|{0x0}|VOID*|0x00030005
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
MdeModulePkgExtra.uni
|
||||
|
|
|
@ -1215,3 +1215,12 @@
|
|||
" TRUE - UEFI Stack Guard will be enabled.<BR>\n"
|
||||
" FALSE - UEFI Stack Guard will be disabled.<BR>"
|
||||
|
||||
#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSetNvStoreDefaultId_PROMPT #language en-US "NV Storage DefaultId"
|
||||
|
||||
#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSetNvStoreDefaultId_HELP #language en-US "This dynamic PCD enables the default variable setting.\n"
|
||||
" Its value is the default store ID value. The default value is zero as Standard default.\n"
|
||||
" When its value is set in PEI, it will trig the default setting to be applied as the default EFI variable.\n"
|
||||
|
||||
#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdNvStoreDefaultValueBuffer_PROMPT #language en-US "NV Storage Default Value Buffer"
|
||||
|
||||
#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdNvStoreDefaultValueBuffer_HELP #language en-US "This dynamic PCD holds the DynamicHii PCD value. Its value is the auto generated.\n"
|
||||
|
|
Loading…
Reference in New Issue