TianoCore EDK2 master
Loading...
Searching...
No Matches
TableGenerator.h
Go to the documentation of this file.
1
13#ifndef TABLE_GENERATOR_H_
14#define TABLE_GENERATOR_H_
15
110typedef UINT32 TABLE_GENERATOR_ID;
111
114typedef enum TableGeneratorType {
118 ETableGeneratorTypeReserved
120
127
130#define TABLE_ID_MASK 0xFF
131
134#define TABLE_NAMESPACEID_MASK (BIT31)
135
138#define TABLE_TYPE_MASK (BIT29 | BIT28)
139
142#define TABLE_TYPE_BIT_SHIFT 28
143
146#define TABLE_NAMESPACE_ID_BIT_SHIFT 31
147
154#define GET_TABLE_ID(TableGeneratorId) \
155 ((TableGeneratorId) & TABLE_ID_MASK)
156
163#define GET_TABLE_TYPE(TableGeneratorId) \
164 (((TableGeneratorId) & TABLE_TYPE_MASK) >> TABLE_TYPE_BIT_SHIFT)
165
172#define GET_TABLE_NAMESPACEID(TableGeneratorId) \
173 (((TableGeneratorId) & TABLE_NAMESPACEID_MASK) >> \
174 TABLE_NAMESPACE_ID_BIT_SHIFT)
175
182#define IS_GENERATOR_NAMESPACE_STD(TableGeneratorId) \
183 ( \
184 GET_TABLE_NAMESPACEID(TableGeneratorId) == \
185 ETableGeneratorNameSpaceStd \
186 )
187
196#define CREATE_TABLE_GEN_ID(TableType, TableNameSpaceId, TableId) \
197 ((((TableType) << TABLE_TYPE_BIT_SHIFT) & TABLE_TYPE_MASK) | \
198 (((TableNameSpaceId) << TABLE_NAMESPACE_ID_BIT_SHIFT) & \
199 TABLE_NAMESPACEID_MASK) | ((TableId) & TABLE_ID_MASK))
200
203#define MAJOR_REVISION_BIT_SHIFT 16
204
207#define MAJOR_REVISION_MASK 0xFFFF
208
211#define MINOR_REVISION_MASK 0xFFFF
212
221#define CREATE_REVISION(Major, Minor) \
222 ((((Major) & MAJOR_REVISION_MASK) << MAJOR_REVISION_BIT_SHIFT) | \
223 ((Minor) & MINOR_REVISION_MASK))
224
233#define GET_MAJOR_REVISION(Revision) \
234 (((Revision) >> MAJOR_REVISION_BIT_SHIFT) & MAJOR_REVISION_MASK)
235
244#define GET_MINOR_REVISION(Revision) ((Revision) & MINOR_REVISION_MASK)
245
246#endif // TABLE_GENERATOR_H_
TableGeneratorNameSpace
@ ETableGeneratorNameSpaceOem
OEM Namespace.
@ ETableGeneratorNameSpaceStd
Standard Namespace.
enum TableGeneratorType ETABLE_GENERATOR_TYPE
enum TableGeneratorNameSpace ETABLE_GENERATOR_NAMESPACE
UINT32 TABLE_GENERATOR_ID
TableGeneratorType
@ ETableGeneratorTypeDt
Device Tree Table Generator Type.
@ ETableGeneratorTypeAcpi
ACPI Table Generator Type.
@ ETableGeneratorTypeSmbios
SMBIOS Table Generator Type.