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/TableHelperLib.h>
#include <Library/AmlLib/AmlLib.h>
#include <Protocol/ConfigurationManagerProtocol.h>
#include "SsdtCpuTopologyGenerator.h"
Go to the source code of this file.
ARM SSDT Cpu Topology Table Generator Helpers.
Copyright (c) 2021 - 2023, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file ArmSsdtCpuTopologyGenerator.c.
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.
[in] | Generator | The SSDT Cpu Topology generator. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[in] | AcpiIdObjectToken | AcpiIdObjectToken identifying the CPU to fetch the other fields from. |
[in] | CpuName | Value used to generate the CPU node name. |
[out] | CpuNode | CPU Node to which the ET device node is attached. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_NOT_FOUND | Not found. |
EFI_UNSUPPORTED | Feature Unsupported. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Definition at line 370 of file ArmSsdtCpuTopologyGenerator.c.
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.
[in] | Generator | The SSDT Cpu Topology generator. |
[in] | ParentNode | Parent node to attach the Cpu node to. |
[in] | AcpiProcessorUid | ACPI Processor UID of the CPU. |
[in] | CpuName | Value used to generate the node name. |
[out] | EtNodePtr | If not NULL, return the created Cpu node. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Definition at line 90 of file ArmSsdtCpuTopologyGenerator.c.
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.
[in] | Generator | The SSDT Cpu Topology generator. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[in] | AcpiProcessorUid | ACPI processor Uid of the local intc (gicc, other) describing the Cpu. |
[in] | EtToken | Embedded Trace Token of the CPU. |
[in] | CpuName | Value used to generate the CPU node name. |
[in] | CpuNode | CPU Node to which the ET device node is attached. |
EFI_SUCCESS | The function completed successfully. |
EFI_UNSUPPORTED | Feature Unsupported. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Definition at line 167 of file ArmSsdtCpuTopologyGenerator.c.
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.
[in] | Generator | The SSDT Cpu Topology generator. |
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[in] | ScopeNode | Scope node handle ('_SB' scope). |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Definition at line 222 of file ArmSsdtCpuTopologyGenerator.c.
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 | ( | EObjNameSpaceArm | , |
EArmObjGicCInfo | , | ||
CM_ARM_GICC_INFO | |||
) |
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.
[in] | CfgMgrProtocol | Pointer to the Configuration Manager Protocol Interface. |
[in] | AcpiIdObjectToken | AcpiIdObjectToken identifying the CPU to fetch the other fields from. |
[out] | AcpiProcessorUid | AcpiProcessorUid of the CPU identified by the AcpiIdObjectToken. |
[out] | CpcToken | CpcToken of the CPU identified by the AcpiIdObjectToken. |
[out] | PsdToken | PsdToken of the CPU identified by the AcpiIdObjectToken. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_NOT_FOUND | Not found. |
Definition at line 315 of file ArmSsdtCpuTopologyGenerator.c.