TianoCore EDK2 master
|
#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
#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 | MCFG_GENERATOR_REVISION CREATE_REVISION (1, 0) |
Variables | |
STATIC CONST ACPI_TABLE_GENERATOR | McfgGenerator |
MCFG Table Generator
Copyright (c) 2017 - 2019, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file McfgGenerator.c.
#define MCFG_GENERATOR_REVISION CREATE_REVISION (1, 0) |
This macro defines the MCFG Table Generator revision.
Definition at line 291 of file McfgGenerator.c.
typedef EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCATION_STRUCTURE MCFG_CFG_SPACE_ADDR |
This typedef is used to shorten the name of the Enhanced Configuration Space address structure.
Definition at line 47 of file McfgGenerator.c.
ARM standard MCFG Generator
Requirements: The following Configuration Manager Object(s) are required by this Generator:
Definition at line 40 of file McfgGenerator.c.
EFI_STATUS EFIAPI AcpiMcfgLibConstructor | ( | 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 335 of file McfgGenerator.c.
EFI_STATUS EFIAPI AcpiMcfgLibDestructor | ( | 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 359 of file McfgGenerator.c.
STATIC VOID AddPciConfigurationSpaceList | ( | IN MCFG_TABLE *CONST | Mcfg, |
IN CONST UINT32 | PciCfgSpaceOffset, | ||
IN CONST CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO * | PciCfgSpaceInfoList, | ||
IN UINT32 | PciCfgSpaceCount | ||
) |
Add the PCI Enhanced Configuration Space Information to the MCFG Table.
[in] | Mcfg | Pointer to MCFG Table. |
[in] | PciCfgSpaceOffset | Offset for the PCI Configuration Space Info structure in the MCFG Table. |
[in] | PciCfgSpaceInfoList | Pointer to the PCI Configuration Space Info List. |
[in] | PciCfgSpaceCount | Count of PCI Configuration Space Info. |
Definition at line 70 of file McfgGenerator.c.
STATIC EFI_STATUS EFIAPI BuildMcfgTable | ( | 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 MCFG 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 122 of file McfgGenerator.c.
STATIC EFI_STATUS EFIAPI FreeMcfgTableResources | ( | 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 MCFG
[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 265 of file McfgGenerator.c.
GET_OBJECT_LIST | ( | EObjNameSpaceArchCommon | , |
EArchCommonObjPciConfigSpaceInfo | , | ||
CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO | |||
) |
Retrieve the PCI Configuration Space Information.
STATIC CONST ACPI_TABLE_GENERATOR McfgGenerator |
The interface for the MCFG Table Generator.
Definition at line 297 of file McfgGenerator.c.