2 ACPI IO Remapping Table (IORT) as specified in ARM spec DEN0049D
4 http://infocenter.arm.com/help/topic/com.arm.doc.den0049d/DEN0049D_IO_Remapping_Table.pdf
6 Copyright (c) 2017, Linaro Limited. All rights reserved.<BR>
7 Copyright (c) 2018, ARM Limited. All rights reserved.<BR>
9 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #ifndef __IO_REMAPPING_TABLE_H__
13 #define __IO_REMAPPING_TABLE_H__
15 #include <IndustryStandard/Acpi.h>
17 #define EFI_ACPI_IO_REMAPPING_TABLE_REVISION 0x0
19 #define EFI_ACPI_IORT_TYPE_ITS_GROUP 0x0
20 #define EFI_ACPI_IORT_TYPE_NAMED_COMP 0x1
21 #define EFI_ACPI_IORT_TYPE_ROOT_COMPLEX 0x2
22 #define EFI_ACPI_IORT_TYPE_SMMUv1v2 0x3
23 #define EFI_ACPI_IORT_TYPE_SMMUv3 0x4
24 #define EFI_ACPI_IORT_TYPE_PMCG 0x5
26 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA BIT0
28 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_TR BIT0
29 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_WA BIT1
30 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_RA BIT2
31 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_AHO BIT3
33 #define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_CPM BIT0
34 #define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_DACS BIT1
36 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_v1 0x0
37 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_v2 0x1
38 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU400 0x2
39 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU500 0x3
40 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU401 0x4
41 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_CAVIUM_THX_v2 0x5
43 #define EFI_ACPI_IORT_SMMUv1v2_FLAG_DVM BIT0
44 #define EFI_ACPI_IORT_SMMUv1v2_FLAG_COH_WALK BIT1
46 #define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_LEVEL 0x0
47 #define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_EDGE 0x1
49 #define EFI_ACPI_IORT_SMMUv3_FLAG_COHAC_OVERRIDE BIT0
50 #define EFI_ACPI_IORT_SMMUv3_FLAG_HTTU_OVERRIDE BIT1
51 #define EFI_ACPI_IORT_SMMUv3_FLAG_PROXIMITY_DOMAIN BIT3
53 #define EFI_ACPI_IORT_SMMUv3_MODEL_GENERIC 0x0
54 #define EFI_ACPI_IORT_SMMUv3_MODEL_HISILICON_HI161X 0x1
55 #define EFI_ACPI_IORT_SMMUv3_MODEL_CAVIUM_CN99XX 0x2
57 #define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_UNSUPPORTED 0x0
58 #define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED 0x1
60 #define EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE BIT0
68 EFI_ACPI_DESCRIPTION_HEADER Header
;
72 } EFI_ACPI_6_0_IO_REMAPPING_TABLE
;
75 /// Definition for ID mapping table shared by all node types
81 UINT32 OutputReference
;
83 } EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE
;
86 /// Node header definition shared by all node types
95 } EFI_ACPI_6_0_IO_REMAPPING_NODE
;
98 /// Node type 0: ITS node
101 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
103 UINT32 NumItsIdentifiers
;
104 // UINT32 ItsIdentifiers[NumItsIdentifiers];
105 } EFI_ACPI_6_0_IO_REMAPPING_ITS_NODE
;
108 /// Node type 1: root complex node
111 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
113 UINT32 CacheCoherent
;
114 UINT8 AllocationHints
;
116 UINT8 MemoryAccessFlags
;
119 UINT32 PciSegmentNumber
;
120 UINT8 MemoryAddressSize
;
122 } EFI_ACPI_6_0_IO_REMAPPING_RC_NODE
;
125 /// Node type 2: named component node
128 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
131 UINT32 CacheCoherent
;
132 UINT8 AllocationHints
;
134 UINT8 MemoryAccessFlags
;
135 UINT8 AddressSizeLimit
;
136 // UINT8 ObjectName[];
137 } EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE
;
140 /// Node type 3: SMMUv1 or SMMUv2 node
144 UINT32 InterruptFlags
;
145 } EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT
;
148 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
154 UINT32 GlobalInterruptArrayRef
;
155 UINT32 NumContextInterrupts
;
156 UINT32 ContextInterruptArrayRef
;
157 UINT32 NumPmuInterrupts
;
158 UINT32 PmuInterruptArrayRef
;
161 UINT32 SMMU_NSgIrptFlags
;
162 UINT32 SMMU_NSgCfgIrpt
;
163 UINT32 SMMU_NSgCfgIrptFlags
;
165 // EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT ContextInterrupt[NumContextInterrupts];
166 // EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT PmuInterrupt[NumPmuInterrupts];
167 } EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE
;
170 /// Node type 4: SMMUv3 node
173 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
184 UINT32 ProximityDomain
;
185 UINT32 DeviceIdMappingIndex
;
186 } EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE
;
189 /// Node type 5: PMCG node
192 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
195 UINT32 OverflowInterruptGsiv
;
196 UINT32 NodeReference
;
198 // EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE OverflowInterruptMsiMapping[1];
199 } EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE
;