2 ACPI IO Remapping Table (IORT) as specified in ARM spec DEN0049C
4 http://infocenter.arm.com/help/topic/com.arm.doc.den0049c/DEN0049C_IO_Remapping_Table.pdf
6 Copyright (c) 2017, Linaro Limited. All rights reserved.<BR>
8 This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #ifndef __IO_REMAPPING_TABLE_H__
18 #define __IO_REMAPPING_TABLE_H__
20 #include <IndustryStandard/Acpi.h>
22 #define EFI_ACPI_IO_REMAPPING_TABLE_REVISION 0x0
24 #define EFI_ACPI_IORT_TYPE_ITS_GROUP 0x0
25 #define EFI_ACPI_IORT_TYPE_NAMED_COMP 0x1
26 #define EFI_ACPI_IORT_TYPE_ROOT_COMPLEX 0x2
27 #define EFI_ACPI_IORT_TYPE_SMMUv1v2 0x3
28 #define EFI_ACPI_IORT_TYPE_SMMUv3 0x4
29 #define EFI_ACPI_IORT_TYPE_PMCG 0x5
31 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA BIT0
33 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_TR BIT0
34 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_WA BIT1
35 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_RA BIT2
36 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_AHO BIT3
38 #define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_CPM BIT0
39 #define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_DACS BIT1
41 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_v1 0x0
42 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_v2 0x1
43 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU400 0x2
44 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU500 0x3
45 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU401 0x4
46 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_CAVIUM_THX_v2 0x5
48 #define EFI_ACPI_IORT_SMMUv1v2_FLAG_DVM BIT0
49 #define EFI_ACPI_IORT_SMMUv1v2_FLAG_COH_WALK BIT1
51 #define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_LEVEL 0x0
52 #define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_EDGE 0x1
54 #define EFI_ACPI_IORT_SMMUv3_FLAG_COHAC_OVERRIDE BIT0
55 #define EFI_ACPI_IORT_SMMUv3_FLAG_HTTU_OVERRIDE BIT1
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 } EFI_ACPI_6_0_IO_REMAPPING_RC_NODE
;
123 /// Node type 2: named component node
126 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
129 UINT32 CacheCoherent
;
130 UINT8 AllocationHints
;
132 UINT8 MemoryAccessFlags
;
133 UINT8 AddressSizeLimit
;
134 //UINT8 ObjectName[];
135 } EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE
;
138 /// Node type 3: SMMUv1 or SMMUv2 node
142 UINT32 InterruptFlags
;
143 } EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT
;
146 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
152 UINT32 GlobalInterruptArrayRef
;
153 UINT32 NumContextInterrupts
;
154 UINT32 ContextInterruptArrayRef
;
155 UINT32 NumPmuInterrupts
;
156 UINT32 PmuInterruptArrayRef
;
159 UINT32 SMMU_NSgIrptFlags
;
160 UINT32 SMMU_NSgCfgIrpt
;
161 UINT32 SMMU_NSgCfgIrptFlags
;
163 //EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT ContextInterrupt[NumContextInterrupts];
164 //EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT PmuInterrupt[NumPmuInterrupts];
165 } EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE
;
168 /// Node type 4: SMMUv4 node
171 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
182 } EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE
;
185 /// Node type 5: PMCG node
188 EFI_ACPI_6_0_IO_REMAPPING_NODE Node
;
191 UINT32 OverflowInterruptGsiv
;
192 UINT32 NodeReference
;
193 //EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE OverflowInterruptMsiMapping[1];
194 } EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE
;