actbl2.h revision 1.1.1.24 1 1.1 jruoho /******************************************************************************
2 1.1 jruoho *
3 1.1.1.3 jruoho * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
4 1.1 jruoho *
5 1.1 jruoho *****************************************************************************/
6 1.1 jruoho
7 1.1.1.2 jruoho /*
8 1.1.1.24 christos * Copyright (C) 2000 - 2023, Intel Corp.
9 1.1 jruoho * All rights reserved.
10 1.1 jruoho *
11 1.1.1.2 jruoho * Redistribution and use in source and binary forms, with or without
12 1.1.1.2 jruoho * modification, are permitted provided that the following conditions
13 1.1.1.2 jruoho * are met:
14 1.1.1.2 jruoho * 1. Redistributions of source code must retain the above copyright
15 1.1.1.2 jruoho * notice, this list of conditions, and the following disclaimer,
16 1.1.1.2 jruoho * without modification.
17 1.1.1.2 jruoho * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1.1.2 jruoho * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1.1.2 jruoho * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1.1.2 jruoho * including a substantially similar Disclaimer requirement for further
21 1.1.1.2 jruoho * binary redistribution.
22 1.1.1.2 jruoho * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1.1.2 jruoho * of any contributors may be used to endorse or promote products derived
24 1.1.1.2 jruoho * from this software without specific prior written permission.
25 1.1.1.2 jruoho *
26 1.1.1.2 jruoho * Alternatively, this software may be distributed under the terms of the
27 1.1.1.2 jruoho * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1.1.2 jruoho * Software Foundation.
29 1.1.1.2 jruoho *
30 1.1.1.2 jruoho * NO WARRANTY
31 1.1.1.2 jruoho * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1.1.2 jruoho * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1.1.18 christos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 1.1.1.2 jruoho * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1.1.2 jruoho * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1.1.2 jruoho * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1.1.2 jruoho * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1.1.2 jruoho * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1.1.2 jruoho * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1.1.2 jruoho * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1.1.2 jruoho * POSSIBILITY OF SUCH DAMAGES.
42 1.1.1.2 jruoho */
43 1.1 jruoho
44 1.1 jruoho #ifndef __ACTBL2_H__
45 1.1 jruoho #define __ACTBL2_H__
46 1.1 jruoho
47 1.1 jruoho
48 1.1 jruoho /*******************************************************************************
49 1.1 jruoho *
50 1.1 jruoho * Additional ACPI Tables (2)
51 1.1 jruoho *
52 1.1 jruoho * These tables are not consumed directly by the ACPICA subsystem, but are
53 1.1 jruoho * included here to support device drivers and the AML disassembler.
54 1.1 jruoho *
55 1.1 jruoho ******************************************************************************/
56 1.1 jruoho
57 1.1 jruoho
58 1.1 jruoho /*
59 1.1 jruoho * Values for description table header signatures for tables defined in this
60 1.1 jruoho * file. Useful because they make it more difficult to inadvertently type in
61 1.1 jruoho * the wrong signature.
62 1.1 jruoho */
63 1.1.1.21 christos #define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */
64 1.1.1.22 christos #define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */
65 1.1.1.19 christos #define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */
66 1.1.1.23 christos #define ACPI_SIG_CCEL "CCEL" /* CC Event Log Table */
67 1.1.1.23 christos #define ACPI_SIG_CDAT "CDAT" /* Coherent Device Attribute Table */
68 1.1.1.7 christos #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
69 1.1 jruoho #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
70 1.1.1.5 christos #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
71 1.1.1.14 christos #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
72 1.1 jruoho #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
73 1.1 jruoho #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
74 1.1.1.24 christos #define ACPI_SIG_MPAM "MPAM" /* Memory System Resource Partitioning and Monitoring Table */
75 1.1.1.14 christos #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
76 1.1.1.6 christos #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
77 1.1.1.14 christos #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
78 1.1.1.20 christos #define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */
79 1.1.1.14 christos #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
80 1.1.1.14 christos #define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */
81 1.1.1.18 christos #define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */
82 1.1.1.14 christos #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
83 1.1.1.14 christos #define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */
84 1.1.1.19 christos #define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */
85 1.1.1.14 christos #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
86 1.1.1.19 christos #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */
87 1.1.1.24 christos #define ACPI_SIG_RHCT "RHCT" /* RISC-V Hart Capabilities Table */
88 1.1.1.14 christos #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
89 1.1.1.12 christos #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
90 1.1.1.14 christos #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
91 1.1.1.19 christos #define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
92 1.1.1.21 christos #define ACPI_SIG_TDEL "TDEL" /* TD Event Log Table */
93 1.1 jruoho
94 1.1 jruoho
95 1.1 jruoho /*
96 1.1 jruoho * All tables must be byte-packed to match the ACPI specification, since
97 1.1 jruoho * the tables are provided by the system BIOS.
98 1.1 jruoho */
99 1.1 jruoho #pragma pack(1)
100 1.1 jruoho
101 1.1 jruoho /*
102 1.1.1.4 christos * Note: C bitfields are not used for this reason:
103 1.1.1.4 christos *
104 1.1.1.4 christos * "Bitfields are great and easy to read, but unfortunately the C language
105 1.1.1.4 christos * does not specify the layout of bitfields in memory, which means they are
106 1.1.1.4 christos * essentially useless for dealing with packed data in on-disk formats or
107 1.1.1.4 christos * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
108 1.1.1.4 christos * this decision was a design error in C. Ritchie could have picked an order
109 1.1.1.4 christos * and stuck with it." Norman Ramsey.
110 1.1.1.4 christos * See http://stackoverflow.com/a/1053662/41661
111 1.1 jruoho */
112 1.1 jruoho
113 1.1 jruoho
114 1.1 jruoho /*******************************************************************************
115 1.1 jruoho *
116 1.1.1.20 christos * AEST - Arm Error Source Table
117 1.1.1.20 christos *
118 1.1.1.20 christos * Conforms to: ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document
119 1.1.1.20 christos * September 2020.
120 1.1.1.20 christos *
121 1.1.1.20 christos ******************************************************************************/
122 1.1.1.20 christos
123 1.1.1.20 christos typedef struct acpi_table_aest
124 1.1.1.20 christos {
125 1.1.1.20 christos ACPI_TABLE_HEADER Header;
126 1.1.1.20 christos
127 1.1.1.20 christos } ACPI_TABLE_AEST;
128 1.1.1.20 christos
129 1.1.1.20 christos /* Common Subtable header - one per Node Structure (Subtable) */
130 1.1.1.20 christos
131 1.1.1.24 christos typedef struct acpi_aest_hdr
132 1.1.1.20 christos {
133 1.1.1.20 christos UINT8 Type;
134 1.1.1.20 christos UINT16 Length;
135 1.1.1.20 christos UINT8 Reserved;
136 1.1.1.20 christos UINT32 NodeSpecificOffset;
137 1.1.1.20 christos UINT32 NodeInterfaceOffset;
138 1.1.1.20 christos UINT32 NodeInterruptOffset;
139 1.1.1.20 christos UINT32 NodeInterruptCount;
140 1.1.1.20 christos UINT64 TimestampRate;
141 1.1.1.20 christos UINT64 Reserved1;
142 1.1.1.20 christos UINT64 ErrorInjectionRate;
143 1.1.1.20 christos
144 1.1.1.20 christos } ACPI_AEST_HEADER;
145 1.1.1.20 christos
146 1.1.1.20 christos /* Values for Type above */
147 1.1.1.20 christos
148 1.1.1.20 christos #define ACPI_AEST_PROCESSOR_ERROR_NODE 0
149 1.1.1.20 christos #define ACPI_AEST_MEMORY_ERROR_NODE 1
150 1.1.1.20 christos #define ACPI_AEST_SMMU_ERROR_NODE 2
151 1.1.1.20 christos #define ACPI_AEST_VENDOR_ERROR_NODE 3
152 1.1.1.20 christos #define ACPI_AEST_GIC_ERROR_NODE 4
153 1.1.1.20 christos #define ACPI_AEST_NODE_TYPE_RESERVED 5 /* 5 and above are reserved */
154 1.1.1.20 christos
155 1.1.1.20 christos
156 1.1.1.20 christos /*
157 1.1.1.20 christos * AEST subtables (Error nodes)
158 1.1.1.20 christos */
159 1.1.1.20 christos
160 1.1.1.20 christos /* 0: Processor Error */
161 1.1.1.20 christos
162 1.1.1.24 christos typedef struct acpi_aest_processor
163 1.1.1.20 christos {
164 1.1.1.20 christos UINT32 ProcessorId;
165 1.1.1.20 christos UINT8 ResourceType;
166 1.1.1.20 christos UINT8 Reserved;
167 1.1.1.20 christos UINT8 Flags;
168 1.1.1.20 christos UINT8 Revision;
169 1.1.1.20 christos UINT64 ProcessorAffinity;
170 1.1.1.20 christos
171 1.1.1.20 christos } ACPI_AEST_PROCESSOR;
172 1.1.1.20 christos
173 1.1.1.20 christos /* Values for ResourceType above, related structs below */
174 1.1.1.20 christos
175 1.1.1.20 christos #define ACPI_AEST_CACHE_RESOURCE 0
176 1.1.1.20 christos #define ACPI_AEST_TLB_RESOURCE 1
177 1.1.1.20 christos #define ACPI_AEST_GENERIC_RESOURCE 2
178 1.1.1.20 christos #define ACPI_AEST_RESOURCE_RESERVED 3 /* 3 and above are reserved */
179 1.1.1.20 christos
180 1.1.1.20 christos /* 0R: Processor Cache Resource Substructure */
181 1.1.1.20 christos
182 1.1.1.24 christos typedef struct acpi_aest_processor_cache
183 1.1.1.20 christos {
184 1.1.1.20 christos UINT32 CacheReference;
185 1.1.1.20 christos UINT32 Reserved;
186 1.1.1.20 christos
187 1.1.1.20 christos } ACPI_AEST_PROCESSOR_CACHE;
188 1.1.1.20 christos
189 1.1.1.20 christos /* Values for CacheType above */
190 1.1.1.20 christos
191 1.1.1.20 christos #define ACPI_AEST_CACHE_DATA 0
192 1.1.1.20 christos #define ACPI_AEST_CACHE_INSTRUCTION 1
193 1.1.1.20 christos #define ACPI_AEST_CACHE_UNIFIED 2
194 1.1.1.20 christos #define ACPI_AEST_CACHE_RESERVED 3 /* 3 and above are reserved */
195 1.1.1.20 christos
196 1.1.1.20 christos /* 1R: Processor TLB Resource Substructure */
197 1.1.1.20 christos
198 1.1.1.24 christos typedef struct acpi_aest_processor_tlb
199 1.1.1.20 christos {
200 1.1.1.20 christos UINT32 TlbLevel;
201 1.1.1.20 christos UINT32 Reserved;
202 1.1.1.20 christos
203 1.1.1.20 christos } ACPI_AEST_PROCESSOR_TLB;
204 1.1.1.20 christos
205 1.1.1.20 christos /* 2R: Processor Generic Resource Substructure */
206 1.1.1.20 christos
207 1.1.1.24 christos typedef struct acpi_aest_processor_generic
208 1.1.1.20 christos {
209 1.1.1.21 christos UINT32 Resource;
210 1.1.1.20 christos
211 1.1.1.20 christos } ACPI_AEST_PROCESSOR_GENERIC;
212 1.1.1.20 christos
213 1.1.1.20 christos /* 1: Memory Error */
214 1.1.1.20 christos
215 1.1.1.24 christos typedef struct acpi_aest_memory
216 1.1.1.20 christos {
217 1.1.1.20 christos UINT32 SratProximityDomain;
218 1.1.1.20 christos
219 1.1.1.20 christos } ACPI_AEST_MEMORY;
220 1.1.1.20 christos
221 1.1.1.20 christos /* 2: Smmu Error */
222 1.1.1.20 christos
223 1.1.1.24 christos typedef struct acpi_aest_smmu
224 1.1.1.20 christos {
225 1.1.1.20 christos UINT32 IortNodeReference;
226 1.1.1.20 christos UINT32 SubcomponentReference;
227 1.1.1.20 christos
228 1.1.1.20 christos } ACPI_AEST_SMMU;
229 1.1.1.20 christos
230 1.1.1.20 christos /* 3: Vendor Defined */
231 1.1.1.20 christos
232 1.1.1.24 christos typedef struct acpi_aest_vendor
233 1.1.1.20 christos {
234 1.1.1.20 christos UINT32 AcpiHid;
235 1.1.1.20 christos UINT32 AcpiUid;
236 1.1.1.20 christos UINT8 VendorSpecificData[16];
237 1.1.1.20 christos
238 1.1.1.20 christos } ACPI_AEST_VENDOR;
239 1.1.1.20 christos
240 1.1.1.20 christos /* 4: Gic Error */
241 1.1.1.20 christos
242 1.1.1.24 christos typedef struct acpi_aest_gic
243 1.1.1.20 christos {
244 1.1.1.20 christos UINT32 InterfaceType;
245 1.1.1.20 christos UINT32 InstanceId;
246 1.1.1.20 christos
247 1.1.1.20 christos } ACPI_AEST_GIC;
248 1.1.1.20 christos
249 1.1.1.20 christos /* Values for InterfaceType above */
250 1.1.1.20 christos
251 1.1.1.20 christos #define ACPI_AEST_GIC_CPU 0
252 1.1.1.20 christos #define ACPI_AEST_GIC_DISTRIBUTOR 1
253 1.1.1.20 christos #define ACPI_AEST_GIC_REDISTRIBUTOR 2
254 1.1.1.20 christos #define ACPI_AEST_GIC_ITS 3
255 1.1.1.20 christos #define ACPI_AEST_GIC_RESERVED 4 /* 4 and above are reserved */
256 1.1.1.20 christos
257 1.1.1.20 christos
258 1.1.1.20 christos /* Node Interface Structure */
259 1.1.1.20 christos
260 1.1.1.24 christos typedef struct acpi_aest_node_interface
261 1.1.1.20 christos {
262 1.1.1.20 christos UINT8 Type;
263 1.1.1.20 christos UINT8 Reserved[3];
264 1.1.1.20 christos UINT32 Flags;
265 1.1.1.20 christos UINT64 Address;
266 1.1.1.20 christos UINT32 ErrorRecordIndex;
267 1.1.1.20 christos UINT32 ErrorRecordCount;
268 1.1.1.20 christos UINT64 ErrorRecordImplemented;
269 1.1.1.20 christos UINT64 ErrorStatusReporting;
270 1.1.1.20 christos UINT64 AddressingMode;
271 1.1.1.20 christos
272 1.1.1.20 christos } ACPI_AEST_NODE_INTERFACE;
273 1.1.1.20 christos
274 1.1.1.20 christos /* Values for Type field above */
275 1.1.1.20 christos
276 1.1.1.20 christos #define ACPI_AEST_NODE_SYSTEM_REGISTER 0
277 1.1.1.20 christos #define ACPI_AEST_NODE_MEMORY_MAPPED 1
278 1.1.1.20 christos #define ACPI_AEST_XFACE_RESERVED 2 /* 2 and above are reserved */
279 1.1.1.20 christos
280 1.1.1.20 christos /* Node Interrupt Structure */
281 1.1.1.20 christos
282 1.1.1.24 christos typedef struct acpi_aest_node_interrupt
283 1.1.1.20 christos {
284 1.1.1.20 christos UINT8 Type;
285 1.1.1.20 christos UINT8 Reserved[2];
286 1.1.1.20 christos UINT8 Flags;
287 1.1.1.20 christos UINT32 Gsiv;
288 1.1.1.20 christos UINT8 IortId;
289 1.1.1.20 christos UINT8 Reserved1[3];
290 1.1.1.20 christos
291 1.1.1.20 christos } ACPI_AEST_NODE_INTERRUPT;
292 1.1.1.20 christos
293 1.1.1.20 christos /* Values for Type field above */
294 1.1.1.20 christos
295 1.1.1.20 christos #define ACPI_AEST_NODE_FAULT_HANDLING 0
296 1.1.1.20 christos #define ACPI_AEST_NODE_ERROR_RECOVERY 1
297 1.1.1.20 christos #define ACPI_AEST_XRUPT_RESERVED 2 /* 2 and above are reserved */
298 1.1.1.20 christos
299 1.1.1.20 christos
300 1.1.1.20 christos /*******************************************************************************
301 1.1.1.21 christos * AGDI - Arm Generic Diagnostic Dump and Reset Device Interface
302 1.1.1.21 christos *
303 1.1.1.21 christos * Conforms to "ACPI for Arm Components 1.1, Platform Design Document"
304 1.1.1.21 christos * ARM DEN0093 v1.1
305 1.1.1.21 christos *
306 1.1.1.21 christos ******************************************************************************/
307 1.1.1.21 christos typedef struct acpi_table_agdi
308 1.1.1.21 christos {
309 1.1.1.21 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
310 1.1.1.21 christos UINT8 Flags;
311 1.1.1.21 christos UINT8 Reserved[3];
312 1.1.1.21 christos UINT32 SdeiEvent;
313 1.1.1.21 christos UINT32 Gsiv;
314 1.1.1.21 christos
315 1.1.1.21 christos } ACPI_TABLE_AGDI;
316 1.1.1.21 christos
317 1.1.1.21 christos /* Mask for Flags field above */
318 1.1.1.21 christos
319 1.1.1.21 christos #define ACPI_AGDI_SIGNALING_MODE (1)
320 1.1.1.21 christos
321 1.1.1.21 christos
322 1.1.1.21 christos /*******************************************************************************
323 1.1.1.20 christos *
324 1.1.1.22 christos * APMT - ARM Performance Monitoring Unit Table
325 1.1.1.22 christos *
326 1.1.1.22 christos * Conforms to:
327 1.1.1.22 christos * ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document
328 1.1.1.22 christos * ARM DEN0117 v1.0 November 25, 2021
329 1.1.1.22 christos *
330 1.1.1.22 christos ******************************************************************************/
331 1.1.1.22 christos
332 1.1.1.22 christos typedef struct acpi_table_apmt {
333 1.1.1.22 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
334 1.1.1.22 christos } ACPI_TABLE_APMT;
335 1.1.1.22 christos
336 1.1.1.22 christos #define ACPI_APMT_NODE_ID_LENGTH 4
337 1.1.1.22 christos
338 1.1.1.22 christos /*
339 1.1.1.22 christos * APMT subtables
340 1.1.1.22 christos */
341 1.1.1.22 christos typedef struct acpi_apmt_node {
342 1.1.1.22 christos UINT16 Length;
343 1.1.1.22 christos UINT8 Flags;
344 1.1.1.22 christos UINT8 Type;
345 1.1.1.22 christos UINT32 Id;
346 1.1.1.22 christos UINT64 InstPrimary;
347 1.1.1.22 christos UINT32 InstSecondary;
348 1.1.1.22 christos UINT64 BaseAddress0;
349 1.1.1.22 christos UINT64 BaseAddress1;
350 1.1.1.22 christos UINT32 OvflwIrq;
351 1.1.1.22 christos UINT32 Reserved;
352 1.1.1.22 christos UINT32 OvflwIrqFlags;
353 1.1.1.22 christos UINT32 ProcAffinity;
354 1.1.1.22 christos UINT32 ImplId;
355 1.1.1.22 christos } ACPI_APMT_NODE;
356 1.1.1.22 christos
357 1.1.1.22 christos /* Masks for Flags field above */
358 1.1.1.22 christos
359 1.1.1.22 christos #define ACPI_APMT_FLAGS_DUAL_PAGE (1<<0)
360 1.1.1.22 christos #define ACPI_APMT_FLAGS_AFFINITY (1<<1)
361 1.1.1.22 christos #define ACPI_APMT_FLAGS_ATOMIC (1<<2)
362 1.1.1.22 christos
363 1.1.1.22 christos /* Values for Flags dual page field above */
364 1.1.1.22 christos
365 1.1.1.22 christos #define ACPI_APMT_FLAGS_DUAL_PAGE_NSUPP (0<<0)
366 1.1.1.22 christos #define ACPI_APMT_FLAGS_DUAL_PAGE_SUPP (1<<0)
367 1.1.1.22 christos
368 1.1.1.22 christos /* Values for Flags processor affinity field above */
369 1.1.1.22 christos #define ACPI_APMT_FLAGS_AFFINITY_PROC (0<<1)
370 1.1.1.22 christos #define ACPI_APMT_FLAGS_AFFINITY_PROC_CONTAINER (1<<1)
371 1.1.1.22 christos
372 1.1.1.22 christos /* Values for Flags 64-bit atomic field above */
373 1.1.1.22 christos #define ACPI_APMT_FLAGS_ATOMIC_NSUPP (0<<2)
374 1.1.1.22 christos #define ACPI_APMT_FLAGS_ATOMIC_SUPP (1<<2)
375 1.1.1.22 christos
376 1.1.1.22 christos /* Values for Type field above */
377 1.1.1.22 christos
378 1.1.1.22 christos enum acpi_apmt_node_type {
379 1.1.1.22 christos ACPI_APMT_NODE_TYPE_MC = 0x00,
380 1.1.1.22 christos ACPI_APMT_NODE_TYPE_SMMU = 0x01,
381 1.1.1.22 christos ACPI_APMT_NODE_TYPE_PCIE_ROOT = 0x02,
382 1.1.1.22 christos ACPI_APMT_NODE_TYPE_ACPI = 0x03,
383 1.1.1.22 christos ACPI_APMT_NODE_TYPE_CACHE = 0x04,
384 1.1.1.22 christos ACPI_APMT_NODE_TYPE_COUNT
385 1.1.1.22 christos };
386 1.1.1.22 christos
387 1.1.1.22 christos /* Masks for ovflw_irq_flags field above */
388 1.1.1.22 christos
389 1.1.1.22 christos #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE (1<<0)
390 1.1.1.22 christos #define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE (1<<1)
391 1.1.1.22 christos
392 1.1.1.22 christos /* Values for ovflw_irq_flags mode field above */
393 1.1.1.22 christos
394 1.1.1.22 christos #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_LEVEL (0<<0)
395 1.1.1.22 christos #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_EDGE (1<<0)
396 1.1.1.22 christos
397 1.1.1.22 christos /* Values for ovflw_irq_flags type field above */
398 1.1.1.22 christos
399 1.1.1.22 christos #define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE_WIRED (0<<1)
400 1.1.1.22 christos
401 1.1.1.22 christos
402 1.1.1.22 christos /*******************************************************************************
403 1.1.1.22 christos *
404 1.1.1.19 christos * BDAT - BIOS Data ACPI Table
405 1.1.1.19 christos *
406 1.1.1.19 christos * Conforms to "BIOS Data ACPI Table", Interface Specification v4.0 Draft 5
407 1.1.1.19 christos * Nov 2020
408 1.1.1.19 christos *
409 1.1.1.19 christos ******************************************************************************/
410 1.1.1.19 christos
411 1.1.1.19 christos typedef struct acpi_table_bdat
412 1.1.1.19 christos {
413 1.1.1.19 christos ACPI_TABLE_HEADER Header;
414 1.1.1.19 christos ACPI_GENERIC_ADDRESS Gas;
415 1.1.1.19 christos
416 1.1.1.19 christos } ACPI_TABLE_BDAT;
417 1.1.1.19 christos
418 1.1.1.23 christos /*******************************************************************************
419 1.1.1.23 christos *
420 1.1.1.23 christos * CCEL - CC-Event Log
421 1.1.1.23 christos * From: "Guest-Host-Communication Interface (GHCI) for Intel
422 1.1.1.23 christos * Trust Domain Extensions (Intel TDX)". Feb 2022
423 1.1.1.23 christos *
424 1.1.1.23 christos ******************************************************************************/
425 1.1.1.23 christos
426 1.1.1.23 christos typedef struct acpi_table_ccel
427 1.1.1.23 christos {
428 1.1.1.23 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
429 1.1.1.23 christos UINT8 CCType;
430 1.1.1.23 christos UINT8 CCSubType;
431 1.1.1.23 christos UINT16 Reserved;
432 1.1.1.23 christos UINT64 LogAreaMinimumLength;
433 1.1.1.23 christos UINT64 LogAreaStartAddress;
434 1.1.1.23 christos
435 1.1.1.23 christos } ACPI_TABLE_CCEL;
436 1.1.1.19 christos
437 1.1.1.19 christos /*******************************************************************************
438 1.1.1.19 christos *
439 1.1.1.14 christos * IORT - IO Remapping Table
440 1.1 jruoho *
441 1.1.1.14 christos * Conforms to "IO Remapping Table System Software on ARM Platforms",
442 1.1.1.23 christos * Document number: ARM DEN 0049E.e, Sep 2022
443 1.1 jruoho *
444 1.1 jruoho ******************************************************************************/
445 1.1 jruoho
446 1.1.1.14 christos typedef struct acpi_table_iort
447 1.1 jruoho {
448 1.1.1.14 christos ACPI_TABLE_HEADER Header;
449 1.1.1.14 christos UINT32 NodeCount;
450 1.1.1.14 christos UINT32 NodeOffset;
451 1.1.1.14 christos UINT32 Reserved;
452 1.1 jruoho
453 1.1.1.14 christos } ACPI_TABLE_IORT;
454 1.1 jruoho
455 1.1 jruoho
456 1.1.1.14 christos /*
457 1.1.1.14 christos * IORT subtables
458 1.1.1.14 christos */
459 1.1.1.14 christos typedef struct acpi_iort_node
460 1.1 jruoho {
461 1.1 jruoho UINT8 Type;
462 1.1 jruoho UINT16 Length;
463 1.1.1.14 christos UINT8 Revision;
464 1.1.1.18 christos UINT32 Identifier;
465 1.1.1.14 christos UINT32 MappingCount;
466 1.1.1.14 christos UINT32 MappingOffset;
467 1.1.1.24 christos char NodeData[];
468 1.1 jruoho
469 1.1.1.14 christos } ACPI_IORT_NODE;
470 1.1 jruoho
471 1.1.1.14 christos /* Values for subtable Type above */
472 1.1 jruoho
473 1.1.1.14 christos enum AcpiIortNodeType
474 1.1 jruoho {
475 1.1.1.14 christos ACPI_IORT_NODE_ITS_GROUP = 0x00,
476 1.1.1.14 christos ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
477 1.1.1.14 christos ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
478 1.1.1.14 christos ACPI_IORT_NODE_SMMU = 0x03,
479 1.1.1.15 christos ACPI_IORT_NODE_SMMU_V3 = 0x04,
480 1.1.1.18 christos ACPI_IORT_NODE_PMCG = 0x05,
481 1.1.1.18 christos ACPI_IORT_NODE_RMR = 0x06,
482 1.1 jruoho };
483 1.1 jruoho
484 1.1 jruoho
485 1.1.1.14 christos typedef struct acpi_iort_id_mapping
486 1.1 jruoho {
487 1.1.1.14 christos UINT32 InputBase; /* Lowest value in input range */
488 1.1.1.14 christos UINT32 IdCount; /* Number of IDs */
489 1.1.1.14 christos UINT32 OutputBase; /* Lowest value in output range */
490 1.1.1.14 christos UINT32 OutputReference; /* A reference to the output node */
491 1.1.1.14 christos UINT32 Flags;
492 1.1 jruoho
493 1.1.1.14 christos } ACPI_IORT_ID_MAPPING;
494 1.1 jruoho
495 1.1.1.14 christos /* Masks for Flags field above for IORT subtable */
496 1.1 jruoho
497 1.1.1.14 christos #define ACPI_IORT_ID_SINGLE_MAPPING (1)
498 1.1 jruoho
499 1.1 jruoho
500 1.1.1.14 christos typedef struct acpi_iort_memory_access
501 1.1 jruoho {
502 1.1.1.14 christos UINT32 CacheCoherency;
503 1.1.1.14 christos UINT8 Hints;
504 1.1.1.14 christos UINT16 Reserved;
505 1.1.1.14 christos UINT8 MemoryFlags;
506 1.1 jruoho
507 1.1.1.14 christos } ACPI_IORT_MEMORY_ACCESS;
508 1.1 jruoho
509 1.1.1.14 christos /* Values for CacheCoherency field above */
510 1.1 jruoho
511 1.1.1.14 christos #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
512 1.1.1.14 christos #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
513 1.1 jruoho
514 1.1.1.14 christos /* Masks for Hints field above */
515 1.1 jruoho
516 1.1.1.14 christos #define ACPI_IORT_HT_TRANSIENT (1)
517 1.1.1.14 christos #define ACPI_IORT_HT_WRITE (1<<1)
518 1.1.1.14 christos #define ACPI_IORT_HT_READ (1<<2)
519 1.1.1.14 christos #define ACPI_IORT_HT_OVERRIDE (1<<3)
520 1.1 jruoho
521 1.1.1.14 christos /* Masks for MemoryFlags field above */
522 1.1 jruoho
523 1.1.1.14 christos #define ACPI_IORT_MF_COHERENCY (1)
524 1.1.1.14 christos #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
525 1.1 jruoho
526 1.1 jruoho
527 1.1.1.14 christos /*
528 1.1.1.14 christos * IORT node specific subtables
529 1.1.1.14 christos */
530 1.1.1.14 christos typedef struct acpi_iort_its_group
531 1.1 jruoho {
532 1.1.1.14 christos UINT32 ItsCount;
533 1.1.1.24 christos UINT32 Identifiers[]; /* GIC ITS identifier array */
534 1.1 jruoho
535 1.1.1.14 christos } ACPI_IORT_ITS_GROUP;
536 1.1 jruoho
537 1.1 jruoho
538 1.1.1.14 christos typedef struct acpi_iort_named_component
539 1.1 jruoho {
540 1.1.1.14 christos UINT32 NodeFlags;
541 1.1.1.14 christos UINT64 MemoryProperties; /* Memory access properties */
542 1.1.1.14 christos UINT8 MemoryAddressLimit; /* Memory address size limit */
543 1.1.1.24 christos char DeviceName[]; /* Path of namespace object */
544 1.1 jruoho
545 1.1.1.14 christos } ACPI_IORT_NAMED_COMPONENT;
546 1.1 jruoho
547 1.1.1.15 christos /* Masks for Flags field above */
548 1.1.1.15 christos
549 1.1.1.15 christos #define ACPI_IORT_NC_STALL_SUPPORTED (1)
550 1.1.1.15 christos #define ACPI_IORT_NC_PASID_BITS (31<<1)
551 1.1 jruoho
552 1.1.1.14 christos typedef struct acpi_iort_root_complex
553 1.1 jruoho {
554 1.1.1.14 christos UINT64 MemoryProperties; /* Memory access properties */
555 1.1.1.14 christos UINT32 AtsAttribute;
556 1.1.1.14 christos UINT32 PciSegmentNumber;
557 1.1.1.15 christos UINT8 MemoryAddressLimit; /* Memory address size limit */
558 1.1.1.22 christos UINT16 PasidCapabilities; /* PASID Capabilities */
559 1.1.1.24 christos UINT8 Reserved[]; /* Reserved, must be zero */
560 1.1 jruoho
561 1.1.1.14 christos } ACPI_IORT_ROOT_COMPLEX;
562 1.1 jruoho
563 1.1.1.18 christos /* Masks for AtsAttribute field above */
564 1.1 jruoho
565 1.1.1.18 christos #define ACPI_IORT_ATS_SUPPORTED (1) /* The root complex ATS support */
566 1.1.1.18 christos #define ACPI_IORT_PRI_SUPPORTED (1<<1) /* The root complex PRI support */
567 1.1.1.18 christos #define ACPI_IORT_PASID_FWD_SUPPORTED (1<<2) /* The root complex PASID forward support */
568 1.1.1.4 christos
569 1.1.1.22 christos /* Masks for PasidCapabilities field above */
570 1.1.1.22 christos #define ACPI_IORT_PASID_MAX_WIDTH (0x1F) /* Bits 0-4 */
571 1.1.1.4 christos
572 1.1.1.14 christos typedef struct acpi_iort_smmu
573 1.1.1.14 christos {
574 1.1.1.14 christos UINT64 BaseAddress; /* SMMU base address */
575 1.1.1.14 christos UINT64 Span; /* Length of memory range */
576 1.1.1.14 christos UINT32 Model;
577 1.1.1.14 christos UINT32 Flags;
578 1.1.1.14 christos UINT32 GlobalInterruptOffset;
579 1.1.1.14 christos UINT32 ContextInterruptCount;
580 1.1.1.14 christos UINT32 ContextInterruptOffset;
581 1.1.1.14 christos UINT32 PmuInterruptCount;
582 1.1.1.14 christos UINT32 PmuInterruptOffset;
583 1.1.1.24 christos UINT64 Interrupts[]; /* Interrupt array */
584 1.1.1.4 christos
585 1.1.1.14 christos } ACPI_IORT_SMMU;
586 1.1.1.4 christos
587 1.1.1.14 christos /* Values for Model field above */
588 1.1.1.4 christos
589 1.1.1.14 christos #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
590 1.1.1.14 christos #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
591 1.1.1.14 christos #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
592 1.1.1.14 christos #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
593 1.1.1.14 christos #define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */
594 1.1.1.14 christos #define ACPI_IORT_SMMU_CAVIUM_THUNDERX 0x00000005 /* Cavium ThunderX SMMUv2 */
595 1.1.1.4 christos
596 1.1.1.14 christos /* Masks for Flags field above */
597 1.1.1.4 christos
598 1.1.1.14 christos #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
599 1.1.1.14 christos #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
600 1.1.1.4 christos
601 1.1.1.14 christos /* Global interrupt format */
602 1.1.1.4 christos
603 1.1.1.14 christos typedef struct acpi_iort_smmu_gsi
604 1.1.1.4 christos {
605 1.1.1.14 christos UINT32 NSgIrpt;
606 1.1.1.14 christos UINT32 NSgIrptFlags;
607 1.1.1.14 christos UINT32 NSgCfgIrpt;
608 1.1.1.14 christos UINT32 NSgCfgIrptFlags;
609 1.1.1.4 christos
610 1.1.1.14 christos } ACPI_IORT_SMMU_GSI;
611 1.1.1.4 christos
612 1.1.1.4 christos
613 1.1.1.14 christos typedef struct acpi_iort_smmu_v3
614 1.1.1.4 christos {
615 1.1.1.14 christos UINT64 BaseAddress; /* SMMUv3 base address */
616 1.1.1.14 christos UINT32 Flags;
617 1.1.1.14 christos UINT32 Reserved;
618 1.1.1.14 christos UINT64 VatosAddress;
619 1.1.1.14 christos UINT32 Model;
620 1.1.1.14 christos UINT32 EventGsiv;
621 1.1.1.14 christos UINT32 PriGsiv;
622 1.1.1.14 christos UINT32 GerrGsiv;
623 1.1.1.14 christos UINT32 SyncGsiv;
624 1.1.1.15 christos UINT32 Pxm;
625 1.1.1.14 christos UINT32 IdMappingIndex;
626 1.1.1.4 christos
627 1.1.1.14 christos } ACPI_IORT_SMMU_V3;
628 1.1.1.4 christos
629 1.1.1.14 christos /* Values for Model field above */
630 1.1.1.4 christos
631 1.1.1.14 christos #define ACPI_IORT_SMMU_V3_GENERIC 0x00000000 /* Generic SMMUv3 */
632 1.1.1.14 christos #define ACPI_IORT_SMMU_V3_HISILICON_HI161X 0x00000001 /* HiSilicon Hi161x SMMUv3 */
633 1.1.1.14 christos #define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */
634 1.1.1.4 christos
635 1.1.1.14 christos /* Masks for Flags field above */
636 1.1.1.4 christos
637 1.1.1.14 christos #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
638 1.1.1.15 christos #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1)
639 1.1.1.14 christos #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
640 1.1.1.23 christos #define ACPI_IORT_SMMU_V3_DEVICEID_VALID (1<<4)
641 1.1.1.4 christos
642 1.1.1.15 christos typedef struct acpi_iort_pmcg
643 1.1.1.15 christos {
644 1.1.1.15 christos UINT64 Page0BaseAddress;
645 1.1.1.15 christos UINT32 OverflowGsiv;
646 1.1.1.15 christos UINT32 NodeReference;
647 1.1.1.15 christos UINT64 Page1BaseAddress;
648 1.1.1.15 christos
649 1.1.1.15 christos } ACPI_IORT_PMCG;
650 1.1.1.15 christos
651 1.1.1.18 christos typedef struct acpi_iort_rmr {
652 1.1.1.18 christos UINT32 Flags;
653 1.1.1.18 christos UINT32 RmrCount;
654 1.1.1.18 christos UINT32 RmrOffset;
655 1.1.1.18 christos
656 1.1.1.18 christos } ACPI_IORT_RMR;
657 1.1.1.18 christos
658 1.1.1.22 christos /* Masks for Flags field above */
659 1.1.1.22 christos #define ACPI_IORT_RMR_REMAP_PERMITTED (1)
660 1.1.1.22 christos #define ACPI_IORT_RMR_ACCESS_PRIVILEGE (1<<1)
661 1.1.1.22 christos
662 1.1.1.22 christos /*
663 1.1.1.22 christos * Macro to access the Access Attributes in flags field above:
664 1.1.1.22 christos * Access Attributes is encoded in bits 9:2
665 1.1.1.22 christos */
666 1.1.1.22 christos #define ACPI_IORT_RMR_ACCESS_ATTRIBUTES(flags) (((flags) >> 2) & 0xFF)
667 1.1.1.22 christos
668 1.1.1.22 christos /* Values for above Access Attributes */
669 1.1.1.22 christos
670 1.1.1.22 christos #define ACPI_IORT_RMR_ATTR_DEVICE_NGNRNE 0x00
671 1.1.1.22 christos #define ACPI_IORT_RMR_ATTR_DEVICE_NGNRE 0x01
672 1.1.1.22 christos #define ACPI_IORT_RMR_ATTR_DEVICE_NGRE 0x02
673 1.1.1.22 christos #define ACPI_IORT_RMR_ATTR_DEVICE_GRE 0x03
674 1.1.1.22 christos #define ACPI_IORT_RMR_ATTR_NORMAL_NC 0x04
675 1.1.1.22 christos #define ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB 0x05
676 1.1.1.22 christos
677 1.1.1.18 christos typedef struct acpi_iort_rmr_desc {
678 1.1.1.18 christos UINT64 BaseAddress;
679 1.1.1.18 christos UINT64 Length;
680 1.1.1.18 christos UINT32 Reserved;
681 1.1.1.18 christos
682 1.1.1.18 christos } ACPI_IORT_RMR_DESC;
683 1.1.1.4 christos
684 1.1.1.4 christos /*******************************************************************************
685 1.1.1.4 christos *
686 1.1.1.14 christos * IVRS - I/O Virtualization Reporting Structure
687 1.1.1.14 christos * Version 1
688 1.1.1.4 christos *
689 1.1.1.14 christos * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
690 1.1.1.14 christos * Revision 1.26, February 2009.
691 1.1.1.4 christos *
692 1.1.1.4 christos ******************************************************************************/
693 1.1.1.4 christos
694 1.1.1.14 christos typedef struct acpi_table_ivrs
695 1.1.1.4 christos {
696 1.1.1.4 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
697 1.1.1.14 christos UINT32 Info; /* Common virtualization info */
698 1.1.1.14 christos UINT64 Reserved;
699 1.1.1.4 christos
700 1.1.1.14 christos } ACPI_TABLE_IVRS;
701 1.1.1.4 christos
702 1.1.1.14 christos /* Values for Info field above */
703 1.1.1.4 christos
704 1.1.1.14 christos #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
705 1.1.1.14 christos #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
706 1.1.1.14 christos #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
707 1.1.1.4 christos
708 1.1.1.4 christos
709 1.1.1.14 christos /* IVRS subtable header */
710 1.1.1.4 christos
711 1.1.1.14 christos typedef struct acpi_ivrs_header
712 1.1.1.4 christos {
713 1.1.1.14 christos UINT8 Type; /* Subtable type */
714 1.1.1.14 christos UINT8 Flags;
715 1.1.1.14 christos UINT16 Length; /* Subtable length */
716 1.1.1.14 christos UINT16 DeviceId; /* ID of IOMMU */
717 1.1.1.4 christos
718 1.1.1.14 christos } ACPI_IVRS_HEADER;
719 1.1.1.4 christos
720 1.1.1.14 christos /* Values for subtable Type above */
721 1.1 jruoho
722 1.1.1.14 christos enum AcpiIvrsType
723 1.1 jruoho {
724 1.1.1.17 christos ACPI_IVRS_TYPE_HARDWARE1 = 0x10,
725 1.1.1.17 christos ACPI_IVRS_TYPE_HARDWARE2 = 0x11,
726 1.1.1.18 christos ACPI_IVRS_TYPE_HARDWARE3 = 0x40,
727 1.1.1.14 christos ACPI_IVRS_TYPE_MEMORY1 = 0x20,
728 1.1.1.14 christos ACPI_IVRS_TYPE_MEMORY2 = 0x21,
729 1.1.1.14 christos ACPI_IVRS_TYPE_MEMORY3 = 0x22
730 1.1.1.14 christos };
731 1.1 jruoho
732 1.1.1.14 christos /* Masks for Flags field above for IVHD subtable */
733 1.1 jruoho
734 1.1.1.14 christos #define ACPI_IVHD_TT_ENABLE (1)
735 1.1.1.14 christos #define ACPI_IVHD_PASS_PW (1<<1)
736 1.1.1.14 christos #define ACPI_IVHD_RES_PASS_PW (1<<2)
737 1.1.1.14 christos #define ACPI_IVHD_ISOC (1<<3)
738 1.1.1.14 christos #define ACPI_IVHD_IOTLB (1<<4)
739 1.1 jruoho
740 1.1.1.14 christos /* Masks for Flags field above for IVMD subtable */
741 1.1 jruoho
742 1.1.1.14 christos #define ACPI_IVMD_UNITY (1)
743 1.1.1.14 christos #define ACPI_IVMD_READ (1<<1)
744 1.1.1.14 christos #define ACPI_IVMD_WRITE (1<<2)
745 1.1.1.14 christos #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
746 1.1 jruoho
747 1.1 jruoho
748 1.1.1.14 christos /*
749 1.1.1.14 christos * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
750 1.1.1.14 christos */
751 1.1 jruoho
752 1.1.1.14 christos /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
753 1.1 jruoho
754 1.1.1.17 christos typedef struct acpi_ivrs_hardware_10
755 1.1 jruoho {
756 1.1.1.14 christos ACPI_IVRS_HEADER Header;
757 1.1.1.14 christos UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
758 1.1.1.14 christos UINT64 BaseAddress; /* IOMMU control registers */
759 1.1.1.14 christos UINT16 PciSegmentGroup;
760 1.1.1.14 christos UINT16 Info; /* MSI number and unit ID */
761 1.1.1.17 christos UINT32 FeatureReporting;
762 1.1.1.17 christos
763 1.1.1.17 christos } ACPI_IVRS_HARDWARE1;
764 1.1.1.17 christos
765 1.1.1.17 christos /* 0x11: I/O Virtualization Hardware Definition Block (IVHD) */
766 1.1 jruoho
767 1.1.1.17 christos typedef struct acpi_ivrs_hardware_11
768 1.1.1.17 christos {
769 1.1.1.17 christos ACPI_IVRS_HEADER Header;
770 1.1.1.17 christos UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
771 1.1.1.17 christos UINT64 BaseAddress; /* IOMMU control registers */
772 1.1.1.17 christos UINT16 PciSegmentGroup;
773 1.1.1.17 christos UINT16 Info; /* MSI number and unit ID */
774 1.1.1.17 christos UINT32 Attributes;
775 1.1.1.17 christos UINT64 EfrRegisterImage;
776 1.1.1.17 christos UINT64 Reserved;
777 1.1.1.17 christos } ACPI_IVRS_HARDWARE2;
778 1.1 jruoho
779 1.1.1.14 christos /* Masks for Info field above */
780 1.1 jruoho
781 1.1.1.14 christos #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
782 1.1.1.14 christos #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
783 1.1 jruoho
784 1.1 jruoho
785 1.1.1.14 christos /*
786 1.1.1.14 christos * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
787 1.1.1.14 christos * Upper two bits of the Type field are the (encoded) length of the structure.
788 1.1.1.14 christos * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
789 1.1.1.14 christos * are reserved for future use but not defined.
790 1.1.1.14 christos */
791 1.1.1.14 christos typedef struct acpi_ivrs_de_header
792 1.1 jruoho {
793 1.1.1.14 christos UINT8 Type;
794 1.1.1.14 christos UINT16 Id;
795 1.1.1.14 christos UINT8 DataSetting;
796 1.1 jruoho
797 1.1.1.14 christos } ACPI_IVRS_DE_HEADER;
798 1.1 jruoho
799 1.1.1.14 christos /* Length of device entry is in the top two bits of Type field above */
800 1.1 jruoho
801 1.1.1.14 christos #define ACPI_IVHD_ENTRY_LENGTH 0xC0
802 1.1 jruoho
803 1.1.1.14 christos /* Values for device entry Type field above */
804 1.1 jruoho
805 1.1.1.14 christos enum AcpiIvrsDeviceEntryType
806 1.1.1.14 christos {
807 1.1.1.14 christos /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
808 1.1 jruoho
809 1.1.1.14 christos ACPI_IVRS_TYPE_PAD4 = 0,
810 1.1.1.14 christos ACPI_IVRS_TYPE_ALL = 1,
811 1.1.1.14 christos ACPI_IVRS_TYPE_SELECT = 2,
812 1.1.1.14 christos ACPI_IVRS_TYPE_START = 3,
813 1.1.1.14 christos ACPI_IVRS_TYPE_END = 4,
814 1.1 jruoho
815 1.1.1.14 christos /* 8-byte device entries */
816 1.1 jruoho
817 1.1.1.14 christos ACPI_IVRS_TYPE_PAD8 = 64,
818 1.1.1.14 christos ACPI_IVRS_TYPE_NOT_USED = 65,
819 1.1.1.14 christos ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */
820 1.1.1.14 christos ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
821 1.1.1.14 christos ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
822 1.1.1.14 christos ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
823 1.1.1.18 christos ACPI_IVRS_TYPE_SPECIAL = 72, /* Uses ACPI_IVRS_DEVICE8C */
824 1.1.1.18 christos
825 1.1.1.18 christos /* Variable-length device entries */
826 1.1.1.18 christos
827 1.1.1.18 christos ACPI_IVRS_TYPE_HID = 240 /* Uses ACPI_IVRS_DEVICE_HID */
828 1.1.1.14 christos };
829 1.1 jruoho
830 1.1.1.14 christos /* Values for Data field above */
831 1.1 jruoho
832 1.1.1.14 christos #define ACPI_IVHD_INIT_PASS (1)
833 1.1.1.14 christos #define ACPI_IVHD_EINT_PASS (1<<1)
834 1.1.1.14 christos #define ACPI_IVHD_NMI_PASS (1<<2)
835 1.1.1.14 christos #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
836 1.1.1.14 christos #define ACPI_IVHD_LINT0_PASS (1<<6)
837 1.1.1.14 christos #define ACPI_IVHD_LINT1_PASS (1<<7)
838 1.1 jruoho
839 1.1 jruoho
840 1.1.1.14 christos /* Types 0-4: 4-byte device entry */
841 1.1 jruoho
842 1.1.1.14 christos typedef struct acpi_ivrs_device4
843 1.1 jruoho {
844 1.1.1.14 christos ACPI_IVRS_DE_HEADER Header;
845 1.1 jruoho
846 1.1.1.14 christos } ACPI_IVRS_DEVICE4;
847 1.1 jruoho
848 1.1.1.14 christos /* Types 66-67: 8-byte device entry */
849 1.1 jruoho
850 1.1.1.14 christos typedef struct acpi_ivrs_device8a
851 1.1.1.14 christos {
852 1.1.1.14 christos ACPI_IVRS_DE_HEADER Header;
853 1.1.1.14 christos UINT8 Reserved1;
854 1.1.1.14 christos UINT16 UsedId;
855 1.1.1.14 christos UINT8 Reserved2;
856 1.1 jruoho
857 1.1.1.14 christos } ACPI_IVRS_DEVICE8A;
858 1.1 jruoho
859 1.1.1.14 christos /* Types 70-71: 8-byte device entry */
860 1.1 jruoho
861 1.1.1.14 christos typedef struct acpi_ivrs_device8b
862 1.1 jruoho {
863 1.1.1.14 christos ACPI_IVRS_DE_HEADER Header;
864 1.1.1.14 christos UINT32 ExtendedData;
865 1.1 jruoho
866 1.1.1.14 christos } ACPI_IVRS_DEVICE8B;
867 1.1 jruoho
868 1.1.1.14 christos /* Values for ExtendedData above */
869 1.1 jruoho
870 1.1.1.14 christos #define ACPI_IVHD_ATS_DISABLED (1<<31)
871 1.1 jruoho
872 1.1.1.14 christos /* Type 72: 8-byte device entry */
873 1.1 jruoho
874 1.1.1.14 christos typedef struct acpi_ivrs_device8c
875 1.1 jruoho {
876 1.1.1.14 christos ACPI_IVRS_DE_HEADER Header;
877 1.1.1.14 christos UINT8 Handle;
878 1.1.1.14 christos UINT16 UsedId;
879 1.1.1.14 christos UINT8 Variety;
880 1.1.1.14 christos
881 1.1.1.14 christos } ACPI_IVRS_DEVICE8C;
882 1.1.1.14 christos
883 1.1.1.14 christos /* Values for Variety field above */
884 1.1 jruoho
885 1.1.1.14 christos #define ACPI_IVHD_IOAPIC 1
886 1.1.1.14 christos #define ACPI_IVHD_HPET 2
887 1.1 jruoho
888 1.1.1.18 christos /* Type 240: variable-length device entry */
889 1.1.1.18 christos
890 1.1.1.18 christos typedef struct acpi_ivrs_device_hid
891 1.1.1.18 christos {
892 1.1.1.18 christos ACPI_IVRS_DE_HEADER Header;
893 1.1.1.18 christos UINT64 AcpiHid;
894 1.1.1.18 christos UINT64 AcpiCid;
895 1.1.1.18 christos UINT8 UidType;
896 1.1.1.18 christos UINT8 UidLength;
897 1.1.1.18 christos
898 1.1.1.18 christos } ACPI_IVRS_DEVICE_HID;
899 1.1.1.18 christos
900 1.1.1.19 christos /* Values for UidType above */
901 1.1.1.19 christos
902 1.1.1.19 christos #define ACPI_IVRS_UID_NOT_PRESENT 0
903 1.1.1.19 christos #define ACPI_IVRS_UID_IS_INTEGER 1
904 1.1.1.19 christos #define ACPI_IVRS_UID_IS_STRING 2
905 1.1 jruoho
906 1.1.1.14 christos /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
907 1.1.1.5 christos
908 1.1.1.14 christos typedef struct acpi_ivrs_memory
909 1.1.1.5 christos {
910 1.1.1.14 christos ACPI_IVRS_HEADER Header;
911 1.1.1.14 christos UINT16 AuxData;
912 1.1.1.14 christos UINT64 Reserved;
913 1.1.1.14 christos UINT64 StartAddress;
914 1.1.1.14 christos UINT64 MemoryLength;
915 1.1.1.5 christos
916 1.1.1.14 christos } ACPI_IVRS_MEMORY;
917 1.1.1.5 christos
918 1.1.1.5 christos
919 1.1 jruoho /*******************************************************************************
920 1.1 jruoho *
921 1.1.1.14 christos * LPIT - Low Power Idle Table
922 1.1 jruoho *
923 1.1.1.14 christos * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
924 1.1 jruoho *
925 1.1 jruoho ******************************************************************************/
926 1.1 jruoho
927 1.1.1.14 christos typedef struct acpi_table_lpit
928 1.1 jruoho {
929 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
930 1.1 jruoho
931 1.1.1.14 christos } ACPI_TABLE_LPIT;
932 1.1.1.14 christos
933 1.1 jruoho
934 1.1.1.14 christos /* LPIT subtable header */
935 1.1.1.14 christos
936 1.1.1.14 christos typedef struct acpi_lpit_header
937 1.1.1.14 christos {
938 1.1.1.14 christos UINT32 Type; /* Subtable type */
939 1.1.1.14 christos UINT32 Length; /* Subtable length */
940 1.1.1.14 christos UINT16 UniqueId;
941 1.1.1.14 christos UINT16 Reserved;
942 1.1.1.14 christos UINT32 Flags;
943 1.1 jruoho
944 1.1.1.14 christos } ACPI_LPIT_HEADER;
945 1.1 jruoho
946 1.1.1.14 christos /* Values for subtable Type above */
947 1.1 jruoho
948 1.1.1.14 christos enum AcpiLpitType
949 1.1 jruoho {
950 1.1.1.14 christos ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
951 1.1.1.14 christos ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
952 1.1 jruoho };
953 1.1 jruoho
954 1.1.1.14 christos /* Masks for Flags field above */
955 1.1.1.14 christos
956 1.1.1.14 christos #define ACPI_LPIT_STATE_DISABLED (1)
957 1.1.1.14 christos #define ACPI_LPIT_NO_COUNTER (1<<1)
958 1.1.1.14 christos
959 1.1.1.14 christos /*
960 1.1.1.14 christos * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
961 1.1.1.14 christos */
962 1.1.1.14 christos
963 1.1.1.14 christos /* 0x00: Native C-state instruction based LPI structure */
964 1.1.1.14 christos
965 1.1.1.14 christos typedef struct acpi_lpit_native
966 1.1.1.14 christos {
967 1.1.1.14 christos ACPI_LPIT_HEADER Header;
968 1.1.1.14 christos ACPI_GENERIC_ADDRESS EntryTrigger;
969 1.1.1.14 christos UINT32 Residency;
970 1.1.1.14 christos UINT32 Latency;
971 1.1.1.14 christos ACPI_GENERIC_ADDRESS ResidencyCounter;
972 1.1.1.14 christos UINT64 CounterFrequency;
973 1.1.1.14 christos
974 1.1.1.14 christos } ACPI_LPIT_NATIVE;
975 1.1.1.14 christos
976 1.1 jruoho
977 1.1 jruoho /*******************************************************************************
978 1.1 jruoho *
979 1.1.1.14 christos * MADT - Multiple APIC Description Table
980 1.1.1.14 christos * Version 3
981 1.1 jruoho *
982 1.1 jruoho ******************************************************************************/
983 1.1 jruoho
984 1.1.1.14 christos typedef struct acpi_table_madt
985 1.1 jruoho {
986 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
987 1.1.1.14 christos UINT32 Address; /* Physical address of local APIC */
988 1.1.1.14 christos UINT32 Flags;
989 1.1 jruoho
990 1.1.1.14 christos } ACPI_TABLE_MADT;
991 1.1 jruoho
992 1.1.1.14 christos /* Masks for Flags field above */
993 1.1 jruoho
994 1.1.1.14 christos #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
995 1.1 jruoho
996 1.1.1.14 christos /* Values for PCATCompat flag */
997 1.1 jruoho
998 1.1.1.14 christos #define ACPI_MADT_DUAL_PIC 1
999 1.1.1.14 christos #define ACPI_MADT_MULTIPLE_APIC 0
1000 1.1 jruoho
1001 1.1 jruoho
1002 1.1.1.14 christos /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
1003 1.1.1.14 christos
1004 1.1.1.14 christos enum AcpiMadtType
1005 1.1.1.14 christos {
1006 1.1.1.14 christos ACPI_MADT_TYPE_LOCAL_APIC = 0,
1007 1.1.1.14 christos ACPI_MADT_TYPE_IO_APIC = 1,
1008 1.1.1.14 christos ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
1009 1.1.1.14 christos ACPI_MADT_TYPE_NMI_SOURCE = 3,
1010 1.1.1.14 christos ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
1011 1.1.1.14 christos ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
1012 1.1.1.14 christos ACPI_MADT_TYPE_IO_SAPIC = 6,
1013 1.1.1.14 christos ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
1014 1.1.1.14 christos ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
1015 1.1.1.14 christos ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
1016 1.1.1.14 christos ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
1017 1.1.1.14 christos ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11,
1018 1.1.1.14 christos ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12,
1019 1.1.1.14 christos ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13,
1020 1.1.1.14 christos ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
1021 1.1.1.14 christos ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
1022 1.1.1.18 christos ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16,
1023 1.1.1.23 christos ACPI_MADT_TYPE_CORE_PIC = 17,
1024 1.1.1.23 christos ACPI_MADT_TYPE_LIO_PIC = 18,
1025 1.1.1.23 christos ACPI_MADT_TYPE_HT_PIC = 19,
1026 1.1.1.23 christos ACPI_MADT_TYPE_EIO_PIC = 20,
1027 1.1.1.23 christos ACPI_MADT_TYPE_MSI_PIC = 21,
1028 1.1.1.23 christos ACPI_MADT_TYPE_BIO_PIC = 22,
1029 1.1.1.23 christos ACPI_MADT_TYPE_LPC_PIC = 23,
1030 1.1.1.24 christos ACPI_MADT_TYPE_RINTC = 24,
1031 1.1.1.24 christos ACPI_MADT_TYPE_IMSIC = 25,
1032 1.1.1.24 christos ACPI_MADT_TYPE_APLIC = 26,
1033 1.1.1.24 christos ACPI_MADT_TYPE_PLIC = 27,
1034 1.1.1.24 christos ACPI_MADT_TYPE_RESERVED = 28, /* 28 to 0x7F are reserved */
1035 1.1.1.22 christos ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */
1036 1.1 jruoho };
1037 1.1 jruoho
1038 1.1 jruoho
1039 1.1.1.14 christos /*
1040 1.1.1.14 christos * MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
1041 1.1.1.14 christos */
1042 1.1 jruoho
1043 1.1.1.14 christos /* 0: Processor Local APIC */
1044 1.1.1.14 christos
1045 1.1.1.14 christos typedef struct acpi_madt_local_apic
1046 1.1 jruoho {
1047 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1048 1.1.1.14 christos UINT8 ProcessorId; /* ACPI processor id */
1049 1.1.1.14 christos UINT8 Id; /* Processor's local APIC id */
1050 1.1.1.14 christos UINT32 LapicFlags;
1051 1.1 jruoho
1052 1.1.1.14 christos } ACPI_MADT_LOCAL_APIC;
1053 1.1 jruoho
1054 1.1 jruoho
1055 1.1.1.14 christos /* 1: IO APIC */
1056 1.1.1.7 christos
1057 1.1.1.14 christos typedef struct acpi_madt_io_apic
1058 1.1.1.7 christos {
1059 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1060 1.1.1.14 christos UINT8 Id; /* I/O APIC ID */
1061 1.1.1.14 christos UINT8 Reserved; /* Reserved - must be zero */
1062 1.1.1.14 christos UINT32 Address; /* APIC physical address */
1063 1.1.1.14 christos UINT32 GlobalIrqBase; /* Global system interrupt where INTI lines start */
1064 1.1.1.7 christos
1065 1.1.1.14 christos } ACPI_MADT_IO_APIC;
1066 1.1.1.7 christos
1067 1.1.1.7 christos
1068 1.1.1.14 christos /* 2: Interrupt Override */
1069 1.1.1.7 christos
1070 1.1.1.14 christos typedef struct acpi_madt_interrupt_override
1071 1.1.1.14 christos {
1072 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1073 1.1.1.14 christos UINT8 Bus; /* 0 - ISA */
1074 1.1.1.14 christos UINT8 SourceIrq; /* Interrupt source (IRQ) */
1075 1.1.1.14 christos UINT32 GlobalIrq; /* Global system interrupt */
1076 1.1.1.14 christos UINT16 IntiFlags;
1077 1.1.1.7 christos
1078 1.1.1.14 christos } ACPI_MADT_INTERRUPT_OVERRIDE;
1079 1.1.1.7 christos
1080 1.1.1.7 christos
1081 1.1.1.14 christos /* 3: NMI Source */
1082 1.1.1.7 christos
1083 1.1.1.14 christos typedef struct acpi_madt_nmi_source
1084 1.1.1.7 christos {
1085 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1086 1.1.1.14 christos UINT16 IntiFlags;
1087 1.1.1.14 christos UINT32 GlobalIrq; /* Global system interrupt */
1088 1.1.1.7 christos
1089 1.1.1.14 christos } ACPI_MADT_NMI_SOURCE;
1090 1.1.1.7 christos
1091 1.1.1.7 christos
1092 1.1.1.14 christos /* 4: Local APIC NMI */
1093 1.1.1.7 christos
1094 1.1.1.14 christos typedef struct acpi_madt_local_apic_nmi
1095 1.1.1.7 christos {
1096 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1097 1.1.1.14 christos UINT8 ProcessorId; /* ACPI processor id */
1098 1.1.1.14 christos UINT16 IntiFlags;
1099 1.1.1.14 christos UINT8 Lint; /* LINTn to which NMI is connected */
1100 1.1.1.7 christos
1101 1.1.1.14 christos } ACPI_MADT_LOCAL_APIC_NMI;
1102 1.1.1.7 christos
1103 1.1.1.7 christos
1104 1.1.1.14 christos /* 5: Address Override */
1105 1.1.1.7 christos
1106 1.1.1.14 christos typedef struct acpi_madt_local_apic_override
1107 1.1.1.14 christos {
1108 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1109 1.1.1.14 christos UINT16 Reserved; /* Reserved, must be zero */
1110 1.1.1.14 christos UINT64 Address; /* APIC physical address */
1111 1.1.1.7 christos
1112 1.1.1.14 christos } ACPI_MADT_LOCAL_APIC_OVERRIDE;
1113 1.1.1.7 christos
1114 1.1.1.7 christos
1115 1.1.1.14 christos /* 6: I/O Sapic */
1116 1.1.1.7 christos
1117 1.1.1.14 christos typedef struct acpi_madt_io_sapic
1118 1.1.1.7 christos {
1119 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1120 1.1.1.14 christos UINT8 Id; /* I/O SAPIC ID */
1121 1.1.1.14 christos UINT8 Reserved; /* Reserved, must be zero */
1122 1.1.1.14 christos UINT32 GlobalIrqBase; /* Global interrupt for SAPIC start */
1123 1.1.1.14 christos UINT64 Address; /* SAPIC physical address */
1124 1.1.1.7 christos
1125 1.1.1.14 christos } ACPI_MADT_IO_SAPIC;
1126 1.1.1.7 christos
1127 1.1.1.7 christos
1128 1.1.1.14 christos /* 7: Local Sapic */
1129 1.1.1.14 christos
1130 1.1.1.14 christos typedef struct acpi_madt_local_sapic
1131 1.1.1.7 christos {
1132 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1133 1.1.1.14 christos UINT8 ProcessorId; /* ACPI processor id */
1134 1.1.1.14 christos UINT8 Id; /* SAPIC ID */
1135 1.1.1.14 christos UINT8 Eid; /* SAPIC EID */
1136 1.1.1.14 christos UINT8 Reserved[3]; /* Reserved, must be zero */
1137 1.1.1.14 christos UINT32 LapicFlags;
1138 1.1.1.14 christos UINT32 Uid; /* Numeric UID - ACPI 3.0 */
1139 1.1.1.24 christos char UidString[]; /* String UID - ACPI 3.0 */
1140 1.1.1.7 christos
1141 1.1.1.14 christos } ACPI_MADT_LOCAL_SAPIC;
1142 1.1.1.7 christos
1143 1.1.1.7 christos
1144 1.1.1.14 christos /* 8: Platform Interrupt Source */
1145 1.1.1.14 christos
1146 1.1.1.14 christos typedef struct acpi_madt_interrupt_source
1147 1.1.1.7 christos {
1148 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1149 1.1.1.14 christos UINT16 IntiFlags;
1150 1.1.1.14 christos UINT8 Type; /* 1=PMI, 2=INIT, 3=corrected */
1151 1.1.1.14 christos UINT8 Id; /* Processor ID */
1152 1.1.1.14 christos UINT8 Eid; /* Processor EID */
1153 1.1.1.14 christos UINT8 IoSapicVector; /* Vector value for PMI interrupts */
1154 1.1.1.14 christos UINT32 GlobalIrq; /* Global system interrupt */
1155 1.1.1.14 christos UINT32 Flags; /* Interrupt Source Flags */
1156 1.1.1.7 christos
1157 1.1.1.14 christos } ACPI_MADT_INTERRUPT_SOURCE;
1158 1.1.1.7 christos
1159 1.1.1.14 christos /* Masks for Flags field above */
1160 1.1.1.7 christos
1161 1.1.1.14 christos #define ACPI_MADT_CPEI_OVERRIDE (1)
1162 1.1.1.7 christos
1163 1.1.1.7 christos
1164 1.1.1.14 christos /* 9: Processor Local X2APIC (ACPI 4.0) */
1165 1.1.1.14 christos
1166 1.1.1.14 christos typedef struct acpi_madt_local_x2apic
1167 1.1.1.7 christos {
1168 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1169 1.1.1.14 christos UINT16 Reserved; /* Reserved - must be zero */
1170 1.1.1.14 christos UINT32 LocalApicId; /* Processor x2APIC ID */
1171 1.1.1.14 christos UINT32 LapicFlags;
1172 1.1.1.14 christos UINT32 Uid; /* ACPI processor UID */
1173 1.1.1.7 christos
1174 1.1.1.14 christos } ACPI_MADT_LOCAL_X2APIC;
1175 1.1.1.7 christos
1176 1.1.1.7 christos
1177 1.1.1.14 christos /* 10: Local X2APIC NMI (ACPI 4.0) */
1178 1.1.1.14 christos
1179 1.1.1.14 christos typedef struct acpi_madt_local_x2apic_nmi
1180 1.1.1.14 christos {
1181 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1182 1.1.1.14 christos UINT16 IntiFlags;
1183 1.1.1.14 christos UINT32 Uid; /* ACPI processor UID */
1184 1.1.1.14 christos UINT8 Lint; /* LINTn to which NMI is connected */
1185 1.1.1.14 christos UINT8 Reserved[3]; /* Reserved - must be zero */
1186 1.1.1.14 christos
1187 1.1.1.14 christos } ACPI_MADT_LOCAL_X2APIC_NMI;
1188 1.1.1.14 christos
1189 1.1.1.14 christos
1190 1.1.1.24 christos /* 11: Generic Interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 + ACPI 6.5 changes) */
1191 1.1.1.14 christos
1192 1.1.1.14 christos typedef struct acpi_madt_generic_interrupt
1193 1.1.1.14 christos {
1194 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1195 1.1.1.14 christos UINT16 Reserved; /* Reserved - must be zero */
1196 1.1.1.14 christos UINT32 CpuInterfaceNumber;
1197 1.1.1.14 christos UINT32 Uid;
1198 1.1.1.14 christos UINT32 Flags;
1199 1.1.1.14 christos UINT32 ParkingVersion;
1200 1.1.1.14 christos UINT32 PerformanceInterrupt;
1201 1.1.1.14 christos UINT64 ParkedAddress;
1202 1.1.1.14 christos UINT64 BaseAddress;
1203 1.1.1.14 christos UINT64 GicvBaseAddress;
1204 1.1.1.14 christos UINT64 GichBaseAddress;
1205 1.1.1.14 christos UINT32 VgicInterrupt;
1206 1.1.1.14 christos UINT64 GicrBaseAddress;
1207 1.1.1.14 christos UINT64 ArmMpidr;
1208 1.1.1.14 christos UINT8 EfficiencyClass;
1209 1.1.1.16 christos UINT8 Reserved2[1];
1210 1.1.1.16 christos UINT16 SpeInterrupt; /* ACPI 6.3 */
1211 1.1.1.24 christos UINT16 TrbeInterrupt; /* ACPI 6.5 */
1212 1.1.1.14 christos
1213 1.1.1.14 christos } ACPI_MADT_GENERIC_INTERRUPT;
1214 1.1.1.7 christos
1215 1.1.1.7 christos /* Masks for Flags field above */
1216 1.1.1.7 christos
1217 1.1.1.14 christos /* ACPI_MADT_ENABLED (1) Processor is usable if set */
1218 1.1.1.14 christos #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */
1219 1.1.1.14 christos #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */
1220 1.1.1.7 christos
1221 1.1.1.11 christos
1222 1.1.1.14 christos /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */
1223 1.1.1.14 christos
1224 1.1.1.14 christos typedef struct acpi_madt_generic_distributor
1225 1.1.1.11 christos {
1226 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1227 1.1.1.14 christos UINT16 Reserved; /* Reserved - must be zero */
1228 1.1.1.14 christos UINT32 GicId;
1229 1.1.1.14 christos UINT64 BaseAddress;
1230 1.1.1.14 christos UINT32 GlobalIrqBase;
1231 1.1.1.14 christos UINT8 Version;
1232 1.1.1.14 christos UINT8 Reserved2[3]; /* Reserved - must be zero */
1233 1.1.1.12 christos
1234 1.1.1.14 christos } ACPI_MADT_GENERIC_DISTRIBUTOR;
1235 1.1.1.11 christos
1236 1.1.1.14 christos /* Values for Version field above */
1237 1.1.1.7 christos
1238 1.1.1.14 christos enum AcpiMadtGicVersion
1239 1.1.1.9 christos {
1240 1.1.1.14 christos ACPI_MADT_GIC_VERSION_NONE = 0,
1241 1.1.1.14 christos ACPI_MADT_GIC_VERSION_V1 = 1,
1242 1.1.1.14 christos ACPI_MADT_GIC_VERSION_V2 = 2,
1243 1.1.1.14 christos ACPI_MADT_GIC_VERSION_V3 = 3,
1244 1.1.1.14 christos ACPI_MADT_GIC_VERSION_V4 = 4,
1245 1.1.1.14 christos ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */
1246 1.1.1.14 christos };
1247 1.1.1.9 christos
1248 1.1.1.9 christos
1249 1.1.1.14 christos /* 13: Generic MSI Frame (ACPI 5.1) */
1250 1.1.1.12 christos
1251 1.1.1.14 christos typedef struct acpi_madt_generic_msi_frame
1252 1.1.1.14 christos {
1253 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1254 1.1.1.14 christos UINT16 Reserved; /* Reserved - must be zero */
1255 1.1.1.14 christos UINT32 MsiFrameId;
1256 1.1.1.14 christos UINT64 BaseAddress;
1257 1.1.1.14 christos UINT32 Flags;
1258 1.1.1.14 christos UINT16 SpiCount;
1259 1.1.1.14 christos UINT16 SpiBase;
1260 1.1.1.14 christos
1261 1.1.1.14 christos } ACPI_MADT_GENERIC_MSI_FRAME;
1262 1.1.1.12 christos
1263 1.1.1.9 christos /* Masks for Flags field above */
1264 1.1.1.9 christos
1265 1.1.1.14 christos #define ACPI_MADT_OVERRIDE_SPI_VALUES (1)
1266 1.1.1.14 christos
1267 1.1.1.14 christos
1268 1.1.1.14 christos /* 14: Generic Redistributor (ACPI 5.1) */
1269 1.1.1.14 christos
1270 1.1.1.14 christos typedef struct acpi_madt_generic_redistributor
1271 1.1.1.14 christos {
1272 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1273 1.1.1.14 christos UINT16 Reserved; /* reserved - must be zero */
1274 1.1.1.14 christos UINT64 BaseAddress;
1275 1.1.1.14 christos UINT32 Length;
1276 1.1.1.14 christos
1277 1.1.1.14 christos } ACPI_MADT_GENERIC_REDISTRIBUTOR;
1278 1.1.1.14 christos
1279 1.1.1.14 christos
1280 1.1.1.14 christos /* 15: Generic Translator (ACPI 6.0) */
1281 1.1.1.14 christos
1282 1.1.1.14 christos typedef struct acpi_madt_generic_translator
1283 1.1.1.14 christos {
1284 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
1285 1.1.1.14 christos UINT16 Reserved; /* reserved - must be zero */
1286 1.1.1.14 christos UINT32 TranslationId;
1287 1.1.1.14 christos UINT64 BaseAddress;
1288 1.1.1.14 christos UINT32 Reserved2;
1289 1.1.1.14 christos
1290 1.1.1.14 christos } ACPI_MADT_GENERIC_TRANSLATOR;
1291 1.1.1.14 christos
1292 1.1.1.18 christos /* 16: Multiprocessor wakeup (ACPI 6.4) */
1293 1.1.1.18 christos
1294 1.1.1.18 christos typedef struct acpi_madt_multiproc_wakeup
1295 1.1.1.18 christos {
1296 1.1.1.18 christos ACPI_SUBTABLE_HEADER Header;
1297 1.1.1.18 christos UINT16 MailboxVersion;
1298 1.1.1.18 christos UINT32 Reserved; /* reserved - must be zero */
1299 1.1.1.18 christos UINT64 BaseAddress;
1300 1.1.1.18 christos
1301 1.1.1.18 christos } ACPI_MADT_MULTIPROC_WAKEUP;
1302 1.1.1.18 christos
1303 1.1.1.22 christos #define ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE 2032
1304 1.1.1.22 christos #define ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE 2048
1305 1.1.1.19 christos
1306 1.1.1.19 christos typedef struct acpi_madt_multiproc_wakeup_mailbox
1307 1.1.1.19 christos {
1308 1.1.1.19 christos UINT16 Command;
1309 1.1.1.19 christos UINT16 Reserved; /* reserved - must be zero */
1310 1.1.1.19 christos UINT32 ApicId;
1311 1.1.1.19 christos UINT64 WakeupVector;
1312 1.1.1.19 christos UINT8 ReservedOs[ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE]; /* reserved for OS use */
1313 1.1.1.19 christos UINT8 ReservedFirmware[ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE]; /* reserved for firmware use */
1314 1.1.1.19 christos
1315 1.1.1.19 christos } ACPI_MADT_MULTIPROC_WAKEUP_MAILBOX;
1316 1.1.1.19 christos
1317 1.1.1.19 christos #define ACPI_MP_WAKE_COMMAND_WAKEUP 1
1318 1.1.1.19 christos
1319 1.1.1.23 christos /* 17: CPU Core Interrupt Controller (ACPI 6.5) */
1320 1.1.1.23 christos
1321 1.1.1.23 christos typedef struct acpi_madt_core_pic {
1322 1.1.1.23 christos ACPI_SUBTABLE_HEADER Header;
1323 1.1.1.23 christos UINT8 Version;
1324 1.1.1.23 christos UINT32 ProcessorId;
1325 1.1.1.23 christos UINT32 CoreId;
1326 1.1.1.23 christos UINT32 Flags;
1327 1.1.1.23 christos } ACPI_MADT_CORE_PIC;
1328 1.1.1.23 christos
1329 1.1.1.23 christos /* Values for Version field above */
1330 1.1.1.23 christos
1331 1.1.1.23 christos enum AcpiMadtCorePicVersion {
1332 1.1.1.23 christos ACPI_MADT_CORE_PIC_VERSION_NONE = 0,
1333 1.1.1.23 christos ACPI_MADT_CORE_PIC_VERSION_V1 = 1,
1334 1.1.1.23 christos ACPI_MADT_CORE_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
1335 1.1.1.23 christos };
1336 1.1.1.23 christos
1337 1.1.1.23 christos /* 18: Legacy I/O Interrupt Controller (ACPI 6.5) */
1338 1.1.1.23 christos
1339 1.1.1.23 christos typedef struct acpi_madt_lio_pic {
1340 1.1.1.23 christos ACPI_SUBTABLE_HEADER Header;
1341 1.1.1.23 christos UINT8 Version;
1342 1.1.1.23 christos UINT64 Address;
1343 1.1.1.23 christos UINT16 Size;
1344 1.1.1.23 christos UINT8 Cascade[2];
1345 1.1.1.23 christos UINT32 CascadeMap[2];
1346 1.1.1.23 christos } ACPI_MADT_LIO_PIC;
1347 1.1.1.23 christos
1348 1.1.1.23 christos /* Values for Version field above */
1349 1.1.1.23 christos
1350 1.1.1.23 christos enum AcpiMadtLioPicVersion {
1351 1.1.1.23 christos ACPI_MADT_LIO_PIC_VERSION_NONE = 0,
1352 1.1.1.23 christos ACPI_MADT_LIO_PIC_VERSION_V1 = 1,
1353 1.1.1.23 christos ACPI_MADT_LIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
1354 1.1.1.23 christos };
1355 1.1.1.23 christos
1356 1.1.1.23 christos /* 19: HT Interrupt Controller (ACPI 6.5) */
1357 1.1.1.23 christos
1358 1.1.1.23 christos typedef struct acpi_madt_ht_pic {
1359 1.1.1.23 christos ACPI_SUBTABLE_HEADER Header;
1360 1.1.1.23 christos UINT8 Version;
1361 1.1.1.23 christos UINT64 Address;
1362 1.1.1.23 christos UINT16 Size;
1363 1.1.1.23 christos UINT8 Cascade[8];
1364 1.1.1.23 christos } ACPI_MADT_HT_PIC;
1365 1.1.1.23 christos
1366 1.1.1.23 christos /* Values for Version field above */
1367 1.1.1.23 christos
1368 1.1.1.23 christos enum AcpiMadtHtPicVersion {
1369 1.1.1.23 christos ACPI_MADT_HT_PIC_VERSION_NONE = 0,
1370 1.1.1.23 christos ACPI_MADT_HT_PIC_VERSION_V1 = 1,
1371 1.1.1.23 christos ACPI_MADT_HT_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
1372 1.1.1.23 christos };
1373 1.1.1.23 christos
1374 1.1.1.23 christos /* 20: Extend I/O Interrupt Controller (ACPI 6.5) */
1375 1.1.1.23 christos
1376 1.1.1.23 christos typedef struct acpi_madt_eio_pic {
1377 1.1.1.23 christos ACPI_SUBTABLE_HEADER Header;
1378 1.1.1.23 christos UINT8 Version;
1379 1.1.1.23 christos UINT8 Cascade;
1380 1.1.1.23 christos UINT8 Node;
1381 1.1.1.23 christos UINT64 NodeMap;
1382 1.1.1.23 christos } ACPI_MADT_EIO_PIC;
1383 1.1.1.23 christos
1384 1.1.1.23 christos /* Values for Version field above */
1385 1.1.1.23 christos
1386 1.1.1.23 christos enum AcpiMadtEioPicVersion {
1387 1.1.1.23 christos ACPI_MADT_EIO_PIC_VERSION_NONE = 0,
1388 1.1.1.23 christos ACPI_MADT_EIO_PIC_VERSION_V1 = 1,
1389 1.1.1.23 christos ACPI_MADT_EIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
1390 1.1.1.23 christos };
1391 1.1.1.23 christos
1392 1.1.1.23 christos /* 21: MSI Interrupt Controller (ACPI 6.5) */
1393 1.1.1.23 christos
1394 1.1.1.23 christos typedef struct acpi_madt_msi_pic {
1395 1.1.1.23 christos ACPI_SUBTABLE_HEADER Header;
1396 1.1.1.23 christos UINT8 Version;
1397 1.1.1.23 christos UINT64 MsgAddress;
1398 1.1.1.23 christos UINT32 Start;
1399 1.1.1.23 christos UINT32 Count;
1400 1.1.1.23 christos } ACPI_MADT_MSI_PIC;
1401 1.1.1.23 christos
1402 1.1.1.23 christos /* Values for Version field above */
1403 1.1.1.23 christos
1404 1.1.1.23 christos enum AcpiMadtMsiPicVersion {
1405 1.1.1.23 christos ACPI_MADT_MSI_PIC_VERSION_NONE = 0,
1406 1.1.1.23 christos ACPI_MADT_MSI_PIC_VERSION_V1 = 1,
1407 1.1.1.23 christos ACPI_MADT_MSI_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
1408 1.1.1.23 christos };
1409 1.1.1.23 christos
1410 1.1.1.23 christos /* 22: Bridge I/O Interrupt Controller (ACPI 6.5) */
1411 1.1.1.23 christos
1412 1.1.1.23 christos typedef struct acpi_madt_bio_pic {
1413 1.1.1.23 christos ACPI_SUBTABLE_HEADER Header;
1414 1.1.1.23 christos UINT8 Version;
1415 1.1.1.23 christos UINT64 Address;
1416 1.1.1.23 christos UINT16 Size;
1417 1.1.1.23 christos UINT16 Id;
1418 1.1.1.23 christos UINT16 GsiBase;
1419 1.1.1.23 christos } ACPI_MADT_BIO_PIC;
1420 1.1.1.23 christos
1421 1.1.1.23 christos /* Values for Version field above */
1422 1.1.1.23 christos
1423 1.1.1.23 christos enum AcpiMadtBioPicVersion {
1424 1.1.1.23 christos ACPI_MADT_BIO_PIC_VERSION_NONE = 0,
1425 1.1.1.23 christos ACPI_MADT_BIO_PIC_VERSION_V1 = 1,
1426 1.1.1.23 christos ACPI_MADT_BIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
1427 1.1.1.23 christos };
1428 1.1.1.23 christos
1429 1.1.1.23 christos /* 23: LPC Interrupt Controller (ACPI 6.5) */
1430 1.1.1.23 christos
1431 1.1.1.23 christos typedef struct acpi_madt_lpc_pic {
1432 1.1.1.23 christos ACPI_SUBTABLE_HEADER Header;
1433 1.1.1.23 christos UINT8 Version;
1434 1.1.1.23 christos UINT64 Address;
1435 1.1.1.23 christos UINT16 Size;
1436 1.1.1.23 christos UINT8 Cascade;
1437 1.1.1.23 christos } ACPI_MADT_LPC_PIC;
1438 1.1.1.23 christos
1439 1.1.1.23 christos /* Values for Version field above */
1440 1.1.1.23 christos
1441 1.1.1.23 christos enum AcpiMadtLpcPicVersion {
1442 1.1.1.23 christos ACPI_MADT_LPC_PIC_VERSION_NONE = 0,
1443 1.1.1.23 christos ACPI_MADT_LPC_PIC_VERSION_V1 = 1,
1444 1.1.1.23 christos ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
1445 1.1.1.23 christos };
1446 1.1.1.23 christos
1447 1.1.1.24 christos /* 24: RISC-V INTC */
1448 1.1.1.24 christos typedef struct acpi_madt_rintc {
1449 1.1.1.24 christos ACPI_SUBTABLE_HEADER Header;
1450 1.1.1.24 christos UINT8 Version;
1451 1.1.1.24 christos UINT8 Reserved;
1452 1.1.1.24 christos UINT32 Flags;
1453 1.1.1.24 christos UINT64 HartId;
1454 1.1.1.24 christos UINT32 Uid; /* ACPI processor UID */
1455 1.1.1.24 christos UINT32 ExtIntcId; /* External INTC Id */
1456 1.1.1.24 christos UINT64 ImsicAddr; /* IMSIC base address */
1457 1.1.1.24 christos UINT32 ImsicSize; /* IMSIC size */
1458 1.1.1.24 christos } ACPI_MADT_RINTC;
1459 1.1.1.24 christos
1460 1.1.1.24 christos /* Values for RISC-V INTC Version field above */
1461 1.1.1.24 christos
1462 1.1.1.24 christos enum AcpiMadtRintcVersion {
1463 1.1.1.24 christos ACPI_MADT_RINTC_VERSION_NONE = 0,
1464 1.1.1.24 christos ACPI_MADT_RINTC_VERSION_V1 = 1,
1465 1.1.1.24 christos ACPI_MADT_RINTC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
1466 1.1.1.24 christos };
1467 1.1.1.24 christos
1468 1.1.1.24 christos /* 25: RISC-V IMSIC */
1469 1.1.1.24 christos typedef struct acpi_madt_imsic {
1470 1.1.1.24 christos ACPI_SUBTABLE_HEADER Header;
1471 1.1.1.24 christos UINT8 Version;
1472 1.1.1.24 christos UINT8 Reserved;
1473 1.1.1.24 christos UINT32 Flags;
1474 1.1.1.24 christos UINT16 NumIds;
1475 1.1.1.24 christos UINT16 NumGuestIds;
1476 1.1.1.24 christos UINT8 GuestIndexBits;
1477 1.1.1.24 christos UINT8 HartIndexBits;
1478 1.1.1.24 christos UINT8 GroupIndexBits;
1479 1.1.1.24 christos UINT8 GroupIndexShift;
1480 1.1.1.24 christos } ACPI_MADT_IMSIC;
1481 1.1.1.24 christos
1482 1.1.1.24 christos /* 26: RISC-V APLIC */
1483 1.1.1.24 christos typedef struct acpi_madt_aplic {
1484 1.1.1.24 christos ACPI_SUBTABLE_HEADER Header;
1485 1.1.1.24 christos UINT8 Version;
1486 1.1.1.24 christos UINT8 Id;
1487 1.1.1.24 christos UINT32 Flags;
1488 1.1.1.24 christos UINT8 HwId[8];
1489 1.1.1.24 christos UINT16 NumIdcs;
1490 1.1.1.24 christos UINT16 NumSources;
1491 1.1.1.24 christos UINT32 GsiBase;
1492 1.1.1.24 christos UINT64 BaseAddr;
1493 1.1.1.24 christos UINT32 Size;
1494 1.1.1.24 christos } ACPI_MADT_APLIC;
1495 1.1.1.24 christos
1496 1.1.1.24 christos /* 27: RISC-V PLIC */
1497 1.1.1.24 christos typedef struct acpi_madt_plic {
1498 1.1.1.24 christos ACPI_SUBTABLE_HEADER Header;
1499 1.1.1.24 christos UINT8 Version;
1500 1.1.1.24 christos UINT8 Id;
1501 1.1.1.24 christos UINT8 HwId[8];
1502 1.1.1.24 christos UINT16 NumIrqs;
1503 1.1.1.24 christos UINT16 MaxPrio;
1504 1.1.1.24 christos UINT32 Flags;
1505 1.1.1.24 christos UINT32 Size;
1506 1.1.1.24 christos UINT64 BaseAddr;
1507 1.1.1.24 christos UINT32 GsiBase;
1508 1.1.1.24 christos } ACPI_MADT_PLIC;
1509 1.1.1.24 christos
1510 1.1.1.24 christos
1511 1.1.1.23 christos /* 80: OEM data */
1512 1.1.1.22 christos
1513 1.1.1.22 christos typedef struct acpi_madt_oem_data
1514 1.1.1.22 christos {
1515 1.1.1.24 christos ACPI_FLEX_ARRAY(UINT8, OemData);
1516 1.1.1.22 christos } ACPI_MADT_OEM_DATA;
1517 1.1.1.22 christos
1518 1.1.1.14 christos
1519 1.1.1.14 christos /*
1520 1.1.1.14 christos * Common flags fields for MADT subtables
1521 1.1.1.14 christos */
1522 1.1.1.14 christos
1523 1.1.1.14 christos /* MADT Local APIC flags */
1524 1.1.1.14 christos
1525 1.1.1.14 christos #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
1526 1.1.1.20 christos #define ACPI_MADT_ONLINE_CAPABLE (2) /* 01: System HW supports enabling processor at runtime */
1527 1.1.1.14 christos
1528 1.1.1.14 christos /* MADT MPS INTI flags (IntiFlags) */
1529 1.1.1.14 christos
1530 1.1.1.14 christos #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
1531 1.1.1.14 christos #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
1532 1.1.1.14 christos
1533 1.1.1.14 christos /* Values for MPS INTI flags */
1534 1.1.1.14 christos
1535 1.1.1.14 christos #define ACPI_MADT_POLARITY_CONFORMS 0
1536 1.1.1.14 christos #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
1537 1.1.1.14 christos #define ACPI_MADT_POLARITY_RESERVED 2
1538 1.1.1.14 christos #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
1539 1.1.1.14 christos
1540 1.1.1.14 christos #define ACPI_MADT_TRIGGER_CONFORMS (0)
1541 1.1.1.14 christos #define ACPI_MADT_TRIGGER_EDGE (1<<2)
1542 1.1.1.14 christos #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
1543 1.1.1.14 christos #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
1544 1.1.1.9 christos
1545 1.1.1.9 christos
1546 1.1.1.7 christos /*******************************************************************************
1547 1.1.1.7 christos *
1548 1.1.1.14 christos * MCFG - PCI Memory Mapped Configuration table and subtable
1549 1.1 jruoho * Version 1
1550 1.1 jruoho *
1551 1.1.1.14 christos * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1552 1.1 jruoho *
1553 1.1 jruoho ******************************************************************************/
1554 1.1 jruoho
1555 1.1.1.14 christos typedef struct acpi_table_mcfg
1556 1.1 jruoho {
1557 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1558 1.1.1.14 christos UINT8 Reserved[8];
1559 1.1 jruoho
1560 1.1.1.14 christos } ACPI_TABLE_MCFG;
1561 1.1 jruoho
1562 1.1 jruoho
1563 1.1.1.14 christos /* Subtable */
1564 1.1 jruoho
1565 1.1.1.14 christos typedef struct acpi_mcfg_allocation
1566 1.1.1.14 christos {
1567 1.1.1.14 christos UINT64 Address; /* Base address, processor-relative */
1568 1.1.1.14 christos UINT16 PciSegment; /* PCI segment group number */
1569 1.1.1.14 christos UINT8 StartBusNumber; /* Starting PCI Bus number */
1570 1.1.1.14 christos UINT8 EndBusNumber; /* Final PCI Bus number */
1571 1.1.1.14 christos UINT32 Reserved;
1572 1.1 jruoho
1573 1.1.1.14 christos } ACPI_MCFG_ALLOCATION;
1574 1.1 jruoho
1575 1.1.1.14 christos
1576 1.1.1.14 christos /*******************************************************************************
1577 1.1.1.14 christos *
1578 1.1.1.14 christos * MCHI - Management Controller Host Interface Table
1579 1.1.1.14 christos * Version 1
1580 1.1.1.14 christos *
1581 1.1.1.14 christos * Conforms to "Management Component Transport Protocol (MCTP) Host
1582 1.1.1.14 christos * Interface Specification", Revision 1.0.0a, October 13, 2009
1583 1.1.1.14 christos *
1584 1.1.1.14 christos ******************************************************************************/
1585 1.1.1.14 christos
1586 1.1.1.14 christos typedef struct acpi_table_mchi
1587 1.1 jruoho {
1588 1.1.1.14 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1589 1.1.1.14 christos UINT8 InterfaceType;
1590 1.1.1.14 christos UINT8 Protocol;
1591 1.1.1.14 christos UINT64 ProtocolData;
1592 1.1.1.14 christos UINT8 InterruptType;
1593 1.1.1.14 christos UINT8 Gpe;
1594 1.1.1.14 christos UINT8 PciDeviceFlag;
1595 1.1.1.14 christos UINT32 GlobalInterrupt;
1596 1.1.1.14 christos ACPI_GENERIC_ADDRESS ControlRegister;
1597 1.1.1.14 christos UINT8 PciSegment;
1598 1.1.1.14 christos UINT8 PciBus;
1599 1.1.1.14 christos UINT8 PciDevice;
1600 1.1.1.14 christos UINT8 PciFunction;
1601 1.1 jruoho
1602 1.1.1.14 christos } ACPI_TABLE_MCHI;
1603 1.1 jruoho
1604 1.1.1.24 christos /*******************************************************************************
1605 1.1.1.24 christos *
1606 1.1.1.24 christos * MPAM - Memory System Resource Partitioning and Monitoring
1607 1.1.1.24 christos *
1608 1.1.1.24 christos * Conforms to "ACPI for Memory System Resource Partitioning and Monitoring 2.0"
1609 1.1.1.24 christos * Document number: ARM DEN 0065, December, 2022.
1610 1.1.1.24 christos *
1611 1.1.1.24 christos ******************************************************************************/
1612 1.1.1.24 christos
1613 1.1.1.24 christos /* MPAM RIS locator types. Table 11, Location types */
1614 1.1.1.24 christos enum AcpiMpamLocatorType {
1615 1.1.1.24 christos ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE = 0,
1616 1.1.1.24 christos ACPI_MPAM_LOCATION_TYPE_MEMORY = 1,
1617 1.1.1.24 christos ACPI_MPAM_LOCATION_TYPE_SMMU = 2,
1618 1.1.1.24 christos ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE = 3,
1619 1.1.1.24 christos ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE = 4,
1620 1.1.1.24 christos ACPI_MPAM_LOCATION_TYPE_INTERCONNECT = 5,
1621 1.1.1.24 christos ACPI_MPAM_LOCATION_TYPE_UNKNOWN = 0xFF
1622 1.1.1.24 christos };
1623 1.1.1.24 christos
1624 1.1.1.24 christos /* MPAM Functional dependency descriptor. Table 10 */
1625 1.1.1.24 christos typedef struct acpi_mpam_func_deps
1626 1.1.1.24 christos {
1627 1.1.1.24 christos UINT32 Producer;
1628 1.1.1.24 christos UINT32 Reserved;
1629 1.1.1.24 christos } ACPI_MPAM_FUNC_DEPS;
1630 1.1.1.24 christos
1631 1.1.1.24 christos /* MPAM Processor cache locator descriptor. Table 13 */
1632 1.1.1.24 christos typedef struct acpi_mpam_resource_cache_locator
1633 1.1.1.24 christos {
1634 1.1.1.24 christos UINT64 CacheReference;
1635 1.1.1.24 christos UINT32 Reserved;
1636 1.1.1.24 christos } ACPI_MPAM_RESOURCE_CACHE_LOCATOR;
1637 1.1.1.24 christos
1638 1.1.1.24 christos /* MPAM Memory locator descriptor. Table 14 */
1639 1.1.1.24 christos typedef struct acpi_mpam_resource_memory_locator
1640 1.1.1.24 christos {
1641 1.1.1.24 christos UINT64 ProximityDomain;
1642 1.1.1.24 christos UINT32 Reserved;
1643 1.1.1.24 christos } ACPI_MPAM_RESOURCE_MEMORY_LOCATOR;
1644 1.1.1.24 christos
1645 1.1.1.24 christos /* MPAM SMMU locator descriptor. Table 15 */
1646 1.1.1.24 christos typedef struct acpi_mpam_resource_smmu_locator
1647 1.1.1.24 christos {
1648 1.1.1.24 christos UINT64 SmmuInterface;
1649 1.1.1.24 christos UINT32 Reserved;
1650 1.1.1.24 christos } ACPI_MPAM_RESOURCE_SMMU_INTERFACE;
1651 1.1.1.24 christos
1652 1.1.1.24 christos /* MPAM Memory-side cache locator descriptor. Table 16 */
1653 1.1.1.24 christos typedef struct acpi_mpam_resource_memcache_locator
1654 1.1.1.24 christos {
1655 1.1.1.24 christos UINT8 Reserved[7];
1656 1.1.1.24 christos UINT8 Level;
1657 1.1.1.24 christos UINT32 Reference;
1658 1.1.1.24 christos } ACPI_MPAM_RESOURCE_MEMCACHE_INTERFACE;
1659 1.1.1.24 christos
1660 1.1.1.24 christos /* MPAM ACPI device locator descriptor. Table 17 */
1661 1.1.1.24 christos typedef struct acpi_mpam_resource_acpi_locator
1662 1.1.1.24 christos {
1663 1.1.1.24 christos UINT64 AcpiHwId;
1664 1.1.1.24 christos UINT32 AcpiUniqueId;
1665 1.1.1.24 christos } ACPI_MPAM_RESOURCE_ACPI_INTERFACE;
1666 1.1.1.24 christos
1667 1.1.1.24 christos /* MPAM Interconnect locator descriptor. Table 18 */
1668 1.1.1.24 christos typedef struct acpi_mpam_resource_interconnect_locator
1669 1.1.1.24 christos {
1670 1.1.1.24 christos UINT64 InterConnectDescTblOff;
1671 1.1.1.24 christos UINT32 Reserved;
1672 1.1.1.24 christos } ACPI_MPAM_RESOURCE_INTERCONNECT_INTERFACE;
1673 1.1.1.24 christos
1674 1.1.1.24 christos /* MPAM Locator structure. Table 12 */
1675 1.1.1.24 christos typedef struct acpi_mpam_resource_generic_locator
1676 1.1.1.24 christos {
1677 1.1.1.24 christos UINT64 Descriptor1;
1678 1.1.1.24 christos UINT32 Descriptor2;
1679 1.1.1.24 christos } ACPI_MPAM_RESOURCE_GENERIC_LOCATOR;
1680 1.1.1.24 christos
1681 1.1.1.24 christos typedef union acpi_mpam_resource_locator
1682 1.1.1.24 christos {
1683 1.1.1.24 christos ACPI_MPAM_RESOURCE_CACHE_LOCATOR CacheLocator;
1684 1.1.1.24 christos ACPI_MPAM_RESOURCE_MEMORY_LOCATOR MemoryLocator;
1685 1.1.1.24 christos ACPI_MPAM_RESOURCE_SMMU_INTERFACE SmmuLocator;
1686 1.1.1.24 christos ACPI_MPAM_RESOURCE_MEMCACHE_INTERFACE MemCacheLocator;
1687 1.1.1.24 christos ACPI_MPAM_RESOURCE_ACPI_INTERFACE AcpiLocator;
1688 1.1.1.24 christos ACPI_MPAM_RESOURCE_INTERCONNECT_INTERFACE InterconnectIfcLocator;
1689 1.1.1.24 christos ACPI_MPAM_RESOURCE_GENERIC_LOCATOR GenericLocator;
1690 1.1.1.24 christos } ACPI_MPAM_RESOURCE_LOCATOR;
1691 1.1.1.24 christos
1692 1.1.1.24 christos /* Memory System Component Resource Node Structure Table 9 */
1693 1.1.1.24 christos typedef struct acpi_mpam_resource_node
1694 1.1.1.24 christos {
1695 1.1.1.24 christos UINT32 Identifier;
1696 1.1.1.24 christos UINT8 RISIndex;
1697 1.1.1.24 christos UINT16 Reserved1;
1698 1.1.1.24 christos UINT8 LocatorType;
1699 1.1.1.24 christos ACPI_MPAM_RESOURCE_LOCATOR Locator;
1700 1.1.1.24 christos UINT32 NumFunctionalDeps;
1701 1.1.1.24 christos } ACPI_MPAM_RESOURCE_NODE;
1702 1.1.1.24 christos
1703 1.1.1.24 christos /* Memory System Component (MSC) Node Structure. Table 4 */
1704 1.1.1.24 christos typedef struct acpi_mpam_msc_node
1705 1.1.1.24 christos {
1706 1.1.1.24 christos UINT16 Length;
1707 1.1.1.24 christos UINT8 InterfaceType;
1708 1.1.1.24 christos UINT8 Reserved;
1709 1.1.1.24 christos UINT32 Identifier;
1710 1.1.1.24 christos UINT64 BaseAddress;
1711 1.1.1.24 christos UINT32 MMIOSize;
1712 1.1.1.24 christos UINT32 OverflowInterrupt;
1713 1.1.1.24 christos UINT32 OverflowInterruptFlags;
1714 1.1.1.24 christos UINT32 Reserved1;
1715 1.1.1.24 christos UINT32 OverflowInterruptAffinity;
1716 1.1.1.24 christos UINT32 ErrorInterrupt;
1717 1.1.1.24 christos UINT32 ErrorInterruptFlags;
1718 1.1.1.24 christos UINT32 Reserved2;
1719 1.1.1.24 christos UINT32 ErrorInterruptAffinity;
1720 1.1.1.24 christos UINT32 MaxNrdyUsec;
1721 1.1.1.24 christos UINT64 HardwareIdLinkedDevice;
1722 1.1.1.24 christos UINT32 InstanceIdLinkedDevice;
1723 1.1.1.24 christos UINT32 NumResouceNodes;
1724 1.1.1.24 christos } ACPI_MPAM_MSC_NODE;
1725 1.1.1.24 christos
1726 1.1.1.24 christos typedef struct acpi_table_mpam
1727 1.1.1.24 christos {
1728 1.1.1.24 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1729 1.1.1.24 christos } ACPI_TABLE_MPAM;
1730 1.1 jruoho
1731 1.1.1.14 christos /*******************************************************************************
1732 1.1.1.14 christos *
1733 1.1.1.14 christos * MPST - Memory Power State Table (ACPI 5.0)
1734 1.1.1.14 christos * Version 1
1735 1.1.1.14 christos *
1736 1.1.1.14 christos ******************************************************************************/
1737 1.1.1.14 christos
1738 1.1.1.14 christos #define ACPI_MPST_CHANNEL_INFO \
1739 1.1.1.14 christos UINT8 ChannelId; \
1740 1.1.1.14 christos UINT8 Reserved1[3]; \
1741 1.1.1.14 christos UINT16 PowerNodeCount; \
1742 1.1.1.14 christos UINT16 Reserved2;
1743 1.1.1.14 christos
1744 1.1.1.14 christos /* Main table */
1745 1.1.1.14 christos
1746 1.1.1.14 christos typedef struct acpi_table_mpst
1747 1.1 jruoho {
1748 1.1.1.14 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1749 1.1.1.14 christos ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
1750 1.1 jruoho
1751 1.1.1.14 christos } ACPI_TABLE_MPST;
1752 1.1 jruoho
1753 1.1 jruoho
1754 1.1.1.14 christos /* Memory Platform Communication Channel Info */
1755 1.1 jruoho
1756 1.1.1.14 christos typedef struct acpi_mpst_channel
1757 1.1.1.14 christos {
1758 1.1.1.14 christos ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
1759 1.1 jruoho
1760 1.1.1.14 christos } ACPI_MPST_CHANNEL;
1761 1.1 jruoho
1762 1.1 jruoho
1763 1.1.1.14 christos /* Memory Power Node Structure */
1764 1.1 jruoho
1765 1.1.1.14 christos typedef struct acpi_mpst_power_node
1766 1.1 jruoho {
1767 1.1.1.14 christos UINT8 Flags;
1768 1.1.1.14 christos UINT8 Reserved1;
1769 1.1.1.14 christos UINT16 NodeId;
1770 1.1.1.14 christos UINT32 Length;
1771 1.1.1.14 christos UINT64 RangeAddress;
1772 1.1.1.14 christos UINT64 RangeLength;
1773 1.1.1.14 christos UINT32 NumPowerStates;
1774 1.1.1.14 christos UINT32 NumPhysicalComponents;
1775 1.1 jruoho
1776 1.1.1.14 christos } ACPI_MPST_POWER_NODE;
1777 1.1 jruoho
1778 1.1.1.14 christos /* Values for Flags field above */
1779 1.1 jruoho
1780 1.1.1.14 christos #define ACPI_MPST_ENABLED 1
1781 1.1.1.14 christos #define ACPI_MPST_POWER_MANAGED 2
1782 1.1.1.14 christos #define ACPI_MPST_HOT_PLUG_CAPABLE 4
1783 1.1 jruoho
1784 1.1 jruoho
1785 1.1.1.14 christos /* Memory Power State Structure (follows POWER_NODE above) */
1786 1.1.1.14 christos
1787 1.1.1.14 christos typedef struct acpi_mpst_power_state
1788 1.1 jruoho {
1789 1.1.1.14 christos UINT8 PowerState;
1790 1.1.1.14 christos UINT8 InfoIndex;
1791 1.1 jruoho
1792 1.1.1.14 christos } ACPI_MPST_POWER_STATE;
1793 1.1 jruoho
1794 1.1 jruoho
1795 1.1.1.14 christos /* Physical Component ID Structure (follows POWER_STATE above) */
1796 1.1 jruoho
1797 1.1.1.14 christos typedef struct acpi_mpst_component
1798 1.1.1.14 christos {
1799 1.1.1.14 christos UINT16 ComponentId;
1800 1.1 jruoho
1801 1.1.1.14 christos } ACPI_MPST_COMPONENT;
1802 1.1.1.14 christos
1803 1.1.1.14 christos
1804 1.1.1.14 christos /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
1805 1.1.1.14 christos
1806 1.1.1.14 christos typedef struct acpi_mpst_data_hdr
1807 1.1 jruoho {
1808 1.1.1.14 christos UINT16 CharacteristicsCount;
1809 1.1.1.14 christos UINT16 Reserved;
1810 1.1 jruoho
1811 1.1.1.14 christos } ACPI_MPST_DATA_HDR;
1812 1.1 jruoho
1813 1.1.1.14 christos typedef struct acpi_mpst_power_data
1814 1.1.1.14 christos {
1815 1.1.1.14 christos UINT8 StructureId;
1816 1.1.1.14 christos UINT8 Flags;
1817 1.1.1.14 christos UINT16 Reserved1;
1818 1.1.1.14 christos UINT32 AveragePower;
1819 1.1.1.14 christos UINT32 PowerSaving;
1820 1.1.1.14 christos UINT64 ExitLatency;
1821 1.1.1.14 christos UINT64 Reserved2;
1822 1.1 jruoho
1823 1.1.1.14 christos } ACPI_MPST_POWER_DATA;
1824 1.1 jruoho
1825 1.1.1.14 christos /* Values for Flags field above */
1826 1.1 jruoho
1827 1.1.1.14 christos #define ACPI_MPST_PRESERVE 1
1828 1.1.1.14 christos #define ACPI_MPST_AUTOENTRY 2
1829 1.1.1.14 christos #define ACPI_MPST_AUTOEXIT 4
1830 1.1 jruoho
1831 1.1 jruoho
1832 1.1.1.14 christos /* Shared Memory Region (not part of an ACPI table) */
1833 1.1 jruoho
1834 1.1.1.14 christos typedef struct acpi_mpst_shared
1835 1.1 jruoho {
1836 1.1.1.14 christos UINT32 Signature;
1837 1.1.1.14 christos UINT16 PccCommand;
1838 1.1.1.14 christos UINT16 PccStatus;
1839 1.1.1.14 christos UINT32 CommandRegister;
1840 1.1.1.14 christos UINT32 StatusRegister;
1841 1.1.1.14 christos UINT32 PowerStateId;
1842 1.1.1.14 christos UINT32 PowerNodeId;
1843 1.1.1.14 christos UINT64 EnergyConsumed;
1844 1.1.1.14 christos UINT64 AveragePower;
1845 1.1 jruoho
1846 1.1.1.14 christos } ACPI_MPST_SHARED;
1847 1.1 jruoho
1848 1.1 jruoho
1849 1.1.1.14 christos /*******************************************************************************
1850 1.1.1.14 christos *
1851 1.1.1.14 christos * MSCT - Maximum System Characteristics Table (ACPI 4.0)
1852 1.1.1.14 christos * Version 1
1853 1.1.1.14 christos *
1854 1.1.1.14 christos ******************************************************************************/
1855 1.1.1.14 christos
1856 1.1.1.14 christos typedef struct acpi_table_msct
1857 1.1 jruoho {
1858 1.1.1.14 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1859 1.1.1.14 christos UINT32 ProximityOffset; /* Location of proximity info struct(s) */
1860 1.1.1.14 christos UINT32 MaxProximityDomains;/* Max number of proximity domains */
1861 1.1.1.14 christos UINT32 MaxClockDomains; /* Max number of clock domains */
1862 1.1.1.14 christos UINT64 MaxAddress; /* Max physical address in system */
1863 1.1 jruoho
1864 1.1.1.14 christos } ACPI_TABLE_MSCT;
1865 1.1 jruoho
1866 1.1 jruoho
1867 1.1.1.14 christos /* Subtable - Maximum Proximity Domain Information. Version 1 */
1868 1.1.1.14 christos
1869 1.1.1.14 christos typedef struct acpi_msct_proximity
1870 1.1 jruoho {
1871 1.1.1.14 christos UINT8 Revision;
1872 1.1.1.14 christos UINT8 Length;
1873 1.1.1.14 christos UINT32 RangeStart; /* Start of domain range */
1874 1.1.1.14 christos UINT32 RangeEnd; /* End of domain range */
1875 1.1.1.14 christos UINT32 ProcessorCapacity;
1876 1.1.1.14 christos UINT64 MemoryCapacity; /* In bytes */
1877 1.1 jruoho
1878 1.1.1.14 christos } ACPI_MSCT_PROXIMITY;
1879 1.1 jruoho
1880 1.1 jruoho
1881 1.1.1.14 christos /*******************************************************************************
1882 1.1.1.14 christos *
1883 1.1.1.14 christos * MSDM - Microsoft Data Management table
1884 1.1.1.14 christos *
1885 1.1.1.14 christos * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1886 1.1.1.14 christos * November 29, 2011. Copyright 2011 Microsoft
1887 1.1.1.14 christos *
1888 1.1.1.14 christos ******************************************************************************/
1889 1.1 jruoho
1890 1.1.1.14 christos /* Basic MSDM table is only the common ACPI header */
1891 1.1 jruoho
1892 1.1.1.14 christos typedef struct acpi_table_msdm
1893 1.1 jruoho {
1894 1.1.1.14 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1895 1.1 jruoho
1896 1.1.1.14 christos } ACPI_TABLE_MSDM;
1897 1.1 jruoho
1898 1.1 jruoho
1899 1.1.1.14 christos /*******************************************************************************
1900 1.1.1.14 christos *
1901 1.1.1.14 christos * NFIT - NVDIMM Interface Table (ACPI 6.0+)
1902 1.1.1.14 christos * Version 1
1903 1.1.1.5 christos *
1904 1.1.1.5 christos ******************************************************************************/
1905 1.1.1.5 christos
1906 1.1.1.14 christos typedef struct acpi_table_nfit
1907 1.1.1.5 christos {
1908 1.1.1.5 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1909 1.1.1.14 christos UINT32 Reserved; /* Reserved, must be zero */
1910 1.1.1.5 christos
1911 1.1.1.14 christos } ACPI_TABLE_NFIT;
1912 1.1.1.5 christos
1913 1.1.1.14 christos /* Subtable header for NFIT */
1914 1.1.1.5 christos
1915 1.1.1.14 christos typedef struct acpi_nfit_header
1916 1.1.1.5 christos {
1917 1.1.1.14 christos UINT16 Type;
1918 1.1.1.14 christos UINT16 Length;
1919 1.1.1.5 christos
1920 1.1.1.14 christos } ACPI_NFIT_HEADER;
1921 1.1.1.5 christos
1922 1.1.1.5 christos
1923 1.1.1.14 christos /* Values for subtable type in ACPI_NFIT_HEADER */
1924 1.1.1.14 christos
1925 1.1.1.14 christos enum AcpiNfitType
1926 1.1.1.5 christos {
1927 1.1.1.14 christos ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0,
1928 1.1.1.14 christos ACPI_NFIT_TYPE_MEMORY_MAP = 1,
1929 1.1.1.14 christos ACPI_NFIT_TYPE_INTERLEAVE = 2,
1930 1.1.1.14 christos ACPI_NFIT_TYPE_SMBIOS = 3,
1931 1.1.1.14 christos ACPI_NFIT_TYPE_CONTROL_REGION = 4,
1932 1.1.1.14 christos ACPI_NFIT_TYPE_DATA_REGION = 5,
1933 1.1.1.14 christos ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
1934 1.1.1.14 christos ACPI_NFIT_TYPE_CAPABILITIES = 7,
1935 1.1.1.14 christos ACPI_NFIT_TYPE_RESERVED = 8 /* 8 and greater are reserved */
1936 1.1.1.5 christos };
1937 1.1.1.5 christos
1938 1.1.1.5 christos /*
1939 1.1.1.14 christos * NFIT Subtables
1940 1.1.1.5 christos */
1941 1.1.1.5 christos
1942 1.1.1.14 christos /* 0: System Physical Address Range Structure */
1943 1.1.1.5 christos
1944 1.1.1.14 christos typedef struct acpi_nfit_system_address
1945 1.1.1.5 christos {
1946 1.1.1.14 christos ACPI_NFIT_HEADER Header;
1947 1.1.1.14 christos UINT16 RangeIndex;
1948 1.1.1.14 christos UINT16 Flags;
1949 1.1.1.14 christos UINT32 Reserved; /* Reserved, must be zero */
1950 1.1.1.14 christos UINT32 ProximityDomain;
1951 1.1.1.14 christos UINT8 RangeGuid[16];
1952 1.1.1.14 christos UINT64 Address;
1953 1.1.1.14 christos UINT64 Length;
1954 1.1.1.14 christos UINT64 MemoryMapping;
1955 1.1.1.18 christos UINT64 LocationCookie; /* ACPI 6.4 */
1956 1.1.1.5 christos
1957 1.1.1.14 christos } ACPI_NFIT_SYSTEM_ADDRESS;
1958 1.1.1.5 christos
1959 1.1.1.14 christos /* Flags */
1960 1.1.1.5 christos
1961 1.1.1.14 christos #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
1962 1.1.1.14 christos #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
1963 1.1.1.18 christos #define ACPI_NFIT_LOCATION_COOKIE_VALID (1<<2) /* 02: SPA location cookie valid (ACPI 6.4) */
1964 1.1 jruoho
1965 1.1.1.14 christos /* Range Type GUIDs appear in the include/acuuid.h file */
1966 1.1.1.14 christos
1967 1.1.1.14 christos
1968 1.1.1.14 christos /* 1: Memory Device to System Address Range Map Structure */
1969 1.1.1.14 christos
1970 1.1.1.14 christos typedef struct acpi_nfit_memory_map
1971 1.1 jruoho {
1972 1.1.1.14 christos ACPI_NFIT_HEADER Header;
1973 1.1.1.14 christos UINT32 DeviceHandle;
1974 1.1.1.14 christos UINT16 PhysicalId;
1975 1.1.1.14 christos UINT16 RegionId;
1976 1.1.1.14 christos UINT16 RangeIndex;
1977 1.1.1.14 christos UINT16 RegionIndex;
1978 1.1.1.14 christos UINT64 RegionSize;
1979 1.1.1.14 christos UINT64 RegionOffset;
1980 1.1.1.14 christos UINT64 Address;
1981 1.1.1.14 christos UINT16 InterleaveIndex;
1982 1.1.1.14 christos UINT16 InterleaveWays;
1983 1.1.1.14 christos UINT16 Flags;
1984 1.1.1.14 christos UINT16 Reserved; /* Reserved, must be zero */
1985 1.1 jruoho
1986 1.1.1.14 christos } ACPI_NFIT_MEMORY_MAP;
1987 1.1 jruoho
1988 1.1.1.14 christos /* Flags */
1989 1.1 jruoho
1990 1.1.1.14 christos #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */
1991 1.1.1.14 christos #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */
1992 1.1.1.14 christos #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */
1993 1.1.1.14 christos #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */
1994 1.1.1.14 christos #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
1995 1.1.1.14 christos #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
1996 1.1.1.14 christos #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */
1997 1.1 jruoho
1998 1.1.1.14 christos
1999 1.1.1.14 christos /* 2: Interleave Structure */
2000 1.1.1.14 christos
2001 1.1.1.14 christos typedef struct acpi_nfit_interleave
2002 1.1 jruoho {
2003 1.1.1.14 christos ACPI_NFIT_HEADER Header;
2004 1.1.1.14 christos UINT16 InterleaveIndex;
2005 1.1.1.14 christos UINT16 Reserved; /* Reserved, must be zero */
2006 1.1.1.14 christos UINT32 LineCount;
2007 1.1.1.14 christos UINT32 LineSize;
2008 1.1.1.24 christos UINT32 LineOffset[]; /* Variable length */
2009 1.1 jruoho
2010 1.1.1.14 christos } ACPI_NFIT_INTERLEAVE;
2011 1.1.1.14 christos
2012 1.1.1.14 christos
2013 1.1.1.14 christos /* 3: SMBIOS Management Information Structure */
2014 1.1.1.14 christos
2015 1.1.1.14 christos typedef struct acpi_nfit_smbios
2016 1.1.1.14 christos {
2017 1.1.1.14 christos ACPI_NFIT_HEADER Header;
2018 1.1.1.14 christos UINT32 Reserved; /* Reserved, must be zero */
2019 1.1.1.24 christos UINT8 Data[]; /* Variable length */
2020 1.1.1.14 christos
2021 1.1.1.14 christos } ACPI_NFIT_SMBIOS;
2022 1.1.1.14 christos
2023 1.1.1.14 christos
2024 1.1.1.14 christos /* 4: NVDIMM Control Region Structure */
2025 1.1.1.14 christos
2026 1.1.1.14 christos typedef struct acpi_nfit_control_region
2027 1.1.1.14 christos {
2028 1.1.1.14 christos ACPI_NFIT_HEADER Header;
2029 1.1.1.14 christos UINT16 RegionIndex;
2030 1.1.1.14 christos UINT16 VendorId;
2031 1.1.1.14 christos UINT16 DeviceId;
2032 1.1.1.14 christos UINT16 RevisionId;
2033 1.1.1.14 christos UINT16 SubsystemVendorId;
2034 1.1.1.14 christos UINT16 SubsystemDeviceId;
2035 1.1.1.14 christos UINT16 SubsystemRevisionId;
2036 1.1.1.14 christos UINT8 ValidFields;
2037 1.1.1.14 christos UINT8 ManufacturingLocation;
2038 1.1.1.14 christos UINT16 ManufacturingDate;
2039 1.1.1.14 christos UINT8 Reserved[2]; /* Reserved, must be zero */
2040 1.1.1.14 christos UINT32 SerialNumber;
2041 1.1.1.14 christos UINT16 Code;
2042 1.1.1.14 christos UINT16 Windows;
2043 1.1.1.14 christos UINT64 WindowSize;
2044 1.1.1.14 christos UINT64 CommandOffset;
2045 1.1.1.14 christos UINT64 CommandSize;
2046 1.1.1.14 christos UINT64 StatusOffset;
2047 1.1.1.14 christos UINT64 StatusSize;
2048 1.1.1.14 christos UINT16 Flags;
2049 1.1.1.14 christos UINT8 Reserved1[6]; /* Reserved, must be zero */
2050 1.1.1.14 christos
2051 1.1.1.14 christos } ACPI_NFIT_CONTROL_REGION;
2052 1.1.1.14 christos
2053 1.1.1.14 christos /* Flags */
2054 1.1.1.14 christos
2055 1.1.1.14 christos #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */
2056 1.1.1.14 christos
2057 1.1.1.14 christos /* ValidFields bits */
2058 1.1.1.14 christos
2059 1.1.1.14 christos #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */
2060 1.1.1.14 christos
2061 1.1.1.14 christos
2062 1.1.1.14 christos /* 5: NVDIMM Block Data Window Region Structure */
2063 1.1.1.14 christos
2064 1.1.1.14 christos typedef struct acpi_nfit_data_region
2065 1.1.1.14 christos {
2066 1.1.1.14 christos ACPI_NFIT_HEADER Header;
2067 1.1.1.14 christos UINT16 RegionIndex;
2068 1.1.1.14 christos UINT16 Windows;
2069 1.1.1.14 christos UINT64 Offset;
2070 1.1.1.14 christos UINT64 Size;
2071 1.1.1.14 christos UINT64 Capacity;
2072 1.1.1.14 christos UINT64 StartAddress;
2073 1.1.1.14 christos
2074 1.1.1.14 christos } ACPI_NFIT_DATA_REGION;
2075 1.1.1.14 christos
2076 1.1.1.14 christos
2077 1.1.1.14 christos /* 6: Flush Hint Address Structure */
2078 1.1.1.14 christos
2079 1.1.1.14 christos typedef struct acpi_nfit_flush_address
2080 1.1.1.14 christos {
2081 1.1.1.14 christos ACPI_NFIT_HEADER Header;
2082 1.1.1.14 christos UINT32 DeviceHandle;
2083 1.1.1.14 christos UINT16 HintCount;
2084 1.1.1.14 christos UINT8 Reserved[6]; /* Reserved, must be zero */
2085 1.1.1.24 christos UINT64 HintAddress[]; /* Variable length */
2086 1.1.1.14 christos
2087 1.1.1.14 christos } ACPI_NFIT_FLUSH_ADDRESS;
2088 1.1.1.14 christos
2089 1.1.1.14 christos
2090 1.1.1.14 christos /* 7: Platform Capabilities Structure */
2091 1.1.1.14 christos
2092 1.1.1.14 christos typedef struct acpi_nfit_capabilities
2093 1.1.1.14 christos {
2094 1.1.1.14 christos ACPI_NFIT_HEADER Header;
2095 1.1.1.14 christos UINT8 HighestCapability;
2096 1.1.1.14 christos UINT8 Reserved[3]; /* Reserved, must be zero */
2097 1.1.1.14 christos UINT32 Capabilities;
2098 1.1.1.14 christos UINT32 Reserved2;
2099 1.1.1.14 christos
2100 1.1.1.14 christos } ACPI_NFIT_CAPABILITIES;
2101 1.1.1.14 christos
2102 1.1.1.14 christos /* Capabilities Flags */
2103 1.1.1.14 christos
2104 1.1.1.14 christos #define ACPI_NFIT_CAPABILITY_CACHE_FLUSH (1) /* 00: Cache Flush to NVDIMM capable */
2105 1.1.1.14 christos #define ACPI_NFIT_CAPABILITY_MEM_FLUSH (1<<1) /* 01: Memory Flush to NVDIMM capable */
2106 1.1.1.14 christos #define ACPI_NFIT_CAPABILITY_MEM_MIRRORING (1<<2) /* 02: Memory Mirroring capable */
2107 1.1.1.14 christos
2108 1.1.1.14 christos
2109 1.1.1.14 christos /*
2110 1.1.1.14 christos * NFIT/DVDIMM device handle support - used as the _ADR for each NVDIMM
2111 1.1.1.14 christos */
2112 1.1.1.14 christos typedef struct nfit_device_handle
2113 1.1.1.14 christos {
2114 1.1.1.14 christos UINT32 Handle;
2115 1.1.1.14 christos
2116 1.1.1.14 christos } NFIT_DEVICE_HANDLE;
2117 1.1.1.14 christos
2118 1.1.1.14 christos /* Device handle construction and extraction macros */
2119 1.1.1.14 christos
2120 1.1.1.14 christos #define ACPI_NFIT_DIMM_NUMBER_MASK 0x0000000F
2121 1.1.1.14 christos #define ACPI_NFIT_CHANNEL_NUMBER_MASK 0x000000F0
2122 1.1.1.14 christos #define ACPI_NFIT_MEMORY_ID_MASK 0x00000F00
2123 1.1.1.14 christos #define ACPI_NFIT_SOCKET_ID_MASK 0x0000F000
2124 1.1.1.14 christos #define ACPI_NFIT_NODE_ID_MASK 0x0FFF0000
2125 1.1.1.14 christos
2126 1.1.1.14 christos #define ACPI_NFIT_DIMM_NUMBER_OFFSET 0
2127 1.1.1.14 christos #define ACPI_NFIT_CHANNEL_NUMBER_OFFSET 4
2128 1.1.1.14 christos #define ACPI_NFIT_MEMORY_ID_OFFSET 8
2129 1.1.1.14 christos #define ACPI_NFIT_SOCKET_ID_OFFSET 12
2130 1.1.1.14 christos #define ACPI_NFIT_NODE_ID_OFFSET 16
2131 1.1.1.14 christos
2132 1.1.1.14 christos /* Macro to construct a NFIT/NVDIMM device handle */
2133 1.1.1.14 christos
2134 1.1.1.14 christos #define ACPI_NFIT_BUILD_DEVICE_HANDLE(dimm, channel, memory, socket, node) \
2135 1.1.1.14 christos ((dimm) | \
2136 1.1.1.14 christos ((channel) << ACPI_NFIT_CHANNEL_NUMBER_OFFSET) | \
2137 1.1.1.14 christos ((memory) << ACPI_NFIT_MEMORY_ID_OFFSET) | \
2138 1.1.1.14 christos ((socket) << ACPI_NFIT_SOCKET_ID_OFFSET) | \
2139 1.1.1.14 christos ((node) << ACPI_NFIT_NODE_ID_OFFSET))
2140 1.1.1.14 christos
2141 1.1.1.14 christos /* Macros to extract individual fields from a NFIT/NVDIMM device handle */
2142 1.1.1.14 christos
2143 1.1.1.14 christos #define ACPI_NFIT_GET_DIMM_NUMBER(handle) \
2144 1.1.1.14 christos ((handle) & ACPI_NFIT_DIMM_NUMBER_MASK)
2145 1.1.1.14 christos
2146 1.1.1.14 christos #define ACPI_NFIT_GET_CHANNEL_NUMBER(handle) \
2147 1.1.1.14 christos (((handle) & ACPI_NFIT_CHANNEL_NUMBER_MASK) >> ACPI_NFIT_CHANNEL_NUMBER_OFFSET)
2148 1.1.1.14 christos
2149 1.1.1.14 christos #define ACPI_NFIT_GET_MEMORY_ID(handle) \
2150 1.1.1.14 christos (((handle) & ACPI_NFIT_MEMORY_ID_MASK) >> ACPI_NFIT_MEMORY_ID_OFFSET)
2151 1.1.1.14 christos
2152 1.1.1.14 christos #define ACPI_NFIT_GET_SOCKET_ID(handle) \
2153 1.1.1.14 christos (((handle) & ACPI_NFIT_SOCKET_ID_MASK) >> ACPI_NFIT_SOCKET_ID_OFFSET)
2154 1.1.1.14 christos
2155 1.1.1.14 christos #define ACPI_NFIT_GET_NODE_ID(handle) \
2156 1.1.1.14 christos (((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET)
2157 1.1 jruoho
2158 1.1 jruoho
2159 1.1 jruoho /*******************************************************************************
2160 1.1 jruoho *
2161 1.1.1.20 christos * NHLT - Non HD Audio Link Table
2162 1.1.1.20 christos *
2163 1.1.1.20 christos * Conforms to: Intel Smart Sound Technology NHLT Specification
2164 1.1.1.20 christos * Version 0.8.1, January 2020.
2165 1.1.1.20 christos *
2166 1.1.1.20 christos ******************************************************************************/
2167 1.1.1.20 christos
2168 1.1.1.20 christos /* Main table */
2169 1.1.1.20 christos
2170 1.1.1.20 christos typedef struct acpi_table_nhlt
2171 1.1.1.20 christos {
2172 1.1.1.20 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
2173 1.1.1.20 christos UINT8 EndpointCount;
2174 1.1.1.20 christos
2175 1.1.1.20 christos } ACPI_TABLE_NHLT;
2176 1.1.1.20 christos
2177 1.1.1.21 christos typedef struct acpi_table_nhlt_endpoint_count
2178 1.1.1.21 christos {
2179 1.1.1.21 christos UINT8 EndpointCount;
2180 1.1.1.21 christos
2181 1.1.1.21 christos } ACPI_TABLE_NHLT_ENDPOINT_COUNT;
2182 1.1.1.21 christos
2183 1.1.1.20 christos typedef struct acpi_nhlt_endpoint
2184 1.1.1.20 christos {
2185 1.1.1.20 christos UINT32 DescriptorLength;
2186 1.1.1.20 christos UINT8 LinkType;
2187 1.1.1.20 christos UINT8 InstanceId;
2188 1.1.1.20 christos UINT16 VendorId;
2189 1.1.1.20 christos UINT16 DeviceId;
2190 1.1.1.20 christos UINT16 RevisionId;
2191 1.1.1.20 christos UINT32 SubsystemId;
2192 1.1.1.20 christos UINT8 DeviceType;
2193 1.1.1.20 christos UINT8 Direction;
2194 1.1.1.20 christos UINT8 VirtualBusId;
2195 1.1.1.20 christos
2196 1.1.1.20 christos } ACPI_NHLT_ENDPOINT;
2197 1.1.1.20 christos
2198 1.1.1.20 christos /* Types for LinkType field above */
2199 1.1.1.20 christos
2200 1.1.1.20 christos #define ACPI_NHLT_RESERVED_HD_AUDIO 0
2201 1.1.1.20 christos #define ACPI_NHLT_RESERVED_DSP 1
2202 1.1.1.20 christos #define ACPI_NHLT_PDM 2
2203 1.1.1.20 christos #define ACPI_NHLT_SSP 3
2204 1.1.1.20 christos #define ACPI_NHLT_RESERVED_SLIMBUS 4
2205 1.1.1.20 christos #define ACPI_NHLT_RESERVED_SOUNDWIRE 5
2206 1.1.1.20 christos #define ACPI_NHLT_TYPE_RESERVED 6 /* 6 and above are reserved */
2207 1.1.1.20 christos
2208 1.1.1.20 christos /* All other values above are reserved */
2209 1.1.1.20 christos
2210 1.1.1.20 christos /* Values for DeviceId field above */
2211 1.1.1.20 christos
2212 1.1.1.20 christos #define ACPI_NHLT_PDM_DMIC 0xAE20
2213 1.1.1.20 christos #define ACPI_NHLT_BT_SIDEBAND 0xAE30
2214 1.1.1.20 christos #define ACPI_NHLT_I2S_TDM_CODECS 0xAE23
2215 1.1.1.20 christos
2216 1.1.1.20 christos /* Values for DeviceType field above */
2217 1.1.1.20 christos
2218 1.1.1.20 christos /* SSP Link */
2219 1.1.1.20 christos
2220 1.1.1.20 christos #define ACPI_NHLT_LINK_BT_SIDEBAND 0
2221 1.1.1.20 christos #define ACPI_NHLT_LINK_FM 1
2222 1.1.1.20 christos #define ACPI_NHLT_LINK_MODEM 2
2223 1.1.1.20 christos /* 3 is reserved */
2224 1.1.1.20 christos #define ACPI_NHLT_LINK_SSP_ANALOG_CODEC 4
2225 1.1.1.20 christos
2226 1.1.1.20 christos /* PDM Link */
2227 1.1.1.20 christos
2228 1.1.1.20 christos #define ACPI_NHLT_PDM_ON_CAVS_1P8 0
2229 1.1.1.20 christos #define ACPI_NHLT_PDM_ON_CAVS_1P5 1
2230 1.1.1.20 christos
2231 1.1.1.20 christos /* Values for Direction field above */
2232 1.1.1.20 christos
2233 1.1.1.20 christos #define ACPI_NHLT_DIR_RENDER 0
2234 1.1.1.20 christos #define ACPI_NHLT_DIR_CAPTURE 1
2235 1.1.1.20 christos #define ACPI_NHLT_DIR_RENDER_LOOPBACK 2
2236 1.1.1.20 christos #define ACPI_NHLT_DIR_RENDER_FEEDBACK 3
2237 1.1.1.20 christos #define ACPI_NHLT_DIR_RESERVED 4 /* 4 and above are reserved */
2238 1.1.1.20 christos
2239 1.1.1.21 christos /* Capabilities = 2 */
2240 1.1.1.21 christos
2241 1.1.1.20 christos typedef struct acpi_nhlt_device_specific_config
2242 1.1.1.20 christos {
2243 1.1.1.20 christos UINT32 CapabilitiesSize;
2244 1.1.1.20 christos UINT8 VirtualSlot;
2245 1.1.1.20 christos UINT8 ConfigType;
2246 1.1.1.20 christos
2247 1.1.1.20 christos } ACPI_NHLT_DEVICE_SPECIFIC_CONFIG;
2248 1.1.1.20 christos
2249 1.1.1.21 christos /* Capabilities = 3 */
2250 1.1.1.21 christos
2251 1.1.1.20 christos typedef struct acpi_nhlt_device_specific_config_a
2252 1.1.1.20 christos {
2253 1.1.1.20 christos UINT32 CapabilitiesSize;
2254 1.1.1.20 christos UINT8 VirtualSlot;
2255 1.1.1.20 christos UINT8 ConfigType;
2256 1.1.1.20 christos UINT8 ArrayType;
2257 1.1.1.20 christos
2258 1.1.1.20 christos } ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A;
2259 1.1.1.20 christos
2260 1.1.1.21 christos /* Capabilities = 3 */
2261 1.1.1.21 christos
2262 1.1.1.21 christos typedef struct acpi_nhlt_device_specific_config_d
2263 1.1.1.21 christos {
2264 1.1.1.21 christos UINT8 VirtualSlot;
2265 1.1.1.21 christos UINT8 ConfigType;
2266 1.1.1.21 christos UINT8 ArrayType;
2267 1.1.1.20 christos
2268 1.1.1.21 christos } ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D;
2269 1.1.1.20 christos
2270 1.1.1.21 christos /* Values for Config Type above */
2271 1.1.1.21 christos
2272 1.1.1.21 christos #define ACPI_NHLT_CONFIG_TYPE_GENERIC 0x00
2273 1.1.1.21 christos #define ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY 0x01
2274 1.1.1.21 christos #define ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK 0x03
2275 1.1.1.21 christos #define ACPI_NHLT_CONFIG_TYPE_RESERVED 0x04 /* 4 and above are reserved */
2276 1.1.1.20 christos
2277 1.1.1.21 christos /* Capabilities = 0 */
2278 1.1.1.20 christos
2279 1.1.1.20 christos typedef struct acpi_nhlt_device_specific_config_b
2280 1.1.1.20 christos {
2281 1.1.1.20 christos UINT32 CapabilitiesSize;
2282 1.1.1.20 christos
2283 1.1.1.20 christos } ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B;
2284 1.1.1.20 christos
2285 1.1.1.21 christos /* Capabilities = 1 */
2286 1.1.1.21 christos
2287 1.1.1.20 christos typedef struct acpi_nhlt_device_specific_config_c
2288 1.1.1.20 christos {
2289 1.1.1.20 christos UINT32 CapabilitiesSize;
2290 1.1.1.20 christos UINT8 VirtualSlot;
2291 1.1.1.20 christos
2292 1.1.1.20 christos } ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C;
2293 1.1.1.20 christos
2294 1.1.1.21 christos typedef struct acpi_nhlt_render_device_specific_config
2295 1.1.1.21 christos {
2296 1.1.1.21 christos UINT32 CapabilitiesSize;
2297 1.1.1.21 christos UINT8 VirtualSlot;
2298 1.1.1.21 christos
2299 1.1.1.21 christos } ACPI_NHLT_RENDER_DEVICE_SPECIFIC_CONFIG;
2300 1.1.1.21 christos
2301 1.1.1.20 christos typedef struct acpi_nhlt_wave_extensible
2302 1.1.1.20 christos {
2303 1.1.1.20 christos UINT16 FormatTag;
2304 1.1.1.20 christos UINT16 ChannelCount;
2305 1.1.1.20 christos UINT32 SamplesPerSec;
2306 1.1.1.20 christos UINT32 AvgBytesPerSec;
2307 1.1.1.20 christos UINT16 BlockAlign;
2308 1.1.1.20 christos UINT16 BitsPerSample;
2309 1.1.1.20 christos UINT16 ExtraFormatSize;
2310 1.1.1.20 christos UINT16 ValidBitsPerSample;
2311 1.1.1.20 christos UINT32 ChannelMask;
2312 1.1.1.20 christos UINT8 SubFormatGuid[16];
2313 1.1.1.20 christos
2314 1.1.1.20 christos } ACPI_NHLT_WAVE_EXTENSIBLE;
2315 1.1.1.20 christos
2316 1.1.1.20 christos /* Values for ChannelMask above */
2317 1.1.1.20 christos
2318 1.1.1.20 christos #define ACPI_NHLT_SPKR_FRONT_LEFT 0x1
2319 1.1.1.20 christos #define ACPI_NHLT_SPKR_FRONT_RIGHT 0x2
2320 1.1.1.20 christos #define ACPI_NHLT_SPKR_FRONT_CENTER 0x4
2321 1.1.1.20 christos #define ACPI_NHLT_SPKR_LOW_FREQ 0x8
2322 1.1.1.20 christos #define ACPI_NHLT_SPKR_BACK_LEFT 0x10
2323 1.1.1.20 christos #define ACPI_NHLT_SPKR_BACK_RIGHT 0x20
2324 1.1.1.20 christos #define ACPI_NHLT_SPKR_FRONT_LEFT_OF_CENTER 0x40
2325 1.1.1.20 christos #define ACPI_NHLT_SPKR_FRONT_RIGHT_OF_CENTER 0x80
2326 1.1.1.20 christos #define ACPI_NHLT_SPKR_BACK_CENTER 0x100
2327 1.1.1.20 christos #define ACPI_NHLT_SPKR_SIDE_LEFT 0x200
2328 1.1.1.20 christos #define ACPI_NHLT_SPKR_SIDE_RIGHT 0x400
2329 1.1.1.20 christos #define ACPI_NHLT_SPKR_TOP_CENTER 0x800
2330 1.1.1.20 christos #define ACPI_NHLT_SPKR_TOP_FRONT_LEFT 0x1000
2331 1.1.1.20 christos #define ACPI_NHLT_SPKR_TOP_FRONT_CENTER 0x2000
2332 1.1.1.20 christos #define ACPI_NHLT_SPKR_TOP_FRONT_RIGHT 0x4000
2333 1.1.1.20 christos #define ACPI_NHLT_SPKR_TOP_BACK_LEFT 0x8000
2334 1.1.1.20 christos #define ACPI_NHLT_SPKR_TOP_BACK_CENTER 0x10000
2335 1.1.1.20 christos #define ACPI_NHLT_SPKR_TOP_BACK_RIGHT 0x20000
2336 1.1.1.20 christos
2337 1.1.1.20 christos typedef struct acpi_nhlt_format_config
2338 1.1.1.20 christos {
2339 1.1.1.20 christos ACPI_NHLT_WAVE_EXTENSIBLE Format;
2340 1.1.1.20 christos UINT32 CapabilitySize;
2341 1.1.1.20 christos UINT8 Capabilities[];
2342 1.1.1.20 christos
2343 1.1.1.20 christos } ACPI_NHLT_FORMAT_CONFIG;
2344 1.1.1.20 christos
2345 1.1.1.20 christos typedef struct acpi_nhlt_formats_config
2346 1.1.1.20 christos {
2347 1.1.1.20 christos UINT8 FormatsCount;
2348 1.1.1.20 christos
2349 1.1.1.20 christos } ACPI_NHLT_FORMATS_CONFIG;
2350 1.1.1.20 christos
2351 1.1.1.20 christos typedef struct acpi_nhlt_device_specific_hdr
2352 1.1.1.20 christos {
2353 1.1.1.20 christos UINT8 VirtualSlot;
2354 1.1.1.20 christos UINT8 ConfigType;
2355 1.1.1.20 christos
2356 1.1.1.20 christos } ACPI_NHLT_DEVICE_SPECIFIC_HDR;
2357 1.1.1.20 christos
2358 1.1.1.20 christos /* Types for ConfigType above */
2359 1.1.1.20 christos
2360 1.1.1.20 christos #define ACPI_NHLT_GENERIC 0
2361 1.1.1.20 christos #define ACPI_NHLT_MIC 1
2362 1.1.1.20 christos #define ACPI_NHLT_RENDER 3
2363 1.1.1.20 christos
2364 1.1.1.20 christos typedef struct acpi_nhlt_mic_device_specific_config
2365 1.1.1.20 christos {
2366 1.1.1.20 christos ACPI_NHLT_DEVICE_SPECIFIC_HDR DeviceConfig;
2367 1.1.1.20 christos UINT8 ArrayTypeExt;
2368 1.1.1.20 christos
2369 1.1.1.20 christos } ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG;
2370 1.1.1.20 christos
2371 1.1.1.20 christos /* Values for ArrayTypeExt above */
2372 1.1.1.20 christos
2373 1.1.1.22 christos #define ACPI_NHLT_ARRAY_TYPE_RESERVED 0x09 /* 9 and below are reserved */
2374 1.1.1.21 christos #define ACPI_NHLT_SMALL_LINEAR_2ELEMENT 0x0A
2375 1.1.1.21 christos #define ACPI_NHLT_BIG_LINEAR_2ELEMENT 0x0B
2376 1.1.1.21 christos #define ACPI_NHLT_FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C
2377 1.1.1.21 christos #define ACPI_NHLT_PLANAR_LSHAPED_4ELEMENT 0x0D
2378 1.1.1.21 christos #define ACPI_NHLT_SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E
2379 1.1.1.21 christos #define ACPI_NHLT_VENDOR_DEFINED 0x0F
2380 1.1.1.21 christos #define ACPI_NHLT_ARRAY_TYPE_MASK 0x0F
2381 1.1.1.21 christos #define ACPI_NHLT_ARRAY_TYPE_EXT_MASK 0x10
2382 1.1.1.21 christos
2383 1.1.1.21 christos #define ACPI_NHLT_NO_EXTENSION 0x0
2384 1.1.1.21 christos #define ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT (1<<4)
2385 1.1.1.20 christos
2386 1.1.1.21 christos typedef struct acpi_nhlt_vendor_mic_count
2387 1.1.1.21 christos {
2388 1.1.1.21 christos UINT8 MicrophoneCount;
2389 1.1.1.20 christos
2390 1.1.1.21 christos } ACPI_NHLT_VENDOR_MIC_COUNT;
2391 1.1.1.20 christos
2392 1.1.1.20 christos typedef struct acpi_nhlt_vendor_mic_config
2393 1.1.1.20 christos {
2394 1.1.1.20 christos UINT8 Type;
2395 1.1.1.20 christos UINT8 Panel;
2396 1.1.1.22 christos UINT16 SpeakerPositionDistance; /* mm */
2397 1.1.1.22 christos UINT16 HorizontalOffset; /* mm */
2398 1.1.1.22 christos UINT16 VerticalOffset; /* mm */
2399 1.1.1.22 christos UINT8 FrequencyLowBand; /* 5*Hz */
2400 1.1.1.22 christos UINT8 FrequencyHighBand; /* 500*Hz */
2401 1.1.1.22 christos UINT16 DirectionAngle; /* -180 - + 180 */
2402 1.1.1.22 christos UINT16 ElevationAngle; /* -180 - + 180 */
2403 1.1.1.22 christos UINT16 WorkVerticalAngleBegin; /* -180 - + 180 with 2 deg step */
2404 1.1.1.22 christos UINT16 WorkVerticalAngleEnd; /* -180 - + 180 with 2 deg step */
2405 1.1.1.22 christos UINT16 WorkHorizontalAngleBegin; /* -180 - + 180 with 2 deg step */
2406 1.1.1.22 christos UINT16 WorkHorizontalAngleEnd; /* -180 - + 180 with 2 deg step */
2407 1.1.1.20 christos
2408 1.1.1.20 christos } ACPI_NHLT_VENDOR_MIC_CONFIG;
2409 1.1.1.20 christos
2410 1.1.1.20 christos /* Values for Type field above */
2411 1.1.1.20 christos
2412 1.1.1.21 christos #define ACPI_NHLT_MIC_OMNIDIRECTIONAL 0
2413 1.1.1.21 christos #define ACPI_NHLT_MIC_SUBCARDIOID 1
2414 1.1.1.21 christos #define ACPI_NHLT_MIC_CARDIOID 2
2415 1.1.1.21 christos #define ACPI_NHLT_MIC_SUPER_CARDIOID 3
2416 1.1.1.21 christos #define ACPI_NHLT_MIC_HYPER_CARDIOID 4
2417 1.1.1.21 christos #define ACPI_NHLT_MIC_8_SHAPED 5
2418 1.1.1.22 christos #define ACPI_NHLT_MIC_RESERVED6 6 /* 6 is reserved */
2419 1.1.1.21 christos #define ACPI_NHLT_MIC_VENDOR_DEFINED 7
2420 1.1.1.22 christos #define ACPI_NHLT_MIC_RESERVED 8 /* 8 and above are reserved */
2421 1.1.1.20 christos
2422 1.1.1.20 christos /* Values for Panel field above */
2423 1.1.1.20 christos
2424 1.1.1.21 christos #define ACPI_NHLT_MIC_POSITION_TOP 0
2425 1.1.1.21 christos #define ACPI_NHLT_MIC_POSITION_BOTTOM 1
2426 1.1.1.21 christos #define ACPI_NHLT_MIC_POSITION_LEFT 2
2427 1.1.1.21 christos #define ACPI_NHLT_MIC_POSITION_RIGHT 3
2428 1.1.1.21 christos #define ACPI_NHLT_MIC_POSITION_FRONT 4
2429 1.1.1.21 christos #define ACPI_NHLT_MIC_POSITION_BACK 5
2430 1.1.1.22 christos #define ACPI_NHLT_MIC_POSITION_RESERVED 6 /* 6 and above are reserved */
2431 1.1.1.20 christos
2432 1.1.1.20 christos typedef struct acpi_nhlt_vendor_mic_device_specific_config
2433 1.1.1.20 christos {
2434 1.1.1.20 christos ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG MicArrayDeviceConfig;
2435 1.1.1.20 christos UINT8 NumberOfMicrophones;
2436 1.1.1.22 christos ACPI_NHLT_VENDOR_MIC_CONFIG MicConfig[]; /* Indexed by NumberOfMicrophones */
2437 1.1.1.20 christos
2438 1.1.1.20 christos } ACPI_NHLT_VENDOR_MIC_DEVICE_SPECIFIC_CONFIG;
2439 1.1.1.20 christos
2440 1.1.1.20 christos /* Microphone SNR and Sensitivity extension */
2441 1.1.1.20 christos
2442 1.1.1.20 christos typedef struct acpi_nhlt_mic_snr_sensitivity_extension
2443 1.1.1.20 christos {
2444 1.1.1.20 christos UINT32 SNR;
2445 1.1.1.20 christos UINT32 Sensitivity;
2446 1.1.1.20 christos
2447 1.1.1.20 christos } ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION;
2448 1.1.1.20 christos
2449 1.1.1.21 christos /* Render device with feedback */
2450 1.1.1.21 christos
2451 1.1.1.20 christos typedef struct acpi_nhlt_render_feedback_device_specific_config
2452 1.1.1.20 christos {
2453 1.1.1.22 christos UINT8 FeedbackVirtualSlot; /* Render slot in case of capture */
2454 1.1.1.22 christos UINT16 FeedbackChannels; /* Informative only */
2455 1.1.1.20 christos UINT16 FeedbackValidBitsPerSample;
2456 1.1.1.20 christos
2457 1.1.1.20 christos } ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG;
2458 1.1.1.20 christos
2459 1.1.1.22 christos /* Non documented structures */
2460 1.1.1.20 christos
2461 1.1.1.22 christos typedef struct acpi_nhlt_device_info_count
2462 1.1.1.20 christos {
2463 1.1.1.20 christos UINT8 StructureCount;
2464 1.1.1.20 christos
2465 1.1.1.22 christos } ACPI_NHLT_DEVICE_INFO_COUNT;
2466 1.1.1.20 christos
2467 1.1.1.22 christos typedef struct acpi_nhlt_device_info
2468 1.1.1.20 christos {
2469 1.1.1.20 christos UINT8 DeviceId[16];
2470 1.1.1.20 christos UINT8 DeviceInstanceId;
2471 1.1.1.20 christos UINT8 DevicePortId;
2472 1.1.1.20 christos
2473 1.1.1.22 christos } ACPI_NHLT_DEVICE_INFO;
2474 1.1.1.20 christos
2475 1.1.1.20 christos
2476 1.1.1.20 christos /*******************************************************************************
2477 1.1.1.20 christos *
2478 1.1.1.14 christos * PCCT - Platform Communications Channel Table (ACPI 5.0)
2479 1.1.1.14 christos * Version 2 (ACPI 6.2)
2480 1.1 jruoho *
2481 1.1 jruoho ******************************************************************************/
2482 1.1 jruoho
2483 1.1.1.14 christos typedef struct acpi_table_pcct
2484 1.1 jruoho {
2485 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
2486 1.1.1.14 christos UINT32 Flags;
2487 1.1.1.14 christos UINT64 Reserved;
2488 1.1.1.14 christos
2489 1.1.1.14 christos } ACPI_TABLE_PCCT;
2490 1.1.1.14 christos
2491 1.1.1.14 christos /* Values for Flags field above */
2492 1.1.1.14 christos
2493 1.1.1.14 christos #define ACPI_PCCT_DOORBELL 1
2494 1.1.1.14 christos
2495 1.1.1.14 christos /* Values for subtable type in ACPI_SUBTABLE_HEADER */
2496 1.1.1.14 christos
2497 1.1.1.14 christos enum AcpiPcctType
2498 1.1.1.14 christos {
2499 1.1.1.14 christos ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
2500 1.1.1.14 christos ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
2501 1.1.1.14 christos ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
2502 1.1.1.14 christos ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, /* ACPI 6.2 */
2503 1.1.1.14 christos ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, /* ACPI 6.2 */
2504 1.1.1.18 christos ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE = 5, /* ACPI 6.4 */
2505 1.1.1.18 christos ACPI_PCCT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
2506 1.1.1.14 christos };
2507 1.1 jruoho
2508 1.1.1.14 christos /*
2509 1.1.1.14 christos * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
2510 1.1.1.14 christos */
2511 1.1 jruoho
2512 1.1.1.14 christos /* 0: Generic Communications Subspace */
2513 1.1 jruoho
2514 1.1.1.14 christos typedef struct acpi_pcct_subspace
2515 1.1.1.14 christos {
2516 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
2517 1.1.1.14 christos UINT8 Reserved[6];
2518 1.1.1.14 christos UINT64 BaseAddress;
2519 1.1.1.14 christos UINT64 Length;
2520 1.1.1.14 christos ACPI_GENERIC_ADDRESS DoorbellRegister;
2521 1.1.1.14 christos UINT64 PreserveMask;
2522 1.1.1.14 christos UINT64 WriteMask;
2523 1.1.1.14 christos UINT32 Latency;
2524 1.1.1.14 christos UINT32 MaxAccessRate;
2525 1.1.1.14 christos UINT16 MinTurnaroundTime;
2526 1.1.1.6 christos
2527 1.1.1.14 christos } ACPI_PCCT_SUBSPACE;
2528 1.1.1.6 christos
2529 1.1.1.14 christos
2530 1.1.1.14 christos /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
2531 1.1.1.14 christos
2532 1.1.1.14 christos typedef struct acpi_pcct_hw_reduced
2533 1.1.1.6 christos {
2534 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
2535 1.1.1.14 christos UINT32 PlatformInterrupt;
2536 1.1.1.14 christos UINT8 Flags;
2537 1.1.1.14 christos UINT8 Reserved;
2538 1.1.1.14 christos UINT64 BaseAddress;
2539 1.1.1.14 christos UINT64 Length;
2540 1.1.1.14 christos ACPI_GENERIC_ADDRESS DoorbellRegister;
2541 1.1.1.14 christos UINT64 PreserveMask;
2542 1.1.1.14 christos UINT64 WriteMask;
2543 1.1.1.14 christos UINT32 Latency;
2544 1.1.1.14 christos UINT32 MaxAccessRate;
2545 1.1.1.14 christos UINT16 MinTurnaroundTime;
2546 1.1.1.6 christos
2547 1.1.1.14 christos } ACPI_PCCT_HW_REDUCED;
2548 1.1.1.6 christos
2549 1.1.1.6 christos
2550 1.1.1.14 christos /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
2551 1.1.1.4 christos
2552 1.1.1.14 christos typedef struct acpi_pcct_hw_reduced_type2
2553 1.1.1.4 christos {
2554 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
2555 1.1.1.14 christos UINT32 PlatformInterrupt;
2556 1.1.1.14 christos UINT8 Flags;
2557 1.1.1.14 christos UINT8 Reserved;
2558 1.1.1.14 christos UINT64 BaseAddress;
2559 1.1.1.14 christos UINT64 Length;
2560 1.1.1.14 christos ACPI_GENERIC_ADDRESS DoorbellRegister;
2561 1.1.1.14 christos UINT64 PreserveMask;
2562 1.1.1.14 christos UINT64 WriteMask;
2563 1.1.1.14 christos UINT32 Latency;
2564 1.1.1.14 christos UINT32 MaxAccessRate;
2565 1.1.1.14 christos UINT16 MinTurnaroundTime;
2566 1.1.1.14 christos ACPI_GENERIC_ADDRESS PlatformAckRegister;
2567 1.1.1.14 christos UINT64 AckPreserveMask;
2568 1.1.1.14 christos UINT64 AckWriteMask;
2569 1.1.1.4 christos
2570 1.1.1.14 christos } ACPI_PCCT_HW_REDUCED_TYPE2;
2571 1.1.1.4 christos
2572 1.1.1.4 christos
2573 1.1.1.14 christos /* 3: Extended PCC Master Subspace Type 3 (ACPI 6.2) */
2574 1.1.1.14 christos
2575 1.1.1.14 christos typedef struct acpi_pcct_ext_pcc_master
2576 1.1.1.4 christos {
2577 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
2578 1.1.1.14 christos UINT32 PlatformInterrupt;
2579 1.1.1.14 christos UINT8 Flags;
2580 1.1.1.14 christos UINT8 Reserved1;
2581 1.1.1.14 christos UINT64 BaseAddress;
2582 1.1.1.14 christos UINT32 Length;
2583 1.1.1.14 christos ACPI_GENERIC_ADDRESS DoorbellRegister;
2584 1.1.1.14 christos UINT64 PreserveMask;
2585 1.1.1.14 christos UINT64 WriteMask;
2586 1.1.1.14 christos UINT32 Latency;
2587 1.1.1.14 christos UINT32 MaxAccessRate;
2588 1.1.1.14 christos UINT32 MinTurnaroundTime;
2589 1.1.1.14 christos ACPI_GENERIC_ADDRESS PlatformAckRegister;
2590 1.1.1.14 christos UINT64 AckPreserveMask;
2591 1.1.1.14 christos UINT64 AckSetMask;
2592 1.1.1.14 christos UINT64 Reserved2;
2593 1.1.1.14 christos ACPI_GENERIC_ADDRESS CmdCompleteRegister;
2594 1.1.1.14 christos UINT64 CmdCompleteMask;
2595 1.1.1.14 christos ACPI_GENERIC_ADDRESS CmdUpdateRegister;
2596 1.1.1.14 christos UINT64 CmdUpdatePreserveMask;
2597 1.1.1.14 christos UINT64 CmdUpdateSetMask;
2598 1.1.1.14 christos ACPI_GENERIC_ADDRESS ErrorStatusRegister;
2599 1.1.1.14 christos UINT64 ErrorStatusMask;
2600 1.1.1.14 christos
2601 1.1.1.14 christos } ACPI_PCCT_EXT_PCC_MASTER;
2602 1.1.1.4 christos
2603 1.1.1.4 christos
2604 1.1.1.14 christos /* 4: Extended PCC Slave Subspace Type 4 (ACPI 6.2) */
2605 1.1.1.12 christos
2606 1.1.1.14 christos typedef struct acpi_pcct_ext_pcc_slave
2607 1.1.1.12 christos {
2608 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
2609 1.1.1.14 christos UINT32 PlatformInterrupt;
2610 1.1.1.14 christos UINT8 Flags;
2611 1.1.1.14 christos UINT8 Reserved1;
2612 1.1.1.14 christos UINT64 BaseAddress;
2613 1.1.1.14 christos UINT32 Length;
2614 1.1.1.14 christos ACPI_GENERIC_ADDRESS DoorbellRegister;
2615 1.1.1.14 christos UINT64 PreserveMask;
2616 1.1.1.14 christos UINT64 WriteMask;
2617 1.1.1.14 christos UINT32 Latency;
2618 1.1.1.14 christos UINT32 MaxAccessRate;
2619 1.1.1.14 christos UINT32 MinTurnaroundTime;
2620 1.1.1.14 christos ACPI_GENERIC_ADDRESS PlatformAckRegister;
2621 1.1.1.14 christos UINT64 AckPreserveMask;
2622 1.1.1.14 christos UINT64 AckSetMask;
2623 1.1.1.14 christos UINT64 Reserved2;
2624 1.1.1.14 christos ACPI_GENERIC_ADDRESS CmdCompleteRegister;
2625 1.1.1.14 christos UINT64 CmdCompleteMask;
2626 1.1.1.14 christos ACPI_GENERIC_ADDRESS CmdUpdateRegister;
2627 1.1.1.14 christos UINT64 CmdUpdatePreserveMask;
2628 1.1.1.14 christos UINT64 CmdUpdateSetMask;
2629 1.1.1.14 christos ACPI_GENERIC_ADDRESS ErrorStatusRegister;
2630 1.1.1.14 christos UINT64 ErrorStatusMask;
2631 1.1.1.12 christos
2632 1.1.1.14 christos } ACPI_PCCT_EXT_PCC_SLAVE;
2633 1.1.1.12 christos
2634 1.1.1.18 christos /* 5: HW Registers based Communications Subspace */
2635 1.1.1.18 christos
2636 1.1.1.18 christos typedef struct acpi_pcct_hw_reg
2637 1.1.1.18 christos {
2638 1.1.1.18 christos ACPI_SUBTABLE_HEADER Header;
2639 1.1.1.18 christos UINT16 Version;
2640 1.1.1.18 christos UINT64 BaseAddress;
2641 1.1.1.18 christos UINT64 Length;
2642 1.1.1.18 christos ACPI_GENERIC_ADDRESS DoorbellRegister;
2643 1.1.1.18 christos UINT64 DoorbellPreserve;
2644 1.1.1.18 christos UINT64 DoorbellWrite;
2645 1.1.1.18 christos ACPI_GENERIC_ADDRESS CmdCompleteRegister;
2646 1.1.1.18 christos UINT64 CmdCompleteMask;
2647 1.1.1.18 christos ACPI_GENERIC_ADDRESS ErrorStatusRegister;
2648 1.1.1.18 christos UINT64 ErrorStatusMask;
2649 1.1.1.18 christos UINT32 NominalLatency;
2650 1.1.1.18 christos UINT32 MinTurnaroundTime;
2651 1.1.1.18 christos
2652 1.1.1.18 christos } ACPI_PCCT_HW_REG;
2653 1.1.1.18 christos
2654 1.1.1.4 christos
2655 1.1.1.14 christos /* Values for doorbell flags above */
2656 1.1.1.14 christos
2657 1.1.1.14 christos #define ACPI_PCCT_INTERRUPT_POLARITY (1)
2658 1.1.1.14 christos #define ACPI_PCCT_INTERRUPT_MODE (1<<1)
2659 1.1.1.14 christos
2660 1.1.1.14 christos
2661 1.1.1.14 christos /*
2662 1.1.1.14 christos * PCC memory structures (not part of the ACPI table)
2663 1.1.1.14 christos */
2664 1.1.1.3 jruoho
2665 1.1.1.14 christos /* Shared Memory Region */
2666 1.1.1.3 jruoho
2667 1.1.1.14 christos typedef struct acpi_pcct_shared_memory
2668 1.1.1.3 jruoho {
2669 1.1.1.14 christos UINT32 Signature;
2670 1.1.1.14 christos UINT16 Command;
2671 1.1.1.14 christos UINT16 Status;
2672 1.1.1.14 christos
2673 1.1.1.14 christos } ACPI_PCCT_SHARED_MEMORY;
2674 1.1.1.14 christos
2675 1.1.1.14 christos
2676 1.1.1.14 christos /* Extended PCC Subspace Shared Memory Region (ACPI 6.2) */
2677 1.1.1.14 christos
2678 1.1.1.14 christos typedef struct acpi_pcct_ext_pcc_shared_memory
2679 1.1.1.14 christos {
2680 1.1.1.14 christos UINT32 Signature;
2681 1.1.1.14 christos UINT32 Flags;
2682 1.1.1.14 christos UINT32 Length;
2683 1.1.1.14 christos UINT32 Command;
2684 1.1.1.3 jruoho
2685 1.1.1.14 christos } ACPI_PCCT_EXT_PCC_SHARED_MEMORY;
2686 1.1.1.3 jruoho
2687 1.1.1.3 jruoho
2688 1.1.1.3 jruoho /*******************************************************************************
2689 1.1.1.3 jruoho *
2690 1.1.1.14 christos * PDTT - Platform Debug Trigger Table (ACPI 6.2)
2691 1.1.1.14 christos * Version 0
2692 1.1 jruoho *
2693 1.1 jruoho ******************************************************************************/
2694 1.1 jruoho
2695 1.1.1.14 christos typedef struct acpi_table_pdtt
2696 1.1 jruoho {
2697 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
2698 1.1.1.14 christos UINT8 TriggerCount;
2699 1.1 jruoho UINT8 Reserved[3];
2700 1.1.1.14 christos UINT32 ArrayOffset;
2701 1.1.1.14 christos
2702 1.1.1.14 christos } ACPI_TABLE_PDTT;
2703 1.1 jruoho
2704 1.1 jruoho
2705 1.1.1.14 christos /*
2706 1.1.1.14 christos * PDTT Communication Channel Identifier Structure.
2707 1.1.1.14 christos * The number of these structures is defined by TriggerCount above,
2708 1.1.1.14 christos * starting at ArrayOffset.
2709 1.1.1.14 christos */
2710 1.1.1.14 christos typedef struct acpi_pdtt_channel
2711 1.1.1.14 christos {
2712 1.1.1.14 christos UINT8 SubchannelId;
2713 1.1.1.14 christos UINT8 Flags;
2714 1.1.1.14 christos
2715 1.1.1.14 christos } ACPI_PDTT_CHANNEL;
2716 1.1 jruoho
2717 1.1.1.14 christos /* Flags for above */
2718 1.1 jruoho
2719 1.1.1.14 christos #define ACPI_PDTT_RUNTIME_TRIGGER (1)
2720 1.1.1.14 christos #define ACPI_PDTT_WAIT_COMPLETION (1<<1)
2721 1.1.1.16 christos #define ACPI_PDTT_TRIGGER_ORDER (1<<2)
2722 1.1.1.9 christos
2723 1.1 jruoho
2724 1.1 jruoho /*******************************************************************************
2725 1.1 jruoho *
2726 1.1.1.18 christos * PHAT - Platform Health Assessment Table (ACPI 6.4)
2727 1.1.1.18 christos * Version 1
2728 1.1.1.18 christos *
2729 1.1.1.18 christos ******************************************************************************/
2730 1.1.1.18 christos
2731 1.1.1.18 christos typedef struct acpi_table_phat
2732 1.1.1.18 christos {
2733 1.1.1.18 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
2734 1.1.1.18 christos
2735 1.1.1.18 christos } ACPI_TABLE_PHAT;
2736 1.1.1.18 christos
2737 1.1.1.18 christos /* Common header for PHAT subtables that follow main table */
2738 1.1.1.18 christos
2739 1.1.1.18 christos typedef struct acpi_phat_header
2740 1.1.1.18 christos {
2741 1.1.1.18 christos UINT16 Type;
2742 1.1.1.18 christos UINT16 Length;
2743 1.1.1.18 christos UINT8 Revision;
2744 1.1.1.18 christos
2745 1.1.1.18 christos } ACPI_PHAT_HEADER;
2746 1.1.1.18 christos
2747 1.1.1.18 christos
2748 1.1.1.18 christos /* Values for Type field above */
2749 1.1.1.18 christos
2750 1.1.1.18 christos #define ACPI_PHAT_TYPE_FW_VERSION_DATA 0
2751 1.1.1.18 christos #define ACPI_PHAT_TYPE_FW_HEALTH_DATA 1
2752 1.1.1.18 christos #define ACPI_PHAT_TYPE_RESERVED 2 /* 0x02-0xFFFF are reserved */
2753 1.1.1.18 christos
2754 1.1.1.18 christos /*
2755 1.1.1.18 christos * PHAT subtables, correspond to Type in ACPI_PHAT_HEADER
2756 1.1.1.18 christos */
2757 1.1.1.18 christos
2758 1.1.1.18 christos /* 0: Firmware Version Data Record */
2759 1.1.1.18 christos
2760 1.1.1.18 christos typedef struct acpi_phat_version_data
2761 1.1.1.18 christos {
2762 1.1.1.18 christos ACPI_PHAT_HEADER Header;
2763 1.1.1.18 christos UINT8 Reserved[3];
2764 1.1.1.18 christos UINT32 ElementCount;
2765 1.1.1.18 christos
2766 1.1.1.18 christos } ACPI_PHAT_VERSION_DATA;
2767 1.1.1.18 christos
2768 1.1.1.18 christos typedef struct acpi_phat_version_element
2769 1.1.1.18 christos {
2770 1.1.1.18 christos UINT8 Guid[16];
2771 1.1.1.18 christos UINT64 VersionValue;
2772 1.1.1.18 christos UINT32 ProducerId;
2773 1.1.1.18 christos
2774 1.1.1.18 christos } ACPI_PHAT_VERSION_ELEMENT;
2775 1.1.1.18 christos
2776 1.1.1.18 christos
2777 1.1.1.18 christos /* 1: Firmware Health Data Record */
2778 1.1.1.18 christos
2779 1.1.1.18 christos typedef struct acpi_phat_health_data
2780 1.1.1.18 christos {
2781 1.1.1.18 christos ACPI_PHAT_HEADER Header;
2782 1.1.1.18 christos UINT8 Reserved[2];
2783 1.1.1.18 christos UINT8 Health;
2784 1.1.1.18 christos UINT8 DeviceGuid[16];
2785 1.1.1.18 christos UINT32 DeviceSpecificOffset; /* Zero if no Device-specific data */
2786 1.1.1.18 christos
2787 1.1.1.18 christos } ACPI_PHAT_HEALTH_DATA;
2788 1.1.1.18 christos
2789 1.1.1.18 christos /* Values for Health field above */
2790 1.1.1.18 christos
2791 1.1.1.18 christos #define ACPI_PHAT_ERRORS_FOUND 0
2792 1.1.1.18 christos #define ACPI_PHAT_NO_ERRORS 1
2793 1.1.1.18 christos #define ACPI_PHAT_UNKNOWN_ERRORS 2
2794 1.1.1.18 christos #define ACPI_PHAT_ADVISORY 3
2795 1.1.1.18 christos
2796 1.1.1.18 christos
2797 1.1.1.18 christos /*******************************************************************************
2798 1.1.1.18 christos *
2799 1.1.1.14 christos * PMTT - Platform Memory Topology Table (ACPI 5.0)
2800 1.1.1.14 christos * Version 1
2801 1.1 jruoho *
2802 1.1 jruoho ******************************************************************************/
2803 1.1 jruoho
2804 1.1.1.14 christos typedef struct acpi_table_pmtt
2805 1.1 jruoho {
2806 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
2807 1.1.1.18 christos UINT32 MemoryDeviceCount;
2808 1.1.1.18 christos /*
2809 1.1.1.18 christos * Immediately followed by:
2810 1.1.1.18 christos * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
2811 1.1.1.18 christos */
2812 1.1.1.14 christos
2813 1.1.1.14 christos } ACPI_TABLE_PMTT;
2814 1.1 jruoho
2815 1.1 jruoho
2816 1.1.1.14 christos /* Common header for PMTT subtables that follow main table */
2817 1.1 jruoho
2818 1.1.1.14 christos typedef struct acpi_pmtt_header
2819 1.1 jruoho {
2820 1.1.1.14 christos UINT8 Type;
2821 1.1.1.14 christos UINT8 Reserved1;
2822 1.1.1.14 christos UINT16 Length;
2823 1.1.1.14 christos UINT16 Flags;
2824 1.1.1.14 christos UINT16 Reserved2;
2825 1.1.1.18 christos UINT32 MemoryDeviceCount; /* Zero means no memory device structs follow */
2826 1.1.1.18 christos /*
2827 1.1.1.18 christos * Immediately followed by:
2828 1.1.1.18 christos * UINT8 TypeSpecificData[]
2829 1.1.1.18 christos * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
2830 1.1.1.18 christos */
2831 1.1 jruoho
2832 1.1.1.14 christos } ACPI_PMTT_HEADER;
2833 1.1 jruoho
2834 1.1.1.14 christos /* Values for Type field above */
2835 1.1 jruoho
2836 1.1.1.14 christos #define ACPI_PMTT_TYPE_SOCKET 0
2837 1.1.1.14 christos #define ACPI_PMTT_TYPE_CONTROLLER 1
2838 1.1.1.14 christos #define ACPI_PMTT_TYPE_DIMM 2
2839 1.1.1.18 christos #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFE are reserved */
2840 1.1.1.18 christos #define ACPI_PMTT_TYPE_VENDOR 0xFF
2841 1.1.1.14 christos
2842 1.1.1.14 christos /* Values for Flags field above */
2843 1.1.1.14 christos
2844 1.1.1.14 christos #define ACPI_PMTT_TOP_LEVEL 0x0001
2845 1.1.1.14 christos #define ACPI_PMTT_PHYSICAL 0x0002
2846 1.1.1.14 christos #define ACPI_PMTT_MEMORY_TYPE 0x000C
2847 1.1.1.7 christos
2848 1.1.1.7 christos
2849 1.1.1.7 christos /*
2850 1.1.1.14 christos * PMTT subtables, correspond to Type in acpi_pmtt_header
2851 1.1.1.7 christos */
2852 1.1.1.7 christos
2853 1.1.1.7 christos
2854 1.1.1.14 christos /* 0: Socket Structure */
2855 1.1.1.14 christos
2856 1.1.1.14 christos typedef struct acpi_pmtt_socket
2857 1.1.1.7 christos {
2858 1.1.1.14 christos ACPI_PMTT_HEADER Header;
2859 1.1.1.14 christos UINT16 SocketId;
2860 1.1.1.14 christos UINT16 Reserved;
2861 1.1.1.14 christos
2862 1.1.1.14 christos } ACPI_PMTT_SOCKET;
2863 1.1.1.18 christos /*
2864 1.1.1.18 christos * Immediately followed by:
2865 1.1.1.18 christos * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
2866 1.1.1.18 christos */
2867 1.1.1.14 christos
2868 1.1.1.7 christos
2869 1.1.1.14 christos /* 1: Memory Controller subtable */
2870 1.1.1.7 christos
2871 1.1.1.14 christos typedef struct acpi_pmtt_controller
2872 1.1.1.7 christos {
2873 1.1.1.14 christos ACPI_PMTT_HEADER Header;
2874 1.1.1.18 christos UINT16 ControllerId;
2875 1.1 jruoho UINT16 Reserved;
2876 1.1.1.14 christos
2877 1.1.1.14 christos } ACPI_PMTT_CONTROLLER;
2878 1.1.1.18 christos /*
2879 1.1.1.18 christos * Immediately followed by:
2880 1.1.1.18 christos * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
2881 1.1.1.18 christos */
2882 1.1.1.7 christos
2883 1.1.1.7 christos
2884 1.1.1.14 christos /* 2: Physical Component Identifier (DIMM) */
2885 1.1.1.7 christos
2886 1.1.1.14 christos typedef struct acpi_pmtt_physical_component
2887 1.1.1.14 christos {
2888 1.1.1.14 christos ACPI_PMTT_HEADER Header;
2889 1.1.1.14 christos UINT32 BiosHandle;
2890 1.1.1.7 christos
2891 1.1.1.14 christos } ACPI_PMTT_PHYSICAL_COMPONENT;
2892 1.1.1.7 christos
2893 1.1.1.7 christos
2894 1.1.1.18 christos /* 0xFF: Vendor Specific Data */
2895 1.1.1.18 christos
2896 1.1.1.18 christos typedef struct acpi_pmtt_vendor_specific
2897 1.1.1.18 christos {
2898 1.1.1.18 christos ACPI_PMTT_HEADER Header;
2899 1.1.1.18 christos UINT8 TypeUuid[16];
2900 1.1.1.18 christos UINT8 Specific[];
2901 1.1.1.18 christos /*
2902 1.1.1.18 christos * Immediately followed by:
2903 1.1.1.18 christos * UINT8 VendorSpecificData[];
2904 1.1.1.18 christos * MEMORY_DEVICE MemoryDeviceStruct[MemoryDeviceCount];
2905 1.1.1.18 christos */
2906 1.1.1.18 christos
2907 1.1.1.18 christos } ACPI_PMTT_VENDOR_SPECIFIC;
2908 1.1.1.18 christos
2909 1.1.1.18 christos
2910 1.1.1.7 christos /*******************************************************************************
2911 1.1.1.7 christos *
2912 1.1.1.14 christos * PPTT - Processor Properties Topology Table (ACPI 6.2)
2913 1.1.1.14 christos * Version 1
2914 1.1.1.7 christos *
2915 1.1.1.7 christos ******************************************************************************/
2916 1.1.1.7 christos
2917 1.1.1.14 christos typedef struct acpi_table_pptt
2918 1.1.1.7 christos {
2919 1.1.1.7 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
2920 1.1.1.7 christos
2921 1.1.1.14 christos } ACPI_TABLE_PPTT;
2922 1.1.1.7 christos
2923 1.1.1.14 christos /* Values for Type field above */
2924 1.1 jruoho
2925 1.1.1.14 christos enum AcpiPpttType
2926 1.1.1.14 christos {
2927 1.1.1.14 christos ACPI_PPTT_TYPE_PROCESSOR = 0,
2928 1.1.1.14 christos ACPI_PPTT_TYPE_CACHE = 1,
2929 1.1.1.14 christos ACPI_PPTT_TYPE_ID = 2,
2930 1.1.1.14 christos ACPI_PPTT_TYPE_RESERVED = 3
2931 1.1.1.14 christos };
2932 1.1.1.12 christos
2933 1.1.1.12 christos
2934 1.1.1.14 christos /* 0: Processor Hierarchy Node Structure */
2935 1.1.1.12 christos
2936 1.1.1.14 christos typedef struct acpi_pptt_processor
2937 1.1.1.12 christos {
2938 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
2939 1.1.1.14 christos UINT16 Reserved;
2940 1.1.1.14 christos UINT32 Flags;
2941 1.1.1.14 christos UINT32 Parent;
2942 1.1.1.14 christos UINT32 AcpiProcessorId;
2943 1.1.1.14 christos UINT32 NumberOfPrivResources;
2944 1.1.1.12 christos
2945 1.1.1.14 christos } ACPI_PPTT_PROCESSOR;
2946 1.1.1.12 christos
2947 1.1.1.14 christos /* Flags */
2948 1.1.1.14 christos
2949 1.1.1.16 christos #define ACPI_PPTT_PHYSICAL_PACKAGE (1)
2950 1.1.1.16 christos #define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (1<<1)
2951 1.1.1.16 christos #define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD (1<<2) /* ACPI 6.3 */
2952 1.1.1.16 christos #define ACPI_PPTT_ACPI_LEAF_NODE (1<<3) /* ACPI 6.3 */
2953 1.1.1.16 christos #define ACPI_PPTT_ACPI_IDENTICAL (1<<4) /* ACPI 6.3 */
2954 1.1.1.12 christos
2955 1.1.1.12 christos
2956 1.1.1.14 christos /* 1: Cache Type Structure */
2957 1.1.1.12 christos
2958 1.1.1.14 christos typedef struct acpi_pptt_cache
2959 1.1.1.12 christos {
2960 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
2961 1.1.1.12 christos UINT16 Reserved;
2962 1.1.1.14 christos UINT32 Flags;
2963 1.1.1.14 christos UINT32 NextLevelOfCache;
2964 1.1.1.14 christos UINT32 Size;
2965 1.1.1.14 christos UINT32 NumberOfSets;
2966 1.1.1.14 christos UINT8 Associativity;
2967 1.1.1.14 christos UINT8 Attributes;
2968 1.1.1.14 christos UINT16 LineSize;
2969 1.1.1.14 christos
2970 1.1.1.14 christos } ACPI_PPTT_CACHE;
2971 1.1.1.14 christos
2972 1.1.1.18 christos /* 1: Cache Type Structure for PPTT version 3 */
2973 1.1.1.18 christos
2974 1.1.1.18 christos typedef struct acpi_pptt_cache_v1
2975 1.1.1.18 christos {
2976 1.1.1.18 christos UINT32 CacheId;
2977 1.1.1.18 christos
2978 1.1.1.18 christos } ACPI_PPTT_CACHE_V1;
2979 1.1.1.18 christos
2980 1.1.1.18 christos
2981 1.1.1.14 christos /* Flags */
2982 1.1.1.14 christos
2983 1.1.1.14 christos #define ACPI_PPTT_SIZE_PROPERTY_VALID (1) /* Physical property valid */
2984 1.1.1.14 christos #define ACPI_PPTT_NUMBER_OF_SETS_VALID (1<<1) /* Number of sets valid */
2985 1.1.1.14 christos #define ACPI_PPTT_ASSOCIATIVITY_VALID (1<<2) /* Associativity valid */
2986 1.1.1.14 christos #define ACPI_PPTT_ALLOCATION_TYPE_VALID (1<<3) /* Allocation type valid */
2987 1.1.1.14 christos #define ACPI_PPTT_CACHE_TYPE_VALID (1<<4) /* Cache type valid */
2988 1.1.1.14 christos #define ACPI_PPTT_WRITE_POLICY_VALID (1<<5) /* Write policy valid */
2989 1.1.1.14 christos #define ACPI_PPTT_LINE_SIZE_VALID (1<<6) /* Line size valid */
2990 1.1.1.18 christos #define ACPI_PPTT_CACHE_ID_VALID (1<<7) /* Cache ID valid */
2991 1.1.1.14 christos
2992 1.1.1.14 christos /* Masks for Attributes */
2993 1.1.1.14 christos
2994 1.1.1.14 christos #define ACPI_PPTT_MASK_ALLOCATION_TYPE (0x03) /* Allocation type */
2995 1.1.1.14 christos #define ACPI_PPTT_MASK_CACHE_TYPE (0x0C) /* Cache type */
2996 1.1.1.14 christos #define ACPI_PPTT_MASK_WRITE_POLICY (0x10) /* Write policy */
2997 1.1.1.14 christos
2998 1.1.1.14 christos /* Attributes describing cache */
2999 1.1.1.14 christos #define ACPI_PPTT_CACHE_READ_ALLOCATE (0x0) /* Cache line is allocated on read */
3000 1.1.1.14 christos #define ACPI_PPTT_CACHE_WRITE_ALLOCATE (0x01) /* Cache line is allocated on write */
3001 1.1.1.14 christos #define ACPI_PPTT_CACHE_RW_ALLOCATE (0x02) /* Cache line is allocated on read and write */
3002 1.1.1.14 christos #define ACPI_PPTT_CACHE_RW_ALLOCATE_ALT (0x03) /* Alternate representation of above */
3003 1.1.1.14 christos
3004 1.1.1.14 christos #define ACPI_PPTT_CACHE_TYPE_DATA (0x0) /* Data cache */
3005 1.1.1.14 christos #define ACPI_PPTT_CACHE_TYPE_INSTR (1<<2) /* Instruction cache */
3006 1.1.1.14 christos #define ACPI_PPTT_CACHE_TYPE_UNIFIED (2<<2) /* Unified I & D cache */
3007 1.1.1.14 christos #define ACPI_PPTT_CACHE_TYPE_UNIFIED_ALT (3<<2) /* Alternate representation of above */
3008 1.1.1.12 christos
3009 1.1.1.14 christos #define ACPI_PPTT_CACHE_POLICY_WB (0x0) /* Cache is write back */
3010 1.1.1.14 christos #define ACPI_PPTT_CACHE_POLICY_WT (1<<4) /* Cache is write through */
3011 1.1.1.12 christos
3012 1.1.1.14 christos /* 2: ID Structure */
3013 1.1.1.12 christos
3014 1.1.1.14 christos typedef struct acpi_pptt_id
3015 1.1.1.14 christos {
3016 1.1.1.14 christos ACPI_SUBTABLE_HEADER Header;
3017 1.1.1.14 christos UINT16 Reserved;
3018 1.1.1.14 christos UINT32 VendorId;
3019 1.1.1.14 christos UINT64 Level1Id;
3020 1.1.1.14 christos UINT64 Level2Id;
3021 1.1.1.14 christos UINT16 MajorRev;
3022 1.1.1.14 christos UINT16 MinorRev;
3023 1.1.1.14 christos UINT16 SpinRev;
3024 1.1.1.12 christos
3025 1.1.1.14 christos } ACPI_PPTT_ID;
3026 1.1 jruoho
3027 1.1 jruoho
3028 1.1 jruoho /*******************************************************************************
3029 1.1 jruoho *
3030 1.1.1.19 christos * PRMT - Platform Runtime Mechanism Table
3031 1.1.1.19 christos * Version 1
3032 1.1.1.19 christos *
3033 1.1.1.19 christos ******************************************************************************/
3034 1.1.1.19 christos
3035 1.1.1.19 christos typedef struct acpi_table_prmt
3036 1.1.1.19 christos {
3037 1.1.1.19 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3038 1.1.1.19 christos
3039 1.1.1.19 christos } ACPI_TABLE_PRMT;
3040 1.1.1.19 christos
3041 1.1.1.19 christos typedef struct acpi_table_prmt_header
3042 1.1.1.19 christos {
3043 1.1.1.19 christos UINT8 PlatformGuid[16];
3044 1.1.1.19 christos UINT32 ModuleInfoOffset;
3045 1.1.1.19 christos UINT32 ModuleInfoCount;
3046 1.1.1.19 christos
3047 1.1.1.19 christos } ACPI_TABLE_PRMT_HEADER;
3048 1.1.1.19 christos
3049 1.1.1.20 christos typedef struct acpi_prmt_module_header
3050 1.1.1.20 christos {
3051 1.1.1.22 christos UINT16 Revision;
3052 1.1.1.22 christos UINT16 Length;
3053 1.1.1.20 christos
3054 1.1.1.20 christos } ACPI_PRMT_MODULE_HEADER;
3055 1.1.1.20 christos
3056 1.1.1.19 christos typedef struct acpi_prmt_module_info
3057 1.1.1.19 christos {
3058 1.1.1.19 christos UINT16 Revision;
3059 1.1.1.19 christos UINT16 Length;
3060 1.1.1.19 christos UINT8 ModuleGuid[16];
3061 1.1.1.19 christos UINT16 MajorRev;
3062 1.1.1.19 christos UINT16 MinorRev;
3063 1.1.1.19 christos UINT16 HandlerInfoCount;
3064 1.1.1.19 christos UINT32 HandlerInfoOffset;
3065 1.1.1.19 christos UINT64 MmioListPointer;
3066 1.1.1.19 christos
3067 1.1.1.19 christos } ACPI_PRMT_MODULE_INFO;
3068 1.1.1.19 christos
3069 1.1.1.19 christos typedef struct acpi_prmt_handler_info
3070 1.1.1.19 christos {
3071 1.1.1.19 christos UINT16 Revision;
3072 1.1.1.19 christos UINT16 Length;
3073 1.1.1.19 christos UINT8 HandlerGuid[16];
3074 1.1.1.19 christos UINT64 HandlerAddress;
3075 1.1.1.19 christos UINT64 StaticDataBufferAddress;
3076 1.1.1.19 christos UINT64 AcpiParamBufferAddress;
3077 1.1.1.19 christos
3078 1.1.1.19 christos } ACPI_PRMT_HANDLER_INFO;
3079 1.1.1.19 christos
3080 1.1.1.19 christos
3081 1.1.1.19 christos /*******************************************************************************
3082 1.1.1.19 christos *
3083 1.1.1.14 christos * RASF - RAS Feature Table (ACPI 5.0)
3084 1.1 jruoho * Version 1
3085 1.1 jruoho *
3086 1.1 jruoho ******************************************************************************/
3087 1.1 jruoho
3088 1.1.1.14 christos typedef struct acpi_table_rasf
3089 1.1 jruoho {
3090 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3091 1.1.1.14 christos UINT8 ChannelId[12];
3092 1.1 jruoho
3093 1.1.1.14 christos } ACPI_TABLE_RASF;
3094 1.1 jruoho
3095 1.1.1.14 christos /* RASF Platform Communication Channel Shared Memory Region */
3096 1.1.1.4 christos
3097 1.1.1.14 christos typedef struct acpi_rasf_shared_memory
3098 1.1.1.4 christos {
3099 1.1.1.14 christos UINT32 Signature;
3100 1.1.1.14 christos UINT16 Command;
3101 1.1.1.14 christos UINT16 Status;
3102 1.1.1.14 christos UINT16 Version;
3103 1.1.1.14 christos UINT8 Capabilities[16];
3104 1.1.1.14 christos UINT8 SetCapabilities[16];
3105 1.1.1.14 christos UINT16 NumParameterBlocks;
3106 1.1.1.14 christos UINT32 SetCapabilitiesStatus;
3107 1.1.1.4 christos
3108 1.1.1.14 christos } ACPI_RASF_SHARED_MEMORY;
3109 1.1.1.4 christos
3110 1.1.1.14 christos /* RASF Parameter Block Structure Header */
3111 1.1.1.4 christos
3112 1.1.1.14 christos typedef struct acpi_rasf_parameter_block
3113 1.1.1.4 christos {
3114 1.1.1.14 christos UINT16 Type;
3115 1.1.1.14 christos UINT16 Version;
3116 1.1.1.14 christos UINT16 Length;
3117 1.1.1.4 christos
3118 1.1.1.14 christos } ACPI_RASF_PARAMETER_BLOCK;
3119 1.1.1.4 christos
3120 1.1.1.14 christos /* RASF Parameter Block Structure for PATROL_SCRUB */
3121 1.1 jruoho
3122 1.1.1.14 christos typedef struct acpi_rasf_patrol_scrub_parameter
3123 1.1 jruoho {
3124 1.1.1.14 christos ACPI_RASF_PARAMETER_BLOCK Header;
3125 1.1.1.14 christos UINT16 PatrolScrubCommand;
3126 1.1.1.14 christos UINT64 RequestedAddressRange[2];
3127 1.1.1.14 christos UINT64 ActualAddressRange[2];
3128 1.1.1.14 christos UINT16 Flags;
3129 1.1.1.14 christos UINT8 RequestedSpeed;
3130 1.1 jruoho
3131 1.1.1.14 christos } ACPI_RASF_PATROL_SCRUB_PARAMETER;
3132 1.1 jruoho
3133 1.1.1.14 christos /* Masks for Flags and Speed fields above */
3134 1.1 jruoho
3135 1.1.1.14 christos #define ACPI_RASF_SCRUBBER_RUNNING 1
3136 1.1.1.14 christos #define ACPI_RASF_SPEED (7<<1)
3137 1.1.1.14 christos #define ACPI_RASF_SPEED_SLOW (0<<1)
3138 1.1.1.14 christos #define ACPI_RASF_SPEED_MEDIUM (4<<1)
3139 1.1.1.14 christos #define ACPI_RASF_SPEED_FAST (7<<1)
3140 1.1 jruoho
3141 1.1.1.14 christos /* Channel Commands */
3142 1.1 jruoho
3143 1.1.1.14 christos enum AcpiRasfCommands
3144 1.1.1.14 christos {
3145 1.1.1.14 christos ACPI_RASF_EXECUTE_RASF_COMMAND = 1
3146 1.1.1.14 christos };
3147 1.1 jruoho
3148 1.1.1.14 christos /* Platform RAS Capabilities */
3149 1.1.1.14 christos
3150 1.1.1.14 christos enum AcpiRasfCapabiliities
3151 1.1 jruoho {
3152 1.1.1.14 christos ACPI_HW_PATROL_SCRUB_SUPPORTED = 0,
3153 1.1.1.14 christos ACPI_SW_PATROL_SCRUB_EXPOSED = 1
3154 1.1.1.14 christos };
3155 1.1 jruoho
3156 1.1.1.14 christos /* Patrol Scrub Commands */
3157 1.1 jruoho
3158 1.1.1.14 christos enum AcpiRasfPatrolScrubCommands
3159 1.1.1.14 christos {
3160 1.1.1.14 christos ACPI_RASF_GET_PATROL_PARAMETERS = 1,
3161 1.1.1.14 christos ACPI_RASF_START_PATROL_SCRUBBER = 2,
3162 1.1.1.14 christos ACPI_RASF_STOP_PATROL_SCRUBBER = 3
3163 1.1.1.14 christos };
3164 1.1 jruoho
3165 1.1.1.14 christos /* Channel Command flags */
3166 1.1 jruoho
3167 1.1.1.14 christos #define ACPI_RASF_GENERATE_SCI (1<<15)
3168 1.1 jruoho
3169 1.1.1.14 christos /* Status values */
3170 1.1 jruoho
3171 1.1.1.14 christos enum AcpiRasfStatus
3172 1.1 jruoho {
3173 1.1.1.14 christos ACPI_RASF_SUCCESS = 0,
3174 1.1.1.14 christos ACPI_RASF_NOT_VALID = 1,
3175 1.1.1.14 christos ACPI_RASF_NOT_SUPPORTED = 2,
3176 1.1.1.14 christos ACPI_RASF_BUSY = 3,
3177 1.1.1.14 christos ACPI_RASF_FAILED = 4,
3178 1.1.1.14 christos ACPI_RASF_ABORTED = 5,
3179 1.1.1.14 christos ACPI_RASF_INVALID_DATA = 6
3180 1.1 jruoho };
3181 1.1 jruoho
3182 1.1.1.14 christos /* Status flags */
3183 1.1 jruoho
3184 1.1.1.14 christos #define ACPI_RASF_COMMAND_COMPLETE (1)
3185 1.1.1.14 christos #define ACPI_RASF_SCI_DOORBELL (1<<1)
3186 1.1.1.14 christos #define ACPI_RASF_ERROR (1<<2)
3187 1.1.1.14 christos #define ACPI_RASF_STATUS (0x1F<<3)
3188 1.1 jruoho
3189 1.1 jruoho
3190 1.1 jruoho /*******************************************************************************
3191 1.1 jruoho *
3192 1.1.1.19 christos * RGRT - Regulatory Graphics Resource Table
3193 1.1.1.19 christos * Version 1
3194 1.1.1.19 christos *
3195 1.1.1.19 christos * Conforms to "ACPI RGRT" available at:
3196 1.1.1.19 christos * https://microsoft.github.io/mu/dyn/mu_plus/MsCorePkg/AcpiRGRT/feature_acpi_rgrt/
3197 1.1.1.19 christos *
3198 1.1.1.19 christos ******************************************************************************/
3199 1.1.1.19 christos
3200 1.1.1.19 christos typedef struct acpi_table_rgrt
3201 1.1.1.19 christos {
3202 1.1.1.19 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3203 1.1.1.19 christos UINT16 Version;
3204 1.1.1.19 christos UINT8 ImageType;
3205 1.1.1.19 christos UINT8 Reserved;
3206 1.1.1.22 christos UINT8 Image[];
3207 1.1.1.19 christos
3208 1.1.1.19 christos } ACPI_TABLE_RGRT;
3209 1.1.1.19 christos
3210 1.1.1.19 christos /* ImageType values */
3211 1.1.1.19 christos
3212 1.1.1.19 christos enum AcpiRgrtImageType
3213 1.1.1.19 christos {
3214 1.1.1.19 christos ACPI_RGRT_TYPE_RESERVED0 = 0,
3215 1.1.1.19 christos ACPI_RGRT_IMAGE_TYPE_PNG = 1,
3216 1.1.1.19 christos ACPI_RGRT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
3217 1.1.1.19 christos };
3218 1.1.1.19 christos
3219 1.1.1.19 christos
3220 1.1.1.19 christos /*******************************************************************************
3221 1.1.1.19 christos *
3222 1.1.1.24 christos * RHCT - RISC-V Hart Capabilities Table
3223 1.1.1.24 christos * Version 1
3224 1.1.1.24 christos *
3225 1.1.1.24 christos ******************************************************************************/
3226 1.1.1.24 christos
3227 1.1.1.24 christos typedef struct acpi_table_rhct {
3228 1.1.1.24 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3229 1.1.1.24 christos UINT32 Flags; /* RHCT flags */
3230 1.1.1.24 christos UINT64 TimeBaseFreq;
3231 1.1.1.24 christos UINT32 NodeCount;
3232 1.1.1.24 christos UINT32 NodeOffset;
3233 1.1.1.24 christos } ACPI_TABLE_RHCT;
3234 1.1.1.24 christos
3235 1.1.1.24 christos /* RHCT Flags */
3236 1.1.1.24 christos
3237 1.1.1.24 christos #define ACPI_RHCT_TIMER_CANNOT_WAKEUP_CPU (1)
3238 1.1.1.24 christos /*
3239 1.1.1.24 christos * RHCT subtables
3240 1.1.1.24 christos */
3241 1.1.1.24 christos typedef struct acpi_rhct_node_header {
3242 1.1.1.24 christos UINT16 Type;
3243 1.1.1.24 christos UINT16 Length;
3244 1.1.1.24 christos UINT16 Revision;
3245 1.1.1.24 christos } ACPI_RHCT_NODE_HEADER;
3246 1.1.1.24 christos
3247 1.1.1.24 christos /* Values for RHCT subtable Type above */
3248 1.1.1.24 christos
3249 1.1.1.24 christos enum acpi_rhct_node_type {
3250 1.1.1.24 christos ACPI_RHCT_NODE_TYPE_ISA_STRING = 0x0000,
3251 1.1.1.24 christos ACPI_RHCT_NODE_TYPE_CMO = 0x0001,
3252 1.1.1.24 christos ACPI_RHCT_NODE_TYPE_MMU = 0x0002,
3253 1.1.1.24 christos ACPI_RHCT_NODE_TYPE_RESERVED = 0x0003,
3254 1.1.1.24 christos ACPI_RHCT_NODE_TYPE_HART_INFO = 0xFFFF,
3255 1.1.1.24 christos };
3256 1.1.1.24 christos
3257 1.1.1.24 christos /*
3258 1.1.1.24 christos * RHCT node specific subtables
3259 1.1.1.24 christos */
3260 1.1.1.24 christos
3261 1.1.1.24 christos /* ISA string node structure */
3262 1.1.1.24 christos typedef struct acpi_rhct_isa_string {
3263 1.1.1.24 christos UINT16 IsaLength;
3264 1.1.1.24 christos char Isa[];
3265 1.1.1.24 christos } ACPI_RHCT_ISA_STRING;
3266 1.1.1.24 christos
3267 1.1.1.24 christos typedef struct acpi_rhct_cmo_node {
3268 1.1.1.24 christos UINT8 Reserved; /* Must be zero */
3269 1.1.1.24 christos UINT8 CbomSize; /* CBOM size in powerof 2 */
3270 1.1.1.24 christos UINT8 CbopSize; /* CBOP size in powerof 2 */
3271 1.1.1.24 christos UINT8 CbozSize; /* CBOZ size in powerof 2 */
3272 1.1.1.24 christos } ACPI_RHCT_CMO_NODE;
3273 1.1.1.24 christos
3274 1.1.1.24 christos typedef struct acpi_rhct_mmu_node {
3275 1.1.1.24 christos UINT8 Reserved; /* Must be zero */
3276 1.1.1.24 christos UINT8 MmuType; /* Virtual Address Scheme */
3277 1.1.1.24 christos } ACPI_RHCT_MMU_NODE;
3278 1.1.1.24 christos
3279 1.1.1.24 christos enum acpi_rhct_mmu_type {
3280 1.1.1.24 christos ACPI_RHCT_MMU_TYPE_SV39 = 0,
3281 1.1.1.24 christos ACPI_RHCT_MMU_TYPE_SV48 = 1,
3282 1.1.1.24 christos ACPI_RHCT_MMU_TYPE_SV57 = 2
3283 1.1.1.24 christos };
3284 1.1.1.24 christos
3285 1.1.1.24 christos /* Hart Info node structure */
3286 1.1.1.24 christos typedef struct acpi_rhct_hart_info {
3287 1.1.1.24 christos UINT16 NumOffsets;
3288 1.1.1.24 christos UINT32 Uid; /* ACPI processor UID */
3289 1.1.1.24 christos } ACPI_RHCT_HART_INFO;
3290 1.1.1.24 christos
3291 1.1.1.24 christos /*******************************************************************************
3292 1.1.1.24 christos *
3293 1.1.1.14 christos * SBST - Smart Battery Specification Table
3294 1.1.1.2 jruoho * Version 1
3295 1.1.1.2 jruoho *
3296 1.1.1.2 jruoho ******************************************************************************/
3297 1.1.1.2 jruoho
3298 1.1.1.14 christos typedef struct acpi_table_sbst
3299 1.1.1.2 jruoho {
3300 1.1.1.2 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3301 1.1.1.14 christos UINT32 WarningLevel;
3302 1.1.1.14 christos UINT32 LowLevel;
3303 1.1.1.14 christos UINT32 CriticalLevel;
3304 1.1.1.2 jruoho
3305 1.1.1.14 christos } ACPI_TABLE_SBST;
3306 1.1.1.2 jruoho
3307 1.1.1.2 jruoho
3308 1.1.1.2 jruoho /*******************************************************************************
3309 1.1.1.2 jruoho *
3310 1.1.1.14 christos * SDEI - Software Delegated Exception Interface Descriptor Table
3311 1.1 jruoho *
3312 1.1.1.14 christos * Conforms to "Software Delegated Exception Interface (SDEI)" ARM DEN0054A,
3313 1.1.1.14 christos * May 8th, 2017. Copyright 2017 ARM Ltd.
3314 1.1 jruoho *
3315 1.1 jruoho ******************************************************************************/
3316 1.1 jruoho
3317 1.1.1.14 christos typedef struct acpi_table_sdei
3318 1.1 jruoho {
3319 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3320 1.1 jruoho
3321 1.1.1.14 christos } ACPI_TABLE_SDEI;
3322 1.1 jruoho
3323 1.1 jruoho
3324 1.1.1.12 christos /*******************************************************************************
3325 1.1.1.12 christos *
3326 1.1.1.14 christos * SDEV - Secure Devices Table (ACPI 6.2)
3327 1.1.1.12 christos * Version 1
3328 1.1.1.12 christos *
3329 1.1.1.12 christos ******************************************************************************/
3330 1.1.1.12 christos
3331 1.1.1.14 christos typedef struct acpi_table_sdev
3332 1.1.1.12 christos {
3333 1.1.1.12 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3334 1.1.1.12 christos
3335 1.1.1.14 christos } ACPI_TABLE_SDEV;
3336 1.1.1.14 christos
3337 1.1.1.14 christos
3338 1.1.1.14 christos typedef struct acpi_sdev_header
3339 1.1.1.14 christos {
3340 1.1.1.14 christos UINT8 Type;
3341 1.1.1.14 christos UINT8 Flags;
3342 1.1.1.14 christos UINT16 Length;
3343 1.1.1.14 christos
3344 1.1.1.14 christos } ACPI_SDEV_HEADER;
3345 1.1.1.14 christos
3346 1.1.1.14 christos
3347 1.1.1.14 christos /* Values for subtable type above */
3348 1.1.1.14 christos
3349 1.1.1.14 christos enum AcpiSdevType
3350 1.1.1.14 christos {
3351 1.1.1.14 christos ACPI_SDEV_TYPE_NAMESPACE_DEVICE = 0,
3352 1.1.1.14 christos ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE = 1,
3353 1.1.1.14 christos ACPI_SDEV_TYPE_RESERVED = 2 /* 2 and greater are reserved */
3354 1.1.1.14 christos };
3355 1.1.1.14 christos
3356 1.1.1.14 christos /* Values for flags above */
3357 1.1.1.14 christos
3358 1.1.1.14 christos #define ACPI_SDEV_HANDOFF_TO_UNSECURE_OS (1)
3359 1.1.1.18 christos #define ACPI_SDEV_SECURE_COMPONENTS_PRESENT (1<<1)
3360 1.1.1.12 christos
3361 1.1.1.14 christos /*
3362 1.1.1.14 christos * SDEV subtables
3363 1.1.1.14 christos */
3364 1.1.1.14 christos
3365 1.1.1.14 christos /* 0: Namespace Device Based Secure Device Structure */
3366 1.1.1.14 christos
3367 1.1.1.14 christos typedef struct acpi_sdev_namespace
3368 1.1.1.14 christos {
3369 1.1.1.14 christos ACPI_SDEV_HEADER Header;
3370 1.1.1.14 christos UINT16 DeviceIdOffset;
3371 1.1.1.14 christos UINT16 DeviceIdLength;
3372 1.1.1.14 christos UINT16 VendorDataOffset;
3373 1.1.1.14 christos UINT16 VendorDataLength;
3374 1.1.1.14 christos
3375 1.1.1.14 christos } ACPI_SDEV_NAMESPACE;
3376 1.1.1.14 christos
3377 1.1.1.18 christos typedef struct acpi_sdev_secure_component
3378 1.1.1.18 christos {
3379 1.1.1.18 christos UINT16 SecureComponentOffset;
3380 1.1.1.18 christos UINT16 SecureComponentLength;
3381 1.1.1.18 christos
3382 1.1.1.18 christos } ACPI_SDEV_SECURE_COMPONENT;
3383 1.1.1.18 christos
3384 1.1.1.18 christos
3385 1.1.1.18 christos /*
3386 1.1.1.18 christos * SDEV sub-subtables ("Components") for above
3387 1.1.1.18 christos */
3388 1.1.1.18 christos typedef struct acpi_sdev_component
3389 1.1.1.18 christos {
3390 1.1.1.18 christos ACPI_SDEV_HEADER Header;
3391 1.1.1.18 christos
3392 1.1.1.18 christos } ACPI_SDEV_COMPONENT;
3393 1.1.1.18 christos
3394 1.1.1.18 christos
3395 1.1.1.18 christos /* Values for sub-subtable type above */
3396 1.1.1.18 christos
3397 1.1.1.18 christos enum AcpiSacType
3398 1.1.1.18 christos {
3399 1.1.1.18 christos ACPI_SDEV_TYPE_ID_COMPONENT = 0,
3400 1.1.1.18 christos ACPI_SDEV_TYPE_MEM_COMPONENT = 1
3401 1.1.1.18 christos };
3402 1.1.1.18 christos
3403 1.1.1.18 christos typedef struct acpi_sdev_id_component
3404 1.1.1.18 christos {
3405 1.1.1.18 christos ACPI_SDEV_HEADER Header;
3406 1.1.1.18 christos UINT16 HardwareIdOffset;
3407 1.1.1.18 christos UINT16 HardwareIdLength;
3408 1.1.1.18 christos UINT16 SubsystemIdOffset;
3409 1.1.1.18 christos UINT16 SubsystemIdLength;
3410 1.1.1.18 christos UINT16 HardwareRevision;
3411 1.1.1.18 christos UINT8 HardwareRevPresent;
3412 1.1.1.18 christos UINT8 ClassCodePresent;
3413 1.1.1.18 christos UINT8 PciBaseClass;
3414 1.1.1.18 christos UINT8 PciSubClass;
3415 1.1.1.18 christos UINT8 PciProgrammingXface;
3416 1.1.1.18 christos
3417 1.1.1.18 christos } ACPI_SDEV_ID_COMPONENT;
3418 1.1.1.18 christos
3419 1.1.1.18 christos typedef struct acpi_sdev_mem_component
3420 1.1.1.18 christos {
3421 1.1.1.18 christos ACPI_SDEV_HEADER Header;
3422 1.1.1.18 christos UINT32 Reserved;
3423 1.1.1.18 christos UINT64 MemoryBaseAddress;
3424 1.1.1.18 christos UINT64 MemoryLength;
3425 1.1.1.18 christos
3426 1.1.1.18 christos } ACPI_SDEV_MEM_COMPONENT;
3427 1.1.1.18 christos
3428 1.1.1.18 christos
3429 1.1.1.14 christos /* 1: PCIe Endpoint Device Based Device Structure */
3430 1.1.1.14 christos
3431 1.1.1.14 christos typedef struct acpi_sdev_pcie
3432 1.1.1.14 christos {
3433 1.1.1.14 christos ACPI_SDEV_HEADER Header;
3434 1.1.1.14 christos UINT16 Segment;
3435 1.1.1.14 christos UINT16 StartBus;
3436 1.1.1.14 christos UINT16 PathOffset;
3437 1.1.1.14 christos UINT16 PathLength;
3438 1.1.1.14 christos UINT16 VendorDataOffset;
3439 1.1.1.14 christos UINT16 VendorDataLength;
3440 1.1.1.14 christos
3441 1.1.1.14 christos } ACPI_SDEV_PCIE;
3442 1.1.1.14 christos
3443 1.1.1.14 christos /* 1a: PCIe Endpoint path entry */
3444 1.1.1.14 christos
3445 1.1.1.14 christos typedef struct acpi_sdev_pcie_path
3446 1.1.1.14 christos {
3447 1.1.1.14 christos UINT8 Device;
3448 1.1.1.14 christos UINT8 Function;
3449 1.1.1.12 christos
3450 1.1.1.14 christos } ACPI_SDEV_PCIE_PATH;
3451 1.1.1.12 christos
3452 1.1.1.12 christos
3453 1.1.1.19 christos /*******************************************************************************
3454 1.1.1.19 christos *
3455 1.1.1.19 christos * SVKL - Storage Volume Key Location Table (ACPI 6.4)
3456 1.1.1.19 christos * From: "Guest-Host-Communication Interface (GHCI) for Intel
3457 1.1.1.19 christos * Trust Domain Extensions (Intel TDX)".
3458 1.1.1.19 christos * Version 1
3459 1.1.1.19 christos *
3460 1.1.1.19 christos ******************************************************************************/
3461 1.1.1.19 christos
3462 1.1.1.19 christos typedef struct acpi_table_svkl
3463 1.1.1.19 christos {
3464 1.1.1.19 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3465 1.1.1.19 christos UINT32 Count;
3466 1.1.1.19 christos
3467 1.1.1.19 christos } ACPI_TABLE_SVKL;
3468 1.1.1.19 christos
3469 1.1.1.19 christos typedef struct acpi_svkl_key
3470 1.1.1.19 christos {
3471 1.1.1.19 christos UINT16 Type;
3472 1.1.1.19 christos UINT16 Format;
3473 1.1.1.19 christos UINT32 Size;
3474 1.1.1.19 christos UINT64 Address;
3475 1.1.1.19 christos
3476 1.1.1.19 christos } ACPI_SVKL_KEY;
3477 1.1.1.19 christos
3478 1.1.1.19 christos enum acpi_svkl_type
3479 1.1.1.19 christos {
3480 1.1.1.19 christos ACPI_SVKL_TYPE_MAIN_STORAGE = 0,
3481 1.1.1.19 christos ACPI_SVKL_TYPE_RESERVED = 1 /* 1 and greater are reserved */
3482 1.1.1.19 christos };
3483 1.1.1.19 christos
3484 1.1.1.19 christos enum acpi_svkl_format
3485 1.1.1.19 christos {
3486 1.1.1.19 christos ACPI_SVKL_FORMAT_RAW_BINARY = 0,
3487 1.1.1.19 christos ACPI_SVKL_FORMAT_RESERVED = 1 /* 1 and greater are reserved */
3488 1.1.1.19 christos };
3489 1.1.1.19 christos
3490 1.1.1.19 christos
3491 1.1.1.21 christos /*******************************************************************************
3492 1.1.1.21 christos *
3493 1.1.1.21 christos * TDEL - TD-Event Log
3494 1.1.1.21 christos * From: "Guest-Host-Communication Interface (GHCI) for Intel
3495 1.1.1.21 christos * Trust Domain Extensions (Intel TDX)".
3496 1.1.1.21 christos * September 2020
3497 1.1.1.21 christos *
3498 1.1.1.21 christos ******************************************************************************/
3499 1.1.1.21 christos
3500 1.1.1.21 christos typedef struct acpi_table_tdel
3501 1.1.1.21 christos {
3502 1.1.1.21 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
3503 1.1.1.21 christos UINT32 Reserved;
3504 1.1.1.21 christos UINT64 LogAreaMinimumLength;
3505 1.1.1.21 christos UINT64 LogAreaStartAddress;
3506 1.1.1.21 christos
3507 1.1.1.21 christos } ACPI_TABLE_TDEL;
3508 1.1.1.21 christos
3509 1.1 jruoho /* Reset to default packing */
3510 1.1 jruoho
3511 1.1 jruoho #pragma pack()
3512 1.1 jruoho
3513 1.1 jruoho #endif /* __ACTBL2_H__ */
3514