diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-05-24 08:11:21 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-05-24 08:11:21 +0000 |
commit | 8b29c893b161ca55f2a81d32b52b1f3309968f30 (patch) | |
tree | 795ca309a45da98db1df24fafdeea50c177ee05b /Tools/Conf | |
parent | 99d2c3c41e39698e527dfdf4d8d5323af20db745 (diff) | |
download | edk2-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')
-rw-r--r-- | Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample | 53 | ||||
-rw-r--r-- | Tools/Conf/Pcd/PcdDatabaseDxeDefinitions.sample | 16 | ||||
-rw-r--r-- | Tools/Conf/Pcd/PcdDatabasePeiDefinitions.sample | 8 |
3 files changed, 77 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)
+
+
+
diff --git a/Tools/Conf/Pcd/PcdDatabaseDxeDefinitions.sample b/Tools/Conf/Pcd/PcdDatabaseDxeDefinitions.sample new file mode 100644 index 0000000000..be2bc0e1e4 --- /dev/null +++ b/Tools/Conf/Pcd/PcdDatabaseDxeDefinitions.sample @@ -0,0 +1,16 @@ +
+typedef struct {
+ DXE_PCD_DATABASE_INIT Init;
+ DXE_PCD_DATABASE_UNINIT Uninit;
+} DXE_PCD_DATABASE;
+
+
+typedef struct {
+ PEI_PCD_DATABASE PeiDb;
+ DXE_PCD_DATABASE DxeDb;
+} PCD_DATABASE;
+
+#define DXE_NEX_TOKEN_NUMBER (DXE_LOCAL_TOKEN_NUMBER - DXE_EX_TOKEN_NUMBER)
+
+#define PCD_TOTAL_TOKEN_NUMBER (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER)
+
diff --git a/Tools/Conf/Pcd/PcdDatabasePeiDefinitions.sample b/Tools/Conf/Pcd/PcdDatabasePeiDefinitions.sample new file mode 100644 index 0000000000..86ae4fca7e --- /dev/null +++ b/Tools/Conf/Pcd/PcdDatabasePeiDefinitions.sample @@ -0,0 +1,8 @@ +
+typedef struct {
+ PEI_PCD_DATABASE_INIT Init;
+ PEI_PCD_DATABASE_UNINIT Uninit;
+} PEI_PCD_DATABASE;
+
+#define PEI_NEX_TOKEN_NUMBER (PEI_LOCAL_TOKEN_NUMBER - PEI_EX_TOKEN_NUMBER)
+
|