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

Go to the source code of this file.

Macros

#define SSDT_CMN_600_GENERATOR_REVISION   CREATE_REVISION (1, 0)
 

Functions

 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)
 
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)
 
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)
 
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)
 
EFI_STATUS EFIAPI AcpiSsdtCmn600LibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI AcpiSsdtCmn600LibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

CHAR8 ssdtcmn600template_aml_code []
 
STATIC CONST ACPI_TABLE_GENERATOR SsdtCmn600Generator
 

Detailed Description

SSDT CMN-600 AML Table Generator.

Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.

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

Reference(s):
  • Arm CoreLink CMN-600 Coherent Mesh Network Technical Reference Manual r3p0
  • Generic ACPI for Arm Components 1.0 Platform Design Document

Definition in file SsdtCmn600Generator.c.

Macro Definition Documentation

◆ SSDT_CMN_600_GENERATOR_REVISION

#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.

Function Documentation

◆ AcpiSsdtCmn600LibConstructor()

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

Register the Generator with the ACPI Table Factory.

Parameters
[in]ImageHandleThe handle to the image.
[in]SystemTablePointer to the System Table.
Return values
EFI_SUCCESSThe Generator is registered.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_ALREADY_STARTEDThe Generator for the Table ID is already registered.

Definition at line 674 of file SsdtCmn600Generator.c.

◆ AcpiSsdtCmn600LibDestructor()

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

Deregister the Generator from the ACPI Table Factory.

Parameters
[in]ImageHandleThe handle to the image.
[in]SystemTablePointer to the System Table.
Return values
EFI_SUCCESSThe Generator is deregistered.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe Generator is not registered.

Definition at line 702 of file SsdtCmn600Generator.c.

◆ BuildSsdtCmn600TableEx()

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.

Parameters
[in]ThisPointer to the ACPI table generator.
[in]AcpiTableInfoPointer to the ACPI table information.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol interface.
[out]TablePointer to a list of generated ACPI table(s).
[out]TableCountNumber of generated ACPI table(s).
Return values
EFI_SUCCESSTable generated successfully.
EFI_BAD_BUFFER_SIZEThe size returned by the Configuration Manager is less than the Object size for the requested object.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDCould not find information.
EFI_OUT_OF_RESOURCESCould not allocate memory.
EFI_UNSUPPORTEDUnsupported configuration.

Definition at line 511 of file SsdtCmn600Generator.c.

◆ FixupCmn600Info()

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.

Parameters
[in]Cmn600InfoPointer to a Cmn600 structure.
[in]NameThe Name to give to the Device. Must be a NULL-terminated ASL NameString e.g.: "DEV0", "DV15.DEV0", etc.
[in]UidUID for the CMN600 device.
[out]TableIf success, pointer to the created SSDT table.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDCould not find information.
EFI_OUT_OF_RESOURCESCould not allocate memory.

Definition at line 227 of file SsdtCmn600Generator.c.

◆ FreeSsdtCmn600TableResourcesEx()

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.

Parameters
[in]ThisPointer to the ACPI table generator.
[in]AcpiTableInfoPointer to the ACPI Table Info.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in,out]TablePointer to an array of pointers to ACPI Table(s).
[in]TableCountNumber of ACPI table(s).
Return values
EFI_SUCCESSThe resources were freed successfully.
EFI_INVALID_PARAMETERThe table pointer is NULL or invalid.

Definition at line 432 of file SsdtCmn600Generator.c.

◆ GET_OBJECT_LIST()

GET_OBJECT_LIST ( EObjNameSpaceArm  ,
EArmObjCmn600Info  ,
CM_ARM_CMN_600_INFO   
)

SSDT CMN-600 Table Generator.

Requirements: The following Configuration Manager Object(s) are required by this Generator:

  • EArmObjCmn600Info This macro expands to a function that retrieves the CMN-600 Information from the Configuration Manager.

◆ ValidateCmn600Info()

STATIC EFI_STATUS EFIAPI ValidateCmn600Info ( IN CONST CM_ARM_CMN_600_INFO Cmn600InfoList,
IN CONST UINT32  Cmn600Count 
)

Check the CMN-600 Information.

Parameters
[in]Cmn600InfoListArray of CMN-600 information structure.
[in]Cmn600CountCount of CMN-600 information structure.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 63 of file SsdtCmn600Generator.c.

Variable Documentation

◆ SsdtCmn600Generator

STATIC CONST ACPI_TABLE_GENERATOR SsdtCmn600Generator
Initial value:
= {
L"ACPI.STD.SSDT.CMN600.GENERATOR",
0,
0,
}
#define EFI_ACPI_6_3_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE
Definition: Acpi63.h:2831
#define TABLE_GENERATOR_CREATOR_ID_ARM
#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId)
@ EStdAcpiTableIdSsdtCmn600
SSDT Cmn-600 Generator.
#define NULL
Definition: Base.h:319
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)
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)
#define SSDT_CMN_600_GENERATOR_REVISION

The interface for the Raw Table Generator.

Definition at line 637 of file SsdtCmn600Generator.c.

◆ ssdtcmn600template_aml_code

CHAR8 ssdtcmn600template_aml_code[]
extern

C array containing the compiled AML template. This symbol is defined in the auto generated C file containing the AML bytecode array.