TianoCore EDK2 master
|
#include <Library/AcpiLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Protocol/AcpiTable.h>
#include <AcpiTableGenerator.h>
#include <ConfigurationManagerObject.h>
#include <ConfigurationManagerHelper.h>
#include <Library/AcpiHelperLib.h>
#include <Library/AmlLib/AmlLib.h>
#include <Protocol/ConfigurationManagerProtocol.h>
#include "SsdtCmn600Generator.h"
Go to the source code of this file.
Macros | |
#define | SSDT_CMN_600_GENERATOR_REVISION CREATE_REVISION (1, 0) |
Variables | |
CHAR8 | ssdtcmn600template_aml_code [] |
STATIC CONST ACPI_TABLE_GENERATOR | SsdtCmn600Generator |
SSDT CMN-600 AML Table Generator.
Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SsdtCmn600Generator.c.
#define SSDT_CMN_600_GENERATOR_REVISION CREATE_REVISION (1, 0) |
This macro defines the Raw Generator revision.
Definition at line 631 of file SsdtCmn600Generator.c.
EFI_STATUS EFIAPI AcpiSsdtCmn600LibConstructor | ( | 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 674 of file SsdtCmn600Generator.c.
EFI_STATUS EFIAPI AcpiSsdtCmn600LibDestructor | ( | 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 702 of file SsdtCmn600Generator.c.
STATIC EFI_STATUS EFIAPI BuildSsdtCmn600TableEx | ( | IN CONST ACPI_TABLE_GENERATOR * | This, |
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST | AcpiTableInfo, | ||
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST | CfgMgrProtocol, | ||
OUT EFI_ACPI_DESCRIPTION_HEADER *** | Table, | ||
OUT UINTN *CONST | TableCount | ||
) |
Construct SSDT tables for describing CMN-600 meshes.
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 FreeXXXXTableResourcesEx function.
[in] | This | Pointer to the ACPI table generator. |
[in] | AcpiTableInfo | Pointer to the ACPI table information. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol interface. |
[out] | Table | Pointer to a list of generated ACPI table(s). |
[out] | TableCount | Number of generated ACPI table(s). |
EFI_SUCCESS | Table generated successfully. |
EFI_BAD_BUFFER_SIZE | The size returned by the Configuration Manager is less than the Object size for the requested object. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | Could not find information. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
EFI_UNSUPPORTED | Unsupported configuration. |
Definition at line 511 of file SsdtCmn600Generator.c.
STATIC EFI_STATUS EFIAPI FixupCmn600Info | ( | IN CONST CM_ARM_CMN_600_INFO * | Cmn600Info, |
IN CONST CHAR8 * | Name, | ||
IN CONST UINT64 | Uid, | ||
OUT EFI_ACPI_DESCRIPTION_HEADER ** | Table | ||
) |
Build a SSDT table describing the CMN-600 device.
The table created by this function must be freed by FreeSsdtCmn600Table.
[in] | Cmn600Info | Pointer to a Cmn600 structure. |
[in] | Name | The Name to give to the Device. Must be a NULL-terminated ASL NameString e.g.: "DEV0", "DV15.DEV0", etc. |
[in] | Uid | UID for the CMN600 device. |
[out] | Table | If success, pointer to the created SSDT table. |
EFI_SUCCESS | Table generated successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | Could not find information. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 227 of file SsdtCmn600Generator.c.
STATIC EFI_STATUS EFIAPI FreeSsdtCmn600TableResourcesEx | ( | 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, | ||
IN CONST UINTN | TableCount | ||
) |
Free any resources allocated for constructing the SSDT tables for CMN-600.
[in] | This | Pointer to the ACPI table generator. |
[in] | AcpiTableInfo | Pointer to the ACPI Table Info. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[in,out] | Table | Pointer to an array of pointers to ACPI Table(s). |
[in] | TableCount | Number of ACPI table(s). |
EFI_SUCCESS | The resources were freed successfully. |
EFI_INVALID_PARAMETER | The table pointer is NULL or invalid. |
Definition at line 432 of file SsdtCmn600Generator.c.
GET_OBJECT_LIST | ( | EObjNameSpaceArm | , |
EArmObjCmn600Info | , | ||
CM_ARM_CMN_600_INFO | |||
) |
STATIC EFI_STATUS EFIAPI ValidateCmn600Info | ( | IN CONST CM_ARM_CMN_600_INFO * | Cmn600InfoList, |
IN CONST UINT32 | Cmn600Count | ||
) |
Check the CMN-600 Information.
[in] | Cmn600InfoList | Array of CMN-600 information structure. |
[in] | Cmn600Count | Count of CMN-600 information structure. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 63 of file SsdtCmn600Generator.c.
STATIC CONST ACPI_TABLE_GENERATOR SsdtCmn600Generator |
The interface for the Raw Table Generator.
Definition at line 637 of file SsdtCmn600Generator.c.
|
extern |
C array containing the compiled AML template. This symbol is defined in the auto generated C file containing the AML bytecode array.