summaryrefslogtreecommitdiff
path: root/Tools/Conf
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-06 06:10:20 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-06 06:10:20 +0000
commit1de04b4f83050f9a8f6c3eedce27f841591972f3 (patch)
treea0366962d8f231b1ab187246bb0c2916666270c5 /Tools/Conf
parent71baa24b6912dffc15058abc683eb6161a88a62f (diff)
downloadedk2-platforms-1de04b4f83050f9a8f6c3eedce27f841591972f3.tar.xz
Add in support for MaxSize and CurrentSize for PCD entry.
Change the behavior for PcdSET for Variable_Enabled Pcd entry. If a Variable does not exist, we will only save the value to a volatile space. We save it to variable ONLY when the variable exist. Fix a few bugs in Pcd Build tool when generated Pcd database for Pcd entry with Unicode String type. Support PcdSet to return MaxSize if the input SizeOfBuffer is greater than the Max Size declared in FPD file. Add SetValueWorker and GetValueWoker for each PcdSET and PcdGET function to reduce code size. Sync function prototype definition for PCD_PPI_SET_POINTER, PCD_PPI_SET_EX_POINTER, PCD_PROTOCOL_SET_POINTER and PCD_PROTOCOL_SET_EX_POINTER with PCD arch spec 0.52. Add ASSERTION in LibPcdSetPtr. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@789 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Conf')
-rw-r--r--Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample35
1 files changed, 23 insertions, 12 deletions
diff --git a/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample b/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample
index 7bdb28293c..7df1a5a6f4 100644
--- a/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample
+++ b/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample
@@ -7,17 +7,32 @@
//
typedef UINT8 SKU_ID;
-#define PCD_TYPE_SHIFT 24
+#define PCD_TYPE_SHIFT 28
+#define PCD_TYPE_DATA (0x0 << PCD_TYPE_SHIFT)
+#define PCD_TYPE_HII (0x8 << PCD_TYPE_SHIFT)
+#define PCD_TYPE_VPD (0x4 << PCD_TYPE_SHIFT)
+#define PCD_TYPE_SKU_ENABLED (0x2 << PCD_TYPE_SHIFT)
+#define PCD_TYPE_STRING (0x1 << PCD_TYPE_SHIFT)
-#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_TYPE_ALL_SET (PCD_TYPE_DATA | PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_SKU_ENABLED | PCD_TYPE_STRING)
+#define PCD_DATUM_TYPE_SHIFT 24
-#define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_SKU_ENABLED | PCD_TYPE_STRING))
+#define PCD_DATUM_TYPE_POINTER (0x0 << PCD_DATUM_TYPE_SHIFT)
+#define PCD_DATUM_TYPE_UINT8 (0x1 << PCD_DATUM_TYPE_SHIFT)
+#define PCD_DATUM_TYPE_UINT16 (0x2 << PCD_DATUM_TYPE_SHIFT)
+#define PCD_DATUM_TYPE_UINT32 (0x4 << PCD_DATUM_TYPE_SHIFT)
+#define PCD_DATUM_TYPE_UINT64 (0x8 << PCD_DATUM_TYPE_SHIFT)
+
+#define PCD_DATUM_TYPE_ALL_SET (PCD_DATUM_TYPE_POINTER | \
+ PCD_DATUM_TYPE_UINT8 | \
+ PCD_DATUM_TYPE_UINT16 | \
+ PCD_DATUM_TYPE_UINT32 | \
+ PCD_DATUM_TYPE_UINT64)
+
+
+#define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_ALL_SET | PCD_DATUM_TYPE_ALL_SET))
typedef struct {
UINT32 ExTokenNumber;
@@ -46,11 +61,7 @@ typedef struct {
typedef UINT16 STRING_HEAD;
-typedef struct {
- UINT32 LocalTokenNumber;
- UINT16 TokenNumber;
- UINT16 Size;
-} SIZEINFO;
+typedef UINT16 SIZE_INFO;
#define offsetof(s,m) (UINT32) (UINTN) &(((s *)0)->m)