Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicTablesPkg: Generate X64 CPU SSDT Topology #6443

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions DynamicTablesPkg/DynamicTables.dsc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
NULL|DynamicTablesPkg/Library/Acpi/X64/AcpiWsmtLib/AcpiWsmtLib.inf
NULL|DynamicTablesPkg/Library/Acpi/X64/AcpiHpetLib/AcpiHpetLib.inf
NULL|DynamicTablesPkg/Library/Acpi/X64/AcpiSsdtHpetLib/AcpiSsdtHpetLib.inf
# AML Codegen
# Common
NULL|DynamicTablesPkg/Library/Acpi/Common/AcpiSsdtCpuTopologyLib/SsdtCpuTopologyLib.inf
}

[Components.ARM, Components.AARCH64]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
[Sources.ARM, Sources.AARCH64]
Arm/ArmSsdtCpuTopologyGenerator.c

[Sources.IA32, Sources.X64]
X64/X64SsdtCpuTopologyGenerator.c

[Packages.ARM, Packages.AARCH64]
ArmPlatformPkg/ArmPlatformPkg.dec

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/** @file
X64 SSDT Cpu Topology Table Generator Helpers.
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
- ACPI 6.3 Specification - January 2019 - s8.4 Declaring Processors
**/

/** Create the processor hierarchy AML tree from arch specific CM objects.
@param [in] Generator The SSDT Cpu Topology generator.
@param [in] CfgMgrProtocol Pointer to the Configuration Manager
Protocol Interface.
@param [in] ScopeNode Scope node handle ('\_SB' scope).
@retval EFI_UNSUPPORTED Not supported
**/

// Module specific include files.
#include <ConfigurationManagerObject.h>
#include <Library/AmlLib/AmlLib.h>

#include "SsdtCpuTopologyGenerator.h"

/**
Create the processor hierarchy AML tree from arch specific CM objects.
@param [in] Generator The SSDT Cpu Topology generator.
@param [in] CfgMgrProtocol Pointer to the Configuration Manager
Protocol Interface.
@param [in] ScopeNode Scope node handle ('\_SB' scope).
@retval EFI_UNSUPPORTED Not supported
**/
EFI_STATUS
EFIAPI
CreateTopologyFromIntC (
IN ACPI_CPU_TOPOLOGY_GENERATOR *Generator,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
IN AML_OBJECT_NODE_HANDLE ScopeNode
)
{
return EFI_UNSUPPORTED;
}

/** Add arch specific information to a CPU node in the asl description.
@param [in] Generator The SSDT Cpu Topology generator.
@param [in] CfgMgrProtocol Pointer to the Configuration Manager
Protocol Interface.
@param [in] AcpiIdObjectToken AcpiIdObjectToken identifying the CPU to fetch the
other fields from.
@param [in] CpuName Value used to generate the CPU node name.
@param [out] CpuNode CPU Node to which the ET device node is
attached.
@retval EFI_UNSUPPORTED Not supported
**/
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
)
{
return EFI_UNSUPPORTED;
}

/** 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.
@param [in] CfgMgrProtocol Pointer to the Configuration Manager
Protocol Interface.
@param [in] AcpiIdObjectToken AcpiIdObjectToken identifying the CPU to fetch the
other fields from.
@param [out] AcpiProcessorUid AcpiProcessorUid of the CPU identified by
the AcpiIdObjectToken.
@param [out] CpcToken CpcToken of the CPU identified by
the AcpiIdObjectToken.
@param [out] PsdToken PsdToken of the CPU identified by
the AcpiIdObjectToken.
@retval EFI_UNSUPPORTED Not supported
**/
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
)
{
return EFI_UNSUPPORTED;
}
Loading