DynamicTablesPkg[all]  1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
DeviceTreeTableGenerator.h File Reference

Data Structures

struct  DtTableGenerator
 

Macros

#define IS_GENERATOR_TYPE_DT(TableGeneratorId)   (GET_TABLE_TYPE(TableGeneratorId) == ETableGeneratorTypeDt)
 
#define IS_VALID_STD_DT_GENERATOR_ID(TableGeneratorId)
 
#define CREATE_STD_DT_TABLE_GEN_ID(TableId)
 

Typedefs

typedef TABLE_GENERATOR_ID DT_TABLE_GENERATOR_ID
 
typedef enum StdDtTableId ESTD_DT_TABLE_ID
 
typedef struct
ConfigurationManagerProtocol 
EDKII_CONFIGURATION_MANAGER_PROTOCOL
 
typedef struct CmAStdObjDtTableInfo CM_STD_OBJ_DT_TABLE_INFO
 
typedef struct DtTableGenerator DT_TABLE_GENERATOR
 
typedef EFI_STATUS(* DT_TABLE_GENERATOR_BUILD_TABLE )(IN CONST DT_TABLE_GENERATOR *Generator, IN CONST CM_STD_OBJ_DT_TABLE_INFO *CONST DtTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT VOID **Table)
 
typedef EFI_STATUS(* DT_TABLE_GENERATOR_FREE_TABLE )(IN CONST DT_TABLE_GENERATOR *Generator, IN CONST CM_STD_OBJ_DT_TABLE_INFO *CONST DtTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN VOID **Table)
 

Enumerations

enum  StdDtTableId { EStdDtTableIdReserved = 0x0000, EStdDtTableIdRaw, EStdDtTableIdMax }
 

Functions

EFI_STATUS EFIAPI RegisterDtTableGenerator (IN CONST DT_TABLE_GENERATOR *CONST Generator)
 
EFI_STATUS EFIAPI DeregisterDtTableGenerator (IN CONST DT_TABLE_GENERATOR *CONST Generator)
 

Detailed Description

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

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

Glossary:
  • Cm or CM - Configuration Manager
  • Obj or OBJ - Object
  • Std or STD - Standard

Macro Definition Documentation

#define CREATE_STD_DT_TABLE_GEN_ID (   TableId)
Value:
TableId \
)
Standard Namespace.
Definition: TableGenerator.h:124
#define CREATE_TABLE_GEN_ID(TableType, TableNameSpaceId, TableId)
Definition: TableGenerator.h:196
Device Tree Table Generator Type.
Definition: TableGenerator.h:117

This macro creates a standard DT Table Generator ID.

Parameters
[in]TableIdThe table generator ID.
Returns
a standard DT table generator ID.
#define IS_GENERATOR_TYPE_DT (   TableGeneratorId)    (GET_TABLE_TYPE(TableGeneratorId) == ETableGeneratorTypeDt)

This macro checks if the Table Generator ID is for an DT Table Generator.

Parameters
[in]TableGeneratorIdThe table generator ID.
Returns
TRUE if the table generator ID is for an DT Table Generator.
#define IS_VALID_STD_DT_GENERATOR_ID (   TableGeneratorId)
Value:
( \
IS_GENERATOR_NAMESPACE_STD(TableGeneratorId) && \
IS_GENERATOR_TYPE_DT(TableGeneratorId) && \
)
IN CONST ACPI_TABLE_GENERATOR_ID GeneratorId
Definition: DynamicTableFactoryProtocol.h:58
#define IS_GENERATOR_TYPE_DT(TableGeneratorId)
Definition: DeviceTreeTableGenerator.h:40
Definition: DeviceTreeTableGenerator.h:30
#define GET_TABLE_ID(TableGeneratorId)
Definition: TableGenerator.h:154
RAW Generator.
Definition: DeviceTreeTableGenerator.h:29
#define IS_GENERATOR_NAMESPACE_STD(TableGeneratorId)
Definition: TableGenerator.h:182

This macro checks if the Table Generator ID is for a standard DT Table Generator.

Parameters
[in]TableGeneratorIdThe table generator ID.
Returns
TRUE if the table generator ID is for a standard DT Table Generator.

Typedef Documentation

typedef struct CmAStdObjDtTableInfo CM_STD_OBJ_DT_TABLE_INFO

The DT_TABLE_GENERATOR structure provides an interface that the Table Manager can use to invoke the functions to build DT tables.

typedef EFI_STATUS(* DT_TABLE_GENERATOR_BUILD_TABLE)(IN CONST DT_TABLE_GENERATOR *Generator, IN CONST CM_STD_OBJ_DT_TABLE_INFO *CONST DtTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT VOID **Table)

This function pointer describes the interface to DT table build functions provided by the DT table generator and called by the Table Manager to build an DT table.

Parameters
[in]GeneratorPointer to the DT table generator.
[in]DtTableInfoPointer to the DT table information.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol interface.
[out]TablePointer to the generated DT table.
Returns
EFI_SUCCESS If the table is generated successfully or other failure codes as returned by the generator.
typedef EFI_STATUS(* DT_TABLE_GENERATOR_FREE_TABLE)(IN CONST DT_TABLE_GENERATOR *Generator, IN CONST CM_STD_OBJ_DT_TABLE_INFO *CONST DtTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN VOID **Table)

This function pointer describes the interface to used by the Table Manager to give the generator an opportunity to free any resources allocated for building the DT table.

Parameters
[in]GeneratorPointer to the DT table generator.
[in]DtTableInfoPointer to the DT table information.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol interface.
[in]TablePointer to the generated DT table.
Returns
EFI_SUCCESS If freed successfully or other failure codes as returned by the generator.

The DT_TABLE_GENERATOR_ID type describes Device Tree table generator ID.

Forward declarations.

The EDKII_CONFIGURATION_MANAGER_PROTOCOL structure describes the Configuration Manager Protocol interface.

The ESTD_DT_TABLE_ID enum describes the DT table IDs reserved for the standard generators.

Enumeration Type Documentation

The ESTD_DT_TABLE_ID enum describes the DT table IDs reserved for the standard generators.

Enumerator
EStdDtTableIdReserved 

Reserved.

EStdDtTableIdRaw 

RAW Generator.

EStdDtTableIdMax 

Function Documentation

EFI_STATUS EFIAPI DeregisterDtTableGenerator ( IN CONST DT_TABLE_GENERATOR *CONST  Generator)

Deregister DT generator.

This function is called by the DT table generator to deregister itself from the DT table factory.

Parameters
[in]GeneratorPointer to the DT table generator.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERThe generator is invalid.
EFI_NOT_FOUNDThe requested generator is not found in the list of registered generators.
EFI_STATUS EFIAPI RegisterDtTableGenerator ( IN CONST DT_TABLE_GENERATOR *CONST  Generator)

Register DT table factory generator.

The DT table factory maintains a list of the Standard and OEM DT table generators.

Parameters
[in]GeneratorPointer to the DT table generator.
Return values
EFI_SUCCESSThe Generator was registered successfully.
EFI_INVALID_PARAMETERThe Generator ID is invalid or the Generator pointer is NULL.
EFI_ALREADY_STARTEDThe Generator for the Table ID is already registered.