]> git.proxmox.com Git - mirror_edk2.git/blame - DynamicTablesPkg/Include/ArmNameSpaceObjects.h
DynamicTablesPkg: Add Pci related objects
[mirror_edk2.git] / DynamicTablesPkg / Include / ArmNameSpaceObjects.h
CommitLineData
26147c77
SM
1/** @file\r
2\r
cc00dbcb 3 Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>\r
26147c77 4\r
9cd9bdc6 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
26147c77
SM
6\r
7 @par Glossary:\r
8 - Cm or CM - Configuration Manager\r
9 - Obj or OBJ - Object\r
10 - Std or STD - Standard\r
11**/\r
12\r
13#ifndef ARM_NAMESPACE_OBJECTS_H_\r
14#define ARM_NAMESPACE_OBJECTS_H_\r
15\r
16#include <StandardNameSpaceObjects.h>\r
17\r
18#pragma pack(1)\r
19\r
20/** The EARM_OBJECT_ID enum describes the Object IDs\r
21 in the ARM Namespace\r
22*/\r
23typedef enum ArmObjectID {\r
f413d9be
SM
24 EArmObjReserved, ///< 0 - Reserved\r
25 EArmObjBootArchInfo, ///< 1 - Boot Architecture Info\r
26 EArmObjCpuInfo, ///< 2 - CPU Info\r
27 EArmObjPowerManagementProfileInfo, ///< 3 - Power Management Profile Info\r
28 EArmObjGicCInfo, ///< 4 - GIC CPU Interface Info\r
29 EArmObjGicDInfo, ///< 5 - GIC Distributor Info\r
30 EArmObjGicMsiFrameInfo, ///< 6 - GIC MSI Frame Info\r
31 EArmObjGicRedistributorInfo, ///< 7 - GIC Redistributor Info\r
32 EArmObjGicItsInfo, ///< 8 - GIC ITS Info\r
33 EArmObjSerialConsolePortInfo, ///< 9 - Serial Console Port Info\r
34 EArmObjSerialDebugPortInfo, ///< 10 - Serial Debug Port Info\r
35 EArmObjGenericTimerInfo, ///< 11 - Generic Timer Info\r
36 EArmObjPlatformGTBlockInfo, ///< 12 - Platform GT Block Info\r
37 EArmObjGTBlockTimerFrameInfo, ///< 13 - Generic Timer Block Frame Info\r
38 EArmObjPlatformGenericWatchdogInfo, ///< 14 - Platform Generic Watchdog\r
39 EArmObjPciConfigSpaceInfo, ///< 15 - PCI Configuration Space Info\r
40 EArmObjHypervisorVendorIdentity, ///< 16 - Hypervisor Vendor Id\r
41 EArmObjFixedFeatureFlags, ///< 17 - Fixed feature flags for FADT\r
42 EArmObjItsGroup, ///< 18 - ITS Group\r
43 EArmObjNamedComponent, ///< 19 - Named Component\r
44 EArmObjRootComplex, ///< 20 - Root Complex\r
45 EArmObjSmmuV1SmmuV2, ///< 21 - SMMUv1 or SMMUv2\r
46 EArmObjSmmuV3, ///< 22 - SMMUv3\r
47 EArmObjPmcg, ///< 23 - PMCG\r
48 EArmObjGicItsIdentifierArray, ///< 24 - GIC ITS Identifier Array\r
49 EArmObjIdMappingArray, ///< 25 - ID Mapping Array\r
50 EArmObjSmmuInterruptArray, ///< 26 - SMMU Interrupt Array\r
51 EArmObjProcHierarchyInfo, ///< 27 - Processor Hierarchy Info\r
52 EArmObjCacheInfo, ///< 28 - Cache Info\r
b2bbe3df 53 EArmObjReserved29, ///< 29 - Reserved\r
f413d9be
SM
54 EArmObjCmRef, ///< 30 - CM Object Reference\r
55 EArmObjMemoryAffinityInfo, ///< 31 - Memory Affinity Info\r
56 EArmObjDeviceHandleAcpi, ///< 32 - Device Handle Acpi\r
57 EArmObjDeviceHandlePci, ///< 33 - Device Handle Pci\r
58 EArmObjGenericInitiatorAffinityInfo, ///< 34 - Generic Initiator Affinity\r
bade7f42 59 EArmObjSerialPortInfo, ///< 35 - Generic Serial Port Info\r
37568365 60 EArmObjCmn600Info, ///< 36 - CMN-600 Info\r
f17ef10e 61 EArmObjLpiInfo, ///< 37 - Lpi Info\r
ce306e48
PG
62 EArmObjPciAddressMapInfo, ///< 38 - Pci Address Map Info\r
63 EArmObjPciInterruptMapInfo, ///< 39 - Pci Interrupt Map Info\r
26147c77
SM
64 EArmObjMax\r
65} EARM_OBJECT_ID;\r
66\r
67/** A structure that describes the\r
68 ARM Boot Architecture flags.\r
c606f472
SM
69\r
70 ID: EArmObjBootArchInfo\r
26147c77
SM
71*/\r
72typedef struct CmArmBootArchInfo {\r
73 /** This is the ARM_BOOT_ARCH flags field of the FADT Table\r
74 described in the ACPI Table Specification.\r
75 */\r
731c67e1 76 UINT16 BootArchFlags;\r
26147c77
SM
77} CM_ARM_BOOT_ARCH_INFO;\r
78\r
26147c77
SM
79/** A structure that describes the\r
80 Power Management Profile Information for the Platform.\r
c606f472
SM
81\r
82 ID: EArmObjPowerManagementProfileInfo\r
26147c77
SM
83*/\r
84typedef struct CmArmPowerManagementProfileInfo {\r
85 /** This is the Preferred_PM_Profile field of the FADT Table\r
86 described in the ACPI Specification\r
87 */\r
731c67e1 88 UINT8 PowerManagementProfile;\r
26147c77
SM
89} CM_ARM_POWER_MANAGEMENT_PROFILE_INFO;\r
90\r
91/** A structure that describes the\r
92 GIC CPU Interface for the Platform.\r
c606f472
SM
93\r
94 ID: EArmObjGicCInfo\r
26147c77
SM
95*/\r
96typedef struct CmArmGicCInfo {\r
97 /// The GIC CPU Interface number.\r
731c67e1 98 UINT32 CPUInterfaceNumber;\r
26147c77
SM
99\r
100 /** The ACPI Processor UID. This must match the\r
101 _UID of the CPU Device object information described\r
102 in the DSDT/SSDT for the CPU.\r
103 */\r
731c67e1 104 UINT32 AcpiProcessorUid;\r
26147c77
SM
105\r
106 /** The flags field as described by the GICC structure\r
107 in the ACPI Specification.\r
108 */\r
731c67e1 109 UINT32 Flags;\r
26147c77
SM
110\r
111 /** The parking protocol version field as described by\r
112 the GICC structure in the ACPI Specification.\r
113 */\r
731c67e1 114 UINT32 ParkingProtocolVersion;\r
26147c77
SM
115\r
116 /** The Performance Interrupt field as described by\r
117 the GICC structure in the ACPI Specification.\r
118 */\r
731c67e1 119 UINT32 PerformanceInterruptGsiv;\r
26147c77
SM
120\r
121 /** The CPU Parked address field as described by\r
122 the GICC structure in the ACPI Specification.\r
123 */\r
731c67e1 124 UINT64 ParkedAddress;\r
26147c77
SM
125\r
126 /** The base address for the GIC CPU Interface\r
127 as described by the GICC structure in the\r
128 ACPI Specification.\r
129 */\r
731c67e1 130 UINT64 PhysicalBaseAddress;\r
26147c77
SM
131\r
132 /** The base address for GICV interface\r
133 as described by the GICC structure in the\r
134 ACPI Specification.\r
135 */\r
731c67e1 136 UINT64 GICV;\r
26147c77
SM
137\r
138 /** The base address for GICH interface\r
139 as described by the GICC structure in the\r
140 ACPI Specification.\r
141 */\r
731c67e1 142 UINT64 GICH;\r
26147c77
SM
143\r
144 /** The GICV maintenance interrupt\r
145 as described by the GICC structure in the\r
146 ACPI Specification.\r
147 */\r
731c67e1 148 UINT32 VGICMaintenanceInterrupt;\r
26147c77
SM
149\r
150 /** The base address for GICR interface\r
151 as described by the GICC structure in the\r
152 ACPI Specification.\r
153 */\r
731c67e1 154 UINT64 GICRBaseAddress;\r
26147c77
SM
155\r
156 /** The MPIDR for the CPU\r
157 as described by the GICC structure in the\r
158 ACPI Specification.\r
159 */\r
731c67e1 160 UINT64 MPIDR;\r
26147c77
SM
161\r
162 /** The Processor Power Efficiency class\r
163 as described by the GICC structure in the\r
164 ACPI Specification.\r
165 */\r
731c67e1 166 UINT8 ProcessorPowerEfficiencyClass;\r
5506701f
KK
167\r
168 /** Statistical Profiling Extension buffer overflow GSIV. Zero if\r
169 unsupported by this processor. This field was introduced in\r
170 ACPI 6.3 (MADT revision 5) and is therefore ignored when\r
171 generating MADT revision 4 or lower.\r
172 */\r
731c67e1 173 UINT16 SpeOverflowInterrupt;\r
f413d9be
SM
174\r
175 /** The proximity domain to which the logical processor belongs.\r
176 This field is used to populate the GICC affinity structure\r
177 in the SRAT table.\r
178 */\r
731c67e1 179 UINT32 ProximityDomain;\r
f413d9be
SM
180\r
181 /** The clock domain to which the logical processor belongs.\r
182 This field is used to populate the GICC affinity structure\r
183 in the SRAT table.\r
184 */\r
731c67e1 185 UINT32 ClockDomain;\r
f413d9be
SM
186\r
187 /** The GICC Affinity flags field as described by the GICC Affinity structure\r
188 in the SRAT table.\r
189 */\r
731c67e1 190 UINT32 AffinityFlags;\r
26147c77
SM
191} CM_ARM_GICC_INFO;\r
192\r
193/** A structure that describes the\r
194 GIC Distributor information for the Platform.\r
c606f472
SM
195\r
196 ID: EArmObjGicDInfo\r
26147c77
SM
197*/\r
198typedef struct CmArmGicDInfo {\r
26147c77 199 /// The Physical Base address for the GIC Distributor.\r
731c67e1 200 UINT64 PhysicalBaseAddress;\r
26147c77
SM
201\r
202 /** The global system interrupt\r
203 number where this GIC Distributor's\r
204 interrupt inputs start.\r
205 */\r
731c67e1 206 UINT32 SystemVectorBase;\r
26147c77
SM
207\r
208 /** The GIC version as described\r
209 by the GICD structure in the\r
210 ACPI Specification.\r
211 */\r
731c67e1 212 UINT8 GicVersion;\r
26147c77
SM
213} CM_ARM_GICD_INFO;\r
214\r
215/** A structure that describes the\r
216 GIC MSI Frame information for the Platform.\r
c606f472
SM
217\r
218 ID: EArmObjGicMsiFrameInfo\r
26147c77
SM
219*/\r
220typedef struct CmArmGicMsiFrameInfo {\r
221 /// The GIC MSI Frame ID\r
731c67e1 222 UINT32 GicMsiFrameId;\r
26147c77
SM
223\r
224 /// The Physical base address for the MSI Frame\r
731c67e1 225 UINT64 PhysicalBaseAddress;\r
26147c77
SM
226\r
227 /** The GIC MSI Frame flags\r
228 as described by the GIC MSI frame\r
229 structure in the ACPI Specification.\r
230 */\r
731c67e1 231 UINT32 Flags;\r
26147c77
SM
232\r
233 /// SPI Count used by this frame\r
731c67e1 234 UINT16 SPICount;\r
26147c77
SM
235\r
236 /// SPI Base used by this frame\r
731c67e1 237 UINT16 SPIBase;\r
26147c77
SM
238} CM_ARM_GIC_MSI_FRAME_INFO;\r
239\r
240/** A structure that describes the\r
241 GIC Redistributor information for the Platform.\r
c606f472
SM
242\r
243 ID: EArmObjGicRedistributorInfo\r
26147c77
SM
244*/\r
245typedef struct CmArmGicRedistInfo {\r
246 /** The physical address of a page range\r
247 containing all GIC Redistributors.\r
248 */\r
731c67e1 249 UINT64 DiscoveryRangeBaseAddress;\r
26147c77
SM
250\r
251 /// Length of the GIC Redistributor Discovery page range\r
731c67e1 252 UINT32 DiscoveryRangeLength;\r
26147c77
SM
253} CM_ARM_GIC_REDIST_INFO;\r
254\r
255/** A structure that describes the\r
256 GIC Interrupt Translation Service information for the Platform.\r
c606f472
SM
257\r
258 ID: EArmObjGicItsInfo\r
26147c77
SM
259*/\r
260typedef struct CmArmGicItsInfo {\r
261 /// The GIC ITS ID\r
731c67e1 262 UINT32 GicItsId;\r
26147c77
SM
263\r
264 /// The physical address for the Interrupt Translation Service\r
731c67e1 265 UINT64 PhysicalBaseAddress;\r
f413d9be
SM
266\r
267 /** The proximity domain to which the logical processor belongs.\r
268 This field is used to populate the GIC ITS affinity structure\r
269 in the SRAT table.\r
270 */\r
731c67e1 271 UINT32 ProximityDomain;\r
26147c77
SM
272} CM_ARM_GIC_ITS_INFO;\r
273\r
274/** A structure that describes the\r
275 Serial Port information for the Platform.\r
c606f472
SM
276\r
277 ID: EArmObjSerialConsolePortInfo or\r
bade7f42
PG
278 EArmObjSerialDebugPortInfo or\r
279 EArmObjSerialPortInfo\r
26147c77
SM
280*/\r
281typedef struct CmArmSerialPortInfo {\r
282 /// The physical base address for the serial port\r
731c67e1 283 UINT64 BaseAddress;\r
26147c77
SM
284\r
285 /// The serial port interrupt\r
731c67e1 286 UINT32 Interrupt;\r
26147c77
SM
287\r
288 /// The serial port baud rate\r
731c67e1 289 UINT64 BaudRate;\r
26147c77
SM
290\r
291 /// The serial port clock\r
731c67e1 292 UINT32 Clock;\r
26147c77
SM
293\r
294 /// Serial Port subtype\r
731c67e1 295 UINT16 PortSubtype;\r
bade7f42
PG
296\r
297 /// The Base address length\r
731c67e1 298 UINT64 BaseAddressLength;\r
c8cf71ec
JG
299\r
300 /// The access size\r
731c67e1 301 UINT8 AccessSize;\r
26147c77
SM
302} CM_ARM_SERIAL_PORT_INFO;\r
303\r
304/** A structure that describes the\r
305 Generic Timer information for the Platform.\r
c606f472
SM
306\r
307 ID: EArmObjGenericTimerInfo\r
26147c77
SM
308*/\r
309typedef struct CmArmGenericTimerInfo {\r
310 /// The physical base address for the counter control frame\r
731c67e1 311 UINT64 CounterControlBaseAddress;\r
26147c77
SM
312\r
313 /// The physical base address for the counter read frame\r
731c67e1 314 UINT64 CounterReadBaseAddress;\r
26147c77
SM
315\r
316 /// The secure PL1 timer interrupt\r
731c67e1 317 UINT32 SecurePL1TimerGSIV;\r
26147c77
SM
318\r
319 /// The secure PL1 timer flags\r
731c67e1 320 UINT32 SecurePL1TimerFlags;\r
26147c77
SM
321\r
322 /// The non-secure PL1 timer interrupt\r
731c67e1 323 UINT32 NonSecurePL1TimerGSIV;\r
26147c77
SM
324\r
325 /// The non-secure PL1 timer flags\r
731c67e1 326 UINT32 NonSecurePL1TimerFlags;\r
26147c77
SM
327\r
328 /// The virtual timer interrupt\r
731c67e1 329 UINT32 VirtualTimerGSIV;\r
26147c77
SM
330\r
331 /// The virtual timer flags\r
731c67e1 332 UINT32 VirtualTimerFlags;\r
26147c77
SM
333\r
334 /// The non-secure PL2 timer interrupt\r
731c67e1 335 UINT32 NonSecurePL2TimerGSIV;\r
26147c77
SM
336\r
337 /// The non-secure PL2 timer flags\r
731c67e1 338 UINT32 NonSecurePL2TimerFlags;\r
e8015f2f
PG
339\r
340 /// GSIV for the virtual EL2 timer\r
731c67e1 341 UINT32 VirtualPL2TimerGSIV;\r
e8015f2f
PG
342\r
343 /// Flags for the virtual EL2 timer\r
731c67e1 344 UINT32 VirtualPL2TimerFlags;\r
26147c77
SM
345} CM_ARM_GENERIC_TIMER_INFO;\r
346\r
347/** A structure that describes the\r
348 Platform Generic Block Timer Frame information for the Platform.\r
c606f472
SM
349\r
350 ID: EArmObjGTBlockTimerFrameInfo\r
26147c77
SM
351*/\r
352typedef struct CmArmGTBlockTimerFrameInfo {\r
353 /// The Generic Timer frame number\r
731c67e1 354 UINT8 FrameNumber;\r
26147c77
SM
355\r
356 /// The physical base address for the CntBase block\r
731c67e1 357 UINT64 PhysicalAddressCntBase;\r
26147c77
SM
358\r
359 /// The physical base address for the CntEL0Base block\r
731c67e1 360 UINT64 PhysicalAddressCntEL0Base;\r
26147c77
SM
361\r
362 /// The physical timer interrupt\r
731c67e1 363 UINT32 PhysicalTimerGSIV;\r
26147c77
SM
364\r
365 /** The physical timer flags as described by the GT Block\r
366 Timer frame Structure in the ACPI Specification.\r
367 */\r
731c67e1 368 UINT32 PhysicalTimerFlags;\r
26147c77
SM
369\r
370 /// The virtual timer interrupt\r
731c67e1 371 UINT32 VirtualTimerGSIV;\r
26147c77
SM
372\r
373 /** The virtual timer flags as described by the GT Block\r
374 Timer frame Structure in the ACPI Specification.\r
375 */\r
731c67e1 376 UINT32 VirtualTimerFlags;\r
26147c77
SM
377\r
378 /** The common timer flags as described by the GT Block\r
379 Timer frame Structure in the ACPI Specification.\r
380 */\r
731c67e1 381 UINT32 CommonFlags;\r
26147c77
SM
382} CM_ARM_GTBLOCK_TIMER_FRAME_INFO;\r
383\r
384/** A structure that describes the\r
385 Platform Generic Block Timer information for the Platform.\r
c606f472
SM
386\r
387 ID: EArmObjPlatformGTBlockInfo\r
26147c77
SM
388*/\r
389typedef struct CmArmGTBlockInfo {\r
390 /// The physical base address for the GT Block Timer structure\r
731c67e1 391 UINT64 GTBlockPhysicalAddress;\r
26147c77
SM
392\r
393 /// The number of timer frames implemented in the GT Block\r
731c67e1 394 UINT32 GTBlockTimerFrameCount;\r
26147c77
SM
395\r
396 /// Reference token for the GT Block timer frame list\r
731c67e1 397 CM_OBJECT_TOKEN GTBlockTimerFrameToken;\r
26147c77
SM
398} CM_ARM_GTBLOCK_INFO;\r
399\r
400/** A structure that describes the\r
f09dbf20 401 Arm Generic Watchdog information for the Platform.\r
c606f472
SM
402\r
403 ID: EArmObjPlatformGenericWatchdogInfo\r
26147c77
SM
404*/\r
405typedef struct CmArmGenericWatchdogInfo {\r
f09dbf20 406 /// The physical base address of the Arm Watchdog control frame\r
731c67e1 407 UINT64 ControlFrameAddress;\r
26147c77 408\r
f09dbf20 409 /// The physical base address of the Arm Watchdog refresh frame\r
731c67e1 410 UINT64 RefreshFrameAddress;\r
26147c77
SM
411\r
412 /// The watchdog interrupt\r
731c67e1 413 UINT32 TimerGSIV;\r
26147c77 414\r
f09dbf20 415 /** The flags for the watchdog as described by the Arm watchdog\r
26147c77
SM
416 structure in the ACPI specification.\r
417 */\r
731c67e1 418 UINT32 Flags;\r
26147c77
SM
419} CM_ARM_GENERIC_WATCHDOG_INFO;\r
420\r
421/** A structure that describes the\r
422 PCI Configuration Space information for the Platform.\r
c606f472
SM
423\r
424 ID: EArmObjPciConfigSpaceInfo\r
26147c77
SM
425*/\r
426typedef struct CmArmPciConfigSpaceInfo {\r
427 /// The physical base address for the PCI segment\r
ce306e48 428 UINT64 BaseAddress;\r
26147c77
SM
429\r
430 /// The PCI segment group number\r
ce306e48 431 UINT16 PciSegmentGroupNumber;\r
26147c77
SM
432\r
433 /// The start bus number\r
ce306e48 434 UINT8 StartBusNumber;\r
26147c77
SM
435\r
436 /// The end bus number\r
ce306e48
PG
437 UINT8 EndBusNumber;\r
438\r
439 /// Optional field: Reference Token for address mapping.\r
440 /// Token identifying a CM_ARM_OBJ_REF structure.\r
441 CM_OBJECT_TOKEN AddressMapToken;\r
442\r
443 /// Optional field: Reference Token for interrupt mapping.\r
444 /// Token identifying a CM_ARM_OBJ_REF structure.\r
445 CM_OBJECT_TOKEN InterruptMapToken;\r
26147c77
SM
446} CM_ARM_PCI_CONFIG_SPACE_INFO;\r
447\r
448/** A structure that describes the\r
449 Hypervisor Vendor ID information for the Platform.\r
c606f472
SM
450\r
451 ID: EArmObjHypervisorVendorIdentity\r
26147c77
SM
452*/\r
453typedef struct CmArmHypervisorVendorId {\r
454 /// The hypervisor Vendor ID\r
731c67e1 455 UINT64 HypervisorVendorId;\r
26147c77
SM
456} CM_ARM_HYPERVISOR_VENDOR_ID;\r
457\r
458/** A structure that describes the\r
459 Fixed feature flags for the Platform.\r
c606f472
SM
460\r
461 ID: EArmObjFixedFeatureFlags\r
26147c77
SM
462*/\r
463typedef struct CmArmFixedFeatureFlags {\r
464 /// The Fixed feature flags\r
731c67e1 465 UINT32 Flags;\r
26147c77
SM
466} CM_ARM_FIXED_FEATURE_FLAGS;\r
467\r
468/** A structure that describes the\r
469 ITS Group node for the Platform.\r
c606f472
SM
470\r
471 ID: EArmObjItsGroup\r
26147c77
SM
472*/\r
473typedef struct CmArmItsGroupNode {\r
c606f472 474 /// An unique token used to identify this object\r
731c67e1 475 CM_OBJECT_TOKEN Token;\r
26147c77 476 /// The number of ITS identifiers in the ITS node\r
731c67e1 477 UINT32 ItsIdCount;\r
26147c77 478 /// Reference token for the ITS identifier array\r
731c67e1 479 CM_OBJECT_TOKEN ItsIdToken;\r
26147c77
SM
480} CM_ARM_ITS_GROUP_NODE;\r
481\r
26147c77
SM
482/** A structure that describes the\r
483 Named component node for the Platform.\r
c606f472
SM
484\r
485 ID: EArmObjNamedComponent\r
26147c77
SM
486*/\r
487typedef struct CmArmNamedComponentNode {\r
c606f472 488 /// An unique token used to identify this object\r
731c67e1 489 CM_OBJECT_TOKEN Token;\r
26147c77 490 /// Number of ID mappings\r
731c67e1 491 UINT32 IdMappingCount;\r
26147c77 492 /// Reference token for the ID mapping array\r
731c67e1 493 CM_OBJECT_TOKEN IdMappingToken;\r
26147c77
SM
494\r
495 /// Flags for the named component\r
731c67e1 496 UINT32 Flags;\r
26147c77
SM
497\r
498 /// Memory access properties : Cache coherent attributes\r
731c67e1 499 UINT32 CacheCoherent;\r
26147c77 500 /// Memory access properties : Allocation hints\r
731c67e1 501 UINT8 AllocationHints;\r
26147c77 502 /// Memory access properties : Memory access flags\r
731c67e1 503 UINT8 MemoryAccessFlags;\r
26147c77
SM
504\r
505 /// Memory access properties : Address size limit\r
731c67e1
MK
506 UINT8 AddressSizeLimit;\r
507\r
26147c77
SM
508 /** ASCII Null terminated string with the full path to\r
509 the entry in the namespace for this object.\r
510 */\r
731c67e1 511 CHAR8 *ObjectName;\r
26147c77
SM
512} CM_ARM_NAMED_COMPONENT_NODE;\r
513\r
514/** A structure that describes the\r
515 Root complex node for the Platform.\r
c606f472
SM
516\r
517 ID: EArmObjRootComplex\r
26147c77
SM
518*/\r
519typedef struct CmArmRootComplexNode {\r
c606f472 520 /// An unique token used to identify this object\r
731c67e1 521 CM_OBJECT_TOKEN Token;\r
26147c77 522 /// Number of ID mappings\r
731c67e1 523 UINT32 IdMappingCount;\r
26147c77 524 /// Reference token for the ID mapping array\r
731c67e1 525 CM_OBJECT_TOKEN IdMappingToken;\r
26147c77
SM
526\r
527 /// Memory access properties : Cache coherent attributes\r
731c67e1 528 UINT32 CacheCoherent;\r
26147c77 529 /// Memory access properties : Allocation hints\r
731c67e1 530 UINT8 AllocationHints;\r
26147c77 531 /// Memory access properties : Memory access flags\r
731c67e1 532 UINT8 MemoryAccessFlags;\r
26147c77
SM
533\r
534 /// ATS attributes\r
731c67e1 535 UINT32 AtsAttribute;\r
26147c77 536 /// PCI segment number\r
731c67e1 537 UINT32 PciSegmentNumber;\r
26147c77 538 /// Memory address size limit\r
731c67e1 539 UINT8 MemoryAddressSize;\r
26147c77
SM
540} CM_ARM_ROOT_COMPLEX_NODE;\r
541\r
542/** A structure that describes the\r
543 SMMUv1 or SMMUv2 node for the Platform.\r
c606f472
SM
544\r
545 ID: EArmObjSmmuV1SmmuV2\r
26147c77
SM
546*/\r
547typedef struct CmArmSmmuV1SmmuV2Node {\r
c606f472 548 /// An unique token used to identify this object\r
731c67e1 549 CM_OBJECT_TOKEN Token;\r
26147c77 550 /// Number of ID mappings\r
731c67e1 551 UINT32 IdMappingCount;\r
26147c77 552 /// Reference token for the ID mapping array\r
731c67e1 553 CM_OBJECT_TOKEN IdMappingToken;\r
26147c77
SM
554\r
555 /// SMMU Base Address\r
731c67e1 556 UINT64 BaseAddress;\r
26147c77 557 /// Length of the memory range covered by the SMMU\r
731c67e1 558 UINT64 Span;\r
26147c77 559 /// SMMU Model\r
731c67e1 560 UINT32 Model;\r
26147c77 561 /// SMMU flags\r
731c67e1 562 UINT32 Flags;\r
26147c77
SM
563\r
564 /// Number of context interrupts\r
731c67e1 565 UINT32 ContextInterruptCount;\r
26147c77 566 /// Reference token for the context interrupt array\r
731c67e1 567 CM_OBJECT_TOKEN ContextInterruptToken;\r
26147c77
SM
568\r
569 /// Number of PMU interrupts\r
731c67e1 570 UINT32 PmuInterruptCount;\r
26147c77 571 /// Reference token for the PMU interrupt array\r
731c67e1 572 CM_OBJECT_TOKEN PmuInterruptToken;\r
26147c77
SM
573\r
574 /// GSIV of the SMMU_NSgIrpt interrupt\r
731c67e1 575 UINT32 SMMU_NSgIrpt;\r
26147c77 576 /// SMMU_NSgIrpt interrupt flags\r
731c67e1 577 UINT32 SMMU_NSgIrptFlags;\r
26147c77 578 /// GSIV of the SMMU_NSgCfgIrpt interrupt\r
731c67e1 579 UINT32 SMMU_NSgCfgIrpt;\r
26147c77 580 /// SMMU_NSgCfgIrpt interrupt flags\r
731c67e1 581 UINT32 SMMU_NSgCfgIrptFlags;\r
26147c77
SM
582} CM_ARM_SMMUV1_SMMUV2_NODE;\r
583\r
584/** A structure that describes the\r
585 SMMUv3 node for the Platform.\r
c606f472
SM
586\r
587 ID: EArmObjSmmuV3\r
26147c77
SM
588*/\r
589typedef struct CmArmSmmuV3Node {\r
c606f472 590 /// An unique token used to identify this object\r
731c67e1 591 CM_OBJECT_TOKEN Token;\r
26147c77 592 /// Number of ID mappings\r
731c67e1 593 UINT32 IdMappingCount;\r
26147c77 594 /// Reference token for the ID mapping array\r
731c67e1 595 CM_OBJECT_TOKEN IdMappingToken;\r
26147c77
SM
596\r
597 /// SMMU Base Address\r
731c67e1 598 UINT64 BaseAddress;\r
26147c77 599 /// SMMU flags\r
731c67e1 600 UINT32 Flags;\r
26147c77 601 /// VATOS address\r
731c67e1 602 UINT64 VatosAddress;\r
26147c77 603 /// Model\r
731c67e1 604 UINT32 Model;\r
26147c77 605 /// GSIV of the Event interrupt if SPI based\r
731c67e1 606 UINT32 EventInterrupt;\r
26147c77 607 /// PRI Interrupt if SPI based\r
731c67e1 608 UINT32 PriInterrupt;\r
26147c77 609 /// GERR interrupt if GSIV based\r
731c67e1 610 UINT32 GerrInterrupt;\r
26147c77 611 /// Sync interrupt if GSIV based\r
731c67e1 612 UINT32 SyncInterrupt;\r
26147c77
SM
613\r
614 /// Proximity domain flag\r
731c67e1 615 UINT32 ProximityDomain;\r
26147c77 616 /// Index into the array of ID mapping\r
731c67e1 617 UINT32 DeviceIdMappingIndex;\r
26147c77
SM
618} CM_ARM_SMMUV3_NODE;\r
619\r
620/** A structure that describes the\r
621 PMCG node for the Platform.\r
c606f472
SM
622\r
623 ID: EArmObjPmcg\r
26147c77
SM
624*/\r
625typedef struct CmArmPmcgNode {\r
c606f472 626 /// An unique token used to identify this object\r
731c67e1 627 CM_OBJECT_TOKEN Token;\r
26147c77 628 /// Number of ID mappings\r
731c67e1 629 UINT32 IdMappingCount;\r
26147c77 630 /// Reference token for the ID mapping array\r
731c67e1 631 CM_OBJECT_TOKEN IdMappingToken;\r
26147c77
SM
632\r
633 /// Base Address for performance monitor counter group\r
731c67e1 634 UINT64 BaseAddress;\r
26147c77 635 /// GSIV for the Overflow interrupt\r
731c67e1 636 UINT32 OverflowInterrupt;\r
26147c77 637 /// Page 1 Base address\r
731c67e1 638 UINT64 Page1BaseAddress;\r
26147c77
SM
639\r
640 /// Reference token for the IORT node associated with this node\r
731c67e1 641 CM_OBJECT_TOKEN ReferenceToken;\r
26147c77
SM
642} CM_ARM_PMCG_NODE;\r
643\r
cc00dbcb
PG
644/** A structure that describes the\r
645 GIC ITS Identifiers for an ITS Group node.\r
646\r
647 ID: EArmObjGicItsIdentifierArray\r
648*/\r
649typedef struct CmArmGicItsIdentifier {\r
650 /// The ITS Identifier\r
731c67e1 651 UINT32 ItsId;\r
cc00dbcb
PG
652} CM_ARM_ITS_IDENTIFIER;\r
653\r
26147c77
SM
654/** A structure that describes the\r
655 ID Mappings for the Platform.\r
c606f472
SM
656\r
657 ID: EArmObjIdMappingArray\r
26147c77
SM
658*/\r
659typedef struct CmArmIdMapping {\r
660 /// Input base\r
731c67e1 661 UINT32 InputBase;\r
26147c77 662 /// Number of input IDs\r
731c67e1 663 UINT32 NumIds;\r
26147c77 664 /// Output Base\r
731c67e1 665 UINT32 OutputBase;\r
26147c77 666 /// Reference token for the output node\r
731c67e1 667 CM_OBJECT_TOKEN OutputReferenceToken;\r
26147c77 668 /// Flags\r
731c67e1 669 UINT32 Flags;\r
26147c77
SM
670} CM_ARM_ID_MAPPING;\r
671\r
37568365
PG
672/** A structure that describes the Arm\r
673 Generic Interrupts.\r
26147c77 674*/\r
37568365 675typedef struct CmArmGenericInterrupt {\r
26147c77
SM
676 /// Interrupt number\r
677 UINT32 Interrupt;\r
678\r
679 /// Flags\r
ce306e48
PG
680 /// BIT0: 0: Interrupt is Level triggered\r
681 /// 1: Interrupt is Edge triggered\r
682 /// BIT1: 0: Interrupt is Active high\r
683 /// 1: Interrupt is Active low\r
26147c77 684 UINT32 Flags;\r
37568365
PG
685} CM_ARM_GENERIC_INTERRUPT;\r
686\r
687/** A structure that describes the SMMU interrupts for the Platform.\r
688\r
689 Interrupt Interrupt number.\r
690 Flags Interrupt flags as defined for SMMU node.\r
691\r
692 ID: EArmObjSmmuInterruptArray\r
693*/\r
694typedef CM_ARM_GENERIC_INTERRUPT CM_ARM_SMMU_INTERRUPT;\r
695\r
696/** A structure that describes the AML Extended Interrupts.\r
697\r
698 Interrupt Interrupt number.\r
699 Flags Interrupt flags as defined by the Interrupt\r
700 Vector Flags (Byte 3) of the Extended Interrupt\r
701 resource descriptor.\r
702 See EFI_ACPI_EXTENDED_INTERRUPT_FLAG_xxx in Acpi10.h\r
37568365
PG
703*/\r
704typedef CM_ARM_GENERIC_INTERRUPT CM_ARM_EXTENDED_INTERRUPT;\r
26147c77 705\r
77db1156
KK
706/** A structure that describes the Processor Hierarchy Node (Type 0) in PPTT\r
707\r
708 ID: EArmObjProcHierarchyInfo\r
709*/\r
710typedef struct CmArmProcHierarchyInfo {\r
711 /// A unique token used to identify this object\r
731c67e1 712 CM_OBJECT_TOKEN Token;\r
77db1156 713 /// Processor structure flags (ACPI 6.3 - January 2019, PPTT, Table 5-155)\r
731c67e1 714 UINT32 Flags;\r
77db1156
KK
715 /// Token for the parent CM_ARM_PROC_HIERARCHY_INFO object in the processor\r
716 /// topology. A value of CM_NULL_TOKEN means this node has no parent.\r
731c67e1 717 CM_OBJECT_TOKEN ParentToken;\r
77db1156
KK
718 /// Token of the associated CM_ARM_GICC_INFO object which has the\r
719 /// corresponding ACPI Processor ID. A value of CM_NULL_TOKEN means this\r
720 /// node represents a group of associated processors and it does not have an\r
721 /// associated GIC CPU interface.\r
731c67e1 722 CM_OBJECT_TOKEN GicCToken;\r
77db1156 723 /// Number of resources private to this Node\r
731c67e1 724 UINT32 NoOfPrivateResources;\r
77db1156
KK
725 /// Token of the array which contains references to the resources private to\r
726 /// this CM_ARM_PROC_HIERARCHY_INFO instance. This field is ignored if\r
e3f8605a 727 /// the NoOfPrivateResources is 0, in which case it is recommended to set\r
77db1156 728 /// this field to CM_NULL_TOKEN.\r
731c67e1 729 CM_OBJECT_TOKEN PrivateResourcesArrayToken;\r
f17ef10e
PG
730 /// Optional field: Reference Token for the Lpi state of this processor.\r
731 /// Token identifying a CM_ARM_OBJ_REF structure, itself referencing\r
732 /// CM_ARM_LPI_INFO objects.\r
731c67e1 733 CM_OBJECT_TOKEN LpiToken;\r
77db1156
KK
734} CM_ARM_PROC_HIERARCHY_INFO;\r
735\r
736/** A structure that describes the Cache Type Structure (Type 1) in PPTT\r
737\r
738 ID: EArmObjCacheInfo\r
739*/\r
740typedef struct CmArmCacheInfo {\r
741 /// A unique token used to identify this object\r
731c67e1 742 CM_OBJECT_TOKEN Token;\r
77db1156
KK
743 /// Reference token for the next level of cache that is private to the same\r
744 /// CM_ARM_PROC_HIERARCHY_INFO instance. A value of CM_NULL_TOKEN means this\r
745 /// entry represents the last cache level appropriate to the processor\r
746 /// hierarchy node structures using this entry.\r
731c67e1 747 CM_OBJECT_TOKEN NextLevelOfCacheToken;\r
77db1156 748 /// Size of the cache in bytes\r
731c67e1 749 UINT32 Size;\r
77db1156 750 /// Number of sets in the cache\r
731c67e1 751 UINT32 NumberOfSets;\r
77db1156
KK
752 /// Integer number of ways. The maximum associativity supported by\r
753 /// ACPI Cache type structure is limited to MAX_UINT8. However,\r
754 /// the maximum number of ways supported by the architecture is\r
755 /// PPTT_ARM_CCIDX_CACHE_ASSOCIATIVITY_MAX. Therfore this field\r
756 /// is 32-bit wide.\r
731c67e1 757 UINT32 Associativity;\r
e81a81e5 758 /// Cache attributes (ACPI 6.4 - January 2021, PPTT, Table 5.140)\r
731c67e1 759 UINT8 Attributes;\r
77db1156 760 /// Line size in bytes\r
731c67e1 761 UINT16 LineSize;\r
e81a81e5
CJ
762 /// Unique ID for the cache\r
763 UINT32 CacheId;\r
77db1156
KK
764} CM_ARM_CACHE_INFO;\r
765\r
77db1156
KK
766/** A structure that describes a reference to another Configuration Manager\r
767 object.\r
768\r
769 This is useful for creating an array of reference tokens. The framework\r
770 can then query the configuration manager for these arrays using the\r
771 object ID EArmObjCmRef.\r
772\r
773 This can be used is to represent one-to-many relationships between objects.\r
774\r
775 ID: EArmObjCmRef\r
776*/\r
777typedef struct CmArmObjRef {\r
778 /// Token of the CM object being referenced\r
731c67e1 779 CM_OBJECT_TOKEN ReferenceToken;\r
77db1156
KK
780} CM_ARM_OBJ_REF;\r
781\r
f413d9be
SM
782/** A structure that describes the Memory Affinity Structure (Type 1) in SRAT\r
783\r
784 ID: EArmObjMemoryAffinityInfo\r
785*/\r
786typedef struct CmArmMemoryAffinityInfo {\r
787 /// The proximity domain to which the "range of memory" belongs.\r
731c67e1 788 UINT32 ProximityDomain;\r
f413d9be
SM
789\r
790 /// Base Address\r
731c67e1 791 UINT64 BaseAddress;\r
f413d9be
SM
792\r
793 /// Length\r
731c67e1 794 UINT64 Length;\r
f413d9be
SM
795\r
796 /// Flags\r
731c67e1 797 UINT32 Flags;\r
f413d9be
SM
798} CM_ARM_MEMORY_AFFINITY_INFO;\r
799\r
800/** A structure that describes the ACPI Device Handle (Type 0) in the\r
801 Generic Initiator Affinity structure in SRAT\r
802\r
803 ID: EArmObjDeviceHandleAcpi\r
804*/\r
805typedef struct CmArmDeviceHandleAcpi {\r
806 /// Hardware ID\r
731c67e1 807 UINT64 Hid;\r
f413d9be
SM
808\r
809 /// Unique Id\r
731c67e1 810 UINT32 Uid;\r
f413d9be
SM
811} CM_ARM_DEVICE_HANDLE_ACPI;\r
812\r
813/** A structure that describes the PCI Device Handle (Type 1) in the\r
814 Generic Initiator Affinity structure in SRAT\r
815\r
816 ID: EArmObjDeviceHandlePci\r
817*/\r
818typedef struct CmArmDeviceHandlePci {\r
819 /// PCI Segment Number\r
731c67e1 820 UINT16 SegmentNumber;\r
f413d9be
SM
821\r
822 /// PCI Bus Number - Max 256 busses (Bits 15:8 of BDF)\r
731c67e1 823 UINT8 BusNumber;\r
f413d9be 824\r
e3f8605a 825 /// PCI Device Number - Max 32 devices (Bits 7:3 of BDF)\r
731c67e1 826 UINT8 DeviceNumber;\r
f413d9be
SM
827\r
828 /// PCI Function Number - Max 8 functions (Bits 2:0 of BDF)\r
731c67e1 829 UINT8 FunctionNumber;\r
f413d9be
SM
830} CM_ARM_DEVICE_HANDLE_PCI;\r
831\r
832/** A structure that describes the Generic Initiator Affinity structure in SRAT\r
833\r
834 ID: EArmObjGenericInitiatorAffinityInfo\r
835*/\r
836typedef struct CmArmGenericInitiatorAffinityInfo {\r
837 /// The proximity domain to which the generic initiator belongs.\r
731c67e1 838 UINT32 ProximityDomain;\r
f413d9be
SM
839\r
840 /// Flags\r
731c67e1 841 UINT32 Flags;\r
f413d9be
SM
842\r
843 /// Device Handle Type\r
731c67e1 844 UINT8 DeviceHandleType;\r
f413d9be
SM
845\r
846 /// Reference Token for the Device Handle\r
731c67e1 847 CM_OBJECT_TOKEN DeviceHandleToken;\r
f413d9be
SM
848} CM_ARM_GENERIC_INITIATOR_AFFINITY_INFO;\r
849\r
37568365
PG
850/** A structure that describes the CMN-600 hardware.\r
851\r
852 ID: EArmObjCmn600Info\r
853*/\r
854typedef struct CmArmCmn600Info {\r
855 /// The PERIPHBASE address.\r
856 /// Corresponds to the Configuration Node Region (CFGR) base address.\r
731c67e1 857 UINT64 PeriphBaseAddress;\r
37568365
PG
858\r
859 /// The PERIPHBASE address length.\r
860 /// Corresponds to the CFGR base address length.\r
731c67e1 861 UINT64 PeriphBaseAddressLength;\r
37568365
PG
862\r
863 /// The ROOTNODEBASE address.\r
864 /// Corresponds to the Root node (ROOT) base address.\r
731c67e1 865 UINT64 RootNodeBaseAddress;\r
37568365
PG
866\r
867 /// The Debug and Trace Logic Controller (DTC) count.\r
868 /// CMN-600 can have maximum 4 DTCs.\r
731c67e1 869 UINT8 DtcCount;\r
37568365
PG
870\r
871 /// DTC Interrupt list.\r
872 /// The first interrupt resource descriptor pertains to\r
873 /// DTC[0], the second to DTC[1] and so on.\r
874 /// DtcCount determines the number of DTC Interrupts that\r
875 /// are populated. If DTC count is 2 then DtcInterrupt[2]\r
876 /// and DtcInterrupt[3] are ignored.\r
877 /// Note: The size of CM_ARM_CMN_600_INFO structure remains\r
878 /// constant and does not vary with the DTC count.\r
731c67e1 879 CM_ARM_EXTENDED_INTERRUPT DtcInterrupt[4];\r
37568365
PG
880} CM_ARM_CMN_600_INFO;\r
881\r
f17ef10e
PG
882/** A structure that describes the Lpi information.\r
883\r
884 The Low Power Idle states are described in DSDT/SSDT and associated\r
885 to cpus/clusters in the cpu topology.\r
886\r
887 ID: EArmObjLpiInfo\r
888*/\r
889typedef struct CmArmLpiInfo {\r
890 /** Minimum Residency. Time in microseconds after which a\r
891 state becomes more energy efficient than any shallower state.\r
892 */\r
731c67e1 893 UINT32 MinResidency;\r
f17ef10e
PG
894\r
895 /** Worst case time in microseconds from a wake interrupt\r
896 being asserted to the return to a running state\r
897 */\r
731c67e1 898 UINT32 WorstCaseWakeLatency;\r
f17ef10e
PG
899\r
900 /** Flags.\r
901 */\r
731c67e1 902 UINT32 Flags;\r
f17ef10e
PG
903\r
904 /** Architecture specific context loss flags.\r
905 */\r
731c67e1 906 UINT32 ArchFlags;\r
f17ef10e
PG
907\r
908 /** Residency counter frequency in cycles-per-second (Hz).\r
909 */\r
731c67e1 910 UINT32 ResCntFreq;\r
f17ef10e
PG
911\r
912 /** Every shallower power state in the parent is also enabled.\r
913 */\r
731c67e1 914 UINT32 EnableParentState;\r
f17ef10e
PG
915\r
916 /** The EntryMethod _LPI field can be described as an integer\r
917 or in a Register resource data descriptor.\r
918\r
919 If IsInteger is TRUE, the IntegerEntryMethod field is used.\r
920 If IsInteger is FALSE, the RegisterEntryMethod field is used.\r
921 */\r
731c67e1 922 BOOLEAN IsInteger;\r
f17ef10e
PG
923\r
924 /** EntryMethod described as an Integer.\r
925 */\r
731c67e1 926 UINT64 IntegerEntryMethod;\r
f17ef10e
PG
927\r
928 /** EntryMethod described as a EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR.\r
929 */\r
731c67e1 930 EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE RegisterEntryMethod;\r
f17ef10e
PG
931\r
932 /** Residency counter register.\r
933 */\r
731c67e1 934 EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ResidencyCounterRegister;\r
f17ef10e
PG
935\r
936 /** Usage counter register.\r
937 */\r
731c67e1 938 EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE UsageCounterRegister;\r
f17ef10e
PG
939\r
940 /** String representing the Lpi state\r
941 */\r
731c67e1 942 CHAR8 StateName[16];\r
f17ef10e
PG
943} CM_ARM_LPI_INFO;\r
944\r
ce306e48
PG
945/** A structure that describes a PCI Address Map.\r
946\r
947 The memory-ranges used by the PCI bus are described by this object.\r
948\r
949 ID: EArmObjPciAddressMapInfo\r
950*/\r
951typedef struct CmArmPciAddressMapInfo {\r
952 /** Pci address space code\r
953\r
954 Available values are:\r
955 - 0: Configuration Space\r
956 - 1: I/O Space\r
957 - 2: 32-bit-address Memory Space\r
958 - 3: 64-bit-address Memory Space\r
959 */\r
960 UINT8 SpaceCode;\r
961\r
962 /// PCI address\r
963 UINT64 PciAddress;\r
964\r
965 /// Cpu address\r
966 UINT64 CpuAddress;\r
967\r
968 /// Address size\r
969 UINT64 AddressSize;\r
970} CM_ARM_PCI_ADDRESS_MAP_INFO;\r
971\r
972/** A structure that describes a PCI Interrupt Map.\r
973\r
974 The legacy PCI interrupts used by PCI devices are described by this object.\r
975\r
976 Cf Devicetree Specification - Release v0.3\r
977 s2.4.3 "Interrupt Nexus Properties"\r
978\r
979 ID: EArmObjPciInterruptMapInfo\r
980*/\r
981typedef struct CmArmPciInterruptMapInfo {\r
982 /// Pci Bus.\r
983 /// Value on 8 bits (max 255).\r
984 UINT8 PciBus;\r
985\r
986 /// Pci Bus.\r
987 /// Value on 5 bits (max 31).\r
988 UINT8 PciDevice;\r
989\r
990 /** PCI interrupt\r
991\r
992 ACPI bindings are used:\r
993 Cf. ACPI 6.4, s6.2.13 _PRT (PCI Routing Table):\r
994 "0-INTA, 1-INTB, 2-INTC, 3-INTD"\r
995\r
996 Device-tree bindings are shifted by 1:\r
997 "INTA=1, INTB=2, INTC=3, INTD=4"\r
998 */\r
999 UINT8 PciInterrupt;\r
1000\r
1001 /** Interrupt controller interrupt.\r
1002\r
1003 Cf Devicetree Specification - Release v0.3\r
1004 s2.4.3 "Interrupt Nexus Properties": "parent interrupt specifier"\r
1005 */\r
1006 CM_ARM_GENERIC_INTERRUPT IntcInterrupt;\r
1007} CM_ARM_PCI_INTERRUPT_MAP_INFO;\r
1008\r
26147c77
SM
1009#pragma pack()\r
1010\r
1011#endif // ARM_NAMESPACE_OBJECTS_H_\r