TianoCore EDK2 master
Loading...
Searching...
No Matches
SsdtCpuTopologyGenerator.h
Go to the documentation of this file.
1
17#ifndef SSDT_CPU_TOPOLOGY_GENERATOR_H_
18#define SSDT_CPU_TOPOLOGY_GENERATOR_H_
19
20#pragma pack(1)
21
22// Mask for the flags that need to be checked.
23#define PPTT_PROCESSOR_MASK ( \
24 (EFI_ACPI_6_3_PPTT_PACKAGE_PHYSICAL) | \
25 (EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID << 1) | \
26 (EFI_ACPI_6_3_PPTT_NODE_IS_LEAF << 3))
27
28// Mask for the cpu flags.
29#define PPTT_CPU_PROCESSOR_MASK ( \
30 (EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL) | \
31 (EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID << 1) | \
32 (EFI_ACPI_6_3_PPTT_NODE_IS_LEAF << 3))
33
34// Mask for the cluster flags.
35// Even though a _UID is generated for clusters, it is simpler to use
36// EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID and to not match the cluster id of
37// the PPTT table (not sure the PPTT table is generated).
38#define PPTT_CLUSTER_PROCESSOR_MASK ( \
39 (EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL) | \
40 (EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID << 1) | \
41 (EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF << 3))
42
43// Leaf nodes specific mask.
44#define PPTT_LEAF_MASK ((EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID << 1) | \
45 (EFI_ACPI_6_3_PPTT_NODE_IS_LEAF << 3))
46
50#define SB_SCOPE "\\_SB_"
51#define SB_SCOPE_PREFIX SB_SCOPE "."
53#define SB_SCOPE_PREFIX_SIZE sizeof (SB_SCOPE_PREFIX)
54
56#define ACPI_HID_PROCESSOR_DEVICE "ACPI0007"
57
59#define ACPI_HID_ET_DEVICE "ARMHC500"
60
62#define ACPI_HID_PROCESSOR_CONTAINER_DEVICE "ACPI0010"
63
68#define MAX_NODE_COUNT (1 << 12)
69
119typedef struct TokenTable {
123
126 UINT32 LastIndex;
128
134
135 // Private fields are defined from here.
136
144
145#pragma pack()
146
164EFIAPI
166 IN CHAR8 LeadChar,
167 IN UINT32 Value,
168 IN OUT CHAR8 *AslName
169 );
170
193EFIAPI
196 IN CM_OBJECT_TOKEN AcpiIdObjectToken,
197 OUT UINT32 *AcpiProcessorUid,
198 OUT CM_OBJECT_TOKEN *CpcToken,
199 OUT CM_OBJECT_TOKEN *PsdToken
200 );
201
257EFIAPI
261 IN CM_OBJECT_TOKEN CpcToken,
263 );
264
285EFIAPI
288 IN AML_NODE_HANDLE ParentNode,
289 IN UINT32 AcpiProcessorUid,
290 IN UINT32 CpuName,
291 OUT AML_OBJECT_NODE_HANDLE *CpuNodePtr OPTIONAL
292 );
293
309EFIAPI
313 IN AML_OBJECT_NODE_HANDLE ScopeNode
314 );
315
334EFIAPI
338 IN CM_OBJECT_TOKEN AcpiIdObjectToken,
339 IN UINT32 CpuName,
341 );
342
343#endif // SSDT_CPU_TOPOLOGY_GENERATOR_H_
void * AML_OBJECT_NODE_HANDLE
Definition: AmlLib.h:55
void * AML_NODE_HANDLE
Definition: AmlLib.h:47
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
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)
struct TokenTable TOKEN_TABLE
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)
EFI_STATUS EFIAPI CreateAmlCpu(IN ACPI_CPU_TOPOLOGY_GENERATOR *Generator, IN AML_NODE_HANDLE ParentNode, IN UINT32 AcpiProcessorUid, IN UINT32 CpuName, OUT AML_OBJECT_NODE_HANDLE *CpuNodePtr OPTIONAL)
EFI_STATUS EFIAPI WriteAslName(IN CHAR8 LeadChar, IN UINT32 Value, IN OUT CHAR8 *AslName)
EFI_STATUS EFIAPI CreateAmlCpcNode(IN ACPI_CPU_TOPOLOGY_GENERATOR *Generator, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CM_OBJECT_TOKEN CpcToken, IN AML_OBJECT_NODE_HANDLE *Node)
struct AcpiCpuTopologyGenerator ACPI_CPU_TOPOLOGY_GENERATOR
UINTN CM_OBJECT_TOKEN
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
TOKEN_TABLE TokenTable
Private object used to handle token referencing.
ACPI_TABLE_GENERATOR Header
ACPI Table generator header.
UINT32 ProcNodeCount
Count of CM_ARCH_COMMON_PROC_HIERARCHY_INFO CM objects.
CM_ARCH_COMMON_PROC_HIERARCHY_INFO * ProcNodeList
List of CM_ARCH_COMMON_PROC_HIERARCHY_INFO CM objects.
CM_OBJECT_TOKEN * Table