TianoCore EDK2 master
Loading...
Searching...
No Matches
DynamicTableManagerDxe.c File Reference

Go to the source code of this file.

Functions

 GET_OBJECT_LIST (EObjNameSpaceStandard, EStdObjAcpiTableList, CM_STD_OBJ_ACPI_TABLE_INFO)
 
STATIC EFI_STATUS EFIAPI BuildAndInstallMultipleAcpiTable (IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo)
 
STATIC EFI_STATUS EFIAPI BuildAndInstallAcpiTable (IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo)
 
STATIC EFI_STATUS EFIAPI VerifyMandatoryTablesArePresent (IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN UINT32 AcpiTableCount)
 
STATIC EFI_STATUS EFIAPI ProcessAcpiTables (IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol)
 
EFI_STATUS EFIAPI DynamicTableManagerDxeInitialize (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC ACPI_TABLE_PRESENCE_INFOmAcpiVerifyTables
 
STATIC UINT32 mAcpiVerifyTablesCount
 
STATIC INT32 mAcpiVerifyTablesFadtIndex
 

Detailed Description

Dynamic Table Manager Dxe

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

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

Definition in file DynamicTableManagerDxe.c.

Function Documentation

◆ BuildAndInstallAcpiTable()

STATIC EFI_STATUS EFIAPI BuildAndInstallAcpiTable ( IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST  TableFactoryProtocol,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN EFI_ACPI_TABLE_PROTOCOL AcpiTableProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo 
)

A helper function to invoke a Table generator

This is a helper function that invokes the Table generator interface for building an ACPI table. It uses the AcpiTableProtocol to install the table, then frees the resources allocated for generating it.

Parameters
[in]TableFactoryProtocolPointer to the Table Factory Protocol interface.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiTableProtocolPointer to the AcpiTable protocol.
[in]AcpiTableInfoPointer to the ACPI table Info.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDRequired object is not found.
EFI_BAD_BUFFER_SIZESize returned by the Configuration Manager is less than the Object size for the requested object.

Definition at line 304 of file DynamicTableManagerDxe.c.

◆ BuildAndInstallMultipleAcpiTable()

STATIC EFI_STATUS EFIAPI BuildAndInstallMultipleAcpiTable ( IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST  TableFactoryProtocol,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CONST ACPI_TABLE_GENERATOR *CONST  Generator,
IN EFI_ACPI_TABLE_PROTOCOL AcpiTableProtocol,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo 
)

A helper function to build and install multiple ACPI tables.

This is a helper function that invokes the Table generator interface for building an ACPI table. It uses the AcpiTableProtocol to install the table, then frees the resources allocated for generating it.

Parameters
[in]TableFactoryProtocolPointer to the Table Factory Protocol interface.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]GeneratorPointer to the AcpiTable generator.
[in]AcpiTableProtocolPointer to the AcpiTable protocol.
[in]AcpiTableInfoPointer to the ACPI table Info.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDRequired object is not found.
EFI_BAD_BUFFER_SIZESize returned by the Configuration Manager is less than the Object size for the requested object.

Definition at line 184 of file DynamicTableManagerDxe.c.

◆ DynamicTableManagerDxeInitialize()

EFI_STATUS EFIAPI DynamicTableManagerDxeInitialize ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Entrypoint of Dynamic Table Manager Dxe.

The Dynamic Table Manager uses the Configuration Manager Protocol to get the list of ACPI and SMBIOS tables to install. For each table in the list it requests the corresponding ACPI/SMBIOS table factory for a generator capable of building the ACPI/SMBIOS table. If a suitable table generator is found, it invokes the generator interface to build the table. The Dynamic Table Manager then installs the table and invokes another generator interface to free any resources allocated for building the table.

Parameters
ImageHandle
SystemTable
Return values
EFI_SUCCESSSuccess.
EFI_OUT_OF_RESOURCESMemory allocation failed.
EFI_NOT_FOUNDRequired interface/object was not found.
EFI_INVALID_PARAMETERSome parameter is incorrect/invalid.

Definition at line 685 of file DynamicTableManagerDxe.c.

◆ GET_OBJECT_LIST()

This macro expands to a function that retrieves the ACPI Table List from the Configuration Manager.

Definition at line 39 of file DynamicTableManagerDxe.c.

◆ ProcessAcpiTables()

STATIC EFI_STATUS EFIAPI ProcessAcpiTables ( IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST  TableFactoryProtocol,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol 
)

Generate and install ACPI tables.

The function gathers the information necessary for installing the ACPI tables from the Configuration Manager, invokes the generators and installs them (via BuildAndInstallAcpiTable).

Parameters
[in]TableFactoryProtocolPointer to the Table Factory Protocol interface.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
Return values
EFI_SUCCESSSuccess.
EFI_NOT_FOUNDIf a mandatory table or a generator is not found.
EFI_ALREADY_STARTEDIf mandatory table found in AcpiTableInfo is already installed.

Definition at line 509 of file DynamicTableManagerDxe.c.

◆ VerifyMandatoryTablesArePresent()

STATIC EFI_STATUS EFIAPI VerifyMandatoryTablesArePresent ( IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST  AcpiTableInfo,
IN UINT32  AcpiTableCount 
)

The function checks if the Configuration Manager has provided the mandatory ACPI tables for installation.

Parameters
[in]AcpiTableInfoPointer to the ACPI Table Info list.
[in]AcpiTableCountCount of ACPI Table Info.
Return values
EFI_SUCCESSSuccess.
EFI_NOT_FOUNDIf mandatory table is not found.
EFI_ALREADY_STARTEDIf mandatory table found in AcpiTableInfo is already installed.

Definition at line 414 of file DynamicTableManagerDxe.c.

Variable Documentation

◆ mAcpiVerifyTables

STATIC ACPI_TABLE_PRESENCE_INFO* mAcpiVerifyTables

We require the FADT, MADT, GTDT and the DSDT tables to boot. This list also include optional ACPI tables: DBG2, SPCR.

Definition at line 32 of file DynamicTableManagerDxe.c.

◆ mAcpiVerifyTablesCount

STATIC UINT32 mAcpiVerifyTablesCount

Definition at line 33 of file DynamicTableManagerDxe.c.

◆ mAcpiVerifyTablesFadtIndex

STATIC INT32 mAcpiVerifyTablesFadtIndex

Definition at line 34 of file DynamicTableManagerDxe.c.