TianoCore EDK2 master
|
#include <Library/AcpiLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Protocol/AcpiTable.h>
#include <AcpiTableGenerator.h>
#include <ConfigurationManagerObject.h>
#include <ConfigurationManagerHelper.h>
#include <Library/TableHelperLib.h>
#include <Protocol/ConfigurationManagerProtocol.h>
Go to the source code of this file.
Macros | |
#define | MADT_GENERATOR_REVISION CREATE_REVISION (1, 0) |
Variables | |
STATIC CONST ACPI_TABLE_GENERATOR | MadtGenerator |
MADT Table Generator
Copyright (c) 2017 - 2023, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file MadtGenerator.c.
#define MADT_GENERATOR_REVISION CREATE_REVISION (1, 0) |
The MADT Table Generator revision.
Definition at line 760 of file MadtGenerator.c.
EFI_STATUS EFIAPI AcpiMadtLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Register the Generator with the ACPI Table Factory.
[in] | ImageHandle | The handle to the image. |
[in] | SystemTable | Pointer to the System Table. |
EFI_SUCCESS | The Generator is registered. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_ALREADY_STARTED | The Generator for the Table ID is already registered. |
Definition at line 804 of file MadtGenerator.c.
EFI_STATUS EFIAPI AcpiMadtLibDestructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Deregister the Generator from the ACPI Table Factory.
[in] | ImageHandle | The handle to the image. |
[in] | SystemTable | Pointer to the System Table. |
EFI_SUCCESS | The Generator is deregistered. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | The Generator is not registered. |
Definition at line 828 of file MadtGenerator.c.
STATIC VOID AddGICC | ( | IN EFI_ACPI_6_5_GIC_STRUCTURE *CONST | Gicc, |
IN CONST CM_ARM_GICC_INFO *CONST | GicCInfo, | ||
IN CONST UINT8 | MadtRev | ||
) |
This function updates the GIC CPU Interface Information in the EFI_ACPI_6_5_GIC_STRUCTURE structure.
[in] | Gicc | Pointer to GIC CPU Interface structure. |
[in] | GicCInfo | Pointer to the GIC CPU Interface Information. |
[in] | MadtRev | MADT table revision. |
Definition at line 93 of file MadtGenerator.c.
STATIC EFI_STATUS AddGICCList | ( | IN EFI_ACPI_6_5_GIC_STRUCTURE * | Gicc, |
IN CONST CM_ARM_GICC_INFO * | GicCInfo, | ||
IN UINT32 | GicCCount, | ||
IN CONST UINT8 | MadtRev | ||
) |
Add the GIC CPU Interface Information to the MADT Table.
This function also checks for duplicate ACPI Processor UIDs.
[in] | Gicc | Pointer to GIC CPU Interface structure list. |
[in] | GicCInfo | Pointer to the GIC CPU Information list. |
[in] | GicCCount | Count of GIC CPU Interfaces. |
[in] | MadtRev | MADT table revision. |
EFI_SUCCESS | GIC CPU Interface Information was added successfully. |
EFI_INVALID_PARAMETER | One or more invalid GIC CPU Info values were provided and the generator failed to add the information to the table. |
Definition at line 221 of file MadtGenerator.c.
STATIC VOID AddGICD | ( | EFI_ACPI_6_5_GIC_DISTRIBUTOR_STRUCTURE *CONST | Gicd, |
CONST CM_ARM_GICD_INFO *CONST | GicDInfo | ||
) |
Update the GIC Distributor Information in the MADT Table.
[in] | Gicd | Pointer to GIC Distributor structure. |
[in] | GicDInfo | Pointer to the GIC Distributor Information. |
Definition at line 259 of file MadtGenerator.c.
STATIC VOID AddGICInterruptTranslationService | ( | IN EFI_ACPI_6_5_GIC_ITS_STRUCTURE *CONST | GicIts, |
IN CONST CM_ARM_GIC_ITS_INFO *CONST | GicItsInfo | ||
) |
Update the GIC Interrupt Translation Service Information
[in] | GicIts | Pointer to GIC ITS structure. |
[in] | GicItsInfo | Pointer to the GIC ITS Information. |
Definition at line 389 of file MadtGenerator.c.
STATIC VOID AddGICItsList | ( | IN EFI_ACPI_6_5_GIC_ITS_STRUCTURE * | GicIts, |
IN CONST CM_ARM_GIC_ITS_INFO * | GicItsInfo, | ||
IN UINT32 | GicItsCount | ||
) |
Add the GIC Interrupt Translation Service Information to the MADT Table.
[in] | GicIts | Pointer to GIC ITS structure list. |
[in] | GicItsInfo | Pointer to the GIC ITS list. |
[in] | GicItsCount | Count of GIC ITS. |
Definition at line 414 of file MadtGenerator.c.
STATIC VOID AddGICMsiFrame | ( | IN EFI_ACPI_6_5_GIC_MSI_FRAME_STRUCTURE *CONST | GicMsiFrame, |
IN CONST CM_ARM_GIC_MSI_FRAME_INFO *CONST | GicMsiFrameInfo | ||
) |
Update the GIC MSI Frame Information.
[in] | GicMsiFrame | Pointer to GIC MSI Frame structure. |
[in] | GicMsiFrameInfo | Pointer to the GIC MSI Frame Information. |
Definition at line 296 of file MadtGenerator.c.
STATIC VOID AddGICMsiFrameInfoList | ( | IN EFI_ACPI_6_5_GIC_MSI_FRAME_STRUCTURE * | GicMsiFrame, |
IN CONST CM_ARM_GIC_MSI_FRAME_INFO * | GicMsiFrameInfo, | ||
IN UINT32 | GicMsiFrameCount | ||
) |
Add the GIC MSI Frame Information to the MADT Table.
[in] | GicMsiFrame | Pointer to GIC MSI Frame structure list. |
[in] | GicMsiFrameInfo | Pointer to the GIC MSI Frame info list. |
[in] | GicMsiFrameCount | Count of GIC MSI Frames. |
Definition at line 323 of file MadtGenerator.c.
STATIC VOID AddGICRedistributor | ( | IN EFI_ACPI_6_5_GICR_STRUCTURE *CONST | Gicr, |
IN CONST CM_ARM_GIC_REDIST_INFO *CONST | GicRedistributorInfo | ||
) |
Update the GIC Redistributor Information.
[in] | Gicr | Pointer to GIC Redistributor structure. |
[in] | GicRedistributorInfo | Pointer to the GIC Redistributor Info. |
Definition at line 344 of file MadtGenerator.c.
STATIC VOID AddGICRedistributorList | ( | IN EFI_ACPI_6_5_GICR_STRUCTURE * | Gicr, |
IN CONST CM_ARM_GIC_REDIST_INFO * | GicRInfo, | ||
IN UINT32 | GicRCount | ||
) |
Add the GIC Redistributor Information to the MADT Table.
[in] | Gicr | Pointer to GIC Redistributor structure list. |
[in] | GicRInfo | Pointer to the GIC Distributor info list. |
[in] | GicRCount | Count of GIC Distributors. |
Definition at line 368 of file MadtGenerator.c.
STATIC EFI_STATUS EFIAPI BuildMadtTable | ( | IN CONST ACPI_TABLE_GENERATOR *CONST | This, |
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST | AcpiTableInfo, | ||
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST | CfgMgrProtocol, | ||
OUT EFI_ACPI_DESCRIPTION_HEADER **CONST | Table | ||
) |
Construct the MADT ACPI table.
This function invokes the Configuration Manager protocol interface to get the required hardware information for generating the ACPI table.
If this function allocates any resources then they must be freed in the FreeXXXXTableResources function.
[in] | This | Pointer to the table generator. |
[in] | AcpiTableInfo | Pointer to the ACPI Table Info. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[out] | Table | Pointer to the constructed ACPI Table. |
EFI_SUCCESS | Table generated successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | The required object was not found. |
EFI_BAD_BUFFER_SIZE | The size returned by the Configuration Manager is less than the Object size for the requested object. |
Definition at line 453 of file MadtGenerator.c.
STATIC EFI_STATUS FreeMadtTableResources | ( | IN CONST ACPI_TABLE_GENERATOR *CONST | This, |
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST | AcpiTableInfo, | ||
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST | CfgMgrProtocol, | ||
IN OUT EFI_ACPI_DESCRIPTION_HEADER **CONST | Table | ||
) |
Free any resources allocated for constructing the MADT
[in] | This | Pointer to the table generator. |
[in] | AcpiTableInfo | Pointer to the ACPI Table Info. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[in,out] | Table | Pointer to the ACPI Table. |
EFI_SUCCESS | The resources were freed successfully. |
EFI_INVALID_PARAMETER | The table pointer is NULL or invalid. |
Definition at line 734 of file MadtGenerator.c.
GET_OBJECT_LIST | ( | EObjNameSpaceArm | , |
EArmObjGicCInfo | , | ||
CM_ARM_GICC_INFO | |||
) |
ARM standard MADT Generator
Requirements: The following Configuration Manager Object(s) are required by this Generator:
GET_OBJECT_LIST | ( | EObjNameSpaceArm | , |
EArmObjGicDInfo | , | ||
CM_ARM_GICD_INFO | |||
) |
This macro expands to a function that retrieves the GIC Distributor Information from the Configuration Manager.
GET_OBJECT_LIST | ( | EObjNameSpaceArm | , |
EArmObjGicItsInfo | , | ||
CM_ARM_GIC_ITS_INFO | |||
) |
This macro expands to a function that retrieves the GIC Interrupt Translation Service Information from the Configuration Manager.
GET_OBJECT_LIST | ( | EObjNameSpaceArm | , |
EArmObjGicMsiFrameInfo | , | ||
CM_ARM_GIC_MSI_FRAME_INFO | |||
) |
This macro expands to a function that retrieves the GIC MSI Frame Information from the Configuration Manager.
GET_OBJECT_LIST | ( | EObjNameSpaceArm | , |
EArmObjGicRedistributorInfo | , | ||
CM_ARM_GIC_REDIST_INFO | |||
) |
This macro expands to a function that retrieves the GIC Redistributor Information from the Configuration Manager.
BOOLEAN EFIAPI IsAcpiUidEqual | ( | IN CONST VOID * | GicCInfo1, |
IN CONST VOID * | GicCInfo2, | ||
IN UINTN | Index1, | ||
IN UINTN | Index2 | ||
) |
Function to test if two GIC CPU Interface information structures have the same ACPI Processor UID.
[in] | GicCInfo1 | Pointer to the first GICC info structure. |
[in] | GicCInfo2 | Pointer to the second GICC info structure. |
[in] | Index1 | Index of GicCInfo1 in the shared list of GIC CPU Interface Info structures. |
[in] | Index2 | Index of GicCInfo2 in the shared list of GIC CPU Interface Info structures. |
TRUE | GicCInfo1 and GicCInfo2 have the same UID. |
FALSE | GicCInfo1 and GicCInfo2 have different UIDs. |
Definition at line 174 of file MadtGenerator.c.
STATIC CONST ACPI_TABLE_GENERATOR MadtGenerator |
The interface for the MADT Table Generator.
Definition at line 766 of file MadtGenerator.c.