summaryrefslogtreecommitdiff
path: root/Tools/Conf/Pcd/PcdDatabaseCommonDefinitions.sample
blob: d441aa0515d9428a2f8e1ddeabae680a5394c4e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
// The following definition will be generated by build tool 
//

//
// Common definitions
//
typedef UINT8 SKU_ID;

#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)