diff options
author | Liming Gao <liming.gao@intel.com> | 2017-12-22 11:50:49 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2017-12-25 11:05:55 +0800 |
commit | fef4cfa7ca4fceb69e3b9bb280584e6de8eac4b0 (patch) | |
tree | 7ee1380fa14f81dd40e14858919f20754d9a7946 /MdeModulePkg/Include/Guid | |
parent | a37044efba8c6b21c2d919f6ca306fcc69c1f59d (diff) | |
download | edk2-fef4cfa7ca4fceb69e3b9bb280584e6de8eac4b0.tar.gz |
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>
Diffstat (limited to 'MdeModulePkg/Include/Guid')
-rw-r--r-- | MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h b/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h index d2e848800b..9b1cb22bbb 100644 --- a/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h +++ b/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h @@ -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
|