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