X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FInclude%2FGuid%2FPcdDataBaseSignatureGuid.h;h=d670af14e909c3859a58a223f5db80c50e7e73d2;hp=22c0d95f606a9b09eee028cc3642af310bb9e15a;hb=7c73626513238176bdd16dca14fcf3f9e10bcc81;hpb=419db80bef66edff583a0a5f406e801d70f11344
diff --git a/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h b/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
index 22c0d95f60..d670af14e9 100644
--- a/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
+++ b/MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h
@@ -1,13 +1,13 @@
/** @file
Guid for Pcd DataBase Signature.
-Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
+Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
+http://opensource.org/licenses/bsd-license.php.
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -23,7 +23,7 @@ extern EFI_GUID gPcdDataBaseSignatureGuid;
//
// Common definitions
//
-typedef UINT8 SKU_ID;
+typedef UINT64 SKU_ID;
#define PCD_TYPE_SHIFT 28
@@ -61,16 +61,14 @@ typedef struct {
UINT16 ExGuidIndex; // Index of GuidTable in units of GUID.
} DYNAMICEX_MAPPING;
-typedef struct {
- UINT32 SkuDataStartOffset; // Offset(with TYPE info) from the PCD_DB.
- UINT32 SkuIdTableOffset; // Offset from the PCD_DB.
-} SKU_HEAD;
-
typedef struct {
UINT32 StringIndex; // Offset in String Table in units of UINT8.
UINT32 DefaultValueOffset; // Offset of the Default Value.
UINT16 GuidTableIndex; // Offset in Guid Table in units of GUID.
UINT16 Offset; // Offset in Variable.
+ UINT32 Attributes; // Variable attributes.
+ UINT16 Property; // Variable property.
+ UINT16 Reserved;
} VARIABLE_HEAD;
typedef struct {
@@ -91,7 +89,9 @@ typedef UINT32 TABLE_OFFSET;
typedef struct {
GUID Signature; // PcdDataBaseGuid.
UINT32 BuildVersion;
- UINT32 Length;
+ UINT32 Length; // Length of DEFAULT SKU PCD DB
+ SKU_ID SystemSkuId; // Current SkuId value.
+ UINT32 LengthForAllSkus; // Length of all SKU PCD DB
UINT32 UninitDataBaseSize; // Total size for PCD those default value with 0.
TABLE_OFFSET LocalTokenNumberTableOffset;
TABLE_OFFSET ExMapTableOffset;
@@ -103,31 +103,28 @@ typedef struct {
UINT16 LocalTokenCount; // LOCAL_TOKEN_NUMBER for all.
UINT16 ExTokenCount; // EX_TOKEN_NUMBER for DynamicEx.
UINT16 GuidTableCount; // The Number of Guid in GuidTable.
- SKU_ID SystemSkuId; // Current SkuId value.
- UINT8 Pad; // Pad bytes to satisfy the alignment.
+ UINT8 Pad[6]; // Pad bytes to satisfy the alignment.
//
// Default initialized external PCD database binary structure
//
// Padding is needed to keep necessary alignment
//
+ //SKU_ID SkuIdTable[]; // SkuIds system supports.
//UINT64 ValueUint64[];
//UINT32 ValueUint32[];
//VPD_HEAD VpdHead[]; // VPD Offset
//DYNAMICEX_MAPPING ExMapTable[]; // DynamicEx PCD mapped to LocalIndex in LocalTokenNumberTable. It can be accessed by the ExMapTableOffset.
//UINT32 LocalTokenNumberTable[]; // Offset | DataType | PCD Type. It can be accessed by LocalTokenNumberTableOffset.
//GUID GuidTable[]; // GUID for DynamicEx and HII PCD variable Guid. It can be accessed by the GuidTableOffset.
- //STRING_HEAD StringHead[]; // String PCD
+ //STRING_HEAD StringHead[]; // String PCD
//PCD_NAME_INDEX PcdNameTable[]; // PCD name index info. It can be accessed by the PcdNameTableOffset.
//VARIABLE_HEAD VariableHead[]; // HII PCD
- //SKU_HEAD SkuHead[]; // Store SKU info for each PCD with SKU enable.
- //UINT8 StringTable[]; // String for String PCD value and HII PCD Variable Name. It can be accessed by StringTableOffset.
+ //UINT8 StringTable[]; // String for String PCD value and HII PCD Variable Name. It can be accessed by StringTableOffset.
//SIZE_INFO SizeTable[]; // MaxSize and CurSize for String PCD. It can be accessed by SizeTableOffset.
//UINT16 ValueUint16[];
//UINT8 ValueUint8[];
//BOOLEAN ValueBoolean[];
- //UINT8 SkuIdTable[]; // SkuIds system supports.
- //UINT8 SkuIndexTable[]; // SkuIds for each PCD with SKU enable.
} PCD_DATABASE_INIT;
@@ -143,5 +140,96 @@ 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) |
+// +-------------------------------------+
+// | ...... |
+// +-------------------------------------+
+//
+
+#pragma pack(1)
+typedef struct {
+ SKU_ID SkuId;
+ SKU_ID SkuIdCompared;
+ UINT32 Length;
+ // PCD_DATA_DELTA DeltaData[]
+} PCD_DATABASE_SKU_DELTA;
+
+//
+// PCD database layout:
+// +---------------------------------+
+// | PCD_DATABASE_INIT (DEFAULT SKU) |
+// +---------------------------------+
+// | PCD_DATABASE_SKU_DELTA (SKU A) |
+// +---------------------------------+
+// | PCD_DATABASE_SKU_DELTA (SKU B) |
+// +---------------------------------+
+// | ...... |
+// +---------------------------------+
+//
+#pragma pack()
#endif