actbl2.h revision 1.1.1.7 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.6 christos * Copyright (C) 2000 - 2015, 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.2 jruoho * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY 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.1.7 christos * Generally, the tables in this file are defined by third-party specifications,
56 1.1.1.7 christos * and are not defined directly by the ACPI specification itself.
57 1.1 jruoho *
58 1.1 jruoho ******************************************************************************/
59 1.1 jruoho
60 1.1 jruoho
61 1.1 jruoho /*
62 1.1 jruoho * Values for description table header signatures for tables defined in this
63 1.1 jruoho * file. Useful because they make it more difficult to inadvertently type in
64 1.1 jruoho * the wrong signature.
65 1.1 jruoho */
66 1.1 jruoho #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
67 1.1 jruoho #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
68 1.1.1.4 christos #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
69 1.1.1.4 christos #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
70 1.1 jruoho #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
71 1.1 jruoho #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
72 1.1 jruoho #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
73 1.1 jruoho #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
74 1.1.1.7 christos #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
75 1.1 jruoho #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
76 1.1.1.5 christos #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
77 1.1 jruoho #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
78 1.1 jruoho #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
79 1.1.1.6 christos #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
80 1.1.1.4 christos #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
81 1.1 jruoho #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
82 1.1 jruoho #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
83 1.1 jruoho #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
84 1.1 jruoho #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
85 1.1.1.7 christos #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
86 1.1 jruoho #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
87 1.1.1.4 christos #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
88 1.1 jruoho #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
89 1.1 jruoho #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
90 1.1.1.2 jruoho #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
91 1.1 jruoho #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
92 1.1 jruoho
93 1.1 jruoho #ifdef ACPI_UNDEFINED_TABLES
94 1.1 jruoho /*
95 1.1 jruoho * These tables have been seen in the field, but no definition has been found
96 1.1 jruoho */
97 1.1 jruoho #define ACPI_SIG_ATKG "ATKG"
98 1.1 jruoho #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
99 1.1 jruoho #define ACPI_SIG_IEIT "IEIT"
100 1.1 jruoho #endif
101 1.1 jruoho
102 1.1 jruoho /*
103 1.1 jruoho * All tables must be byte-packed to match the ACPI specification, since
104 1.1 jruoho * the tables are provided by the system BIOS.
105 1.1 jruoho */
106 1.1 jruoho #pragma pack(1)
107 1.1 jruoho
108 1.1 jruoho /*
109 1.1.1.4 christos * Note: C bitfields are not used for this reason:
110 1.1.1.4 christos *
111 1.1.1.4 christos * "Bitfields are great and easy to read, but unfortunately the C language
112 1.1.1.4 christos * does not specify the layout of bitfields in memory, which means they are
113 1.1.1.4 christos * essentially useless for dealing with packed data in on-disk formats or
114 1.1.1.4 christos * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
115 1.1.1.4 christos * this decision was a design error in C. Ritchie could have picked an order
116 1.1.1.4 christos * and stuck with it." Norman Ramsey.
117 1.1.1.4 christos * See http://stackoverflow.com/a/1053662/41661
118 1.1 jruoho */
119 1.1 jruoho
120 1.1 jruoho
121 1.1 jruoho /*******************************************************************************
122 1.1 jruoho *
123 1.1 jruoho * ASF - Alert Standard Format table (Signature "ASF!")
124 1.1 jruoho * Revision 0x10
125 1.1 jruoho *
126 1.1 jruoho * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
127 1.1 jruoho *
128 1.1 jruoho ******************************************************************************/
129 1.1 jruoho
130 1.1 jruoho typedef struct acpi_table_asf
131 1.1 jruoho {
132 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
133 1.1 jruoho
134 1.1 jruoho } ACPI_TABLE_ASF;
135 1.1 jruoho
136 1.1 jruoho
137 1.1 jruoho /* ASF subtable header */
138 1.1 jruoho
139 1.1 jruoho typedef struct acpi_asf_header
140 1.1 jruoho {
141 1.1 jruoho UINT8 Type;
142 1.1 jruoho UINT8 Reserved;
143 1.1 jruoho UINT16 Length;
144 1.1 jruoho
145 1.1 jruoho } ACPI_ASF_HEADER;
146 1.1 jruoho
147 1.1 jruoho
148 1.1 jruoho /* Values for Type field above */
149 1.1 jruoho
150 1.1 jruoho enum AcpiAsfType
151 1.1 jruoho {
152 1.1 jruoho ACPI_ASF_TYPE_INFO = 0,
153 1.1 jruoho ACPI_ASF_TYPE_ALERT = 1,
154 1.1 jruoho ACPI_ASF_TYPE_CONTROL = 2,
155 1.1 jruoho ACPI_ASF_TYPE_BOOT = 3,
156 1.1 jruoho ACPI_ASF_TYPE_ADDRESS = 4,
157 1.1 jruoho ACPI_ASF_TYPE_RESERVED = 5
158 1.1 jruoho };
159 1.1 jruoho
160 1.1 jruoho /*
161 1.1 jruoho * ASF subtables
162 1.1 jruoho */
163 1.1 jruoho
164 1.1 jruoho /* 0: ASF Information */
165 1.1 jruoho
166 1.1 jruoho typedef struct acpi_asf_info
167 1.1 jruoho {
168 1.1 jruoho ACPI_ASF_HEADER Header;
169 1.1 jruoho UINT8 MinResetValue;
170 1.1 jruoho UINT8 MinPollInterval;
171 1.1 jruoho UINT16 SystemId;
172 1.1 jruoho UINT32 MfgId;
173 1.1 jruoho UINT8 Flags;
174 1.1 jruoho UINT8 Reserved2[3];
175 1.1 jruoho
176 1.1 jruoho } ACPI_ASF_INFO;
177 1.1 jruoho
178 1.1 jruoho /* Masks for Flags field above */
179 1.1 jruoho
180 1.1 jruoho #define ACPI_ASF_SMBUS_PROTOCOLS (1)
181 1.1 jruoho
182 1.1 jruoho
183 1.1 jruoho /* 1: ASF Alerts */
184 1.1 jruoho
185 1.1 jruoho typedef struct acpi_asf_alert
186 1.1 jruoho {
187 1.1 jruoho ACPI_ASF_HEADER Header;
188 1.1 jruoho UINT8 AssertMask;
189 1.1 jruoho UINT8 DeassertMask;
190 1.1 jruoho UINT8 Alerts;
191 1.1 jruoho UINT8 DataLength;
192 1.1 jruoho
193 1.1 jruoho } ACPI_ASF_ALERT;
194 1.1 jruoho
195 1.1 jruoho typedef struct acpi_asf_alert_data
196 1.1 jruoho {
197 1.1 jruoho UINT8 Address;
198 1.1 jruoho UINT8 Command;
199 1.1 jruoho UINT8 Mask;
200 1.1 jruoho UINT8 Value;
201 1.1 jruoho UINT8 SensorType;
202 1.1 jruoho UINT8 Type;
203 1.1 jruoho UINT8 Offset;
204 1.1 jruoho UINT8 SourceType;
205 1.1 jruoho UINT8 Severity;
206 1.1 jruoho UINT8 SensorNumber;
207 1.1 jruoho UINT8 Entity;
208 1.1 jruoho UINT8 Instance;
209 1.1 jruoho
210 1.1 jruoho } ACPI_ASF_ALERT_DATA;
211 1.1 jruoho
212 1.1 jruoho
213 1.1 jruoho /* 2: ASF Remote Control */
214 1.1 jruoho
215 1.1 jruoho typedef struct acpi_asf_remote
216 1.1 jruoho {
217 1.1 jruoho ACPI_ASF_HEADER Header;
218 1.1 jruoho UINT8 Controls;
219 1.1 jruoho UINT8 DataLength;
220 1.1 jruoho UINT16 Reserved2;
221 1.1 jruoho
222 1.1 jruoho } ACPI_ASF_REMOTE;
223 1.1 jruoho
224 1.1 jruoho typedef struct acpi_asf_control_data
225 1.1 jruoho {
226 1.1 jruoho UINT8 Function;
227 1.1 jruoho UINT8 Address;
228 1.1 jruoho UINT8 Command;
229 1.1 jruoho UINT8 Value;
230 1.1 jruoho
231 1.1 jruoho } ACPI_ASF_CONTROL_DATA;
232 1.1 jruoho
233 1.1 jruoho
234 1.1 jruoho /* 3: ASF RMCP Boot Options */
235 1.1 jruoho
236 1.1 jruoho typedef struct acpi_asf_rmcp
237 1.1 jruoho {
238 1.1 jruoho ACPI_ASF_HEADER Header;
239 1.1 jruoho UINT8 Capabilities[7];
240 1.1 jruoho UINT8 CompletionCode;
241 1.1 jruoho UINT32 EnterpriseId;
242 1.1 jruoho UINT8 Command;
243 1.1 jruoho UINT16 Parameter;
244 1.1 jruoho UINT16 BootOptions;
245 1.1 jruoho UINT16 OemParameters;
246 1.1 jruoho
247 1.1 jruoho } ACPI_ASF_RMCP;
248 1.1 jruoho
249 1.1 jruoho
250 1.1 jruoho /* 4: ASF Address */
251 1.1 jruoho
252 1.1 jruoho typedef struct acpi_asf_address
253 1.1 jruoho {
254 1.1 jruoho ACPI_ASF_HEADER Header;
255 1.1 jruoho UINT8 EpromAddress;
256 1.1 jruoho UINT8 Devices;
257 1.1 jruoho
258 1.1 jruoho } ACPI_ASF_ADDRESS;
259 1.1 jruoho
260 1.1 jruoho
261 1.1 jruoho /*******************************************************************************
262 1.1 jruoho *
263 1.1 jruoho * BOOT - Simple Boot Flag Table
264 1.1 jruoho * Version 1
265 1.1 jruoho *
266 1.1 jruoho * Conforms to the "Simple Boot Flag Specification", Version 2.1
267 1.1 jruoho *
268 1.1 jruoho ******************************************************************************/
269 1.1 jruoho
270 1.1 jruoho typedef struct acpi_table_boot
271 1.1 jruoho {
272 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
273 1.1 jruoho UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */
274 1.1 jruoho UINT8 Reserved[3];
275 1.1 jruoho
276 1.1 jruoho } ACPI_TABLE_BOOT;
277 1.1 jruoho
278 1.1 jruoho
279 1.1 jruoho /*******************************************************************************
280 1.1 jruoho *
281 1.1.1.4 christos * CSRT - Core System Resource Table
282 1.1.1.4 christos * Version 0
283 1.1.1.4 christos *
284 1.1.1.4 christos * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
285 1.1.1.4 christos *
286 1.1.1.4 christos ******************************************************************************/
287 1.1.1.4 christos
288 1.1.1.4 christos typedef struct acpi_table_csrt
289 1.1.1.4 christos {
290 1.1.1.4 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
291 1.1.1.4 christos
292 1.1.1.4 christos } ACPI_TABLE_CSRT;
293 1.1.1.4 christos
294 1.1.1.4 christos
295 1.1.1.4 christos /* Resource Group subtable */
296 1.1.1.4 christos
297 1.1.1.4 christos typedef struct acpi_csrt_group
298 1.1.1.4 christos {
299 1.1.1.4 christos UINT32 Length;
300 1.1.1.4 christos UINT32 VendorId;
301 1.1.1.4 christos UINT32 SubvendorId;
302 1.1.1.4 christos UINT16 DeviceId;
303 1.1.1.4 christos UINT16 SubdeviceId;
304 1.1.1.4 christos UINT16 Revision;
305 1.1.1.4 christos UINT16 Reserved;
306 1.1.1.4 christos UINT32 SharedInfoLength;
307 1.1.1.4 christos
308 1.1.1.4 christos /* Shared data immediately follows (Length = SharedInfoLength) */
309 1.1.1.4 christos
310 1.1.1.4 christos } ACPI_CSRT_GROUP;
311 1.1.1.4 christos
312 1.1.1.4 christos /* Shared Info subtable */
313 1.1.1.4 christos
314 1.1.1.4 christos typedef struct acpi_csrt_shared_info
315 1.1.1.4 christos {
316 1.1.1.4 christos UINT16 MajorVersion;
317 1.1.1.4 christos UINT16 MinorVersion;
318 1.1.1.4 christos UINT32 MmioBaseLow;
319 1.1.1.4 christos UINT32 MmioBaseHigh;
320 1.1.1.4 christos UINT32 GsiInterrupt;
321 1.1.1.4 christos UINT8 InterruptPolarity;
322 1.1.1.4 christos UINT8 InterruptMode;
323 1.1.1.4 christos UINT8 NumChannels;
324 1.1.1.4 christos UINT8 DmaAddressWidth;
325 1.1.1.4 christos UINT16 BaseRequestLine;
326 1.1.1.4 christos UINT16 NumHandshakeSignals;
327 1.1.1.4 christos UINT32 MaxBlockSize;
328 1.1.1.4 christos
329 1.1.1.4 christos /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
330 1.1.1.4 christos
331 1.1.1.4 christos } ACPI_CSRT_SHARED_INFO;
332 1.1.1.4 christos
333 1.1.1.4 christos /* Resource Descriptor subtable */
334 1.1.1.4 christos
335 1.1.1.4 christos typedef struct acpi_csrt_descriptor
336 1.1.1.4 christos {
337 1.1.1.4 christos UINT32 Length;
338 1.1.1.4 christos UINT16 Type;
339 1.1.1.4 christos UINT16 Subtype;
340 1.1.1.4 christos UINT32 Uid;
341 1.1.1.4 christos
342 1.1.1.4 christos /* Resource-specific information immediately follows */
343 1.1.1.4 christos
344 1.1.1.4 christos } ACPI_CSRT_DESCRIPTOR;
345 1.1.1.4 christos
346 1.1.1.4 christos
347 1.1.1.4 christos /* Resource Types */
348 1.1.1.4 christos
349 1.1.1.4 christos #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
350 1.1.1.4 christos #define ACPI_CSRT_TYPE_TIMER 0x0002
351 1.1.1.4 christos #define ACPI_CSRT_TYPE_DMA 0x0003
352 1.1.1.4 christos
353 1.1.1.4 christos /* Resource Subtypes */
354 1.1.1.4 christos
355 1.1.1.4 christos #define ACPI_CSRT_XRUPT_LINE 0x0000
356 1.1.1.4 christos #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
357 1.1.1.4 christos #define ACPI_CSRT_TIMER 0x0000
358 1.1.1.4 christos #define ACPI_CSRT_DMA_CHANNEL 0x0000
359 1.1.1.4 christos #define ACPI_CSRT_DMA_CONTROLLER 0x0001
360 1.1.1.4 christos
361 1.1.1.4 christos
362 1.1.1.4 christos /*******************************************************************************
363 1.1.1.4 christos *
364 1.1.1.4 christos * DBG2 - Debug Port Table 2
365 1.1.1.4 christos * Version 0 (Both main table and subtables)
366 1.1.1.4 christos *
367 1.1.1.4 christos * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
368 1.1.1.4 christos *
369 1.1.1.4 christos ******************************************************************************/
370 1.1.1.4 christos
371 1.1.1.4 christos typedef struct acpi_table_dbg2
372 1.1.1.4 christos {
373 1.1.1.4 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
374 1.1.1.4 christos UINT32 InfoOffset;
375 1.1.1.4 christos UINT32 InfoCount;
376 1.1.1.4 christos
377 1.1.1.4 christos } ACPI_TABLE_DBG2;
378 1.1.1.4 christos
379 1.1.1.4 christos
380 1.1.1.4 christos typedef struct acpi_dbg2_header
381 1.1.1.4 christos {
382 1.1.1.4 christos UINT32 InfoOffset;
383 1.1.1.4 christos UINT32 InfoCount;
384 1.1.1.4 christos
385 1.1.1.4 christos } ACPI_DBG2_HEADER;
386 1.1.1.4 christos
387 1.1.1.4 christos
388 1.1.1.4 christos /* Debug Device Information Subtable */
389 1.1.1.4 christos
390 1.1.1.4 christos typedef struct acpi_dbg2_device
391 1.1.1.4 christos {
392 1.1.1.4 christos UINT8 Revision;
393 1.1.1.4 christos UINT16 Length;
394 1.1.1.4 christos UINT8 RegisterCount; /* Number of BaseAddress registers */
395 1.1.1.4 christos UINT16 NamepathLength;
396 1.1.1.4 christos UINT16 NamepathOffset;
397 1.1.1.4 christos UINT16 OemDataLength;
398 1.1.1.4 christos UINT16 OemDataOffset;
399 1.1.1.4 christos UINT16 PortType;
400 1.1.1.4 christos UINT16 PortSubtype;
401 1.1.1.4 christos UINT16 Reserved;
402 1.1.1.4 christos UINT16 BaseAddressOffset;
403 1.1.1.4 christos UINT16 AddressSizeOffset;
404 1.1.1.4 christos /*
405 1.1.1.4 christos * Data that follows:
406 1.1.1.4 christos * BaseAddress (required) - Each in 12-byte Generic Address Structure format.
407 1.1.1.4 christos * AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
408 1.1.1.4 christos * Namepath (required) - Null terminated string. Single dot if not supported.
409 1.1.1.4 christos * OemData (optional) - Length is OemDataLength.
410 1.1.1.4 christos */
411 1.1.1.4 christos } ACPI_DBG2_DEVICE;
412 1.1.1.4 christos
413 1.1.1.4 christos /* Types for PortType field above */
414 1.1.1.4 christos
415 1.1.1.4 christos #define ACPI_DBG2_SERIAL_PORT 0x8000
416 1.1.1.4 christos #define ACPI_DBG2_1394_PORT 0x8001
417 1.1.1.4 christos #define ACPI_DBG2_USB_PORT 0x8002
418 1.1.1.4 christos #define ACPI_DBG2_NET_PORT 0x8003
419 1.1.1.4 christos
420 1.1.1.4 christos /* Subtypes for PortSubtype field above */
421 1.1.1.4 christos
422 1.1.1.4 christos #define ACPI_DBG2_16550_COMPATIBLE 0x0000
423 1.1.1.4 christos #define ACPI_DBG2_16550_SUBSET 0x0001
424 1.1.1.4 christos
425 1.1.1.4 christos #define ACPI_DBG2_1394_STANDARD 0x0000
426 1.1.1.4 christos
427 1.1.1.4 christos #define ACPI_DBG2_USB_XHCI 0x0000
428 1.1.1.4 christos #define ACPI_DBG2_USB_EHCI 0x0001
429 1.1.1.4 christos
430 1.1.1.4 christos
431 1.1.1.4 christos /*******************************************************************************
432 1.1.1.4 christos *
433 1.1 jruoho * DBGP - Debug Port table
434 1.1 jruoho * Version 1
435 1.1 jruoho *
436 1.1 jruoho * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
437 1.1 jruoho *
438 1.1 jruoho ******************************************************************************/
439 1.1 jruoho
440 1.1 jruoho typedef struct acpi_table_dbgp
441 1.1 jruoho {
442 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
443 1.1 jruoho UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
444 1.1 jruoho UINT8 Reserved[3];
445 1.1 jruoho ACPI_GENERIC_ADDRESS DebugPort;
446 1.1 jruoho
447 1.1 jruoho } ACPI_TABLE_DBGP;
448 1.1 jruoho
449 1.1 jruoho
450 1.1 jruoho /*******************************************************************************
451 1.1 jruoho *
452 1.1 jruoho * DMAR - DMA Remapping table
453 1.1 jruoho * Version 1
454 1.1 jruoho *
455 1.1 jruoho * Conforms to "Intel Virtualization Technology for Directed I/O",
456 1.1.1.5 christos * Version 2.2, Sept. 2013
457 1.1 jruoho *
458 1.1 jruoho ******************************************************************************/
459 1.1 jruoho
460 1.1 jruoho typedef struct acpi_table_dmar
461 1.1 jruoho {
462 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
463 1.1 jruoho UINT8 Width; /* Host Address Width */
464 1.1 jruoho UINT8 Flags;
465 1.1 jruoho UINT8 Reserved[10];
466 1.1 jruoho
467 1.1 jruoho } ACPI_TABLE_DMAR;
468 1.1 jruoho
469 1.1 jruoho /* Masks for Flags field above */
470 1.1 jruoho
471 1.1 jruoho #define ACPI_DMAR_INTR_REMAP (1)
472 1.1 jruoho
473 1.1 jruoho
474 1.1 jruoho /* DMAR subtable header */
475 1.1 jruoho
476 1.1 jruoho typedef struct acpi_dmar_header
477 1.1 jruoho {
478 1.1 jruoho UINT16 Type;
479 1.1 jruoho UINT16 Length;
480 1.1 jruoho
481 1.1 jruoho } ACPI_DMAR_HEADER;
482 1.1 jruoho
483 1.1 jruoho /* Values for subtable type in ACPI_DMAR_HEADER */
484 1.1 jruoho
485 1.1 jruoho enum AcpiDmarType
486 1.1 jruoho {
487 1.1 jruoho ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
488 1.1 jruoho ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
489 1.1.1.5 christos ACPI_DMAR_TYPE_ROOT_ATS = 2,
490 1.1.1.5 christos ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
491 1.1.1.5 christos ACPI_DMAR_TYPE_NAMESPACE = 4,
492 1.1.1.5 christos ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
493 1.1 jruoho };
494 1.1 jruoho
495 1.1 jruoho
496 1.1 jruoho /* DMAR Device Scope structure */
497 1.1 jruoho
498 1.1 jruoho typedef struct acpi_dmar_device_scope
499 1.1 jruoho {
500 1.1 jruoho UINT8 EntryType;
501 1.1 jruoho UINT8 Length;
502 1.1 jruoho UINT16 Reserved;
503 1.1 jruoho UINT8 EnumerationId;
504 1.1 jruoho UINT8 Bus;
505 1.1 jruoho
506 1.1 jruoho } ACPI_DMAR_DEVICE_SCOPE;
507 1.1 jruoho
508 1.1.1.5 christos /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
509 1.1 jruoho
510 1.1 jruoho enum AcpiDmarScopeType
511 1.1 jruoho {
512 1.1 jruoho ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
513 1.1 jruoho ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
514 1.1 jruoho ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
515 1.1 jruoho ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
516 1.1 jruoho ACPI_DMAR_SCOPE_TYPE_HPET = 4,
517 1.1.1.5 christos ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
518 1.1.1.5 christos ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
519 1.1 jruoho };
520 1.1 jruoho
521 1.1 jruoho typedef struct acpi_dmar_pci_path
522 1.1 jruoho {
523 1.1 jruoho UINT8 Device;
524 1.1 jruoho UINT8 Function;
525 1.1 jruoho
526 1.1 jruoho } ACPI_DMAR_PCI_PATH;
527 1.1 jruoho
528 1.1 jruoho
529 1.1 jruoho /*
530 1.1.1.5 christos * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
531 1.1 jruoho */
532 1.1 jruoho
533 1.1 jruoho /* 0: Hardware Unit Definition */
534 1.1 jruoho
535 1.1 jruoho typedef struct acpi_dmar_hardware_unit
536 1.1 jruoho {
537 1.1 jruoho ACPI_DMAR_HEADER Header;
538 1.1 jruoho UINT8 Flags;
539 1.1 jruoho UINT8 Reserved;
540 1.1 jruoho UINT16 Segment;
541 1.1 jruoho UINT64 Address; /* Register Base Address */
542 1.1 jruoho
543 1.1 jruoho } ACPI_DMAR_HARDWARE_UNIT;
544 1.1 jruoho
545 1.1 jruoho /* Masks for Flags field above */
546 1.1 jruoho
547 1.1 jruoho #define ACPI_DMAR_INCLUDE_ALL (1)
548 1.1 jruoho
549 1.1 jruoho
550 1.1 jruoho /* 1: Reserved Memory Defininition */
551 1.1 jruoho
552 1.1 jruoho typedef struct acpi_dmar_reserved_memory
553 1.1 jruoho {
554 1.1 jruoho ACPI_DMAR_HEADER Header;
555 1.1 jruoho UINT16 Reserved;
556 1.1 jruoho UINT16 Segment;
557 1.1 jruoho UINT64 BaseAddress; /* 4K aligned base address */
558 1.1 jruoho UINT64 EndAddress; /* 4K aligned limit address */
559 1.1 jruoho
560 1.1 jruoho } ACPI_DMAR_RESERVED_MEMORY;
561 1.1 jruoho
562 1.1 jruoho /* Masks for Flags field above */
563 1.1 jruoho
564 1.1 jruoho #define ACPI_DMAR_ALLOW_ALL (1)
565 1.1 jruoho
566 1.1 jruoho
567 1.1 jruoho /* 2: Root Port ATS Capability Reporting Structure */
568 1.1 jruoho
569 1.1 jruoho typedef struct acpi_dmar_atsr
570 1.1 jruoho {
571 1.1 jruoho ACPI_DMAR_HEADER Header;
572 1.1 jruoho UINT8 Flags;
573 1.1 jruoho UINT8 Reserved;
574 1.1 jruoho UINT16 Segment;
575 1.1 jruoho
576 1.1 jruoho } ACPI_DMAR_ATSR;
577 1.1 jruoho
578 1.1 jruoho /* Masks for Flags field above */
579 1.1 jruoho
580 1.1 jruoho #define ACPI_DMAR_ALL_PORTS (1)
581 1.1 jruoho
582 1.1 jruoho
583 1.1 jruoho /* 3: Remapping Hardware Static Affinity Structure */
584 1.1 jruoho
585 1.1 jruoho typedef struct acpi_dmar_rhsa
586 1.1 jruoho {
587 1.1 jruoho ACPI_DMAR_HEADER Header;
588 1.1 jruoho UINT32 Reserved;
589 1.1 jruoho UINT64 BaseAddress;
590 1.1 jruoho UINT32 ProximityDomain;
591 1.1 jruoho
592 1.1 jruoho } ACPI_DMAR_RHSA;
593 1.1 jruoho
594 1.1 jruoho
595 1.1.1.5 christos /* 4: ACPI Namespace Device Declaration Structure */
596 1.1.1.5 christos
597 1.1.1.5 christos typedef struct acpi_dmar_andd
598 1.1.1.5 christos {
599 1.1.1.5 christos ACPI_DMAR_HEADER Header;
600 1.1.1.5 christos UINT8 Reserved[3];
601 1.1.1.5 christos UINT8 DeviceNumber;
602 1.1.1.5 christos char DeviceName[1];
603 1.1.1.5 christos
604 1.1.1.5 christos } ACPI_DMAR_ANDD;
605 1.1.1.5 christos
606 1.1.1.5 christos
607 1.1 jruoho /*******************************************************************************
608 1.1 jruoho *
609 1.1 jruoho * HPET - High Precision Event Timer table
610 1.1 jruoho * Version 1
611 1.1 jruoho *
612 1.1 jruoho * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
613 1.1 jruoho * Version 1.0a, October 2004
614 1.1 jruoho *
615 1.1 jruoho ******************************************************************************/
616 1.1 jruoho
617 1.1 jruoho typedef struct acpi_table_hpet
618 1.1 jruoho {
619 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
620 1.1 jruoho UINT32 Id; /* Hardware ID of event timer block */
621 1.1 jruoho ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
622 1.1 jruoho UINT8 Sequence; /* HPET sequence number */
623 1.1 jruoho UINT16 MinimumTick; /* Main counter min tick, periodic mode */
624 1.1 jruoho UINT8 Flags;
625 1.1 jruoho
626 1.1 jruoho } ACPI_TABLE_HPET;
627 1.1 jruoho
628 1.1 jruoho /* Masks for Flags field above */
629 1.1 jruoho
630 1.1 jruoho #define ACPI_HPET_PAGE_PROTECT_MASK (3)
631 1.1 jruoho
632 1.1 jruoho /* Values for Page Protect flags */
633 1.1 jruoho
634 1.1 jruoho enum AcpiHpetPageProtect
635 1.1 jruoho {
636 1.1 jruoho ACPI_HPET_NO_PAGE_PROTECT = 0,
637 1.1 jruoho ACPI_HPET_PAGE_PROTECT4 = 1,
638 1.1 jruoho ACPI_HPET_PAGE_PROTECT64 = 2
639 1.1 jruoho };
640 1.1 jruoho
641 1.1 jruoho
642 1.1 jruoho /*******************************************************************************
643 1.1 jruoho *
644 1.1 jruoho * IBFT - Boot Firmware Table
645 1.1 jruoho * Version 1
646 1.1 jruoho *
647 1.1 jruoho * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
648 1.1 jruoho * Specification", Version 1.01, March 1, 2007
649 1.1 jruoho *
650 1.1 jruoho * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
651 1.1 jruoho * Therefore, it is not currently supported by the disassembler.
652 1.1 jruoho *
653 1.1 jruoho ******************************************************************************/
654 1.1 jruoho
655 1.1 jruoho typedef struct acpi_table_ibft
656 1.1 jruoho {
657 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
658 1.1 jruoho UINT8 Reserved[12];
659 1.1 jruoho
660 1.1 jruoho } ACPI_TABLE_IBFT;
661 1.1 jruoho
662 1.1 jruoho
663 1.1 jruoho /* IBFT common subtable header */
664 1.1 jruoho
665 1.1 jruoho typedef struct acpi_ibft_header
666 1.1 jruoho {
667 1.1 jruoho UINT8 Type;
668 1.1 jruoho UINT8 Version;
669 1.1 jruoho UINT16 Length;
670 1.1 jruoho UINT8 Index;
671 1.1 jruoho UINT8 Flags;
672 1.1 jruoho
673 1.1 jruoho } ACPI_IBFT_HEADER;
674 1.1 jruoho
675 1.1 jruoho /* Values for Type field above */
676 1.1 jruoho
677 1.1 jruoho enum AcpiIbftType
678 1.1 jruoho {
679 1.1 jruoho ACPI_IBFT_TYPE_NOT_USED = 0,
680 1.1 jruoho ACPI_IBFT_TYPE_CONTROL = 1,
681 1.1 jruoho ACPI_IBFT_TYPE_INITIATOR = 2,
682 1.1 jruoho ACPI_IBFT_TYPE_NIC = 3,
683 1.1 jruoho ACPI_IBFT_TYPE_TARGET = 4,
684 1.1 jruoho ACPI_IBFT_TYPE_EXTENSIONS = 5,
685 1.1 jruoho ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
686 1.1 jruoho };
687 1.1 jruoho
688 1.1 jruoho
689 1.1 jruoho /* IBFT subtables */
690 1.1 jruoho
691 1.1 jruoho typedef struct acpi_ibft_control
692 1.1 jruoho {
693 1.1 jruoho ACPI_IBFT_HEADER Header;
694 1.1 jruoho UINT16 Extensions;
695 1.1 jruoho UINT16 InitiatorOffset;
696 1.1 jruoho UINT16 Nic0Offset;
697 1.1 jruoho UINT16 Target0Offset;
698 1.1 jruoho UINT16 Nic1Offset;
699 1.1 jruoho UINT16 Target1Offset;
700 1.1 jruoho
701 1.1 jruoho } ACPI_IBFT_CONTROL;
702 1.1 jruoho
703 1.1 jruoho typedef struct acpi_ibft_initiator
704 1.1 jruoho {
705 1.1 jruoho ACPI_IBFT_HEADER Header;
706 1.1 jruoho UINT8 SnsServer[16];
707 1.1 jruoho UINT8 SlpServer[16];
708 1.1 jruoho UINT8 PrimaryServer[16];
709 1.1 jruoho UINT8 SecondaryServer[16];
710 1.1 jruoho UINT16 NameLength;
711 1.1 jruoho UINT16 NameOffset;
712 1.1 jruoho
713 1.1 jruoho } ACPI_IBFT_INITIATOR;
714 1.1 jruoho
715 1.1 jruoho typedef struct acpi_ibft_nic
716 1.1 jruoho {
717 1.1 jruoho ACPI_IBFT_HEADER Header;
718 1.1 jruoho UINT8 IpAddress[16];
719 1.1 jruoho UINT8 SubnetMaskPrefix;
720 1.1 jruoho UINT8 Origin;
721 1.1 jruoho UINT8 Gateway[16];
722 1.1 jruoho UINT8 PrimaryDns[16];
723 1.1 jruoho UINT8 SecondaryDns[16];
724 1.1 jruoho UINT8 Dhcp[16];
725 1.1 jruoho UINT16 Vlan;
726 1.1 jruoho UINT8 MacAddress[6];
727 1.1 jruoho UINT16 PciAddress;
728 1.1 jruoho UINT16 NameLength;
729 1.1 jruoho UINT16 NameOffset;
730 1.1 jruoho
731 1.1 jruoho } ACPI_IBFT_NIC;
732 1.1 jruoho
733 1.1 jruoho typedef struct acpi_ibft_target
734 1.1 jruoho {
735 1.1 jruoho ACPI_IBFT_HEADER Header;
736 1.1 jruoho UINT8 TargetIpAddress[16];
737 1.1 jruoho UINT16 TargetIpSocket;
738 1.1 jruoho UINT8 TargetBootLun[8];
739 1.1 jruoho UINT8 ChapType;
740 1.1 jruoho UINT8 NicAssociation;
741 1.1 jruoho UINT16 TargetNameLength;
742 1.1 jruoho UINT16 TargetNameOffset;
743 1.1 jruoho UINT16 ChapNameLength;
744 1.1 jruoho UINT16 ChapNameOffset;
745 1.1 jruoho UINT16 ChapSecretLength;
746 1.1 jruoho UINT16 ChapSecretOffset;
747 1.1 jruoho UINT16 ReverseChapNameLength;
748 1.1 jruoho UINT16 ReverseChapNameOffset;
749 1.1 jruoho UINT16 ReverseChapSecretLength;
750 1.1 jruoho UINT16 ReverseChapSecretOffset;
751 1.1 jruoho
752 1.1 jruoho } ACPI_IBFT_TARGET;
753 1.1 jruoho
754 1.1 jruoho
755 1.1 jruoho /*******************************************************************************
756 1.1 jruoho *
757 1.1.1.7 christos * IORT - IO Remapping Table
758 1.1.1.7 christos *
759 1.1.1.7 christos * Conforms to "IO Remapping Table System Software on ARM Platforms",
760 1.1.1.7 christos * Document number: ARM DEN 0049A, 2015
761 1.1.1.7 christos *
762 1.1.1.7 christos ******************************************************************************/
763 1.1.1.7 christos
764 1.1.1.7 christos typedef struct acpi_table_iort
765 1.1.1.7 christos {
766 1.1.1.7 christos ACPI_TABLE_HEADER Header;
767 1.1.1.7 christos UINT32 NodeCount;
768 1.1.1.7 christos UINT32 NodeOffset;
769 1.1.1.7 christos UINT32 Reserved;
770 1.1.1.7 christos
771 1.1.1.7 christos } ACPI_TABLE_IORT;
772 1.1.1.7 christos
773 1.1.1.7 christos
774 1.1.1.7 christos /*
775 1.1.1.7 christos * IORT subtables
776 1.1.1.7 christos */
777 1.1.1.7 christos typedef struct acpi_iort_node
778 1.1.1.7 christos {
779 1.1.1.7 christos UINT8 Type;
780 1.1.1.7 christos UINT16 Length;
781 1.1.1.7 christos UINT8 Revision;
782 1.1.1.7 christos UINT32 Reserved;
783 1.1.1.7 christos UINT32 MappingCount;
784 1.1.1.7 christos UINT32 MappingOffset;
785 1.1.1.7 christos char NodeData[1];
786 1.1.1.7 christos
787 1.1.1.7 christos } ACPI_IORT_NODE;
788 1.1.1.7 christos
789 1.1.1.7 christos /* Values for subtable Type above */
790 1.1.1.7 christos
791 1.1.1.7 christos enum AcpiIortNodeType
792 1.1.1.7 christos {
793 1.1.1.7 christos ACPI_IORT_NODE_ITS_GROUP = 0x00,
794 1.1.1.7 christos ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
795 1.1.1.7 christos ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
796 1.1.1.7 christos ACPI_IORT_NODE_SMMU = 0x03
797 1.1.1.7 christos };
798 1.1.1.7 christos
799 1.1.1.7 christos
800 1.1.1.7 christos typedef struct acpi_iort_id_mapping
801 1.1.1.7 christos {
802 1.1.1.7 christos UINT32 InputBase; /* Lowest value in input range */
803 1.1.1.7 christos UINT32 IdCount; /* Number of IDs */
804 1.1.1.7 christos UINT32 OutputBase; /* Lowest value in output range */
805 1.1.1.7 christos UINT32 OutputReference; /* A reference to the output node */
806 1.1.1.7 christos UINT32 Flags;
807 1.1.1.7 christos
808 1.1.1.7 christos } ACPI_IORT_ID_MAPPING;
809 1.1.1.7 christos
810 1.1.1.7 christos /* Masks for Flags field above for IORT subtable */
811 1.1.1.7 christos
812 1.1.1.7 christos #define ACPI_IORT_ID_SINGLE_MAPPING (1)
813 1.1.1.7 christos
814 1.1.1.7 christos
815 1.1.1.7 christos typedef struct acpi_iort_memory_access
816 1.1.1.7 christos {
817 1.1.1.7 christos UINT32 CacheCoherency;
818 1.1.1.7 christos UINT8 Hints;
819 1.1.1.7 christos UINT16 Reserved;
820 1.1.1.7 christos UINT8 MemoryFlags;
821 1.1.1.7 christos
822 1.1.1.7 christos } ACPI_IORT_MEMORY_ACCESS;
823 1.1.1.7 christos
824 1.1.1.7 christos /* Values for CacheCoherency field above */
825 1.1.1.7 christos
826 1.1.1.7 christos #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
827 1.1.1.7 christos #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
828 1.1.1.7 christos
829 1.1.1.7 christos /* Masks for Hints field above */
830 1.1.1.7 christos
831 1.1.1.7 christos #define ACPI_IORT_HT_TRANSIENT (1)
832 1.1.1.7 christos #define ACPI_IORT_HT_WRITE (1<<1)
833 1.1.1.7 christos #define ACPI_IORT_HT_READ (1<<2)
834 1.1.1.7 christos #define ACPI_IORT_HT_OVERRIDE (1<<3)
835 1.1.1.7 christos
836 1.1.1.7 christos /* Masks for MemoryFlags field above */
837 1.1.1.7 christos
838 1.1.1.7 christos #define ACPI_IORT_MF_COHERENCY (1)
839 1.1.1.7 christos #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
840 1.1.1.7 christos
841 1.1.1.7 christos
842 1.1.1.7 christos /*
843 1.1.1.7 christos * IORT node specific subtables
844 1.1.1.7 christos */
845 1.1.1.7 christos typedef struct acpi_iort_its_group
846 1.1.1.7 christos {
847 1.1.1.7 christos UINT32 ItsCount;
848 1.1.1.7 christos UINT32 Identifiers[1]; /* GIC ITS identifier arrary */
849 1.1.1.7 christos
850 1.1.1.7 christos } ACPI_IORT_ITS_GROUP;
851 1.1.1.7 christos
852 1.1.1.7 christos
853 1.1.1.7 christos typedef struct acpi_iort_named_component
854 1.1.1.7 christos {
855 1.1.1.7 christos UINT32 NodeFlags;
856 1.1.1.7 christos UINT64 MemoryProperties; /* Memory access properties */
857 1.1.1.7 christos UINT8 MemoryAddressLimit; /* Memory address size limit */
858 1.1.1.7 christos char DeviceName[1]; /* Path of namespace object */
859 1.1.1.7 christos
860 1.1.1.7 christos } ACPI_IORT_NAMED_COMPONENT;
861 1.1.1.7 christos
862 1.1.1.7 christos
863 1.1.1.7 christos typedef struct acpi_iort_root_complex
864 1.1.1.7 christos {
865 1.1.1.7 christos UINT64 MemoryProperties; /* Memory access properties */
866 1.1.1.7 christos UINT32 AtsAttribute;
867 1.1.1.7 christos UINT32 PciSegmentNumber;
868 1.1.1.7 christos
869 1.1.1.7 christos } ACPI_IORT_ROOT_COMPLEX;
870 1.1.1.7 christos
871 1.1.1.7 christos /* Values for AtsAttribute field above */
872 1.1.1.7 christos
873 1.1.1.7 christos #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
874 1.1.1.7 christos #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
875 1.1.1.7 christos
876 1.1.1.7 christos
877 1.1.1.7 christos typedef struct acpi_iort_smmu
878 1.1.1.7 christos {
879 1.1.1.7 christos UINT64 BaseAddress; /* SMMU base address */
880 1.1.1.7 christos UINT64 Span; /* Length of memory range */
881 1.1.1.7 christos UINT32 Model;
882 1.1.1.7 christos UINT32 Flags;
883 1.1.1.7 christos UINT32 GlobalInterruptOffset;
884 1.1.1.7 christos UINT32 ContextInterruptCount;
885 1.1.1.7 christos UINT32 ContextInterruptOffset;
886 1.1.1.7 christos UINT32 PmuInterruptCount;
887 1.1.1.7 christos UINT32 PmuInterruptOffset;
888 1.1.1.7 christos UINT64 Interrupts[1]; /* Interrupt array */
889 1.1.1.7 christos
890 1.1.1.7 christos } ACPI_IORT_SMMU;
891 1.1.1.7 christos
892 1.1.1.7 christos /* Values for Model field above */
893 1.1.1.7 christos
894 1.1.1.7 christos #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
895 1.1.1.7 christos #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
896 1.1.1.7 christos #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
897 1.1.1.7 christos #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
898 1.1.1.7 christos
899 1.1.1.7 christos /* Masks for Flags field above */
900 1.1.1.7 christos
901 1.1.1.7 christos #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
902 1.1.1.7 christos #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
903 1.1.1.7 christos
904 1.1.1.7 christos
905 1.1.1.7 christos /*******************************************************************************
906 1.1.1.7 christos *
907 1.1 jruoho * IVRS - I/O Virtualization Reporting Structure
908 1.1 jruoho * Version 1
909 1.1 jruoho *
910 1.1 jruoho * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
911 1.1 jruoho * Revision 1.26, February 2009.
912 1.1 jruoho *
913 1.1 jruoho ******************************************************************************/
914 1.1 jruoho
915 1.1 jruoho typedef struct acpi_table_ivrs
916 1.1 jruoho {
917 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
918 1.1 jruoho UINT32 Info; /* Common virtualization info */
919 1.1 jruoho UINT64 Reserved;
920 1.1 jruoho
921 1.1 jruoho } ACPI_TABLE_IVRS;
922 1.1 jruoho
923 1.1 jruoho /* Values for Info field above */
924 1.1 jruoho
925 1.1 jruoho #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
926 1.1 jruoho #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
927 1.1 jruoho #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
928 1.1 jruoho
929 1.1 jruoho
930 1.1 jruoho /* IVRS subtable header */
931 1.1 jruoho
932 1.1 jruoho typedef struct acpi_ivrs_header
933 1.1 jruoho {
934 1.1 jruoho UINT8 Type; /* Subtable type */
935 1.1 jruoho UINT8 Flags;
936 1.1 jruoho UINT16 Length; /* Subtable length */
937 1.1 jruoho UINT16 DeviceId; /* ID of IOMMU */
938 1.1 jruoho
939 1.1 jruoho } ACPI_IVRS_HEADER;
940 1.1 jruoho
941 1.1 jruoho /* Values for subtable Type above */
942 1.1 jruoho
943 1.1 jruoho enum AcpiIvrsType
944 1.1 jruoho {
945 1.1 jruoho ACPI_IVRS_TYPE_HARDWARE = 0x10,
946 1.1 jruoho ACPI_IVRS_TYPE_MEMORY1 = 0x20,
947 1.1 jruoho ACPI_IVRS_TYPE_MEMORY2 = 0x21,
948 1.1 jruoho ACPI_IVRS_TYPE_MEMORY3 = 0x22
949 1.1 jruoho };
950 1.1 jruoho
951 1.1 jruoho /* Masks for Flags field above for IVHD subtable */
952 1.1 jruoho
953 1.1 jruoho #define ACPI_IVHD_TT_ENABLE (1)
954 1.1 jruoho #define ACPI_IVHD_PASS_PW (1<<1)
955 1.1 jruoho #define ACPI_IVHD_RES_PASS_PW (1<<2)
956 1.1 jruoho #define ACPI_IVHD_ISOC (1<<3)
957 1.1 jruoho #define ACPI_IVHD_IOTLB (1<<4)
958 1.1 jruoho
959 1.1 jruoho /* Masks for Flags field above for IVMD subtable */
960 1.1 jruoho
961 1.1 jruoho #define ACPI_IVMD_UNITY (1)
962 1.1 jruoho #define ACPI_IVMD_READ (1<<1)
963 1.1 jruoho #define ACPI_IVMD_WRITE (1<<2)
964 1.1 jruoho #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
965 1.1 jruoho
966 1.1 jruoho
967 1.1 jruoho /*
968 1.1 jruoho * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
969 1.1 jruoho */
970 1.1 jruoho
971 1.1 jruoho /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
972 1.1 jruoho
973 1.1 jruoho typedef struct acpi_ivrs_hardware
974 1.1 jruoho {
975 1.1 jruoho ACPI_IVRS_HEADER Header;
976 1.1 jruoho UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
977 1.1 jruoho UINT64 BaseAddress; /* IOMMU control registers */
978 1.1 jruoho UINT16 PciSegmentGroup;
979 1.1 jruoho UINT16 Info; /* MSI number and unit ID */
980 1.1 jruoho UINT32 Reserved;
981 1.1 jruoho
982 1.1 jruoho } ACPI_IVRS_HARDWARE;
983 1.1 jruoho
984 1.1 jruoho /* Masks for Info field above */
985 1.1 jruoho
986 1.1 jruoho #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
987 1.1 jruoho #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
988 1.1 jruoho
989 1.1 jruoho
990 1.1 jruoho /*
991 1.1 jruoho * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
992 1.1 jruoho * Upper two bits of the Type field are the (encoded) length of the structure.
993 1.1 jruoho * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
994 1.1 jruoho * are reserved for future use but not defined.
995 1.1 jruoho */
996 1.1 jruoho typedef struct acpi_ivrs_de_header
997 1.1 jruoho {
998 1.1 jruoho UINT8 Type;
999 1.1 jruoho UINT16 Id;
1000 1.1 jruoho UINT8 DataSetting;
1001 1.1 jruoho
1002 1.1 jruoho } ACPI_IVRS_DE_HEADER;
1003 1.1 jruoho
1004 1.1 jruoho /* Length of device entry is in the top two bits of Type field above */
1005 1.1 jruoho
1006 1.1 jruoho #define ACPI_IVHD_ENTRY_LENGTH 0xC0
1007 1.1 jruoho
1008 1.1 jruoho /* Values for device entry Type field above */
1009 1.1 jruoho
1010 1.1 jruoho enum AcpiIvrsDeviceEntryType
1011 1.1 jruoho {
1012 1.1 jruoho /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
1013 1.1 jruoho
1014 1.1 jruoho ACPI_IVRS_TYPE_PAD4 = 0,
1015 1.1 jruoho ACPI_IVRS_TYPE_ALL = 1,
1016 1.1 jruoho ACPI_IVRS_TYPE_SELECT = 2,
1017 1.1 jruoho ACPI_IVRS_TYPE_START = 3,
1018 1.1 jruoho ACPI_IVRS_TYPE_END = 4,
1019 1.1 jruoho
1020 1.1 jruoho /* 8-byte device entries */
1021 1.1 jruoho
1022 1.1 jruoho ACPI_IVRS_TYPE_PAD8 = 64,
1023 1.1 jruoho ACPI_IVRS_TYPE_NOT_USED = 65,
1024 1.1 jruoho ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */
1025 1.1 jruoho ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
1026 1.1 jruoho ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
1027 1.1 jruoho ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
1028 1.1 jruoho ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */
1029 1.1 jruoho };
1030 1.1 jruoho
1031 1.1 jruoho /* Values for Data field above */
1032 1.1 jruoho
1033 1.1 jruoho #define ACPI_IVHD_INIT_PASS (1)
1034 1.1 jruoho #define ACPI_IVHD_EINT_PASS (1<<1)
1035 1.1 jruoho #define ACPI_IVHD_NMI_PASS (1<<2)
1036 1.1 jruoho #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
1037 1.1 jruoho #define ACPI_IVHD_LINT0_PASS (1<<6)
1038 1.1 jruoho #define ACPI_IVHD_LINT1_PASS (1<<7)
1039 1.1 jruoho
1040 1.1 jruoho
1041 1.1 jruoho /* Types 0-4: 4-byte device entry */
1042 1.1 jruoho
1043 1.1 jruoho typedef struct acpi_ivrs_device4
1044 1.1 jruoho {
1045 1.1 jruoho ACPI_IVRS_DE_HEADER Header;
1046 1.1 jruoho
1047 1.1 jruoho } ACPI_IVRS_DEVICE4;
1048 1.1 jruoho
1049 1.1 jruoho /* Types 66-67: 8-byte device entry */
1050 1.1 jruoho
1051 1.1 jruoho typedef struct acpi_ivrs_device8a
1052 1.1 jruoho {
1053 1.1 jruoho ACPI_IVRS_DE_HEADER Header;
1054 1.1 jruoho UINT8 Reserved1;
1055 1.1 jruoho UINT16 UsedId;
1056 1.1 jruoho UINT8 Reserved2;
1057 1.1 jruoho
1058 1.1 jruoho } ACPI_IVRS_DEVICE8A;
1059 1.1 jruoho
1060 1.1 jruoho /* Types 70-71: 8-byte device entry */
1061 1.1 jruoho
1062 1.1 jruoho typedef struct acpi_ivrs_device8b
1063 1.1 jruoho {
1064 1.1 jruoho ACPI_IVRS_DE_HEADER Header;
1065 1.1 jruoho UINT32 ExtendedData;
1066 1.1 jruoho
1067 1.1 jruoho } ACPI_IVRS_DEVICE8B;
1068 1.1 jruoho
1069 1.1 jruoho /* Values for ExtendedData above */
1070 1.1 jruoho
1071 1.1 jruoho #define ACPI_IVHD_ATS_DISABLED (1<<31)
1072 1.1 jruoho
1073 1.1 jruoho /* Type 72: 8-byte device entry */
1074 1.1 jruoho
1075 1.1 jruoho typedef struct acpi_ivrs_device8c
1076 1.1 jruoho {
1077 1.1 jruoho ACPI_IVRS_DE_HEADER Header;
1078 1.1 jruoho UINT8 Handle;
1079 1.1 jruoho UINT16 UsedId;
1080 1.1 jruoho UINT8 Variety;
1081 1.1 jruoho
1082 1.1 jruoho } ACPI_IVRS_DEVICE8C;
1083 1.1 jruoho
1084 1.1 jruoho /* Values for Variety field above */
1085 1.1 jruoho
1086 1.1 jruoho #define ACPI_IVHD_IOAPIC 1
1087 1.1 jruoho #define ACPI_IVHD_HPET 2
1088 1.1 jruoho
1089 1.1 jruoho
1090 1.1 jruoho /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
1091 1.1 jruoho
1092 1.1 jruoho typedef struct acpi_ivrs_memory
1093 1.1 jruoho {
1094 1.1 jruoho ACPI_IVRS_HEADER Header;
1095 1.1 jruoho UINT16 AuxData;
1096 1.1 jruoho UINT64 Reserved;
1097 1.1 jruoho UINT64 StartAddress;
1098 1.1 jruoho UINT64 MemoryLength;
1099 1.1 jruoho
1100 1.1 jruoho } ACPI_IVRS_MEMORY;
1101 1.1 jruoho
1102 1.1 jruoho
1103 1.1 jruoho /*******************************************************************************
1104 1.1 jruoho *
1105 1.1.1.5 christos * LPIT - Low Power Idle Table
1106 1.1.1.5 christos *
1107 1.1.1.7 christos * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
1108 1.1.1.5 christos *
1109 1.1.1.5 christos ******************************************************************************/
1110 1.1.1.5 christos
1111 1.1.1.5 christos typedef struct acpi_table_lpit
1112 1.1.1.5 christos {
1113 1.1.1.5 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1114 1.1.1.5 christos
1115 1.1.1.5 christos } ACPI_TABLE_LPIT;
1116 1.1.1.5 christos
1117 1.1.1.5 christos
1118 1.1.1.5 christos /* LPIT subtable header */
1119 1.1.1.5 christos
1120 1.1.1.5 christos typedef struct acpi_lpit_header
1121 1.1.1.5 christos {
1122 1.1.1.5 christos UINT32 Type; /* Subtable type */
1123 1.1.1.5 christos UINT32 Length; /* Subtable length */
1124 1.1.1.5 christos UINT16 UniqueId;
1125 1.1.1.5 christos UINT16 Reserved;
1126 1.1.1.5 christos UINT32 Flags;
1127 1.1.1.5 christos
1128 1.1.1.5 christos } ACPI_LPIT_HEADER;
1129 1.1.1.5 christos
1130 1.1.1.5 christos /* Values for subtable Type above */
1131 1.1.1.5 christos
1132 1.1.1.5 christos enum AcpiLpitType
1133 1.1.1.5 christos {
1134 1.1.1.5 christos ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
1135 1.1.1.7 christos ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
1136 1.1.1.5 christos };
1137 1.1.1.5 christos
1138 1.1.1.5 christos /* Masks for Flags field above */
1139 1.1.1.5 christos
1140 1.1.1.5 christos #define ACPI_LPIT_STATE_DISABLED (1)
1141 1.1.1.5 christos #define ACPI_LPIT_NO_COUNTER (1<<1)
1142 1.1.1.5 christos
1143 1.1.1.5 christos /*
1144 1.1.1.5 christos * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
1145 1.1.1.5 christos */
1146 1.1.1.5 christos
1147 1.1.1.5 christos /* 0x00: Native C-state instruction based LPI structure */
1148 1.1.1.5 christos
1149 1.1.1.5 christos typedef struct acpi_lpit_native
1150 1.1.1.5 christos {
1151 1.1.1.5 christos ACPI_LPIT_HEADER Header;
1152 1.1.1.5 christos ACPI_GENERIC_ADDRESS EntryTrigger;
1153 1.1.1.5 christos UINT32 Residency;
1154 1.1.1.5 christos UINT32 Latency;
1155 1.1.1.5 christos ACPI_GENERIC_ADDRESS ResidencyCounter;
1156 1.1.1.5 christos UINT64 CounterFrequency;
1157 1.1.1.5 christos
1158 1.1.1.5 christos } ACPI_LPIT_NATIVE;
1159 1.1.1.5 christos
1160 1.1.1.5 christos
1161 1.1.1.5 christos /*******************************************************************************
1162 1.1.1.5 christos *
1163 1.1.1.5 christos * MCFG - PCI Memory Mapped Configuration table and subtable
1164 1.1 jruoho * Version 1
1165 1.1 jruoho *
1166 1.1 jruoho * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1167 1.1 jruoho *
1168 1.1 jruoho ******************************************************************************/
1169 1.1 jruoho
1170 1.1 jruoho typedef struct acpi_table_mcfg
1171 1.1 jruoho {
1172 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1173 1.1 jruoho UINT8 Reserved[8];
1174 1.1 jruoho
1175 1.1 jruoho } ACPI_TABLE_MCFG;
1176 1.1 jruoho
1177 1.1 jruoho
1178 1.1 jruoho /* Subtable */
1179 1.1 jruoho
1180 1.1 jruoho typedef struct acpi_mcfg_allocation
1181 1.1 jruoho {
1182 1.1 jruoho UINT64 Address; /* Base address, processor-relative */
1183 1.1 jruoho UINT16 PciSegment; /* PCI segment group number */
1184 1.1 jruoho UINT8 StartBusNumber; /* Starting PCI Bus number */
1185 1.1 jruoho UINT8 EndBusNumber; /* Final PCI Bus number */
1186 1.1 jruoho UINT32 Reserved;
1187 1.1 jruoho
1188 1.1 jruoho } ACPI_MCFG_ALLOCATION;
1189 1.1 jruoho
1190 1.1 jruoho
1191 1.1 jruoho /*******************************************************************************
1192 1.1 jruoho *
1193 1.1 jruoho * MCHI - Management Controller Host Interface Table
1194 1.1 jruoho * Version 1
1195 1.1 jruoho *
1196 1.1 jruoho * Conforms to "Management Component Transport Protocol (MCTP) Host
1197 1.1 jruoho * Interface Specification", Revision 1.0.0a, October 13, 2009
1198 1.1 jruoho *
1199 1.1 jruoho ******************************************************************************/
1200 1.1 jruoho
1201 1.1 jruoho typedef struct acpi_table_mchi
1202 1.1 jruoho {
1203 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1204 1.1 jruoho UINT8 InterfaceType;
1205 1.1 jruoho UINT8 Protocol;
1206 1.1 jruoho UINT64 ProtocolData;
1207 1.1 jruoho UINT8 InterruptType;
1208 1.1 jruoho UINT8 Gpe;
1209 1.1 jruoho UINT8 PciDeviceFlag;
1210 1.1 jruoho UINT32 GlobalInterrupt;
1211 1.1 jruoho ACPI_GENERIC_ADDRESS ControlRegister;
1212 1.1 jruoho UINT8 PciSegment;
1213 1.1 jruoho UINT8 PciBus;
1214 1.1 jruoho UINT8 PciDevice;
1215 1.1 jruoho UINT8 PciFunction;
1216 1.1 jruoho
1217 1.1 jruoho } ACPI_TABLE_MCHI;
1218 1.1 jruoho
1219 1.1 jruoho
1220 1.1 jruoho /*******************************************************************************
1221 1.1 jruoho *
1222 1.1.1.6 christos * MSDM - Microsoft Data Management table
1223 1.1.1.6 christos *
1224 1.1.1.6 christos * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1225 1.1.1.6 christos * November 29, 2011. Copyright 2011 Microsoft
1226 1.1.1.6 christos *
1227 1.1.1.6 christos ******************************************************************************/
1228 1.1.1.6 christos
1229 1.1.1.6 christos /* Basic MSDM table is only the common ACPI header */
1230 1.1.1.6 christos
1231 1.1.1.6 christos typedef struct acpi_table_msdm
1232 1.1.1.6 christos {
1233 1.1.1.6 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1234 1.1.1.6 christos
1235 1.1.1.6 christos } ACPI_TABLE_MSDM;
1236 1.1.1.6 christos
1237 1.1.1.6 christos
1238 1.1.1.6 christos /*******************************************************************************
1239 1.1.1.6 christos *
1240 1.1.1.4 christos * MTMR - MID Timer Table
1241 1.1.1.4 christos * Version 1
1242 1.1.1.4 christos *
1243 1.1.1.4 christos * Conforms to "Simple Firmware Interface Specification",
1244 1.1.1.4 christos * Draft 0.8.2, Oct 19, 2010
1245 1.1.1.4 christos * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
1246 1.1.1.4 christos *
1247 1.1.1.4 christos ******************************************************************************/
1248 1.1.1.4 christos
1249 1.1.1.4 christos typedef struct acpi_table_mtmr
1250 1.1.1.4 christos {
1251 1.1.1.4 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1252 1.1.1.4 christos
1253 1.1.1.4 christos } ACPI_TABLE_MTMR;
1254 1.1.1.4 christos
1255 1.1.1.4 christos /* MTMR entry */
1256 1.1.1.4 christos
1257 1.1.1.4 christos typedef struct acpi_mtmr_entry
1258 1.1.1.4 christos {
1259 1.1.1.4 christos ACPI_GENERIC_ADDRESS PhysicalAddress;
1260 1.1.1.4 christos UINT32 Frequency;
1261 1.1.1.4 christos UINT32 Irq;
1262 1.1.1.4 christos
1263 1.1.1.4 christos } ACPI_MTMR_ENTRY;
1264 1.1.1.4 christos
1265 1.1.1.4 christos
1266 1.1.1.4 christos /*******************************************************************************
1267 1.1.1.4 christos *
1268 1.1.1.3 jruoho * SLIC - Software Licensing Description Table
1269 1.1.1.3 jruoho *
1270 1.1.1.6 christos * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1271 1.1.1.6 christos * November 29, 2011. Copyright 2011 Microsoft
1272 1.1.1.3 jruoho *
1273 1.1.1.3 jruoho ******************************************************************************/
1274 1.1.1.3 jruoho
1275 1.1.1.3 jruoho /* Basic SLIC table is only the common ACPI header */
1276 1.1.1.3 jruoho
1277 1.1.1.3 jruoho typedef struct acpi_table_slic
1278 1.1.1.3 jruoho {
1279 1.1.1.3 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1280 1.1.1.3 jruoho
1281 1.1.1.3 jruoho } ACPI_TABLE_SLIC;
1282 1.1.1.3 jruoho
1283 1.1.1.3 jruoho
1284 1.1.1.3 jruoho /*******************************************************************************
1285 1.1.1.3 jruoho *
1286 1.1 jruoho * SPCR - Serial Port Console Redirection table
1287 1.1 jruoho * Version 1
1288 1.1 jruoho *
1289 1.1 jruoho * Conforms to "Serial Port Console Redirection Table",
1290 1.1 jruoho * Version 1.00, January 11, 2002
1291 1.1 jruoho *
1292 1.1 jruoho ******************************************************************************/
1293 1.1 jruoho
1294 1.1 jruoho typedef struct acpi_table_spcr
1295 1.1 jruoho {
1296 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1297 1.1 jruoho UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
1298 1.1 jruoho UINT8 Reserved[3];
1299 1.1 jruoho ACPI_GENERIC_ADDRESS SerialPort;
1300 1.1 jruoho UINT8 InterruptType;
1301 1.1 jruoho UINT8 PcInterrupt;
1302 1.1 jruoho UINT32 Interrupt;
1303 1.1 jruoho UINT8 BaudRate;
1304 1.1 jruoho UINT8 Parity;
1305 1.1 jruoho UINT8 StopBits;
1306 1.1 jruoho UINT8 FlowControl;
1307 1.1 jruoho UINT8 TerminalType;
1308 1.1 jruoho UINT8 Reserved1;
1309 1.1 jruoho UINT16 PciDeviceId;
1310 1.1 jruoho UINT16 PciVendorId;
1311 1.1 jruoho UINT8 PciBus;
1312 1.1 jruoho UINT8 PciDevice;
1313 1.1 jruoho UINT8 PciFunction;
1314 1.1 jruoho UINT32 PciFlags;
1315 1.1 jruoho UINT8 PciSegment;
1316 1.1 jruoho UINT32 Reserved2;
1317 1.1 jruoho
1318 1.1 jruoho } ACPI_TABLE_SPCR;
1319 1.1 jruoho
1320 1.1 jruoho /* Masks for PciFlags field above */
1321 1.1 jruoho
1322 1.1 jruoho #define ACPI_SPCR_DO_NOT_DISABLE (1)
1323 1.1 jruoho
1324 1.1 jruoho
1325 1.1 jruoho /*******************************************************************************
1326 1.1 jruoho *
1327 1.1 jruoho * SPMI - Server Platform Management Interface table
1328 1.1 jruoho * Version 5
1329 1.1 jruoho *
1330 1.1 jruoho * Conforms to "Intelligent Platform Management Interface Specification
1331 1.1 jruoho * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1332 1.1 jruoho * June 12, 2009 markup.
1333 1.1 jruoho *
1334 1.1 jruoho ******************************************************************************/
1335 1.1 jruoho
1336 1.1 jruoho typedef struct acpi_table_spmi
1337 1.1 jruoho {
1338 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1339 1.1 jruoho UINT8 InterfaceType;
1340 1.1 jruoho UINT8 Reserved; /* Must be 1 */
1341 1.1 jruoho UINT16 SpecRevision; /* Version of IPMI */
1342 1.1 jruoho UINT8 InterruptType;
1343 1.1 jruoho UINT8 GpeNumber; /* GPE assigned */
1344 1.1 jruoho UINT8 Reserved1;
1345 1.1 jruoho UINT8 PciDeviceFlag;
1346 1.1 jruoho UINT32 Interrupt;
1347 1.1 jruoho ACPI_GENERIC_ADDRESS IpmiRegister;
1348 1.1 jruoho UINT8 PciSegment;
1349 1.1 jruoho UINT8 PciBus;
1350 1.1 jruoho UINT8 PciDevice;
1351 1.1 jruoho UINT8 PciFunction;
1352 1.1 jruoho UINT8 Reserved2;
1353 1.1 jruoho
1354 1.1 jruoho } ACPI_TABLE_SPMI;
1355 1.1 jruoho
1356 1.1 jruoho /* Values for InterfaceType above */
1357 1.1 jruoho
1358 1.1 jruoho enum AcpiSpmiInterfaceTypes
1359 1.1 jruoho {
1360 1.1 jruoho ACPI_SPMI_NOT_USED = 0,
1361 1.1 jruoho ACPI_SPMI_KEYBOARD = 1,
1362 1.1 jruoho ACPI_SPMI_SMI = 2,
1363 1.1 jruoho ACPI_SPMI_BLOCK_TRANSFER = 3,
1364 1.1 jruoho ACPI_SPMI_SMBUS = 4,
1365 1.1 jruoho ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
1366 1.1 jruoho };
1367 1.1 jruoho
1368 1.1 jruoho
1369 1.1 jruoho /*******************************************************************************
1370 1.1 jruoho *
1371 1.1 jruoho * TCPA - Trusted Computing Platform Alliance table
1372 1.1.1.7 christos * Version 2
1373 1.1.1.7 christos *
1374 1.1.1.7 christos * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1375 1.1.1.7 christos * December 19, 2014
1376 1.1 jruoho *
1377 1.1.1.7 christos * NOTE: There are two versions of the table with the same signature --
1378 1.1.1.7 christos * the client version and the server version. The common PlatformClass
1379 1.1.1.7 christos * field is used to differentiate the two types of tables.
1380 1.1 jruoho *
1381 1.1 jruoho ******************************************************************************/
1382 1.1 jruoho
1383 1.1.1.7 christos typedef struct acpi_table_tcpa_hdr
1384 1.1 jruoho {
1385 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1386 1.1.1.7 christos UINT16 PlatformClass;
1387 1.1.1.7 christos
1388 1.1.1.7 christos } ACPI_TABLE_TCPA_HDR;
1389 1.1.1.7 christos
1390 1.1.1.7 christos /*
1391 1.1.1.7 christos * Values for PlatformClass above.
1392 1.1.1.7 christos * This is how the client and server subtables are differentiated
1393 1.1.1.7 christos */
1394 1.1.1.7 christos #define ACPI_TCPA_CLIENT_TABLE 0
1395 1.1.1.7 christos #define ACPI_TCPA_SERVER_TABLE 1
1396 1.1.1.7 christos
1397 1.1.1.7 christos
1398 1.1.1.7 christos typedef struct acpi_table_tcpa_client
1399 1.1.1.7 christos {
1400 1.1.1.7 christos UINT32 MinimumLogLength; /* Minimum length for the event log area */
1401 1.1.1.7 christos UINT64 LogAddress; /* Address of the event log area */
1402 1.1.1.7 christos
1403 1.1.1.7 christos } ACPI_TABLE_TCPA_CLIENT;
1404 1.1.1.7 christos
1405 1.1.1.7 christos typedef struct acpi_table_tcpa_server
1406 1.1.1.7 christos {
1407 1.1 jruoho UINT16 Reserved;
1408 1.1.1.7 christos UINT64 MinimumLogLength; /* Minimum length for the event log area */
1409 1.1 jruoho UINT64 LogAddress; /* Address of the event log area */
1410 1.1.1.7 christos UINT16 SpecRevision;
1411 1.1.1.7 christos UINT8 DeviceFlags;
1412 1.1.1.7 christos UINT8 InterruptFlags;
1413 1.1.1.7 christos UINT8 GpeNumber;
1414 1.1.1.7 christos UINT8 Reserved2[3];
1415 1.1.1.7 christos UINT32 GlobalInterrupt;
1416 1.1.1.7 christos ACPI_GENERIC_ADDRESS Address;
1417 1.1.1.7 christos UINT32 Reserved3;
1418 1.1.1.7 christos ACPI_GENERIC_ADDRESS ConfigAddress;
1419 1.1.1.7 christos UINT8 Group;
1420 1.1.1.7 christos UINT8 Bus; /* PCI Bus/Segment/Function numbers */
1421 1.1.1.7 christos UINT8 Device;
1422 1.1.1.7 christos UINT8 Function;
1423 1.1.1.7 christos
1424 1.1.1.7 christos } ACPI_TABLE_TCPA_SERVER;
1425 1.1.1.7 christos
1426 1.1.1.7 christos /* Values for DeviceFlags above */
1427 1.1.1.7 christos
1428 1.1.1.7 christos #define ACPI_TCPA_PCI_DEVICE (1)
1429 1.1.1.7 christos #define ACPI_TCPA_BUS_PNP (1<<1)
1430 1.1.1.7 christos #define ACPI_TCPA_ADDRESS_VALID (1<<2)
1431 1.1.1.7 christos
1432 1.1.1.7 christos /* Values for InterruptFlags above */
1433 1.1.1.7 christos
1434 1.1.1.7 christos #define ACPI_TCPA_INTERRUPT_MODE (1)
1435 1.1.1.7 christos #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
1436 1.1.1.7 christos #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
1437 1.1.1.7 christos #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
1438 1.1.1.7 christos
1439 1.1.1.7 christos
1440 1.1.1.7 christos /*******************************************************************************
1441 1.1.1.7 christos *
1442 1.1.1.7 christos * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
1443 1.1.1.7 christos * Version 4
1444 1.1.1.7 christos *
1445 1.1.1.7 christos * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1446 1.1.1.7 christos * December 19, 2014
1447 1.1.1.7 christos *
1448 1.1.1.7 christos ******************************************************************************/
1449 1.1.1.7 christos
1450 1.1.1.7 christos typedef struct acpi_table_tpm2
1451 1.1.1.7 christos {
1452 1.1.1.7 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1453 1.1.1.7 christos UINT16 PlatformClass;
1454 1.1.1.7 christos UINT16 Reserved;
1455 1.1.1.7 christos UINT64 ControlAddress;
1456 1.1.1.7 christos UINT32 StartMethod;
1457 1.1.1.7 christos
1458 1.1.1.7 christos /* Platform-specific data follows */
1459 1.1.1.7 christos
1460 1.1.1.7 christos } ACPI_TABLE_TPM2;
1461 1.1.1.7 christos
1462 1.1.1.7 christos /* Values for StartMethod above */
1463 1.1 jruoho
1464 1.1.1.7 christos #define ACPI_TPM2_NOT_ALLOWED 0
1465 1.1.1.7 christos #define ACPI_TPM2_START_METHOD 2
1466 1.1.1.7 christos #define ACPI_TPM2_MEMORY_MAPPED 6
1467 1.1.1.7 christos #define ACPI_TPM2_COMMAND_BUFFER 7
1468 1.1.1.7 christos #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
1469 1.1 jruoho
1470 1.1 jruoho
1471 1.1 jruoho /*******************************************************************************
1472 1.1 jruoho *
1473 1.1 jruoho * UEFI - UEFI Boot optimization Table
1474 1.1 jruoho * Version 1
1475 1.1 jruoho *
1476 1.1 jruoho * Conforms to "Unified Extensible Firmware Interface Specification",
1477 1.1 jruoho * Version 2.3, May 8, 2009
1478 1.1 jruoho *
1479 1.1 jruoho ******************************************************************************/
1480 1.1 jruoho
1481 1.1 jruoho typedef struct acpi_table_uefi
1482 1.1 jruoho {
1483 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1484 1.1 jruoho UINT8 Identifier[16]; /* UUID identifier */
1485 1.1 jruoho UINT16 DataOffset; /* Offset of remaining data in table */
1486 1.1 jruoho
1487 1.1 jruoho } ACPI_TABLE_UEFI;
1488 1.1 jruoho
1489 1.1 jruoho
1490 1.1 jruoho /*******************************************************************************
1491 1.1 jruoho *
1492 1.1.1.4 christos * VRTC - Virtual Real Time Clock Table
1493 1.1.1.4 christos * Version 1
1494 1.1.1.4 christos *
1495 1.1.1.4 christos * Conforms to "Simple Firmware Interface Specification",
1496 1.1.1.4 christos * Draft 0.8.2, Oct 19, 2010
1497 1.1.1.4 christos * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1498 1.1.1.4 christos *
1499 1.1.1.4 christos ******************************************************************************/
1500 1.1.1.4 christos
1501 1.1.1.4 christos typedef struct acpi_table_vrtc
1502 1.1.1.4 christos {
1503 1.1.1.4 christos ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1504 1.1.1.4 christos
1505 1.1.1.4 christos } ACPI_TABLE_VRTC;
1506 1.1.1.4 christos
1507 1.1.1.4 christos /* VRTC entry */
1508 1.1.1.4 christos
1509 1.1.1.4 christos typedef struct acpi_vrtc_entry
1510 1.1.1.4 christos {
1511 1.1.1.4 christos ACPI_GENERIC_ADDRESS PhysicalAddress;
1512 1.1.1.4 christos UINT32 Irq;
1513 1.1.1.4 christos
1514 1.1.1.4 christos } ACPI_VRTC_ENTRY;
1515 1.1.1.4 christos
1516 1.1.1.4 christos
1517 1.1.1.4 christos /*******************************************************************************
1518 1.1.1.4 christos *
1519 1.1 jruoho * WAET - Windows ACPI Emulated devices Table
1520 1.1 jruoho * Version 1
1521 1.1 jruoho *
1522 1.1 jruoho * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1523 1.1 jruoho *
1524 1.1 jruoho ******************************************************************************/
1525 1.1 jruoho
1526 1.1 jruoho typedef struct acpi_table_waet
1527 1.1 jruoho {
1528 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1529 1.1 jruoho UINT32 Flags;
1530 1.1 jruoho
1531 1.1 jruoho } ACPI_TABLE_WAET;
1532 1.1 jruoho
1533 1.1 jruoho /* Masks for Flags field above */
1534 1.1 jruoho
1535 1.1 jruoho #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
1536 1.1 jruoho #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
1537 1.1 jruoho
1538 1.1 jruoho
1539 1.1 jruoho /*******************************************************************************
1540 1.1 jruoho *
1541 1.1 jruoho * WDAT - Watchdog Action Table
1542 1.1 jruoho * Version 1
1543 1.1 jruoho *
1544 1.1 jruoho * Conforms to "Hardware Watchdog Timers Design Specification",
1545 1.1 jruoho * Copyright 2006 Microsoft Corporation.
1546 1.1 jruoho *
1547 1.1 jruoho ******************************************************************************/
1548 1.1 jruoho
1549 1.1 jruoho typedef struct acpi_table_wdat
1550 1.1 jruoho {
1551 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1552 1.1 jruoho UINT32 HeaderLength; /* Watchdog Header Length */
1553 1.1 jruoho UINT16 PciSegment; /* PCI Segment number */
1554 1.1 jruoho UINT8 PciBus; /* PCI Bus number */
1555 1.1 jruoho UINT8 PciDevice; /* PCI Device number */
1556 1.1 jruoho UINT8 PciFunction; /* PCI Function number */
1557 1.1 jruoho UINT8 Reserved[3];
1558 1.1 jruoho UINT32 TimerPeriod; /* Period of one timer count (msec) */
1559 1.1 jruoho UINT32 MaxCount; /* Maximum counter value supported */
1560 1.1 jruoho UINT32 MinCount; /* Minimum counter value */
1561 1.1 jruoho UINT8 Flags;
1562 1.1 jruoho UINT8 Reserved2[3];
1563 1.1 jruoho UINT32 Entries; /* Number of watchdog entries that follow */
1564 1.1 jruoho
1565 1.1 jruoho } ACPI_TABLE_WDAT;
1566 1.1 jruoho
1567 1.1 jruoho /* Masks for Flags field above */
1568 1.1 jruoho
1569 1.1 jruoho #define ACPI_WDAT_ENABLED (1)
1570 1.1 jruoho #define ACPI_WDAT_STOPPED 0x80
1571 1.1 jruoho
1572 1.1 jruoho
1573 1.1 jruoho /* WDAT Instruction Entries (actions) */
1574 1.1 jruoho
1575 1.1 jruoho typedef struct acpi_wdat_entry
1576 1.1 jruoho {
1577 1.1 jruoho UINT8 Action;
1578 1.1 jruoho UINT8 Instruction;
1579 1.1 jruoho UINT16 Reserved;
1580 1.1 jruoho ACPI_GENERIC_ADDRESS RegisterRegion;
1581 1.1 jruoho UINT32 Value; /* Value used with Read/Write register */
1582 1.1 jruoho UINT32 Mask; /* Bitmask required for this register instruction */
1583 1.1 jruoho
1584 1.1 jruoho } ACPI_WDAT_ENTRY;
1585 1.1 jruoho
1586 1.1 jruoho /* Values for Action field above */
1587 1.1 jruoho
1588 1.1 jruoho enum AcpiWdatActions
1589 1.1 jruoho {
1590 1.1 jruoho ACPI_WDAT_RESET = 1,
1591 1.1 jruoho ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1592 1.1 jruoho ACPI_WDAT_GET_COUNTDOWN = 5,
1593 1.1 jruoho ACPI_WDAT_SET_COUNTDOWN = 6,
1594 1.1 jruoho ACPI_WDAT_GET_RUNNING_STATE = 8,
1595 1.1 jruoho ACPI_WDAT_SET_RUNNING_STATE = 9,
1596 1.1 jruoho ACPI_WDAT_GET_STOPPED_STATE = 10,
1597 1.1 jruoho ACPI_WDAT_SET_STOPPED_STATE = 11,
1598 1.1 jruoho ACPI_WDAT_GET_REBOOT = 16,
1599 1.1 jruoho ACPI_WDAT_SET_REBOOT = 17,
1600 1.1 jruoho ACPI_WDAT_GET_SHUTDOWN = 18,
1601 1.1 jruoho ACPI_WDAT_SET_SHUTDOWN = 19,
1602 1.1 jruoho ACPI_WDAT_GET_STATUS = 32,
1603 1.1 jruoho ACPI_WDAT_SET_STATUS = 33,
1604 1.1 jruoho ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
1605 1.1 jruoho };
1606 1.1 jruoho
1607 1.1 jruoho /* Values for Instruction field above */
1608 1.1 jruoho
1609 1.1 jruoho enum AcpiWdatInstructions
1610 1.1 jruoho {
1611 1.1 jruoho ACPI_WDAT_READ_VALUE = 0,
1612 1.1 jruoho ACPI_WDAT_READ_COUNTDOWN = 1,
1613 1.1 jruoho ACPI_WDAT_WRITE_VALUE = 2,
1614 1.1 jruoho ACPI_WDAT_WRITE_COUNTDOWN = 3,
1615 1.1 jruoho ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
1616 1.1 jruoho ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
1617 1.1 jruoho };
1618 1.1 jruoho
1619 1.1 jruoho
1620 1.1 jruoho /*******************************************************************************
1621 1.1 jruoho *
1622 1.1.1.2 jruoho * WDDT - Watchdog Descriptor Table
1623 1.1.1.2 jruoho * Version 1
1624 1.1.1.2 jruoho *
1625 1.1.1.2 jruoho * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1626 1.1.1.2 jruoho * Version 001, September 2002
1627 1.1.1.2 jruoho *
1628 1.1.1.2 jruoho ******************************************************************************/
1629 1.1.1.2 jruoho
1630 1.1.1.2 jruoho typedef struct acpi_table_wddt
1631 1.1.1.2 jruoho {
1632 1.1.1.2 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1633 1.1.1.2 jruoho UINT16 SpecVersion;
1634 1.1.1.2 jruoho UINT16 TableVersion;
1635 1.1.1.2 jruoho UINT16 PciVendorId;
1636 1.1.1.2 jruoho ACPI_GENERIC_ADDRESS Address;
1637 1.1.1.2 jruoho UINT16 MaxCount; /* Maximum counter value supported */
1638 1.1.1.2 jruoho UINT16 MinCount; /* Minimum counter value supported */
1639 1.1.1.2 jruoho UINT16 Period;
1640 1.1.1.2 jruoho UINT16 Status;
1641 1.1.1.2 jruoho UINT16 Capability;
1642 1.1.1.2 jruoho
1643 1.1.1.2 jruoho } ACPI_TABLE_WDDT;
1644 1.1.1.2 jruoho
1645 1.1.1.2 jruoho /* Flags for Status field above */
1646 1.1.1.2 jruoho
1647 1.1.1.2 jruoho #define ACPI_WDDT_AVAILABLE (1)
1648 1.1.1.2 jruoho #define ACPI_WDDT_ACTIVE (1<<1)
1649 1.1.1.2 jruoho #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
1650 1.1.1.2 jruoho #define ACPI_WDDT_USER_RESET (1<<11)
1651 1.1.1.2 jruoho #define ACPI_WDDT_WDT_RESET (1<<12)
1652 1.1.1.2 jruoho #define ACPI_WDDT_POWER_FAIL (1<<13)
1653 1.1.1.2 jruoho #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1654 1.1.1.2 jruoho
1655 1.1.1.2 jruoho /* Flags for Capability field above */
1656 1.1.1.2 jruoho
1657 1.1.1.2 jruoho #define ACPI_WDDT_AUTO_RESET (1)
1658 1.1.1.2 jruoho #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1659 1.1.1.2 jruoho
1660 1.1.1.2 jruoho
1661 1.1.1.2 jruoho /*******************************************************************************
1662 1.1.1.2 jruoho *
1663 1.1 jruoho * WDRT - Watchdog Resource Table
1664 1.1 jruoho * Version 1
1665 1.1 jruoho *
1666 1.1 jruoho * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1667 1.1 jruoho * Version 1.01, August 28, 2006
1668 1.1 jruoho *
1669 1.1 jruoho ******************************************************************************/
1670 1.1 jruoho
1671 1.1 jruoho typedef struct acpi_table_wdrt
1672 1.1 jruoho {
1673 1.1 jruoho ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1674 1.1 jruoho ACPI_GENERIC_ADDRESS ControlRegister;
1675 1.1 jruoho ACPI_GENERIC_ADDRESS CountRegister;
1676 1.1 jruoho UINT16 PciDeviceId;
1677 1.1 jruoho UINT16 PciVendorId;
1678 1.1 jruoho UINT8 PciBus; /* PCI Bus number */
1679 1.1 jruoho UINT8 PciDevice; /* PCI Device number */
1680 1.1 jruoho UINT8 PciFunction; /* PCI Function number */
1681 1.1 jruoho UINT8 PciSegment; /* PCI Segment number */
1682 1.1 jruoho UINT16 MaxCount; /* Maximum counter value supported */
1683 1.1 jruoho UINT8 Units;
1684 1.1 jruoho
1685 1.1 jruoho } ACPI_TABLE_WDRT;
1686 1.1 jruoho
1687 1.1 jruoho
1688 1.1 jruoho /* Reset to default packing */
1689 1.1 jruoho
1690 1.1 jruoho #pragma pack()
1691 1.1 jruoho
1692 1.1 jruoho #endif /* __ACTBL2_H__ */
1693