Merge tag 'pm-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
[linux-2.6-block.git] / include / acpi / actbl1.h
CommitLineData
95857638 1/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
1da177e4
LT
2/******************************************************************************
3 *
793c2388 4 * Name: actbl1.h - Additional ACPI table definitions
1da177e4 5 *
0e9fd691 6 * Copyright (C) 2000 - 2025, Intel Corp.
1da177e4 7 *
95857638 8 *****************************************************************************/
1da177e4
LT
9
10#ifndef __ACTBL1_H__
11#define __ACTBL1_H__
12
793c2388
BM
13/*******************************************************************************
14 *
e62f8227 15 * Additional ACPI Tables
793c2388
BM
16 *
17 * These tables are not consumed directly by the ACPICA subsystem, but are
18 * included here to support device drivers and the AML disassembler.
19 *
20 ******************************************************************************/
21
22/*
6e2d5ebd
BM
23 * Values for description table header signatures for tables defined in this
24 * file. Useful because they make it more difficult to inadvertently type in
25 * the wrong signature.
793c2388 26 */
e692fa13 27#define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */
e62f8227 28#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
f5325cb1 29#define ACPI_SIG_ASPT "ASPT" /* AMD Secure Processor Table */
970d9c9e 30#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
e62f8227
ES
31#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
32#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
7c5eab72 33#define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */
793c2388 34#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
e62f8227
ES
35#define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
36#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
37#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
38#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
39#define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
793c2388 40#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
970d9c9e
BM
41#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
42#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
e62f8227
ES
43#define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
44#define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
970d9c9e 45#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
e62f8227
ES
46#define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
47#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
48#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
51aad1a6 49#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
e62f8227
ES
50
51#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
52#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
53
6ad90f71
SH
54#define ACPI_SIG_NBFT "NBFT" /* NVMe Boot Firmware Table */
55
e62f8227
ES
56/* Reserved table signatures */
57
58#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
59#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
60
61/*
62 * These tables have been seen in the field, but no definition has been found
63 */
64#ifdef ACPI_UNDEFINED_TABLES
65#define ACPI_SIG_ATKG "ATKG"
66#define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
67#define ACPI_SIG_IEIT "IEIT"
68#endif
793c2388 69
793c2388
BM
70/*
71 * All tables must be byte-packed to match the ACPI specification, since
72 * the tables are provided by the system BIOS.
73 */
1da177e4
LT
74#pragma pack(1)
75
76/*
be030a57
BM
77 * Note: C bitfields are not used for this reason:
78 *
79 * "Bitfields are great and easy to read, but unfortunately the C language
80 * does not specify the layout of bitfields in memory, which means they are
81 * essentially useless for dealing with packed data in on-disk formats or
82 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
83 * this decision was a design error in C. Ritchie could have picked an order
84 * and stuck with it." Norman Ramsey.
85 * See http://stackoverflow.com/a/1053662/41661
1da177e4 86 */
793c2388 87
6e2d5ebd
BM
88/*******************************************************************************
89 *
90 * Common subtable headers
91 *
92 ******************************************************************************/
93
94/* Generic subtable header (used in MADT, SRAT, etc.) */
f3d2e786
BM
95
96struct acpi_subtable_header {
97 u8 type;
98 u8 length;
99};
100
6e2d5ebd 101/* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
970d9c9e
BM
102
103struct acpi_whea_header {
104 u8 action;
105 u8 instruction;
106 u8 flags;
107 u8 reserved;
108 struct acpi_generic_address register_region;
3fa34777
BM
109 u64 value; /* Value used with Read/Write register */
110 u64 mask; /* Bitmask required for this register instruction */
970d9c9e
BM
111};
112
f5325cb1
JP
113/* https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/acpitabl/ns-acpitabl-aspt_table */
114#define ASPT_REVISION_ID 0x01
115struct acpi_table_aspt {
116 struct acpi_table_header header;
117 u32 num_entries;
118};
119
120struct acpi_aspt_header {
121 u16 type;
122 u16 length;
123};
124
125enum acpi_aspt_type {
126 ACPI_ASPT_TYPE_GLOBAL_REGS = 0,
127 ACPI_ASPT_TYPE_SEV_MBOX_REGS = 1,
128 ACPI_ASPT_TYPE_ACPI_MBOX_REGS = 2,
129};
130
131/* 0: ASPT Global Registers */
132struct acpi_aspt_global_regs {
133 struct acpi_aspt_header header;
134 u32 reserved;
135 u64 feature_reg_addr;
136 u64 irq_en_reg_addr;
137 u64 irq_st_reg_addr;
138};
139
140/* 1: ASPT SEV Mailbox Registers */
141struct acpi_aspt_sev_mbox_regs {
142 struct acpi_aspt_header header;
143 u8 mbox_irq_id;
144 u8 reserved[3];
145 u64 cmd_resp_reg_addr;
146 u64 cmd_buf_lo_reg_addr;
147 u64 cmd_buf_hi_reg_addr;
148};
149
150/* 2: ASPT ACPI Mailbox Registers */
151struct acpi_aspt_acpi_mbox_regs {
152 struct acpi_aspt_header header;
153 u32 reserved1;
154 u64 cmd_resp_reg_addr;
155 u64 reserved2[2];
156};
157
67f9d690
TL
158/* Larger subtable header (when Length can exceed 255) */
159
5833942d 160struct acpi_subtbl_hdr_16 {
67f9d690
TL
161 u16 type;
162 u16 length;
163};
164
e62f8227
ES
165/*******************************************************************************
166 *
167 * ASF - Alert Standard Format table (Signature "ASF!")
168 * Revision 0x10
169 *
170 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
171 *
172 ******************************************************************************/
173
174struct acpi_table_asf {
175 struct acpi_table_header header; /* Common ACPI table header */
176};
177
178/* ASF subtable header */
179
180struct acpi_asf_header {
181 u8 type;
182 u8 reserved;
183 u16 length;
184};
185
186/* Values for Type field above */
187
188enum acpi_asf_type {
189 ACPI_ASF_TYPE_INFO = 0,
190 ACPI_ASF_TYPE_ALERT = 1,
191 ACPI_ASF_TYPE_CONTROL = 2,
192 ACPI_ASF_TYPE_BOOT = 3,
193 ACPI_ASF_TYPE_ADDRESS = 4,
194 ACPI_ASF_TYPE_RESERVED = 5
195};
196
197/*
198 * ASF subtables
199 */
200
201/* 0: ASF Information */
202
203struct acpi_asf_info {
204 struct acpi_asf_header header;
205 u8 min_reset_value;
206 u8 min_poll_interval;
207 u16 system_id;
208 u32 mfg_id;
209 u8 flags;
210 u8 reserved2[3];
211};
212
213/* Masks for Flags field above */
214
215#define ACPI_ASF_SMBUS_PROTOCOLS (1)
216
217/* 1: ASF Alerts */
218
219struct acpi_asf_alert {
220 struct acpi_asf_header header;
221 u8 assert_mask;
222 u8 deassert_mask;
223 u8 alerts;
224 u8 data_length;
225};
226
227struct acpi_asf_alert_data {
228 u8 address;
229 u8 command;
230 u8 mask;
231 u8 value;
232 u8 sensor_type;
233 u8 type;
234 u8 offset;
235 u8 source_type;
236 u8 severity;
237 u8 sensor_number;
238 u8 entity;
239 u8 instance;
240};
241
242/* 2: ASF Remote Control */
243
244struct acpi_asf_remote {
245 struct acpi_asf_header header;
246 u8 controls;
247 u8 data_length;
248 u16 reserved2;
249};
250
251struct acpi_asf_control_data {
252 u8 function;
253 u8 address;
254 u8 command;
255 u8 value;
256};
257
258/* 3: ASF RMCP Boot Options */
259
260struct acpi_asf_rmcp {
261 struct acpi_asf_header header;
262 u8 capabilities[7];
263 u8 completion_code;
264 u32 enterprise_id;
265 u8 command;
266 u16 parameter;
267 u16 boot_options;
268 u16 oem_parameters;
269};
270
271/* 4: ASF Address */
272
273struct acpi_asf_address {
274 struct acpi_asf_header header;
275 u8 eprom_address;
276 u8 devices;
277};
278
970d9c9e
BM
279/*******************************************************************************
280 *
6e2d5ebd
BM
281 * BERT - Boot Error Record Table (ACPI 4.0)
282 * Version 1
970d9c9e
BM
283 *
284 ******************************************************************************/
285
286struct acpi_table_bert {
287 struct acpi_table_header header; /* Common ACPI table header */
288 u32 region_length; /* Length of the boot error region */
b595076a 289 u64 address; /* Physical address of the error region */
970d9c9e
BM
290};
291
6e2d5ebd 292/* Boot Error Region (not a subtable, pointed to by Address field above) */
3fa34777 293
970d9c9e 294struct acpi_bert_region {
6e2d5ebd
BM
295 u32 block_status; /* Type of error information */
296 u32 raw_data_offset; /* Offset to raw error data */
297 u32 raw_data_length; /* Length of raw error data */
298 u32 data_length; /* Length of generic error data */
299 u32 error_severity; /* Severity code */
970d9c9e
BM
300};
301
6e2d5ebd 302/* Values for block_status flags above */
970d9c9e
BM
303
304#define ACPI_BERT_UNCORRECTABLE (1)
6e2d5ebd
BM
305#define ACPI_BERT_CORRECTABLE (1<<1)
306#define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
307#define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
308#define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
309
310/* Values for error_severity above */
311
312enum acpi_bert_error_severity {
313 ACPI_BERT_ERROR_CORRECTABLE = 0,
314 ACPI_BERT_ERROR_FATAL = 1,
315 ACPI_BERT_ERROR_CORRECTED = 2,
316 ACPI_BERT_ERROR_NONE = 3,
317 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
318};
319
320/*
321 * Note: The generic error data that follows the error_severity field above
322 * uses the struct acpi_hest_generic_data defined under the HEST table below
323 */
970d9c9e 324
e62f8227
ES
325/*******************************************************************************
326 *
327 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
328 * Version 1
329 *
330 ******************************************************************************/
331
332struct acpi_table_bgrt {
333 struct acpi_table_header header; /* Common ACPI table header */
334 u16 version;
335 u8 status;
336 u8 image_type;
337 u64 image_address;
338 u32 image_offset_x;
339 u32 image_offset_y;
340};
341
342/* Flags for Status field above */
343
344#define ACPI_BGRT_DISPLAYED (1)
345#define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
346
347/*******************************************************************************
348 *
349 * BOOT - Simple Boot Flag Table
350 * Version 1
351 *
352 * Conforms to the "Simple Boot Flag Specification", Version 2.1
353 *
354 ******************************************************************************/
355
356struct acpi_table_boot {
357 struct acpi_table_header header; /* Common ACPI table header */
358 u8 cmos_index; /* Index in CMOS RAM for the boot register */
359 u8 reserved[3];
360};
361
51aad1a6
BM
362/*******************************************************************************
363 *
364 * CDAT - Coherent Device Attribute Table
365 * Version 1
366 *
367 * Conforms to the "Coherent Device Attribute Table (CDAT) Specification
368 " (Revision 1.01, October 2020.)
369 *
370 ******************************************************************************/
371
372struct acpi_table_cdat {
373 u32 length; /* Length of table in bytes, including this header */
374 u8 revision; /* ACPI Specification minor version number */
375 u8 checksum; /* To make sum of entire table == 0 */
376 u8 reserved[6];
377 u32 sequence; /* Used to detect runtime CDAT table changes */
378};
379
380/* CDAT common subtable header */
381
382struct acpi_cdat_header {
383 u8 type;
384 u8 reserved;
385 u16 length;
386};
387
388/* Values for Type field above */
389
390enum acpi_cdat_type {
391 ACPI_CDAT_TYPE_DSMAS = 0,
392 ACPI_CDAT_TYPE_DSLBIS = 1,
393 ACPI_CDAT_TYPE_DSMSCIS = 2,
394 ACPI_CDAT_TYPE_DSIS = 3,
395 ACPI_CDAT_TYPE_DSEMTS = 4,
396 ACPI_CDAT_TYPE_SSLBIS = 5,
397 ACPI_CDAT_TYPE_RESERVED = 6 /* 6 through 0xFF are reserved */
398};
399
400/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
401
5a9e358f 402struct acpi_cdat_dsmas {
51aad1a6
BM
403 u8 dsmad_handle;
404 u8 flags;
405 u16 reserved;
406 u64 dpa_base_address;
407 u64 dpa_length;
408};
409
410/* Flags for subtable above */
411
6399878f 412#define ACPI_CDAT_DSMAS_NON_VOLATILE (1 << 2)
d62e2ed0
IW
413#define ACPI_CDAT_DSMAS_SHAREABLE (1 << 3)
414#define ACPI_CDAT_DSMAS_READ_ONLY (1 << 6)
51aad1a6
BM
415
416/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */
417
418struct acpi_cdat_dslbis {
419 u8 handle;
420 u8 flags; /* If Handle matches a DSMAS handle, the definition of this field matches
421 * Flags field in HMAT System Locality Latency */
422 u8 data_type;
423 u8 reserved;
424 u64 entry_base_unit;
425 u16 entry[3];
426 u16 reserved2;
427};
428
429/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */
430
431struct acpi_cdat_dsmscis {
432 u8 dsmas_handle;
433 u8 reserved[3];
434 u64 side_cache_size;
435 u32 cache_attributes;
436};
437
438/* Subtable 3: Device Scoped Initiator Structure (DSIS) */
439
440struct acpi_cdat_dsis {
441 u8 flags;
442 u8 handle;
443 u16 reserved;
444};
445
446/* Flags for above subtable */
447
448#define ACPI_CDAT_DSIS_MEM_ATTACHED (1 << 0)
449
450/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */
451
452struct acpi_cdat_dsemts {
453 u8 dsmas_handle;
454 u8 memory_type;
455 u16 reserved;
456 u64 dpa_offset;
457 u64 range_length;
458};
459
460/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */
461
462struct acpi_cdat_sslbis {
463 u8 data_type;
464 u8 reserved[3];
465 u64 entry_base_unit;
466};
467
468/* Sub-subtable for above, sslbe_entries field */
469
470struct acpi_cdat_sslbe {
471 u16 portx_id;
472 u16 porty_id;
473 u16 latency_or_bandwidth;
474 u16 reserved;
475};
476
178e1ea6
DJ
477#define ACPI_CDAT_SSLBIS_US_PORT 0x0100
478#define ACPI_CDAT_SSLBIS_ANY_PORT 0xffff
479
7c5eab72
BW
480/*******************************************************************************
481 *
482 * CEDT - CXL Early Discovery Table
483 * Version 1
484 *
51aad1a6 485 * Conforms to the "CXL Early Discovery Table" (CXL 2.0, October 2020)
7c5eab72
BW
486 *
487 ******************************************************************************/
488
489struct acpi_table_cedt {
490 struct acpi_table_header header; /* Common ACPI table header */
491};
492
493/* CEDT subtable header (Performance Record Structure) */
494
495struct acpi_cedt_header {
496 u8 type;
497 u8 reserved;
498 u16 length;
499};
500
501/* Values for Type field above */
502
503enum acpi_cedt_type {
504 ACPI_CEDT_TYPE_CHBS = 0,
4a2c1dcf 505 ACPI_CEDT_TYPE_CFMWS = 1,
f350c68e
AS
506 ACPI_CEDT_TYPE_CXIMS = 2,
507 ACPI_CEDT_TYPE_RDPAS = 3,
508 ACPI_CEDT_TYPE_RESERVED = 4,
7c5eab72
BW
509};
510
160c768e
AS
511/* Values for version field above */
512
513#define ACPI_CEDT_CHBS_VERSION_CXL11 (0)
514#define ACPI_CEDT_CHBS_VERSION_CXL20 (1)
515
516/* Values for length field above */
517
518#define ACPI_CEDT_CHBS_LENGTH_CXL11 (0x2000)
519#define ACPI_CEDT_CHBS_LENGTH_CXL20 (0x10000)
520
7c5eab72
BW
521/*
522 * CEDT subtables
523 */
524
525/* 0: CXL Host Bridge Structure */
526
527struct acpi_cedt_chbs {
519c8090 528 struct acpi_cedt_header header;
7c5eab72
BW
529 u32 uid;
530 u32 cxl_version;
531 u32 reserved;
532 u64 base;
533 u64 length;
534};
535
4a2c1dcf
AS
536/* 1: CXL Fixed Memory Window Structure */
537
538struct acpi_cedt_cfmws {
539 struct acpi_cedt_header header;
540 u32 reserved1;
541 u64 base_hpa;
542 u64 window_size;
543 u8 interleave_ways;
544 u8 interleave_arithmetic;
545 u16 reserved2;
546 u32 granularity;
547 u16 restrictions;
548 u16 qtg_id;
549 u32 interleave_targets[];
550};
551
a95d2fb0
LH
552struct acpi_cedt_cfmws_target_element {
553 u32 interleave_target;
554};
555
4a2c1dcf
AS
556/* Values for Interleave Arithmetic field above */
557
45882a81 558#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
f350c68e 559#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1)
4a2c1dcf
AS
560
561/* Values for Restrictions field above */
562
45882a81
BM
563#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)
564#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)
565#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
566#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
567#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
4a2c1dcf 568
f350c68e
AS
569/* 2: CXL XOR Interleave Math Structure */
570
571struct acpi_cedt_cxims {
572 struct acpi_cedt_header header;
573 u16 reserved1;
574 u8 hbig;
575 u8 nr_xormaps;
576 u64 xormap_list[];
577};
578
ff418f34
ZR
579struct acpi_cedt_cxims_target_element {
580 u64 xormap;
581};
582
f350c68e
AS
583/* 3: CXL RCEC Downstream Port Association Structure */
584
585struct acpi_cedt_rdpas {
586 struct acpi_cedt_header header;
f350c68e
AS
587 u16 segment;
588 u16 bdf;
589 u8 protocol;
590 u64 address;
591};
592
593/* Masks for bdf field above */
594#define ACPI_CEDT_RDPAS_BUS_MASK 0xff00
595#define ACPI_CEDT_RDPAS_DEVICE_MASK 0x00f8
596#define ACPI_CEDT_RDPAS_FUNCTION_MASK 0x0007
597
598#define ACPI_CEDT_RDPAS_PROTOCOL_IO (0)
599#define ACPI_CEDT_RDPAS_PROTOCOL_CACHEMEM (1)
600
793c2388
BM
601/*******************************************************************************
602 *
6e2d5ebd
BM
603 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
604 * Version 1
793c2388
BM
605 *
606 ******************************************************************************/
607
608struct acpi_table_cpep {
f3d2e786
BM
609 struct acpi_table_header header; /* Common ACPI table header */
610 u64 reserved;
793c2388
BM
611};
612
613/* Subtable */
614
615struct acpi_cpep_polling {
6e2d5ebd 616 struct acpi_subtable_header header;
f3d2e786
BM
617 u8 id; /* Processor ID */
618 u8 eid; /* Processor EID */
619 u32 interval; /* Polling interval (msec) */
793c2388
BM
620};
621
e62f8227
ES
622/*******************************************************************************
623 *
624 * CSRT - Core System Resource Table
625 * Version 0
626 *
627 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
628 *
629 ******************************************************************************/
630
631struct acpi_table_csrt {
632 struct acpi_table_header header; /* Common ACPI table header */
633};
634
635/* Resource Group subtable */
636
637struct acpi_csrt_group {
638 u32 length;
639 u32 vendor_id;
640 u32 subvendor_id;
641 u16 device_id;
642 u16 subdevice_id;
643 u16 revision;
644 u16 reserved;
645 u32 shared_info_length;
646
647 /* Shared data immediately follows (Length = shared_info_length) */
648};
649
650/* Shared Info subtable */
651
652struct acpi_csrt_shared_info {
653 u16 major_version;
654 u16 minor_version;
655 u32 mmio_base_low;
656 u32 mmio_base_high;
657 u32 gsi_interrupt;
658 u8 interrupt_polarity;
659 u8 interrupt_mode;
660 u8 num_channels;
661 u8 dma_address_width;
662 u16 base_request_line;
663 u16 num_handshake_signals;
664 u32 max_block_size;
665
666 /* Resource descriptors immediately follow (Length = Group length - shared_info_length) */
667};
668
669/* Resource Descriptor subtable */
670
671struct acpi_csrt_descriptor {
672 u32 length;
673 u16 type;
674 u16 subtype;
675 u32 uid;
676
677 /* Resource-specific information immediately follows */
678};
679
680/* Resource Types */
681
682#define ACPI_CSRT_TYPE_INTERRUPT 0x0001
683#define ACPI_CSRT_TYPE_TIMER 0x0002
684#define ACPI_CSRT_TYPE_DMA 0x0003
685
686/* Resource Subtypes */
687
688#define ACPI_CSRT_XRUPT_LINE 0x0000
689#define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
690#define ACPI_CSRT_TIMER 0x0000
691#define ACPI_CSRT_DMA_CHANNEL 0x0000
692#define ACPI_CSRT_DMA_CONTROLLER 0x0001
693
694/*******************************************************************************
695 *
696 * DBG2 - Debug Port Table 2
697 * Version 0 (Both main table and subtables)
698 *
200950b6 699 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020
e62f8227
ES
700 *
701 ******************************************************************************/
702
703struct acpi_table_dbg2 {
704 struct acpi_table_header header; /* Common ACPI table header */
705 u32 info_offset;
706 u32 info_count;
707};
708
709struct acpi_dbg2_header {
710 u32 info_offset;
711 u32 info_count;
712};
713
714/* Debug Device Information Subtable */
715
716struct acpi_dbg2_device {
717 u8 revision;
718 u16 length;
719 u8 register_count; /* Number of base_address registers */
720 u16 namepath_length;
721 u16 namepath_offset;
722 u16 oem_data_length;
723 u16 oem_data_offset;
724 u16 port_type;
725 u16 port_subtype;
726 u16 reserved;
727 u16 base_address_offset;
728 u16 address_size_offset;
729 /*
730 * Data that follows:
731 * base_address (required) - Each in 12-byte Generic Address Structure format.
732 * address_size (required) - Array of u32 sizes corresponding to each base_address register.
733 * Namepath (required) - Null terminated string. Single dot if not supported.
734 * oem_data (optional) - Length is oem_data_length.
735 */
736};
737
738/* Types for port_type field above */
739
740#define ACPI_DBG2_SERIAL_PORT 0x8000
741#define ACPI_DBG2_1394_PORT 0x8001
742#define ACPI_DBG2_USB_PORT 0x8002
743#define ACPI_DBG2_NET_PORT 0x8003
744
745/* Subtypes for port_subtype field above */
746
747#define ACPI_DBG2_16550_COMPATIBLE 0x0000
748#define ACPI_DBG2_16550_SUBSET 0x0001
200950b6 749#define ACPI_DBG2_MAX311XE_SPI 0x0002
e62f8227 750#define ACPI_DBG2_ARM_PL011 0x0003
200950b6
MW
751#define ACPI_DBG2_MSM8X60 0x0004
752#define ACPI_DBG2_16550_NVIDIA 0x0005
753#define ACPI_DBG2_TI_OMAP 0x0006
754#define ACPI_DBG2_APM88XXXX 0x0008
755#define ACPI_DBG2_MSM8974 0x0009
756#define ACPI_DBG2_SAM5250 0x000A
757#define ACPI_DBG2_INTEL_USIF 0x000B
758#define ACPI_DBG2_IMX6 0x000C
e62f8227
ES
759#define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
760#define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
761#define ACPI_DBG2_ARM_DCC 0x000F
762#define ACPI_DBG2_BCM2835 0x0010
200950b6
MW
763#define ACPI_DBG2_SDM845_1_8432MHZ 0x0011
764#define ACPI_DBG2_16550_WITH_GAS 0x0012
765#define ACPI_DBG2_SDM845_7_372MHZ 0x0013
766#define ACPI_DBG2_INTEL_LPSS 0x0014
4aca2bef 767#define ACPI_DBG2_RISCV_SBI_CON 0x0015
e62f8227
ES
768
769#define ACPI_DBG2_1394_STANDARD 0x0000
770
771#define ACPI_DBG2_USB_XHCI 0x0000
772#define ACPI_DBG2_USB_EHCI 0x0001
773
774/*******************************************************************************
775 *
776 * DBGP - Debug Port table
777 * Version 1
778 *
779 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
780 *
781 ******************************************************************************/
782
783struct acpi_table_dbgp {
784 struct acpi_table_header header; /* Common ACPI table header */
785 u8 type; /* 0=full 16550, 1=subset of 16550 */
786 u8 reserved[3];
787 struct acpi_generic_address debug_port;
788};
789
790/*******************************************************************************
791 *
792 * DMAR - DMA Remapping table
793 * Version 1
794 *
795 * Conforms to "Intel Virtualization Technology for Directed I/O",
796 * Version 2.3, October 2014
797 *
798 ******************************************************************************/
799
800struct acpi_table_dmar {
801 struct acpi_table_header header; /* Common ACPI table header */
802 u8 width; /* Host Address Width */
803 u8 flags;
804 u8 reserved[10];
805};
806
807/* Masks for Flags field above */
808
809#define ACPI_DMAR_INTR_REMAP (1)
810#define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
811#define ACPI_DMAR_X2APIC_MODE (1<<2)
812
813/* DMAR subtable header */
814
815struct acpi_dmar_header {
816 u16 type;
817 u16 length;
818};
819
820/* Values for subtable type in struct acpi_dmar_header */
821
822enum acpi_dmar_type {
823 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
824 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
825 ACPI_DMAR_TYPE_ROOT_ATS = 2,
826 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
827 ACPI_DMAR_TYPE_NAMESPACE = 4,
81d3c75b 828 ACPI_DMAR_TYPE_SATC = 5,
f61c3949
AN
829 ACPI_DMAR_TYPE_SIDP = 6,
830 ACPI_DMAR_TYPE_RESERVED = 7 /* 7 and greater are reserved */
e62f8227
ES
831};
832
833/* DMAR Device Scope structure */
834
835struct acpi_dmar_device_scope {
836 u8 entry_type;
837 u8 length;
f61c3949
AN
838 u8 flags;
839 u8 reserved;
e62f8227
ES
840 u8 enumeration_id;
841 u8 bus;
842};
843
844/* Values for entry_type in struct acpi_dmar_device_scope - device types */
845
846enum acpi_dmar_scope_type {
847 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
848 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
849 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
850 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
851 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
852 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
853 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
854};
855
856struct acpi_dmar_pci_path {
857 u8 device;
858 u8 function;
859};
860
861/*
862 * DMAR Subtables, correspond to Type in struct acpi_dmar_header
863 */
864
865/* 0: Hardware Unit Definition */
866
867struct acpi_dmar_hardware_unit {
868 struct acpi_dmar_header header;
869 u8 flags;
4db96bfe 870 u8 size; /* Size of the register set */
e62f8227
ES
871 u16 segment;
872 u64 address; /* Register Base Address */
873};
874
875/* Masks for Flags field above */
876
877#define ACPI_DMAR_INCLUDE_ALL (1)
878
c163f90c 879/* 1: Reserved Memory Definition */
e62f8227
ES
880
881struct acpi_dmar_reserved_memory {
882 struct acpi_dmar_header header;
883 u16 reserved;
884 u16 segment;
885 u64 base_address; /* 4K aligned base address */
886 u64 end_address; /* 4K aligned limit address */
887};
888
889/* Masks for Flags field above */
890
891#define ACPI_DMAR_ALLOW_ALL (1)
892
893/* 2: Root Port ATS Capability Reporting Structure */
894
895struct acpi_dmar_atsr {
896 struct acpi_dmar_header header;
897 u8 flags;
898 u8 reserved;
899 u16 segment;
900};
901
902/* Masks for Flags field above */
903
904#define ACPI_DMAR_ALL_PORTS (1)
905
906/* 3: Remapping Hardware Static Affinity Structure */
907
908struct acpi_dmar_rhsa {
909 struct acpi_dmar_header header;
910 u32 reserved;
911 u64 base_address;
912 u32 proximity_domain;
913};
914
915/* 4: ACPI Namespace Device Declaration Structure */
916
917struct acpi_dmar_andd {
918 struct acpi_dmar_header header;
919 u8 reserved[3];
920 u8 device_number;
49bd783e
KC
921 union {
922 char __pad;
923 ACPI_FLEX_ARRAY(char, device_name);
924 };
e62f8227
ES
925};
926
81d3c75b
YC
927/* 5: SOC Integrated Address Translation Cache Reporting Structure */
928
929struct acpi_dmar_satc {
930 struct acpi_dmar_header header;
931 u8 flags;
932 u8 reserved;
933 u16 segment;
934};
f61c3949
AN
935
936/* 6: so_c Integrated Device Property Reporting Structure */
937
938struct acpi_dmar_sidp {
939 struct acpi_dmar_header header;
940 u16 reserved;
941 u16 segment;
942};
943
e62f8227
ES
944/*******************************************************************************
945 *
946 * DRTM - Dynamic Root of Trust for Measurement table
947 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
948 * Table version 1
949 *
950 ******************************************************************************/
951
952struct acpi_table_drtm {
953 struct acpi_table_header header; /* Common ACPI table header */
954 u64 entry_base_address;
955 u64 entry_length;
956 u32 entry_address32;
957 u64 entry_address64;
958 u64 exit_address;
959 u64 log_area_address;
960 u32 log_area_length;
961 u64 arch_dependent_address;
962 u32 flags;
963};
964
965/* Flag Definitions for above */
966
967#define ACPI_DRTM_ACCESS_ALLOWED (1)
968#define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
969#define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
970#define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
971
972/* 1) Validated Tables List (64-bit addresses) */
973
974struct acpi_drtm_vtable_list {
975 u32 validated_table_count;
48ff467c 976 u64 validated_tables[];
e62f8227
ES
977};
978
979/* 2) Resources List (of Resource Descriptors) */
980
981/* Resource Descriptor */
982
983struct acpi_drtm_resource {
984 u8 size[7];
985 u8 type;
986 u64 address;
987};
988
989struct acpi_drtm_resource_list {
990 u32 resource_count;
48ff467c 991 struct acpi_drtm_resource resources[];
e62f8227
ES
992};
993
994/* 3) Platform-specific Identifiers List */
995
996struct acpi_drtm_dps_id {
997 u32 dps_id_length;
998 u8 dps_id[16];
999};
1000
793c2388
BM
1001/*******************************************************************************
1002 *
1003 * ECDT - Embedded Controller Boot Resources Table
6e2d5ebd 1004 * Version 1
793c2388
BM
1005 *
1006 ******************************************************************************/
1007
f3d2e786
BM
1008struct acpi_table_ecdt {
1009 struct acpi_table_header header; /* Common ACPI table header */
1010 struct acpi_generic_address control; /* Address of EC command/status register */
1011 struct acpi_generic_address data; /* Address of EC data register */
793c2388 1012 u32 uid; /* Unique ID - must be same as the EC _UID method */
f3d2e786 1013 u8 gpe; /* The GPE for the EC */
48ff467c 1014 u8 id[]; /* Full namepath of the EC in the ACPI namespace */
793c2388
BM
1015};
1016
970d9c9e
BM
1017/*******************************************************************************
1018 *
6e2d5ebd
BM
1019 * EINJ - Error Injection Table (ACPI 4.0)
1020 * Version 1
970d9c9e
BM
1021 *
1022 ******************************************************************************/
1023
1024struct acpi_table_einj {
1025 struct acpi_table_header header; /* Common ACPI table header */
1026 u32 header_length;
6e2d5ebd
BM
1027 u8 flags;
1028 u8 reserved[3];
970d9c9e
BM
1029 u32 entries;
1030};
1031
1032/* EINJ Injection Instruction Entries (actions) */
1033
1034struct acpi_einj_entry {
1035 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
1036};
1037
6e2d5ebd
BM
1038/* Masks for Flags field above */
1039
1040#define ACPI_EINJ_PRESERVE (1)
1041
970d9c9e
BM
1042/* Values for Action field above */
1043
1044enum acpi_einj_actions {
5d2f7e76
ZA
1045 ACPI_EINJ_BEGIN_OPERATION = 0x0,
1046 ACPI_EINJ_GET_TRIGGER_TABLE = 0x1,
1047 ACPI_EINJ_SET_ERROR_TYPE = 0x2,
1048 ACPI_EINJ_GET_ERROR_TYPE = 0x3,
1049 ACPI_EINJ_END_OPERATION = 0x4,
1050 ACPI_EINJ_EXECUTE_OPERATION = 0x5,
1051 ACPI_EINJ_CHECK_BUSY_STATUS = 0x6,
1052 ACPI_EINJ_GET_COMMAND_STATUS = 0x7,
1053 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 0x8,
1054 ACPI_EINJ_GET_EXECUTE_TIMINGS = 0x9,
56b594fd
ZA
1055 ACPI_EINJV2_GET_ERROR_TYPE = 0x11,
1056 ACPI_EINJ_ACTION_RESERVED = 0x12, /* 0x12 and greater are reserved */
970d9c9e
BM
1057 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
1058};
1059
1060/* Values for Instruction field above */
1061
1062enum acpi_einj_instructions {
1063 ACPI_EINJ_READ_REGISTER = 0,
1064 ACPI_EINJ_READ_REGISTER_VALUE = 1,
1065 ACPI_EINJ_WRITE_REGISTER = 2,
1066 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
1067 ACPI_EINJ_NOOP = 4,
c5bd6537
BM
1068 ACPI_EINJ_FLUSH_CACHELINE = 5,
1069 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
1070};
1071
1072struct acpi_einj_error_type_with_addr {
1073 u32 error_type;
1074 u32 vendor_struct_offset;
1075 u32 flags;
1076 u32 apic_id;
1077 u64 address;
1078 u64 range;
1079 u32 pcie_id;
1080};
1081
1082struct acpi_einj_vendor {
1083 u32 length;
1084 u32 pcie_id;
1085 u16 vendor_id;
1086 u16 device_id;
1087 u8 revision_id;
1088 u8 reserved[3];
970d9c9e
BM
1089};
1090
3fa34777
BM
1091/* EINJ Trigger Error Action Table */
1092
1093struct acpi_einj_trigger {
1094 u32 header_size;
1095 u32 revision;
1096 u32 table_size;
1097 u32 entry_count;
1098};
1099
6e2d5ebd
BM
1100/* Command status return values */
1101
1102enum acpi_einj_command_status {
1103 ACPI_EINJ_SUCCESS = 0,
1104 ACPI_EINJ_FAILURE = 1,
1105 ACPI_EINJ_INVALID_ACCESS = 2,
1106 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
1107};
1108
1109/* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
1110
1111#define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
1112#define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
1113#define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
1114#define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
1115#define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
1116#define ACPI_EINJ_MEMORY_FATAL (1<<5)
1117#define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
1118#define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
1119#define ACPI_EINJ_PCIX_FATAL (1<<8)
1120#define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
1121#define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
1122#define ACPI_EINJ_PLATFORM_FATAL (1<<11)
cd1b3082
BC
1123#define ACPI_EINJ_CXL_CACHE_CORRECTABLE (1<<12)
1124#define ACPI_EINJ_CXL_CACHE_UNCORRECTABLE (1<<13)
1125#define ACPI_EINJ_CXL_CACHE_FATAL (1<<14)
1126#define ACPI_EINJ_CXL_MEM_CORRECTABLE (1<<15)
1127#define ACPI_EINJ_CXL_MEM_UNCORRECTABLE (1<<16)
1128#define ACPI_EINJ_CXL_MEM_FATAL (1<<17)
c5bd6537 1129#define ACPI_EINJ_VENDOR_DEFINED (1<<31)
6e2d5ebd 1130
970d9c9e
BM
1131/*******************************************************************************
1132 *
6e2d5ebd
BM
1133 * ERST - Error Record Serialization Table (ACPI 4.0)
1134 * Version 1
970d9c9e
BM
1135 *
1136 ******************************************************************************/
1137
1138struct acpi_table_erst {
1139 struct acpi_table_header header; /* Common ACPI table header */
1140 u32 header_length;
1141 u32 reserved;
1142 u32 entries;
1143};
1144
1145/* ERST Serialization Entries (actions) */
1146
1147struct acpi_erst_entry {
1148 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
1149};
1150
6e2d5ebd
BM
1151/* Masks for Flags field above */
1152
1153#define ACPI_ERST_PRESERVE (1)
1154
970d9c9e
BM
1155/* Values for Action field above */
1156
1157enum acpi_erst_actions {
6e2d5ebd
BM
1158 ACPI_ERST_BEGIN_WRITE = 0,
1159 ACPI_ERST_BEGIN_READ = 1,
1160 ACPI_ERST_BEGIN_CLEAR = 2,
1161 ACPI_ERST_END = 3,
970d9c9e
BM
1162 ACPI_ERST_SET_RECORD_OFFSET = 4,
1163 ACPI_ERST_EXECUTE_OPERATION = 5,
1164 ACPI_ERST_CHECK_BUSY_STATUS = 6,
1165 ACPI_ERST_GET_COMMAND_STATUS = 7,
6e2d5ebd
BM
1166 ACPI_ERST_GET_RECORD_ID = 8,
1167 ACPI_ERST_SET_RECORD_ID = 9,
970d9c9e
BM
1168 ACPI_ERST_GET_RECORD_COUNT = 10,
1169 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
1170 ACPI_ERST_NOT_USED = 12,
1171 ACPI_ERST_GET_ERROR_RANGE = 13,
1172 ACPI_ERST_GET_ERROR_LENGTH = 14,
1173 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
a88e0ce6
BM
1174 ACPI_ERST_EXECUTE_TIMINGS = 16,
1175 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
970d9c9e
BM
1176};
1177
1178/* Values for Instruction field above */
1179
1180enum acpi_erst_instructions {
1181 ACPI_ERST_READ_REGISTER = 0,
1182 ACPI_ERST_READ_REGISTER_VALUE = 1,
1183 ACPI_ERST_WRITE_REGISTER = 2,
1184 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
1185 ACPI_ERST_NOOP = 4,
1186 ACPI_ERST_LOAD_VAR1 = 5,
1187 ACPI_ERST_LOAD_VAR2 = 6,
1188 ACPI_ERST_STORE_VAR1 = 7,
1189 ACPI_ERST_ADD = 8,
1190 ACPI_ERST_SUBTRACT = 9,
1191 ACPI_ERST_ADD_VALUE = 10,
1192 ACPI_ERST_SUBTRACT_VALUE = 11,
1193 ACPI_ERST_STALL = 12,
1194 ACPI_ERST_STALL_WHILE_TRUE = 13,
1195 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
1196 ACPI_ERST_GOTO = 15,
1197 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
1198 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
1199 ACPI_ERST_MOVE_DATA = 18,
1200 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
1201};
1202
6e2d5ebd
BM
1203/* Command status return values */
1204
1205enum acpi_erst_command_status {
54a2a15a 1206 ACPI_ERST_SUCCESS = 0,
6e2d5ebd
BM
1207 ACPI_ERST_NO_SPACE = 1,
1208 ACPI_ERST_NOT_AVAILABLE = 2,
1209 ACPI_ERST_FAILURE = 3,
1210 ACPI_ERST_RECORD_EMPTY = 4,
1211 ACPI_ERST_NOT_FOUND = 5,
1212 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
1213};
1214
1215/* Error Record Serialization Information */
1216
1217struct acpi_erst_info {
1218 u16 signature; /* Should be "ER" */
1219 u8 data[48];
1220};
1221
970d9c9e
BM
1222/*******************************************************************************
1223 *
e62f8227 1224 * FPDT - Firmware Performance Data Table (ACPI 5.0)
6e2d5ebd 1225 * Version 1
970d9c9e
BM
1226 *
1227 ******************************************************************************/
1228
e62f8227 1229struct acpi_table_fpdt {
970d9c9e 1230 struct acpi_table_header header; /* Common ACPI table header */
970d9c9e
BM
1231};
1232
e62f8227 1233/* FPDT subtable header (Performance Record Structure) */
3fa34777 1234
e62f8227 1235struct acpi_fpdt_header {
3fa34777 1236 u16 type;
e62f8227
ES
1237 u8 length;
1238 u8 revision;
3fa34777
BM
1239};
1240
e62f8227
ES
1241/* Values for Type field above */
1242
1243enum acpi_fpdt_type {
1244 ACPI_FPDT_TYPE_BOOT = 0,
1245 ACPI_FPDT_TYPE_S3PERF = 1
1246};
1247
1248/*
1249 * FPDT subtables
1250 */
1251
1252/* 0: Firmware Basic Boot Performance Record */
1253
1254struct acpi_fpdt_boot_pointer {
1255 struct acpi_fpdt_header header;
1256 u8 reserved[4];
1257 u64 address;
1258};
1259
1260/* 1: S3 Performance Table Pointer Record */
1261
1262struct acpi_fpdt_s3pt_pointer {
1263 struct acpi_fpdt_header header;
1264 u8 reserved[4];
1265 u64 address;
1266};
1267
1268/*
1269 * S3PT - S3 Performance Table. This table is pointed to by the
1270 * S3 Pointer Record above.
1271 */
1272struct acpi_table_s3pt {
1273 u8 signature[4]; /* "S3PT" */
1274 u32 length;
1275};
1276
1277/*
1278 * S3PT Subtables (Not part of the actual FPDT)
1279 */
1280
1281/* Values for Type field in S3PT header */
1282
1283enum acpi_s3pt_type {
1284 ACPI_S3PT_TYPE_RESUME = 0,
1285 ACPI_S3PT_TYPE_SUSPEND = 1,
1286 ACPI_FPDT_BOOT_PERFORMANCE = 2
1287};
1288
1289struct acpi_s3pt_resume {
1290 struct acpi_fpdt_header header;
1291 u32 resume_count;
1292 u64 full_resume;
1293 u64 average_resume;
1294};
1295
1296struct acpi_s3pt_suspend {
1297 struct acpi_fpdt_header header;
1298 u64 suspend_start;
1299 u64 suspend_end;
1300};
1301
1302/*
1303 * FPDT Boot Performance Record (Not part of the actual FPDT)
1304 */
1305struct acpi_fpdt_boot {
1306 struct acpi_fpdt_header header;
1307 u8 reserved[4];
1308 u64 reset_end;
1309 u64 load_start;
1310 u64 startup_start;
1311 u64 exit_services_entry;
1312 u64 exit_services_exit;
1313};
1314
1315/*******************************************************************************
1316 *
1317 * GTDT - Generic Timer Description Table (ACPI 5.1)
1318 * Version 2
1319 *
1320 ******************************************************************************/
1321
1322struct acpi_table_gtdt {
1323 struct acpi_table_header header; /* Common ACPI table header */
1324 u64 counter_block_addresss;
1325 u32 reserved;
1326 u32 secure_el1_interrupt;
1327 u32 secure_el1_flags;
1328 u32 non_secure_el1_interrupt;
1329 u32 non_secure_el1_flags;
1330 u32 virtual_timer_interrupt;
1331 u32 virtual_timer_flags;
1332 u32 non_secure_el2_interrupt;
1333 u32 non_secure_el2_flags;
1334 u64 counter_read_block_address;
1335 u32 platform_timer_count;
1336 u32 platform_timer_offset;
1337};
1338
1339/* Flag Definitions: Timer Block Physical Timers and Virtual timers */
1340
1341#define ACPI_GTDT_INTERRUPT_MODE (1)
1342#define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
1343#define ACPI_GTDT_ALWAYS_ON (1<<2)
1344
8f5a14d0
ES
1345struct acpi_gtdt_el2 {
1346 u32 virtual_el2_timer_gsiv;
1347 u32 virtual_el2_timer_flags;
1348};
1349
e62f8227
ES
1350/* Common GTDT subtable header */
1351
1352struct acpi_gtdt_header {
1353 u8 type;
1354 u16 length;
1355};
1356
1357/* Values for GTDT subtable type above */
1358
1359enum acpi_gtdt_type {
1360 ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
1361 ACPI_GTDT_TYPE_WATCHDOG = 1,
1362 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
1363};
1364
1365/* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */
1366
1367/* 0: Generic Timer Block */
1368
1369struct acpi_gtdt_timer_block {
1370 struct acpi_gtdt_header header;
1371 u8 reserved;
1372 u64 block_address;
1373 u32 timer_count;
1374 u32 timer_offset;
1375};
1376
1377/* Timer Sub-Structure, one per timer */
1378
1379struct acpi_gtdt_timer_entry {
1380 u8 frame_number;
1381 u8 reserved[3];
1382 u64 base_address;
1383 u64 el0_base_address;
1384 u32 timer_interrupt;
1385 u32 timer_flags;
1386 u32 virtual_timer_interrupt;
1387 u32 virtual_timer_flags;
1388 u32 common_flags;
1389};
1390
1391/* Flag Definitions: timer_flags and virtual_timer_flags above */
1392
1393#define ACPI_GTDT_GT_IRQ_MODE (1)
1394#define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
1395
1396/* Flag Definitions: common_flags above */
1397
1398#define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
1399#define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
1400
1401/* 1: SBSA Generic Watchdog Structure */
1402
1403struct acpi_gtdt_watchdog {
1404 struct acpi_gtdt_header header;
1405 u8 reserved;
1406 u64 refresh_frame_address;
1407 u64 control_frame_address;
1408 u32 timer_interrupt;
1409 u32 timer_flags;
1410};
1411
1412/* Flag Definitions: timer_flags above */
1413
1414#define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
1415#define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
1416#define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
1417
1418/*******************************************************************************
1419 *
1420 * HEST - Hardware Error Source Table (ACPI 4.0)
1421 * Version 1
1422 *
1423 ******************************************************************************/
1424
1425struct acpi_table_hest {
1426 struct acpi_table_header header; /* Common ACPI table header */
1427 u32 error_source_count;
1428};
1429
1430/* HEST subtable header */
1431
1432struct acpi_hest_header {
1433 u16 type;
1434 u16 source_id;
1435};
1436
1437/* Values for Type field above for subtables */
3fa34777
BM
1438
1439enum acpi_hest_types {
6e2d5ebd
BM
1440 ACPI_HEST_TYPE_IA32_CHECK = 0,
1441 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
1442 ACPI_HEST_TYPE_IA32_NMI = 2,
1443 ACPI_HEST_TYPE_NOT_USED3 = 3,
1444 ACPI_HEST_TYPE_NOT_USED4 = 4,
1445 ACPI_HEST_TYPE_NOT_USED5 = 5,
3fa34777
BM
1446 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
1447 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
1448 ACPI_HEST_TYPE_AER_BRIDGE = 8,
6e2d5ebd 1449 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
7cd55c76 1450 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
c042933d
BM
1451 ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,
1452 ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */
3fa34777
BM
1453};
1454
1455/*
6e2d5ebd 1456 * HEST substructures contained in subtables
3fa34777
BM
1457 */
1458
6e2d5ebd
BM
1459/*
1460 * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and
1461 * struct acpi_hest_ia_corrected structures.
1462 */
1463struct acpi_hest_ia_error_bank {
3fa34777
BM
1464 u8 bank_number;
1465 u8 clear_status_on_init;
1466 u8 status_format;
6e2d5ebd 1467 u8 reserved;
3fa34777 1468 u32 control_register;
6e2d5ebd 1469 u64 control_data;
3fa34777
BM
1470 u32 status_register;
1471 u32 address_register;
1472 u32 misc_register;
1473};
1474
6e2d5ebd 1475/* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
3fa34777
BM
1476
1477struct acpi_hest_aer_common {
6e2d5ebd 1478 u16 reserved1;
3fa34777
BM
1479 u8 flags;
1480 u8 enabled;
c276e388 1481 u32 records_to_preallocate;
3fa34777 1482 u32 max_sections_per_record;
4059a310 1483 u32 bus; /* Bus and Segment numbers */
3fa34777
BM
1484 u16 device;
1485 u16 function;
1486 u16 device_control;
6e2d5ebd 1487 u16 reserved2;
c276e388
BM
1488 u32 uncorrectable_mask;
1489 u32 uncorrectable_severity;
1490 u32 correctable_mask;
1491 u32 advanced_capabilities;
3fa34777
BM
1492};
1493
6e2d5ebd
BM
1494/* Masks for HEST Flags fields */
1495
1496#define ACPI_HEST_FIRMWARE_FIRST (1)
1497#define ACPI_HEST_GLOBAL (1<<1)
2e166c73 1498#define ACPI_HEST_GHES_ASSIST (1<<2)
6e2d5ebd 1499
4059a310
BD
1500/*
1501 * Macros to access the bus/segment numbers in Bus field above:
1502 * Bus number is encoded in bits 7:0
1503 * Segment number is encoded in bits 23:8
1504 */
1505#define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
1506#define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)
1507
3fa34777
BM
1508/* Hardware Error Notification */
1509
1510struct acpi_hest_notify {
1511 u8 type;
1512 u8 length;
1513 u16 config_write_enable;
1514 u32 poll_interval;
1515 u32 vector;
1516 u32 polling_threshold_value;
1517 u32 polling_threshold_window;
1518 u32 error_threshold_value;
1519 u32 error_threshold_window;
1520};
1521
1522/* Values for Notify Type field above */
1523
1524enum acpi_hest_notify_types {
1525 ACPI_HEST_NOTIFY_POLLED = 0,
1526 ACPI_HEST_NOTIFY_EXTERNAL = 1,
1527 ACPI_HEST_NOTIFY_LOCAL = 2,
1528 ACPI_HEST_NOTIFY_SCI = 3,
1529 ACPI_HEST_NOTIFY_NMI = 4,
ca4a0314
BM
1530 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
1531 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
7cd55c76
BM
1532 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
1533 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
1534 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
1535 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
4a8a6058
BM
1536 ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */
1537 ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */
3fa34777
BM
1538};
1539
6e2d5ebd
BM
1540/* Values for config_write_enable bitfield above */
1541
1542#define ACPI_HEST_TYPE (1)
1543#define ACPI_HEST_POLL_INTERVAL (1<<1)
1544#define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
1545#define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
1546#define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
1547#define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
1548
3fa34777
BM
1549/*
1550 * HEST subtables
3fa34777
BM
1551 */
1552
6e2d5ebd 1553/* 0: IA32 Machine Check Exception */
3fa34777 1554
6e2d5ebd 1555struct acpi_hest_ia_machine_check {
3fa34777 1556 struct acpi_hest_header header;
6e2d5ebd 1557 u16 reserved1;
c042933d 1558 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
6e2d5ebd 1559 u8 enabled;
c276e388 1560 u32 records_to_preallocate;
3fa34777
BM
1561 u32 max_sections_per_record;
1562 u64 global_capability_data;
1563 u64 global_control_data;
1564 u8 num_hardware_banks;
6e2d5ebd 1565 u8 reserved3[7];
3fa34777
BM
1566};
1567
6e2d5ebd 1568/* 1: IA32 Corrected Machine Check */
3fa34777 1569
1872bbc9 1570struct acpi_hest_ia_corrected {
3fa34777 1571 struct acpi_hest_header header;
6e2d5ebd 1572 u16 reserved1;
c042933d 1573 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
3fa34777 1574 u8 enabled;
c276e388 1575 u32 records_to_preallocate;
3fa34777
BM
1576 u32 max_sections_per_record;
1577 struct acpi_hest_notify notify;
1578 u8 num_hardware_banks;
6e2d5ebd 1579 u8 reserved2[3];
3fa34777
BM
1580};
1581
6e2d5ebd 1582/* 2: IA32 Non-Maskable Interrupt */
3fa34777 1583
6e2d5ebd 1584struct acpi_hest_ia_nmi {
3fa34777 1585 struct acpi_hest_header header;
3fa34777 1586 u32 reserved;
c276e388 1587 u32 records_to_preallocate;
3fa34777
BM
1588 u32 max_sections_per_record;
1589 u32 max_raw_data_length;
1590};
1591
6e2d5ebd 1592/* 3,4,5: Not used */
3fa34777
BM
1593
1594/* 6: PCI Express Root Port AER */
1595
1596struct acpi_hest_aer_root {
1597 struct acpi_hest_header header;
1598 struct acpi_hest_aer_common aer;
1599 u32 root_error_command;
1600};
1601
1602/* 7: PCI Express AER (AER Endpoint) */
1603
1604struct acpi_hest_aer {
1605 struct acpi_hest_header header;
1606 struct acpi_hest_aer_common aer;
1607};
1608
1609/* 8: PCI Express/PCI-X Bridge AER */
1610
1611struct acpi_hest_aer_bridge {
1612 struct acpi_hest_header header;
1613 struct acpi_hest_aer_common aer;
c276e388
BM
1614 u32 uncorrectable_mask2;
1615 u32 uncorrectable_severity2;
1616 u32 advanced_capabilities2;
3fa34777
BM
1617};
1618
1619/* 9: Generic Hardware Error Source */
1620
1621struct acpi_hest_generic {
1622 struct acpi_hest_header header;
3fa34777 1623 u16 related_source_id;
6e2d5ebd 1624 u8 reserved;
3fa34777 1625 u8 enabled;
c276e388 1626 u32 records_to_preallocate;
3fa34777
BM
1627 u32 max_sections_per_record;
1628 u32 max_raw_data_length;
1629 struct acpi_generic_address error_status_address;
1630 struct acpi_hest_notify notify;
6e2d5ebd
BM
1631 u32 error_block_length;
1632};
1633
7cd55c76
BM
1634/* 10: Generic Hardware Error Source, version 2 */
1635
1636struct acpi_hest_generic_v2 {
1637 struct acpi_hest_header header;
1638 u16 related_source_id;
1639 u8 reserved;
1640 u8 enabled;
1641 u32 records_to_preallocate;
1642 u32 max_sections_per_record;
1643 u32 max_raw_data_length;
1644 struct acpi_generic_address error_status_address;
1645 struct acpi_hest_notify notify;
1646 u32 error_block_length;
1647 struct acpi_generic_address read_ack_register;
1648 u64 read_ack_preserve;
1649 u64 read_ack_write;
1650};
1651
6e2d5ebd
BM
1652/* Generic Error Status block */
1653
0a00fd5e 1654struct acpi_hest_generic_status {
6e2d5ebd
BM
1655 u32 block_status;
1656 u32 raw_data_offset;
1657 u32 raw_data_length;
1658 u32 data_length;
1659 u32 error_severity;
1660};
1661
1662/* Values for block_status flags above */
1663
0a00fd5e
LZ
1664#define ACPI_HEST_UNCORRECTABLE (1)
1665#define ACPI_HEST_CORRECTABLE (1<<1)
1666#define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
1667#define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
1668#define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
6e2d5ebd
BM
1669
1670/* Generic Error Data entry */
1671
0a00fd5e 1672struct acpi_hest_generic_data {
6e2d5ebd
BM
1673 u8 section_type[16];
1674 u32 error_severity;
1675 u16 revision;
1676 u8 validation_bits;
1677 u8 flags;
1678 u32 error_data_length;
1679 u8 fru_id[16];
1680 u8 fru_text[20];
3fa34777 1681};
970d9c9e 1682
7cd55c76
BM
1683/* Extension for revision 0x0300 */
1684
1685struct acpi_hest_generic_data_v300 {
1686 u8 section_type[16];
1687 u32 error_severity;
1688 u16 revision;
1689 u8 validation_bits;
1690 u8 flags;
1691 u32 error_data_length;
1692 u8 fru_id[16];
1693 u8 fru_text[20];
1694 u64 time_stamp;
1695};
1696
1697/* Values for error_severity above */
1698
1699#define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
1700#define ACPI_HEST_GEN_ERROR_FATAL 1
1701#define ACPI_HEST_GEN_ERROR_CORRECTED 2
1702#define ACPI_HEST_GEN_ERROR_NONE 3
1703
1704/* Flags for validation_bits above */
1705
1706#define ACPI_HEST_GEN_VALID_FRU_ID (1)
1707#define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
1708#define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
1709
c042933d
BM
1710/* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
1711
1712struct acpi_hest_ia_deferred_check {
1713 struct acpi_hest_header header;
1714 u16 reserved1;
1715 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
1716 u8 enabled;
1717 u32 records_to_preallocate;
1718 u32 max_sections_per_record;
1719 struct acpi_hest_notify notify;
1720 u8 num_hardware_banks;
1721 u8 reserved2[3];
1722};
1723
fa418ddf
LZ
1724/*******************************************************************************
1725 *
1726 * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
1727 * Version 1
1728 *
1729 ******************************************************************************/
1730
1731struct acpi_table_hmat {
1732 struct acpi_table_header header; /* Common ACPI table header */
1733 u32 reserved;
1734};
1735
1736/* Values for HMAT structure types */
1737
1738enum acpi_hmat_type {
57f5cf6e 1739 ACPI_HMAT_TYPE_PROXIMITY = 0, /* Memory proximity domain attributes */
fa418ddf
LZ
1740 ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
1741 ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
1742 ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
1743};
1744
1745struct acpi_hmat_structure {
1746 u16 type;
1747 u16 reserved;
1748 u32 length;
1749};
1750
1751/*
1752 * HMAT Structures, correspond to Type in struct acpi_hmat_structure
1753 */
1754
9a8d961f 1755/* 0: Memory proximity domain attributes */
fa418ddf 1756
9a8d961f 1757struct acpi_hmat_proximity_domain {
fa418ddf
LZ
1758 struct acpi_hmat_structure header;
1759 u16 flags;
1760 u16 reserved1;
1761 u32 processor_PD; /* Processor proximity domain */
1762 u32 memory_PD; /* Memory proximity domain */
1763 u32 reserved2;
9a8d961f
ES
1764 u64 reserved3;
1765 u64 reserved4;
fa418ddf
LZ
1766};
1767
1768/* Masks for Flags field above */
1769
1770#define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: processor_PD field is valid */
1771#define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: memory_PD field is valid */
1772#define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
1773
1774/* 1: System locality latency and bandwidth information */
1775
1776struct acpi_hmat_locality {
1777 struct acpi_hmat_structure header;
1778 u8 flags;
1779 u8 data_type;
f1489db6
BM
1780 u8 min_transfer_size;
1781 u8 reserved1;
fa418ddf
LZ
1782 u32 number_of_initiator_Pds;
1783 u32 number_of_target_Pds;
1784 u32 reserved2;
1785 u64 entry_base_unit;
1786};
1787
1788/* Masks for Flags field above */
1789
f1489db6 1790#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */
fa418ddf 1791
f1489db6 1792/* Values for Memory Hierarchy flags */
fa418ddf
LZ
1793
1794#define ACPI_HMAT_MEMORY 0
1795#define ACPI_HMAT_LAST_LEVEL_CACHE 1
1796#define ACPI_HMAT_1ST_LEVEL_CACHE 2
1797#define ACPI_HMAT_2ND_LEVEL_CACHE 3
1798#define ACPI_HMAT_3RD_LEVEL_CACHE 4
f1489db6
BM
1799#define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */
1800#define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */
1801
fa418ddf
LZ
1802
1803/* Values for data_type field above */
1804
1805#define ACPI_HMAT_ACCESS_LATENCY 0
1806#define ACPI_HMAT_READ_LATENCY 1
1807#define ACPI_HMAT_WRITE_LATENCY 2
1808#define ACPI_HMAT_ACCESS_BANDWIDTH 3
1809#define ACPI_HMAT_READ_BANDWIDTH 4
1810#define ACPI_HMAT_WRITE_BANDWIDTH 5
1811
1812/* 2: Memory side cache information */
1813
1814struct acpi_hmat_cache {
1815 struct acpi_hmat_structure header;
1816 u32 memory_PD;
1817 u32 reserved1;
1818 u64 cache_size;
1819 u32 cache_attributes;
6143f961 1820 u16 address_mode;
fa418ddf
LZ
1821 u16 number_of_SMBIOShandles;
1822};
1823
1824/* Masks for cache_attributes field above */
1825
1826#define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)
1827#define ACPI_HMAT_CACHE_LEVEL (0x000000F0)
1828#define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)
1829#define ACPI_HMAT_WRITE_POLICY (0x0000F000)
1830#define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)
1831
6143f961
DJ
1832#define ACPI_HMAT_CACHE_MODE_UNKNOWN (0)
1833#define ACPI_HMAT_CACHE_MODE_EXTENDED_LINEAR (1)
1834
fa418ddf
LZ
1835/* Values for cache associativity flag */
1836
1837#define ACPI_HMAT_CA_NONE (0)
1838#define ACPI_HMAT_CA_DIRECT_MAPPED (1)
1839#define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)
1840
1841/* Values for write policy flag */
1842
1843#define ACPI_HMAT_CP_NONE (0)
1844#define ACPI_HMAT_CP_WB (1)
1845#define ACPI_HMAT_CP_WT (2)
1846
793c2388
BM
1847/*******************************************************************************
1848 *
e62f8227 1849 * HPET - High Precision Event Timer table
6e2d5ebd
BM
1850 * Version 1
1851 *
e62f8227
ES
1852 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
1853 * Version 1.0a, October 2004
81b7cb92
BM
1854 *
1855 ******************************************************************************/
1856
e62f8227 1857struct acpi_table_hpet {
81b7cb92 1858 struct acpi_table_header header; /* Common ACPI table header */
e62f8227
ES
1859 u32 id; /* Hardware ID of event timer block */
1860 struct acpi_generic_address address; /* Address of event timer block */
1861 u8 sequence; /* HPET sequence number */
1862 u16 minimum_tick; /* Main counter min tick, periodic mode */
4c189c9d 1863 u8 flags;
81b7cb92
BM
1864};
1865
e62f8227 1866/* Masks for Flags field above */
e3860b5e 1867
e62f8227 1868#define ACPI_HPET_PAGE_PROTECT_MASK (3)
e3860b5e 1869
e62f8227 1870/* Values for Page Protect flags */
b8355bca 1871
e62f8227
ES
1872enum acpi_hpet_page_protect {
1873 ACPI_HPET_NO_PAGE_PROTECT = 0,
1874 ACPI_HPET_PAGE_PROTECT4 = 1,
1875 ACPI_HPET_PAGE_PROTECT64 = 2
b8355bca
LZ
1876};
1877
793c2388
BM
1878/*******************************************************************************
1879 *
e62f8227 1880 * IBFT - Boot Firmware Table
6e2d5ebd 1881 * Version 1
793c2388 1882 *
e62f8227
ES
1883 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
1884 * Specification", Version 1.01, March 1, 2007
4c189c9d 1885 *
e62f8227
ES
1886 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
1887 * Therefore, it is not currently supported by the disassembler.
4c189c9d
BM
1888 *
1889 ******************************************************************************/
1890
e62f8227 1891struct acpi_table_ibft {
4c189c9d 1892 struct acpi_table_header header; /* Common ACPI table header */
e62f8227 1893 u8 reserved[12];
4c189c9d
BM
1894};
1895
e62f8227
ES
1896/* IBFT common subtable header */
1897
1898struct acpi_ibft_header {
4c189c9d 1899 u8 type;
e62f8227 1900 u8 version;
4c189c9d 1901 u16 length;
e62f8227
ES
1902 u8 index;
1903 u8 flags;
4c189c9d
BM
1904};
1905
e62f8227 1906/* Values for Type field above */
a618c7f8 1907
e62f8227
ES
1908enum acpi_ibft_type {
1909 ACPI_IBFT_TYPE_NOT_USED = 0,
1910 ACPI_IBFT_TYPE_CONTROL = 1,
1911 ACPI_IBFT_TYPE_INITIATOR = 2,
1912 ACPI_IBFT_TYPE_NIC = 3,
1913 ACPI_IBFT_TYPE_TARGET = 4,
1914 ACPI_IBFT_TYPE_EXTENSIONS = 5,
1915 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
1916};
1917
1918/* IBFT subtables */
1919
1920struct acpi_ibft_control {
1921 struct acpi_ibft_header header;
1922 u16 extensions;
1923 u16 initiator_offset;
1924 u16 nic0_offset;
1925 u16 target0_offset;
1926 u16 nic1_offset;
1927 u16 target1_offset;
1928};
1929
1930struct acpi_ibft_initiator {
1931 struct acpi_ibft_header header;
1932 u8 sns_server[16];
1933 u8 slp_server[16];
1934 u8 primary_server[16];
1935 u8 secondary_server[16];
1936 u16 name_length;
1937 u16 name_offset;
1938};
1939
1940struct acpi_ibft_nic {
1941 struct acpi_ibft_header header;
1942 u8 ip_address[16];
1943 u8 subnet_mask_prefix;
1944 u8 origin;
1945 u8 gateway[16];
1946 u8 primary_dns[16];
1947 u8 secondary_dns[16];
1948 u8 dhcp[16];
1949 u16 vlan;
1950 u8 mac_address[6];
1951 u16 pci_address;
1952 u16 name_length;
1953 u16 name_offset;
1954};
1955
1956struct acpi_ibft_target {
1957 struct acpi_ibft_header header;
1958 u8 target_ip_address[16];
1959 u16 target_ip_socket;
1960 u8 target_boot_lun[8];
1961 u8 chap_type;
1962 u8 nic_association;
1963 u16 target_name_length;
1964 u16 target_name_offset;
1965 u16 chap_name_length;
1966 u16 chap_name_offset;
1967 u16 chap_secret_length;
1968 u16 chap_secret_offset;
1969 u16 reverse_chap_name_length;
1970 u16 reverse_chap_name_offset;
1971 u16 reverse_chap_secret_length;
1972 u16 reverse_chap_secret_offset;
a618c7f8
BM
1973};
1974
6e596084
RM
1975/* Reset to default packing */
1976
1977#pragma pack()
1da177e4 1978
4be44fcd 1979#endif /* __ACTBL1_H__ */