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

Go to the source code of this file.

Data Structures

struct  SmbiosTableGenerator
 

Macros

#define IS_GENERATOR_TYPE_SMBIOS(TableGeneratorId)
 
#define IS_VALID_STD_SMBIOS_GENERATOR_ID(TableGeneratorId)
 
#define CREATE_STD_SMBIOS_TABLE_GEN_ID(TableId)
 

Typedefs

typedef TABLE_GENERATOR_ID SMBIOS_TABLE_GENERATOR_ID
 
typedef enum StdSmbiosTableGeneratorId ESTD_SMBIOS_TABLE_ID
 
typedef struct ConfigurationManagerProtocol EDKII_CONFIGURATION_MANAGER_PROTOCOL
 
typedef struct CmStdObjSmbiosTableInfo CM_STD_OBJ_SMBIOS_TABLE_INFO
 
typedef struct SmbiosTableGenerator SMBIOS_TABLE_GENERATOR
 
typedef EFI_STATUS(* SMBIOS_TABLE_GENERATOR_BUILD_TABLE) (IN CONST SMBIOS_TABLE_GENERATOR *Generator, IN CM_STD_OBJ_SMBIOS_TABLE_INFO *CONST SmbiosTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT SMBIOS_STRUCTURE **Table)
 
typedef EFI_STATUS(* SMBIOS_TABLE_GENERATOR_FREE_TABLE) (IN CONST SMBIOS_TABLE_GENERATOR *Generator, IN CONST CM_STD_OBJ_SMBIOS_TABLE_INFO *CONST SmbiosTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN SMBIOS_STRUCTURE **Table)
 

Enumerations

enum  StdSmbiosTableGeneratorId {
  EStdSmbiosTableIdReserved = 0x0000 , EStdSmbiosTableIdRAW , EStdSmbiosTableIdType00 , EStdSmbiosTableIdType01 ,
  EStdSmbiosTableIdType02 , EStdSmbiosTableIdType03 , EStdSmbiosTableIdType04 , EStdSmbiosTableIdType05 ,
  EStdSmbiosTableIdType06 , EStdSmbiosTableIdType07 , EStdSmbiosTableIdType08 , EStdSmbiosTableIdType09 ,
  EStdSmbiosTableIdType10 , EStdSmbiosTableIdType11 , EStdSmbiosTableIdType12 , EStdSmbiosTableIdType13 ,
  EStdSmbiosTableIdType14 , EStdSmbiosTableIdType15 , EStdSmbiosTableIdType16 , EStdSmbiosTableIdType17 ,
  EStdSmbiosTableIdType18 , EStdSmbiosTableIdType19 , EStdSmbiosTableIdType20 , EStdSmbiosTableIdType21 ,
  EStdSmbiosTableIdType22 , EStdSmbiosTableIdType23 , EStdSmbiosTableIdType24 , EStdSmbiosTableIdType25 ,
  EStdSmbiosTableIdType26 , EStdSmbiosTableIdType27 , EStdSmbiosTableIdType28 , EStdSmbiosTableIdType29 ,
  EStdSmbiosTableIdType30 , EStdSmbiosTableIdType31 , EStdSmbiosTableIdType32 , EStdSmbiosTableIdType33 ,
  EStdSmbiosTableIdType34 , EStdSmbiosTableIdType35 , EStdSmbiosTableIdType36 , EStdSmbiosTableIdType37 ,
  EStdSmbiosTableIdType38 , EStdSmbiosTableIdType39 , EStdSmbiosTableIdType40 , EStdSmbiosTableIdType41 ,
  EStdSmbiosTableIdType42 , EStdSmbiosTableIdType126 = (EStdSmbiosTableIdType00 + 126) , EStdSmbiosTableIdType127 , EStdSmbiosTableIdMax
}
 

Functions

EFI_STATUS EFIAPI RegisterSmbiosTableGenerator (IN CONST SMBIOS_TABLE_GENERATOR *CONST Generator)
 
EFI_STATUS EFIAPI DeregisterSmbiosTableGenerator (IN CONST SMBIOS_TABLE_GENERATOR *CONST Generator)
 

Detailed Description

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

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

Definition in file SmbiosTableGenerator.h.

Macro Definition Documentation

◆ CREATE_STD_SMBIOS_TABLE_GEN_ID

#define CREATE_STD_SMBIOS_TABLE_GEN_ID (   TableId)
Value:
TableId \
)
@ ETableGeneratorNameSpaceStd
Standard Namespace.
#define CREATE_TABLE_GEN_ID(TableType, TableNameSpaceId, TableId)
@ ETableGeneratorTypeSmbios
SMBIOS Table Generator Type.

This macro creates a standard SMBIOS Table Generator ID.

Parameters
[in]TableIdThe table generator ID.
Returns
a standard SMBIOS table generator ID.

Definition at line 118 of file SmbiosTableGenerator.h.

◆ IS_GENERATOR_TYPE_SMBIOS

#define IS_GENERATOR_TYPE_SMBIOS (   TableGeneratorId)
Value:
( \
GET_TABLE_TYPE (TableGeneratorId) == \
)

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

Parameters
[in]TableGeneratorIdThe table generator ID.
Returns
TRUE if the table generator ID is for an SMBIOS Table Generator.

Definition at line 90 of file SmbiosTableGenerator.h.

◆ IS_VALID_STD_SMBIOS_GENERATOR_ID

#define IS_VALID_STD_SMBIOS_GENERATOR_ID (   TableGeneratorId)
Value:
( \
IS_GENERATOR_NAMESPACE_STD(TableGeneratorId) && \
IS_GENERATOR_TYPE_SMBIOS(TableGeneratorId) && \
((GET_TABLE_ID(GeneratorId) >= EStdSmbiosTableIdRaw) && \
(GET_TABLE_ID(GeneratorId) < EStdSmbiosTableIdMax)) \
)
#define GET_TABLE_ID(TableGeneratorId)

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

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

Definition at line 104 of file SmbiosTableGenerator.h.

Typedef Documentation

◆ CM_STD_OBJ_SMBIOS_TABLE_INFO

◆ EDKII_CONFIGURATION_MANAGER_PROTOCOL

Forward declarations.

Definition at line 127 of file SmbiosTableGenerator.h.

◆ ESTD_SMBIOS_TABLE_ID

The ESTD_SMBIOS_TABLE_ID enum describes the SMBIOS table IDs reserved for the standard generators.

NOTE: The SMBIOS Generator IDs do not match the table type numbers! This allows 0 to be used to catch invalid parameters.

◆ SMBIOS_TABLE_GENERATOR

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

Definition at line 129 of file SmbiosTableGenerator.h.

◆ SMBIOS_TABLE_GENERATOR_BUILD_TABLE

typedef EFI_STATUS(* SMBIOS_TABLE_GENERATOR_BUILD_TABLE) (IN CONST SMBIOS_TABLE_GENERATOR *Generator, IN CM_STD_OBJ_SMBIOS_TABLE_INFO *CONST SmbiosTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT SMBIOS_STRUCTURE **Table)

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

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

Definition at line 144 of file SmbiosTableGenerator.h.

◆ SMBIOS_TABLE_GENERATOR_FREE_TABLE

typedef EFI_STATUS(* SMBIOS_TABLE_GENERATOR_FREE_TABLE) (IN CONST SMBIOS_TABLE_GENERATOR *Generator, IN CONST CM_STD_OBJ_SMBIOS_TABLE_INFO *CONST SmbiosTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN SMBIOS_STRUCTURE **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 SMBIOS table.

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

Definition at line 164 of file SmbiosTableGenerator.h.

◆ SMBIOS_TABLE_GENERATOR_ID

The SMBIOS_TABLE_GENERATOR_ID type describes SMBIOS table generator ID.

Definition at line 20 of file SmbiosTableGenerator.h.

Enumeration Type Documentation

◆ StdSmbiosTableGeneratorId

The ESTD_SMBIOS_TABLE_ID enum describes the SMBIOS table IDs reserved for the standard generators.

NOTE: The SMBIOS Generator IDs do not match the table type numbers! This allows 0 to be used to catch invalid parameters.

Definition at line 28 of file SmbiosTableGenerator.h.

Function Documentation

◆ DeregisterSmbiosTableGenerator()

EFI_STATUS EFIAPI DeregisterSmbiosTableGenerator ( IN CONST SMBIOS_TABLE_GENERATOR *CONST  Generator)

Deregister SMBIOS generator.

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

Parameters
[in]GeneratorPointer to the SMBIOS 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.

Definition at line 174 of file SmbiosTableFactory.c.

◆ RegisterSmbiosTableGenerator()

EFI_STATUS EFIAPI RegisterSmbiosTableGenerator ( IN CONST SMBIOS_TABLE_GENERATOR *CONST  Generator)

Register SMBIOS table factory generator.

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

Parameters
[in]GeneratorPointer to the SMBIOS 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.

Definition at line 110 of file SmbiosTableFactory.c.