TianoCore EDK2 master
Loading...
Searching...
No Matches
IoRemappingTable.h
Go to the documentation of this file.
1
21#ifndef __IO_REMAPPING_TABLE_H__
22#define __IO_REMAPPING_TABLE_H__
23
25
26#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00 0x0
27#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_04 0x4 // Deprecated
28#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05 0x5
29#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_06 0x6
30
31#define EFI_ACPI_IORT_TYPE_ITS_GROUP 0x0
32#define EFI_ACPI_IORT_TYPE_NAMED_COMP 0x1
33#define EFI_ACPI_IORT_TYPE_ROOT_COMPLEX 0x2
34#define EFI_ACPI_IORT_TYPE_SMMUv1v2 0x3
35#define EFI_ACPI_IORT_TYPE_SMMUv3 0x4
36#define EFI_ACPI_IORT_TYPE_PMCG 0x5
37#define EFI_ACPI_IORT_TYPE_RMR 0x6
38
39#define EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA BIT0
40
41#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_TR BIT0
42#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_WA BIT1
43#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_RA BIT2
44#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_AHO BIT3
45
46#define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_CPM BIT0
47#define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_DACS BIT1
48#define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_CANWBS BIT2
49
50#define EFI_ACPI_IORT_SMMUv1v2_MODEL_v1 0x0
51#define EFI_ACPI_IORT_SMMUv1v2_MODEL_v2 0x1
52#define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU400 0x2
53#define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU500 0x3
54#define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU401 0x4
55#define EFI_ACPI_IORT_SMMUv1v2_MODEL_CAVIUM_THX_v2 0x5
56
57#define EFI_ACPI_IORT_SMMUv1v2_FLAG_DVM BIT0
58#define EFI_ACPI_IORT_SMMUv1v2_FLAG_COH_WALK BIT1
59
60#define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_LEVEL 0x0
61#define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_EDGE 0x1
62
63#define EFI_ACPI_IORT_SMMUv3_FLAG_COHAC_OVERRIDE BIT0
64#define EFI_ACPI_IORT_SMMUv3_FLAG_HTTU_OVERRIDE BIT1 // HW update of Access Flag supported
65#define EFI_ACPI_IORT_SMMUv3_FLAG_HTTU_OVERRIDE_DS BIT2 // HW update of Access Flag + Dirty Flag supported
66#define EFI_ACPI_IORT_SMMUv3_FLAG_PROXIMITY_DOMAIN BIT3
67#define EFI_ACPI_IORT_SMMUv3_FLAG_DEVICEID_VALID BIT4
68
69#define EFI_ACPI_IORT_SMMUv3_MODEL_GENERIC 0x0
70#define EFI_ACPI_IORT_SMMUv3_MODEL_HISILICON_HI161X 0x1
71#define EFI_ACPI_IORT_SMMUv3_MODEL_CAVIUM_CN99XX 0x2
72
73#define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_UNSUPPORTED 0x0
74#define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED BIT0
75
76#define EFI_ACPI_IORT_ROOT_COMPLEX_PRI_UNSUPPORTED 0x0
77#define EFI_ACPI_IORT_ROOT_COMPLEX_PRI_SUPPORTED BIT1
78
79#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_FWD_UNSUPPORTED 0x0
80#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_FWD_SUPPORTED BIT2
81
82#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_UNSUPPORTED 0x0
83#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_SUPPORTED BIT1
84
85#define EFI_ACPI_IORT_RMR_REMAP_NOT_PERMITTED 0x0
86#define EFI_ACPI_IORT_RMR_REMAP_PERMITTED BIT0
87
88#define EFI_ACPI_IORT_RMR_ACCESS_REQ_NOT_PRIVILEGED 0x0
89#define EFI_ACPI_IORT_RMR_ACCESS_REQ_PRIVILEGED BIT1
90
91#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGNRNE 0x0
92#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGNRE 0x1
93#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGRE 0x2
94#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_GRE 0x3
95#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_NORM_IN_NC_OUT_NC 0x4
96#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_NORM_IN_WB_OUT_WB_ISH 0x5
97
98#define EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE BIT0
99
100#define EFI_ACPI_IORT_RMR_NODE_REVISION_02 0x2 // Deprecated
101
102#pragma pack(1)
103
107typedef struct {
109 UINT32 NumNodes;
110 UINT32 NodeOffset;
111 UINT32 Reserved;
113
117typedef struct {
118 UINT32 InputBase;
119 UINT32 NumIds;
120 UINT32 OutputBase;
121 UINT32 OutputReference;
122 UINT32 Flags;
124
128typedef struct {
129 UINT8 Type;
130 UINT16 Length;
131 UINT8 Revision;
132 UINT32 Identifier;
133 UINT32 NumIdMappings;
134 UINT32 IdReference;
136
140typedef struct {
142
143 UINT32 NumItsIdentifiers;
144 // UINT32 ItsIdentifiers[NumItsIdentifiers];
146
150typedef struct {
152
153 UINT32 CacheCoherent;
154 UINT8 AllocationHints;
155 UINT16 Reserved;
156 UINT8 MemoryAccessFlags;
157
158 UINT32 AtsAttribute;
159 UINT32 PciSegmentNumber;
160 UINT8 MemoryAddressSize;
161 UINT16 PasidCapabilities;
162 UINT8 Reserved1[1];
163 UINT32 Flags;
165
169typedef struct {
171
172 UINT32 Flags;
173 UINT32 CacheCoherent;
174 UINT8 AllocationHints;
175 UINT16 Reserved;
176 UINT8 MemoryAccessFlags;
177 UINT8 AddressSizeLimit;
178 // UINT8 ObjectName[];
180
184typedef struct {
185 UINT32 Interrupt;
186 UINT32 InterruptFlags;
188
189typedef struct {
191
192 UINT64 Base;
193 UINT64 Span;
194 UINT32 Model;
195 UINT32 Flags;
196 UINT32 GlobalInterruptArrayRef;
197 UINT32 NumContextInterrupts;
198 UINT32 ContextInterruptArrayRef;
199 UINT32 NumPmuInterrupts;
200 UINT32 PmuInterruptArrayRef;
201
202 UINT32 SMMU_NSgIrpt;
203 UINT32 SMMU_NSgIrptFlags;
204 UINT32 SMMU_NSgCfgIrpt;
205 UINT32 SMMU_NSgCfgIrptFlags;
206
207 // EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT ContextInterrupt[NumContextInterrupts];
208 // EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT PmuInterrupt[NumPmuInterrupts];
210
214typedef struct {
216
217 UINT64 Base;
218 UINT32 Flags;
219 UINT32 Reserved;
220 UINT64 VatosAddress;
221 UINT32 Model;
222 UINT32 Event;
223 UINT32 Pri;
224 UINT32 Gerr;
225 UINT32 Sync;
226 UINT32 ProximityDomain;
227 UINT32 DeviceIdMappingIndex;
229
233typedef struct {
235
236 UINT64 Base;
237 UINT32 OverflowInterruptGsiv;
238 UINT32 NodeReference;
239 UINT64 Page1Base;
240 // EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE OverflowInterruptMsiMapping[1];
242
246typedef struct {
249 UINT64 Base;
250
253 UINT64 Length;
254
256 UINT32 Reserved;
258
262typedef struct {
264
266 UINT32 Flags;
267
270
273 // EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE IdMapping[1];
274 // EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC MemRangeDesc[1];
276
277#pragma pack()
278
279#endif
UINT32 Reserved
Reserved, must be zero.
UINT32 MemRangeDescRef
Offset of the memory range descriptor array.
UINT32 NumMemRangeDesc
Memory range descriptor count.