TianoCore EDK2 master
Loading...
Searching...
No Matches
TableGenerator.h File Reference

Go to the source code of this file.

Macros

#define TABLE_ID_MASK   0xFF
 
#define TABLE_NAMESPACEID_MASK   (BIT31)
 
#define TABLE_TYPE_MASK   (BIT29 | BIT28)
 
#define TABLE_TYPE_BIT_SHIFT   28
 
#define TABLE_NAMESPACE_ID_BIT_SHIFT   31
 
#define GET_TABLE_ID(TableGeneratorId)    ((TableGeneratorId) & TABLE_ID_MASK)
 
#define GET_TABLE_TYPE(TableGeneratorId)    (((TableGeneratorId) & TABLE_TYPE_MASK) >> TABLE_TYPE_BIT_SHIFT)
 
#define GET_TABLE_NAMESPACEID(TableGeneratorId)
 
#define IS_GENERATOR_NAMESPACE_STD(TableGeneratorId)
 
#define CREATE_TABLE_GEN_ID(TableType, TableNameSpaceId, TableId)
 
#define MAJOR_REVISION_BIT_SHIFT   16
 
#define MAJOR_REVISION_MASK   0xFFFF
 
#define MINOR_REVISION_MASK   0xFFFF
 
#define CREATE_REVISION(Major, Minor)
 
#define GET_MAJOR_REVISION(Revision)    (((Revision) >> MAJOR_REVISION_BIT_SHIFT) & MAJOR_REVISION_MASK)
 
#define GET_MINOR_REVISION(Revision)   ((Revision) & MINOR_REVISION_MASK)
 

Typedefs

typedef UINT32 TABLE_GENERATOR_ID
 
typedef enum TableGeneratorType ETABLE_GENERATOR_TYPE
 
typedef enum TableGeneratorNameSpace ETABLE_GENERATOR_NAMESPACE
 

Enumerations

enum  TableGeneratorType { ETableGeneratorTypeAcpi = 0 , ETableGeneratorTypeSmbios , ETableGeneratorTypeDt , ETableGeneratorTypeReserved }
 
enum  TableGeneratorNameSpace { ETableGeneratorNameSpaceStd = 0 , ETableGeneratorNameSpaceOem }
 

Detailed Description

Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Glossary:
  • ACPI - Advanced Configuration and Power Interface
  • SMBIOS - System Management BIOS
  • DT - Device Tree

Definition in file TableGenerator.h.

Macro Definition Documentation

◆ CREATE_REVISION

#define CREATE_REVISION (   Major,
  Minor 
)
Value:
((Minor) & MINOR_REVISION_MASK))
#define MAJOR_REVISION_MASK
#define MINOR_REVISION_MASK
#define MAJOR_REVISION_BIT_SHIFT

This macro generates a Major.Minor version where the Major and Minor fields are 16 bit.

Parameters
[in]MajorThe Major revision.
[in]MinorThe Minor revision.
Returns
a 32 bit representation of the type Major.Minor.

Definition at line 221 of file TableGenerator.h.

◆ CREATE_TABLE_GEN_ID

#define CREATE_TABLE_GEN_ID (   TableType,
  TableNameSpaceId,
  TableId 
)
Value:
((((TableType) << TABLE_TYPE_BIT_SHIFT) & TABLE_TYPE_MASK) | \
(((TableNameSpaceId) << TABLE_NAMESPACE_ID_BIT_SHIFT) & \
#define TABLE_NAMESPACE_ID_BIT_SHIFT
#define TABLE_TYPE_BIT_SHIFT
#define TABLE_NAMESPACEID_MASK
#define TABLE_ID_MASK
#define TABLE_TYPE_MASK

This macro creates a TableGeneratorId

Parameters
[in]TableTypeThe table type.
[in]TableNameSpaceIdThe namespace ID for the table.
[in]TableIdThe table ID.
Returns
a TableGeneratorId calculated from the inputs.

Definition at line 196 of file TableGenerator.h.

◆ GET_MAJOR_REVISION

#define GET_MAJOR_REVISION (   Revision)     (((Revision) >> MAJOR_REVISION_BIT_SHIFT) & MAJOR_REVISION_MASK)

This macro returns the Major revision

Extracts Major from the 32 bit representation of the type Major.Minor

Parameters
[in]RevisionThe Revision value which is 32 bit.
Returns
the Major part of the revision.

Definition at line 233 of file TableGenerator.h.

◆ GET_MINOR_REVISION

#define GET_MINOR_REVISION (   Revision)    ((Revision) & MINOR_REVISION_MASK)

This macro returns the Minor revision

Extracts Minor from the 32 bit representation of the type Major.Minor

Parameters
[in]RevisionThe Revision value which is 32 bit.
Returns
the Minor part of the revision.

Definition at line 244 of file TableGenerator.h.

◆ GET_TABLE_ID

#define GET_TABLE_ID (   TableGeneratorId)     ((TableGeneratorId) & TABLE_ID_MASK)

This macro returns the Table ID from the TableGeneratorId.

Parameters
[in]TableGeneratorIdThe table generator ID.
Returns
the Table ID described by the TableGeneratorId.

Definition at line 154 of file TableGenerator.h.

◆ GET_TABLE_NAMESPACEID

#define GET_TABLE_NAMESPACEID (   TableGeneratorId)
Value:

This macro returns the Namespace ID from the TableGeneratorId.

Parameters
[in]TableGeneratorIdThe table generator ID.
Returns
the Namespace described by the TableGeneratorId.

Definition at line 172 of file TableGenerator.h.

◆ GET_TABLE_TYPE

#define GET_TABLE_TYPE (   TableGeneratorId)     (((TableGeneratorId) & TABLE_TYPE_MASK) >> TABLE_TYPE_BIT_SHIFT)

This macro returns the Table type from the TableGeneratorId.

Parameters
[in]TableGeneratorIdThe table generator ID.
Returns
the Table type described by the TableGeneratorId.

Definition at line 163 of file TableGenerator.h.

◆ IS_GENERATOR_NAMESPACE_STD

#define IS_GENERATOR_NAMESPACE_STD (   TableGeneratorId)
Value:
( \
GET_TABLE_NAMESPACEID(TableGeneratorId) == \
)
@ ETableGeneratorNameSpaceStd
Standard Namespace.

This macro checks if the TableGeneratorId is in the Standard Namespace.

Parameters
[in]TableGeneratorIdThe table generator ID.
Returns
TRUE if the TableGeneratorId is in the Standard Namespace.

Definition at line 182 of file TableGenerator.h.

◆ MAJOR_REVISION_BIT_SHIFT

#define MAJOR_REVISION_BIT_SHIFT   16

Starting bit position for MAJOR revision

Definition at line 203 of file TableGenerator.h.

◆ MAJOR_REVISION_MASK

#define MAJOR_REVISION_MASK   0xFFFF

A mask for Major revision.

Definition at line 207 of file TableGenerator.h.

◆ MINOR_REVISION_MASK

#define MINOR_REVISION_MASK   0xFFFF

A mask for Minor revision.

Definition at line 211 of file TableGenerator.h.

◆ TABLE_ID_MASK

#define TABLE_ID_MASK   0xFF

A mask for the Table ID bits of TABLE_GENERATOR_ID.

Definition at line 130 of file TableGenerator.h.

◆ TABLE_NAMESPACE_ID_BIT_SHIFT

#define TABLE_NAMESPACE_ID_BIT_SHIFT   31

Starting bit position for the Table Namespace ID bit

Definition at line 146 of file TableGenerator.h.

◆ TABLE_NAMESPACEID_MASK

#define TABLE_NAMESPACEID_MASK   (BIT31)

A mask for the Namespace ID bits of TABLE_GENERATOR_ID.

Definition at line 134 of file TableGenerator.h.

◆ TABLE_TYPE_BIT_SHIFT

#define TABLE_TYPE_BIT_SHIFT   28

Starting bit position for the Table Type bits

Definition at line 142 of file TableGenerator.h.

◆ TABLE_TYPE_MASK

#define TABLE_TYPE_MASK   (BIT29 | BIT28)

A mask for the Table Type bits of TABLE_GENERATOR_ID.

Definition at line 138 of file TableGenerator.h.

Typedef Documentation

◆ ETABLE_GENERATOR_NAMESPACE

This enum lists the namespaces for the Table Generators.

◆ ETABLE_GENERATOR_TYPE

This enum lists the Table Generator Types.

◆ TABLE_GENERATOR_ID

typedef UINT32 TABLE_GENERATOR_ID

The TABLE_GENERATOR_ID type describes the Table Generator ID

Table Generator ID


| 31 | 30 |29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17| 16|

|TNSID| 0 | TT | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0| 0|



|15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0|

| Table ID |


Bit [31] - Table NameSpace ID (TNSID) 0 - Standard 1 - Custom/OEM

Bit [30] - Reserved, Must be Zero

Bit [29:28] - Table Type (TT) 0 - ACPI Table 1 - SMBIOS Table 2 - DT (Device Tree) Table 3 - Reserved (INVALID)

Bit [27:16] - Reserved, Must Be Zero

Bit [15:0] - Table ID

Standard ACPI Table IDs: 0 - Reserved 1 - RAW 2 - FADT 3 - DSDT 4 - SSDT 5 - MADT 6 - GTDT 7 - DBG2 8 - SPCR 9 - MCFG 10 - PPTT

Standard SMBIOS Table IDs: 0 - Reserved 1 - RAW 2 - Table Type00 3 - Table Type01 4 - Table Type02 5 - Table Type03 6 - Table Type04 7 - Table Type05 8 - Table Type06 9 - Table Type07 10 - Table Type08 11 - Table Type09 12 - Table Type10 13 - Table Type11 14 - Table Type12 15 - Table Type13 16 - Table Type14 17 - Table Type15 18 - Table Type16 19 - Table Type17 20 - Table Type18 21 - Table Type19 22 - Table Type20 23 - Table Type21 24 - Table Type22 25 - Table Type23 26 - Table Type24 27 - Table Type25 28 - Table Type26 29 - Table Type27 30 - Table Type28 31 - Table Type29 32 - Table Type30 33 - Table Type31 34 - Table Type32 35 - Table Type33 36 - Table Type34 37 - Table Type35 38 - Table Type36 39 - Table Type37 40 - Table Type38 41 - Table Type39 42 - Table Type40 43 - Table Type41 44 - Table Type42 45-127 - Reserved 128 - Table Type126 129 - Table Type127

Definition at line 110 of file TableGenerator.h.

Enumeration Type Documentation

◆ TableGeneratorNameSpace

This enum lists the namespaces for the Table Generators.

Enumerator
ETableGeneratorNameSpaceStd 

Standard Namespace.

ETableGeneratorNameSpaceOem 

OEM Namespace.

Definition at line 123 of file TableGenerator.h.

◆ TableGeneratorType

This enum lists the Table Generator Types.

Enumerator
ETableGeneratorTypeAcpi 

ACPI Table Generator Type.

ETableGeneratorTypeSmbios 

SMBIOS Table Generator Type.

ETableGeneratorTypeDt 

Device Tree Table Generator Type.

Definition at line 114 of file TableGenerator.h.