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

Go to the source code of this file.

Functions

 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjGicCInfo, CM_ARM_GICC_INFO)
 
 GET_OBJECT_LIST (EObjNameSpaceArm, EArmObjEtInfo, CM_ARM_ET_INFO)
 
STATIC EFI_STATUS EFIAPI CreateAmlEtd (IN ACPI_CPU_TOPOLOGY_GENERATOR *Generator, IN AML_NODE_HANDLE ParentNode, IN UINT32 AcpiProcessorUid, IN UINT32 CpuName, OUT AML_OBJECT_NODE_HANDLE *EtNodePtr OPTIONAL)
 
STATIC EFI_STATUS EFIAPI CreateAmlEtNode (IN ACPI_CPU_TOPOLOGY_GENERATOR *Generator, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN UINT32 AcpiProcessorUid, IN CM_OBJECT_TOKEN EtToken, IN UINT32 CpuName, IN AML_OBJECT_NODE_HANDLE *CpuNode)
 
EFI_STATUS EFIAPI CreateTopologyFromIntC (IN ACPI_CPU_TOPOLOGY_GENERATOR *Generator, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN AML_OBJECT_NODE_HANDLE ScopeNode)
 
EFI_STATUS EFIAPI GetIntCInfo (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CM_OBJECT_TOKEN AcpiIdObjectToken, OUT UINT32 *AcpiProcessorUid, OUT CM_OBJECT_TOKEN *CpcToken, OUT CM_OBJECT_TOKEN *PsdToken)
 
EFI_STATUS EFIAPI AddArchAmlCpuInfo (IN ACPI_CPU_TOPOLOGY_GENERATOR *Generator, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CM_OBJECT_TOKEN AcpiIdObjectToken, IN UINT32 CpuName, OUT AML_OBJECT_NODE_HANDLE *CpuNode)
 

Detailed Description

ARM SSDT Cpu Topology Table Generator Helpers.

Copyright (c) 2021 - 2023, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Reference(s):
Glossary:
  • ETE - Embedded Trace Extension.
  • ETM - Embedded Trace Macrocell.

Definition in file ArmSsdtCpuTopologyGenerator.c.

Function Documentation

◆ AddArchAmlCpuInfo()

EFI_STATUS EFIAPI AddArchAmlCpuInfo ( IN ACPI_CPU_TOPOLOGY_GENERATOR Generator,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CM_OBJECT_TOKEN  AcpiIdObjectToken,
IN UINT32  CpuName,
OUT AML_OBJECT_NODE_HANDLE CpuNode 
)

Add arch specific information to a CPU node in the asl description.

Parameters
[in]GeneratorThe SSDT Cpu Topology generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiIdObjectTokenAcpiIdObjectToken identifying the CPU to fetch the other fields from.
[in]CpuNameValue used to generate the CPU node name.
[out]CpuNodeCPU Node to which the ET device node is attached.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_NOT_FOUNDNot found.
EFI_UNSUPPORTEDFeature Unsupported.
EFI_OUT_OF_RESOURCESFailed to allocate memory.

Definition at line 370 of file ArmSsdtCpuTopologyGenerator.c.

◆ CreateAmlEtd()

STATIC EFI_STATUS EFIAPI CreateAmlEtd ( IN ACPI_CPU_TOPOLOGY_GENERATOR Generator,
IN AML_NODE_HANDLE  ParentNode,
IN UINT32  AcpiProcessorUid,
IN UINT32  CpuName,
OUT AML_OBJECT_NODE_HANDLE *EtNodePtr  OPTIONAL 
)

Create an embedded trace device and add it to the Cpu Node in the AML namespace.

This generates the following ASL code: Device (E002) { Name (_UID, 2) Name (_HID, "ARMHC500") }

Note: Currently we only support generating ETE nodes. Unlike ETM, ETE has a system register interface and therefore does not need the MMIO range to be described.

Parameters
[in]GeneratorThe SSDT Cpu Topology generator.
[in]ParentNodeParent node to attach the Cpu node to.
[in]AcpiProcessorUidACPI Processor UID of the CPU.
[in]CpuNameValue used to generate the node name.
[out]EtNodePtrIf not NULL, return the created Cpu node.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESFailed to allocate memory.

Definition at line 90 of file ArmSsdtCpuTopologyGenerator.c.

◆ CreateAmlEtNode()

STATIC EFI_STATUS EFIAPI CreateAmlEtNode ( IN ACPI_CPU_TOPOLOGY_GENERATOR Generator,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN UINT32  AcpiProcessorUid,
IN CM_OBJECT_TOKEN  EtToken,
IN UINT32  CpuName,
IN AML_OBJECT_NODE_HANDLE CpuNode 
)

Create and add an Embedded trace device to the Cpu Node.

Parameters
[in]GeneratorThe SSDT Cpu Topology generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiProcessorUidACPI processor Uid of the local intc (gicc, other) describing the Cpu.
[in]EtTokenEmbedded Trace Token of the CPU.
[in]CpuNameValue used to generate the CPU node name.
[in]CpuNodeCPU Node to which the ET device node is attached.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_UNSUPPORTEDFeature Unsupported.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESFailed to allocate memory.

Definition at line 167 of file ArmSsdtCpuTopologyGenerator.c.

◆ CreateTopologyFromIntC()

EFI_STATUS EFIAPI CreateTopologyFromIntC ( IN ACPI_CPU_TOPOLOGY_GENERATOR Generator,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN AML_OBJECT_NODE_HANDLE  ScopeNode 
)

Create the processor hierarchy AML tree from arch specific CM objects.

The Arm architecture will use the CM_ARM_GICC_INFO CM objects for instance. A processor container is by extension any non-leave device in the cpu topology.

Parameters
[in]GeneratorThe SSDT Cpu Topology generator.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]ScopeNodeScope node handle ('_SB' scope).
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESFailed to allocate memory.

Definition at line 222 of file ArmSsdtCpuTopologyGenerator.c.

◆ GET_OBJECT_LIST() [1/2]

GET_OBJECT_LIST ( EObjNameSpaceArm  ,
EArmObjEtInfo  ,
CM_ARM_ET_INFO   
)

This macro expands to a function that retrieves the ET device information from the Configuration Manager.

◆ GET_OBJECT_LIST() [2/2]

GET_OBJECT_LIST ( EObjNameSpaceArm  ,
EArmObjGicCInfo  ,
CM_ARM_GICC_INFO   
)

ARM SSDT Cpu Topology Table Generator.

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

  • EArmObjGicCInfo
  • EArmObjEtInfo (OPTIONAL) This macro expands to a function that retrieves the GIC CPU interface Information from the Configuration Manager.

◆ GetIntCInfo()

EFI_STATUS EFIAPI GetIntCInfo ( IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST  CfgMgrProtocol,
IN CM_OBJECT_TOKEN  AcpiIdObjectToken,
OUT UINT32 *  AcpiProcessorUid,
OUT CM_OBJECT_TOKEN CpcToken,
OUT CM_OBJECT_TOKEN PsdToken 
)

Get generic interrupt information from arch specific CM objects.

The AcpiProcessorUid, CpcToken, etc. are held in arch specific CM objects, in the CM_ARM_GICC_INFO CM object for Arm for instance. This wrapper allows to get this information from each arch object.

Parameters
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[in]AcpiIdObjectTokenAcpiIdObjectToken identifying the CPU to fetch the other fields from.
[out]AcpiProcessorUidAcpiProcessorUid of the CPU identified by the AcpiIdObjectToken.
[out]CpcTokenCpcToken of the CPU identified by the AcpiIdObjectToken.
[out]PsdTokenPsdToken of the CPU identified by the AcpiIdObjectToken.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_NOT_FOUNDNot found.

Definition at line 315 of file ArmSsdtCpuTopologyGenerator.c.