summaryrefslogtreecommitdiff
path: root/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2006-05-24 08:11:21 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2006-05-24 08:11:21 +0000
commit8b29c893b161ca55f2a81d32b52b1f3309968f30 (patch)
tree795ca309a45da98db1df24fafdeea50c177ee05b /Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample
parent99d2c3c41e39698e527dfdf4d8d5323af20db745 (diff)
downloadedk2-platforms-8b29c893b161ca55f2a81d32b52b1f3309968f30.tar.xz
Add sample code for PCD Database generation. These 3 files will be read by GenBuild tool and it is generated in the Head and Source file of PCD Service PEIM/Dxe Driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@251 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample')
-rw-r--r--Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample53
1 files changed, 53 insertions, 0 deletions
diff --git a/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample b/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample
new file mode 100644
index 0000000000..9b7d7d319f
--- /dev/null
+++ b/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample
@@ -0,0 +1,53 @@
+//
+// The following definition will be generated by build tool
+//
+
+//
+// Common definitions
+//
+#define PCD_TYPE_SHIFT 24
+
+
+#define PCD_TYPE_DATA (0x00 << PCD_TYPE_SHIFT)
+#define PCD_TYPE_HII (0x80 << PCD_TYPE_SHIFT)
+#define PCD_TYPE_VPD (0x40 << PCD_TYPE_SHIFT)
+#define PCD_TYPE_SKU_ENABLED (0x20 << PCD_TYPE_SHIFT)
+#define PCD_TYPE_STRING (0x10 << PCD_TYPE_SHIFT)
+
+
+#define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_SKU_ENABLED | PCD_TYPE_STRING))
+
+typedef struct {
+ UINT32 ExTokenNumber;
+ UINT32 LocalTokenNumber; // PCD Number of this particular platform build
+ UINT16 ExGuidIndex; // Index of GuidTable
+} DYNAMICEX_MAPPING;
+
+
+typedef struct {
+ UINT32 SkuDataStartOffset; //We have to use offsetof MACRO as we don't know padding done by compiler
+ UINT32 SkuIdTableOffset; //Offset from the PCD_DB
+} SKU_HEAD;
+
+
+typedef struct {
+ UINT16 GuidTableIndex; // Offset in Guid Table in units of GUID.
+ UINT16 StringIndex; // Offset in String Table in units of UINT16.
+ UINT16 Offset; // Offset in Variable
+} VARIABLE_HEAD ;
+
+
+typedef struct {
+ UINT32 Offset;
+} VPD_HEAD;
+
+typedef struct {
+ UINT32 LocalTokenNumber;
+ UINT16 TokenNumber;
+ UINT16 Size;
+} SIZEINFO;
+
+#define offsetof(s,m) (UINT32)&(((s *)0)->m)
+
+
+