TianoCore EDK2 master
|
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/AcpiSystemDescriptionTable.h>
#include <Protocol/AcpiTable.h>
#include <AcpiTableGenerator.h>
#include <ConfigurationManagerObject.h>
#include <ConfigurationManagerHelper.h>
#include <DeviceTreeTableGenerator.h>
#include <Library/TableHelperLib.h>
#include <Protocol/ConfigurationManagerProtocol.h>
#include <Protocol/DynamicTableFactoryProtocol.h>
#include <SmbiosTableGenerator.h>
#include "DynamicTableManagerDxe.h"
Go to the source code of this file.
Variables | |
STATIC ACPI_TABLE_PRESENCE_INFO * | mAcpiVerifyTables |
STATIC UINT32 | mAcpiVerifyTablesCount |
STATIC INT32 | mAcpiVerifyTablesFadtIndex |
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.
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.
[in] | TableFactoryProtocol | Pointer to the Table Factory Protocol interface. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[in] | AcpiTableProtocol | Pointer to the AcpiTable protocol. |
[in] | AcpiTableInfo | Pointer to the ACPI table Info. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | Required object is not found. |
EFI_BAD_BUFFER_SIZE | Size returned by the Configuration Manager is less than the Object size for the requested object. |
Definition at line 304 of file DynamicTableManagerDxe.c.
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.
[in] | TableFactoryProtocol | Pointer to the Table Factory Protocol interface. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[in] | Generator | Pointer to the AcpiTable generator. |
[in] | AcpiTableProtocol | Pointer to the AcpiTable protocol. |
[in] | AcpiTableInfo | Pointer to the ACPI table Info. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | Required object is not found. |
EFI_BAD_BUFFER_SIZE | Size returned by the Configuration Manager is less than the Object size for the requested object. |
Definition at line 184 of file DynamicTableManagerDxe.c.
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.
ImageHandle | |
SystemTable |
EFI_SUCCESS | Success. |
EFI_OUT_OF_RESOURCES | Memory allocation failed. |
EFI_NOT_FOUND | Required interface/object was not found. |
EFI_INVALID_PARAMETER | Some parameter is incorrect/invalid. |
Definition at line 685 of file DynamicTableManagerDxe.c.
GET_OBJECT_LIST | ( | EObjNameSpaceStandard | , |
EStdObjAcpiTableList | , | ||
CM_STD_OBJ_ACPI_TABLE_INFO | |||
) |
This macro expands to a function that retrieves the ACPI Table List from the Configuration Manager.
Definition at line 39 of file DynamicTableManagerDxe.c.
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).
[in] | TableFactoryProtocol | Pointer to the Table Factory Protocol interface. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
EFI_SUCCESS | Success. |
EFI_NOT_FOUND | If a mandatory table or a generator is not found. |
EFI_ALREADY_STARTED | If mandatory table found in AcpiTableInfo is already installed. |
Definition at line 509 of file DynamicTableManagerDxe.c.
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.
[in] | AcpiTableInfo | Pointer to the ACPI Table Info list. |
[in] | AcpiTableCount | Count of ACPI Table Info. |
EFI_SUCCESS | Success. |
EFI_NOT_FOUND | If mandatory table is not found. |
EFI_ALREADY_STARTED | If mandatory table found in AcpiTableInfo is already installed. |
Definition at line 414 of file DynamicTableManagerDxe.c.
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.
STATIC UINT32 mAcpiVerifyTablesCount |
Definition at line 33 of file DynamicTableManagerDxe.c.
STATIC INT32 mAcpiVerifyTablesFadtIndex |
Definition at line 34 of file DynamicTableManagerDxe.c.