map FeaturePcdGet(TokenName) to _PCD_GET_MODE_BOOL_##TokenName to follow the build...
[mirror_edk2.git] / Tools / Conf / Pcd / PcdDatabaseCommonDefinitions.sample
CommitLineData
8b29c893 1//\r
2// The following definition will be generated by build tool \r
3//\r
4\r
5//\r
6// Common definitions\r
7//\r
8a43e8dd 8typedef UINT8 SKU_ID;\r
9\r
1de04b4f 10#define PCD_TYPE_SHIFT 28\r
8b29c893 11\r
1de04b4f 12#define PCD_TYPE_DATA (0x0 << PCD_TYPE_SHIFT)\r
13#define PCD_TYPE_HII (0x8 << PCD_TYPE_SHIFT)\r
14#define PCD_TYPE_VPD (0x4 << PCD_TYPE_SHIFT)\r
15#define PCD_TYPE_SKU_ENABLED (0x2 << PCD_TYPE_SHIFT)\r
16#define PCD_TYPE_STRING (0x1 << PCD_TYPE_SHIFT)\r
8b29c893 17\r
1de04b4f 18#define PCD_TYPE_ALL_SET (PCD_TYPE_DATA | PCD_TYPE_HII | PCD_TYPE_VPD | PCD_TYPE_SKU_ENABLED | PCD_TYPE_STRING)\r
8b29c893 19\r
1de04b4f 20#define PCD_DATUM_TYPE_SHIFT 24\r
8b29c893 21\r
1de04b4f 22#define PCD_DATUM_TYPE_POINTER (0x0 << PCD_DATUM_TYPE_SHIFT)\r
23#define PCD_DATUM_TYPE_UINT8 (0x1 << PCD_DATUM_TYPE_SHIFT)\r
24#define PCD_DATUM_TYPE_UINT16 (0x2 << PCD_DATUM_TYPE_SHIFT)\r
25#define PCD_DATUM_TYPE_UINT32 (0x4 << PCD_DATUM_TYPE_SHIFT)\r
26#define PCD_DATUM_TYPE_UINT64 (0x8 << PCD_DATUM_TYPE_SHIFT)\r
27\r
28#define PCD_DATUM_TYPE_ALL_SET (PCD_DATUM_TYPE_POINTER | \\r
29 PCD_DATUM_TYPE_UINT8 | \\r
30 PCD_DATUM_TYPE_UINT16 | \\r
31 PCD_DATUM_TYPE_UINT32 | \\r
32 PCD_DATUM_TYPE_UINT64)\r
33\r
34\r
35#define PCD_DATABASE_OFFSET_MASK (~(PCD_TYPE_ALL_SET | PCD_DATUM_TYPE_ALL_SET))\r
8b29c893 36\r
37typedef struct {\r
38 UINT32 ExTokenNumber;\r
bb5545b6 39 UINT16 LocalTokenNumber; // PCD Number of this particular platform build\r
8b29c893 40 UINT16 ExGuidIndex; // Index of GuidTable\r
41} DYNAMICEX_MAPPING;\r
42\r
43\r
44typedef struct {\r
45 UINT32 SkuDataStartOffset; //We have to use offsetof MACRO as we don't know padding done by compiler\r
46 UINT32 SkuIdTableOffset; //Offset from the PCD_DB\r
47} SKU_HEAD;\r
48\r
49\r
50typedef struct {\r
58f1099f 51 UINT16 GuidTableIndex; // Offset in Guid Table in units of GUID.\r
52 UINT16 StringIndex; // Offset in String Table in units of UINT16.\r
53 UINT16 Offset; // Offset in Variable\r
54 UINT16 DefaultValueOffset; // Offset of the Default Value\r
8b29c893 55} VARIABLE_HEAD ;\r
56\r
57\r
58typedef struct {\r
59 UINT32 Offset;\r
60} VPD_HEAD;\r
61\r
58f1099f 62typedef UINT16 STRING_HEAD;\r
63\r
1de04b4f 64typedef UINT16 SIZE_INFO;\r
8b29c893 65\r
eaa6aeba 66#define offsetof(s,m) (UINT32) (UINTN) &(((s *)0)->m)\r
8b29c893 67\r
68\r
69\r