blob: a7ea179b2089cf2b3084033ada0dbc7bc8b5eeec [file] [log] [blame]
Erik Schmauss95857632018-03-14 16:13:07 -07001/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/******************************************************************************
3 *
Bob Moore793c2382006-03-31 00:00:00 -05004 * Name: actbl1.h - Additional ACPI table definitions
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 *
Bob Moore4441e552021-01-15 10:48:25 -08006 * Copyright (C) 2000 - 2021, Intel Corp.
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 *
Erik Schmauss95857632018-03-14 16:13:07 -07008 *****************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
10#ifndef __ACTBL1_H__
11#define __ACTBL1_H__
12
Bob Moore793c2382006-03-31 00:00:00 -050013/*******************************************************************************
14 *
Erik Schmausse62f8222018-02-15 13:09:26 -080015 * Additional ACPI Tables
Bob Moore793c2382006-03-31 00:00:00 -050016 *
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/*
Bob Moore6e2d5eb2009-07-27 10:53:00 +080023 * 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.
Bob Moore793c2382006-03-31 00:00:00 -050026 */
Bob Mooree692fa12021-08-03 20:07:53 +020027#define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */
Erik Schmausse62f8222018-02-15 13:09:26 -080028#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
Bob Moore970d9c92008-04-10 19:06:42 +040029#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
Erik Schmausse62f8222018-02-15 13:09:26 -080030#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
31#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
Ben Widawsky7c5eab72021-04-06 14:30:20 -070032#define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */
Bob Moore793c2382006-03-31 00:00:00 -050033#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
Erik Schmausse62f8222018-02-15 13:09:26 -080034#define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
35#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
36#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
37#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
38#define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
Bob Moore793c2382006-03-31 00:00:00 -050039#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
Bob Moore970d9c92008-04-10 19:06:42 +040040#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
41#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
Erik Schmausse62f8222018-02-15 13:09:26 -080042#define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
43#define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
Bob Moore970d9c92008-04-10 19:06:42 +040044#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
Erik Schmausse62f8222018-02-15 13:09:26 -080045#define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
46#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
47#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
48
49#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
50#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
51
52/* Reserved table signatures */
53
54#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
55#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
56
57/*
58 * These tables have been seen in the field, but no definition has been found
59 */
60#ifdef ACPI_UNDEFINED_TABLES
61#define ACPI_SIG_ATKG "ATKG"
62#define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
63#define ACPI_SIG_IEIT "IEIT"
64#endif
Bob Moore793c2382006-03-31 00:00:00 -050065
Bob Moore793c2382006-03-31 00:00:00 -050066/*
67 * All tables must be byte-packed to match the ACPI specification, since
68 * the tables are provided by the system BIOS.
69 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070070#pragma pack(1)
71
72/*
Bob Moorebe030a52012-08-17 13:07:54 +080073 * Note: C bitfields are not used for this reason:
74 *
75 * "Bitfields are great and easy to read, but unfortunately the C language
76 * does not specify the layout of bitfields in memory, which means they are
77 * essentially useless for dealing with packed data in on-disk formats or
78 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
79 * this decision was a design error in C. Ritchie could have picked an order
80 * and stuck with it." Norman Ramsey.
81 * See http://stackoverflow.com/a/1053662/41661
Linus Torvalds1da177e2005-04-16 15:20:36 -070082 */
Bob Moore793c2382006-03-31 00:00:00 -050083
Bob Moore6e2d5eb2009-07-27 10:53:00 +080084/*******************************************************************************
85 *
86 * Common subtable headers
87 *
88 ******************************************************************************/
89
90/* Generic subtable header (used in MADT, SRAT, etc.) */
Bob Mooref3d2e782007-02-02 19:48:18 +030091
92struct acpi_subtable_header {
93 u8 type;
94 u8 length;
95};
96
Bob Moore6e2d5eb2009-07-27 10:53:00 +080097/* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
Bob Moore970d9c92008-04-10 19:06:42 +040098
99struct acpi_whea_header {
100 u8 action;
101 u8 instruction;
102 u8 flags;
103 u8 reserved;
104 struct acpi_generic_address register_region;
Bob Moore3fa34772008-04-10 19:06:43 +0400105 u64 value; /* Value used with Read/Write register */
106 u64 mask; /* Bitmask required for this register instruction */
Bob Moore970d9c92008-04-10 19:06:42 +0400107};
108
Bob Moore793c2382006-03-31 00:00:00 -0500109/*******************************************************************************
110 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800111 * ASF - Alert Standard Format table (Signature "ASF!")
112 * Revision 0x10
113 *
114 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
115 *
116 ******************************************************************************/
117
118struct acpi_table_asf {
119 struct acpi_table_header header; /* Common ACPI table header */
120};
121
122/* ASF subtable header */
123
124struct acpi_asf_header {
125 u8 type;
126 u8 reserved;
127 u16 length;
128};
129
130/* Values for Type field above */
131
132enum acpi_asf_type {
133 ACPI_ASF_TYPE_INFO = 0,
134 ACPI_ASF_TYPE_ALERT = 1,
135 ACPI_ASF_TYPE_CONTROL = 2,
136 ACPI_ASF_TYPE_BOOT = 3,
137 ACPI_ASF_TYPE_ADDRESS = 4,
138 ACPI_ASF_TYPE_RESERVED = 5
139};
140
141/*
142 * ASF subtables
143 */
144
145/* 0: ASF Information */
146
147struct acpi_asf_info {
148 struct acpi_asf_header header;
149 u8 min_reset_value;
150 u8 min_poll_interval;
151 u16 system_id;
152 u32 mfg_id;
153 u8 flags;
154 u8 reserved2[3];
155};
156
157/* Masks for Flags field above */
158
159#define ACPI_ASF_SMBUS_PROTOCOLS (1)
160
161/* 1: ASF Alerts */
162
163struct acpi_asf_alert {
164 struct acpi_asf_header header;
165 u8 assert_mask;
166 u8 deassert_mask;
167 u8 alerts;
168 u8 data_length;
169};
170
171struct acpi_asf_alert_data {
172 u8 address;
173 u8 command;
174 u8 mask;
175 u8 value;
176 u8 sensor_type;
177 u8 type;
178 u8 offset;
179 u8 source_type;
180 u8 severity;
181 u8 sensor_number;
182 u8 entity;
183 u8 instance;
184};
185
186/* 2: ASF Remote Control */
187
188struct acpi_asf_remote {
189 struct acpi_asf_header header;
190 u8 controls;
191 u8 data_length;
192 u16 reserved2;
193};
194
195struct acpi_asf_control_data {
196 u8 function;
197 u8 address;
198 u8 command;
199 u8 value;
200};
201
202/* 3: ASF RMCP Boot Options */
203
204struct acpi_asf_rmcp {
205 struct acpi_asf_header header;
206 u8 capabilities[7];
207 u8 completion_code;
208 u32 enterprise_id;
209 u8 command;
210 u16 parameter;
211 u16 boot_options;
212 u16 oem_parameters;
213};
214
215/* 4: ASF Address */
216
217struct acpi_asf_address {
218 struct acpi_asf_header header;
219 u8 eprom_address;
220 u8 devices;
221};
222
223/*******************************************************************************
224 *
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800225 * BERT - Boot Error Record Table (ACPI 4.0)
226 * Version 1
Bob Moore970d9c92008-04-10 19:06:42 +0400227 *
228 ******************************************************************************/
229
230struct acpi_table_bert {
231 struct acpi_table_header header; /* Common ACPI table header */
232 u32 region_length; /* Length of the boot error region */
Uwe Kleine-Königb5950762010-11-01 15:38:34 -0400233 u64 address; /* Physical address of the error region */
Bob Moore970d9c92008-04-10 19:06:42 +0400234};
235
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800236/* Boot Error Region (not a subtable, pointed to by Address field above) */
Bob Moore3fa34772008-04-10 19:06:43 +0400237
Bob Moore970d9c92008-04-10 19:06:42 +0400238struct acpi_bert_region {
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800239 u32 block_status; /* Type of error information */
240 u32 raw_data_offset; /* Offset to raw error data */
241 u32 raw_data_length; /* Length of raw error data */
242 u32 data_length; /* Length of generic error data */
243 u32 error_severity; /* Severity code */
Bob Moore970d9c92008-04-10 19:06:42 +0400244};
245
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800246/* Values for block_status flags above */
Bob Moore970d9c92008-04-10 19:06:42 +0400247
248#define ACPI_BERT_UNCORRECTABLE (1)
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800249#define ACPI_BERT_CORRECTABLE (1<<1)
250#define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
251#define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
252#define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
253
254/* Values for error_severity above */
255
256enum acpi_bert_error_severity {
257 ACPI_BERT_ERROR_CORRECTABLE = 0,
258 ACPI_BERT_ERROR_FATAL = 1,
259 ACPI_BERT_ERROR_CORRECTED = 2,
260 ACPI_BERT_ERROR_NONE = 3,
261 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
262};
263
264/*
265 * Note: The generic error data that follows the error_severity field above
266 * uses the struct acpi_hest_generic_data defined under the HEST table below
267 */
Bob Moore970d9c92008-04-10 19:06:42 +0400268
269/*******************************************************************************
270 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800271 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
272 * Version 1
273 *
274 ******************************************************************************/
275
276struct acpi_table_bgrt {
277 struct acpi_table_header header; /* Common ACPI table header */
278 u16 version;
279 u8 status;
280 u8 image_type;
281 u64 image_address;
282 u32 image_offset_x;
283 u32 image_offset_y;
284};
285
286/* Flags for Status field above */
287
288#define ACPI_BGRT_DISPLAYED (1)
289#define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
290
291/*******************************************************************************
292 *
293 * BOOT - Simple Boot Flag Table
294 * Version 1
295 *
296 * Conforms to the "Simple Boot Flag Specification", Version 2.1
297 *
298 ******************************************************************************/
299
300struct acpi_table_boot {
301 struct acpi_table_header header; /* Common ACPI table header */
302 u8 cmos_index; /* Index in CMOS RAM for the boot register */
303 u8 reserved[3];
304};
305
306/*******************************************************************************
307 *
Ben Widawsky7c5eab72021-04-06 14:30:20 -0700308 * CEDT - CXL Early Discovery Table
309 * Version 1
310 *
311 * Conforms to the "CXL Early Discovery Table" (CXL 2.0)
312 *
313 ******************************************************************************/
314
315struct acpi_table_cedt {
316 struct acpi_table_header header; /* Common ACPI table header */
317};
318
319/* CEDT subtable header (Performance Record Structure) */
320
321struct acpi_cedt_header {
322 u8 type;
323 u8 reserved;
324 u16 length;
325};
326
327/* Values for Type field above */
328
329enum acpi_cedt_type {
330 ACPI_CEDT_TYPE_CHBS = 0,
Alison Schofield4a2c1dc2021-06-04 14:26:05 -0700331 ACPI_CEDT_TYPE_CFMWS = 1,
332 ACPI_CEDT_TYPE_RESERVED = 2,
Ben Widawsky7c5eab72021-04-06 14:30:20 -0700333};
334
Alison Schofield160c7682021-06-04 14:26:04 -0700335/* Values for version field above */
336
337#define ACPI_CEDT_CHBS_VERSION_CXL11 (0)
338#define ACPI_CEDT_CHBS_VERSION_CXL20 (1)
339
340/* Values for length field above */
341
342#define ACPI_CEDT_CHBS_LENGTH_CXL11 (0x2000)
343#define ACPI_CEDT_CHBS_LENGTH_CXL20 (0x10000)
344
Ben Widawsky7c5eab72021-04-06 14:30:20 -0700345/*
346 * CEDT subtables
347 */
348
349/* 0: CXL Host Bridge Structure */
350
351struct acpi_cedt_chbs {
Bob Moore519c8092021-04-06 14:30:24 -0700352 struct acpi_cedt_header header;
Ben Widawsky7c5eab72021-04-06 14:30:20 -0700353 u32 uid;
354 u32 cxl_version;
355 u32 reserved;
356 u64 base;
357 u64 length;
358};
359
Alison Schofield4a2c1dc2021-06-04 14:26:05 -0700360/* 1: CXL Fixed Memory Window Structure */
361
362struct acpi_cedt_cfmws {
363 struct acpi_cedt_header header;
364 u32 reserved1;
365 u64 base_hpa;
366 u64 window_size;
367 u8 interleave_ways;
368 u8 interleave_arithmetic;
369 u16 reserved2;
370 u32 granularity;
371 u16 restrictions;
372 u16 qtg_id;
373 u32 interleave_targets[];
374};
375
376/* Values for Interleave Arithmetic field above */
377
378#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
379
380/* Values for Restrictions field above */
381
382#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)
383#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)
384#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
385#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
386#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
387
Ben Widawsky7c5eab72021-04-06 14:30:20 -0700388/*******************************************************************************
389 *
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800390 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
391 * Version 1
Bob Moore793c2382006-03-31 00:00:00 -0500392 *
393 ******************************************************************************/
394
395struct acpi_table_cpep {
Bob Mooref3d2e782007-02-02 19:48:18 +0300396 struct acpi_table_header header; /* Common ACPI table header */
397 u64 reserved;
Bob Moore793c2382006-03-31 00:00:00 -0500398};
399
400/* Subtable */
401
402struct acpi_cpep_polling {
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800403 struct acpi_subtable_header header;
Bob Mooref3d2e782007-02-02 19:48:18 +0300404 u8 id; /* Processor ID */
405 u8 eid; /* Processor EID */
406 u32 interval; /* Polling interval (msec) */
Bob Moore793c2382006-03-31 00:00:00 -0500407};
408
409/*******************************************************************************
410 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800411 * CSRT - Core System Resource Table
412 * Version 0
413 *
414 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
415 *
416 ******************************************************************************/
417
418struct acpi_table_csrt {
419 struct acpi_table_header header; /* Common ACPI table header */
420};
421
422/* Resource Group subtable */
423
424struct acpi_csrt_group {
425 u32 length;
426 u32 vendor_id;
427 u32 subvendor_id;
428 u16 device_id;
429 u16 subdevice_id;
430 u16 revision;
431 u16 reserved;
432 u32 shared_info_length;
433
434 /* Shared data immediately follows (Length = shared_info_length) */
435};
436
437/* Shared Info subtable */
438
439struct acpi_csrt_shared_info {
440 u16 major_version;
441 u16 minor_version;
442 u32 mmio_base_low;
443 u32 mmio_base_high;
444 u32 gsi_interrupt;
445 u8 interrupt_polarity;
446 u8 interrupt_mode;
447 u8 num_channels;
448 u8 dma_address_width;
449 u16 base_request_line;
450 u16 num_handshake_signals;
451 u32 max_block_size;
452
453 /* Resource descriptors immediately follow (Length = Group length - shared_info_length) */
454};
455
456/* Resource Descriptor subtable */
457
458struct acpi_csrt_descriptor {
459 u32 length;
460 u16 type;
461 u16 subtype;
462 u32 uid;
463
464 /* Resource-specific information immediately follows */
465};
466
467/* Resource Types */
468
469#define ACPI_CSRT_TYPE_INTERRUPT 0x0001
470#define ACPI_CSRT_TYPE_TIMER 0x0002
471#define ACPI_CSRT_TYPE_DMA 0x0003
472
473/* Resource Subtypes */
474
475#define ACPI_CSRT_XRUPT_LINE 0x0000
476#define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
477#define ACPI_CSRT_TIMER 0x0000
478#define ACPI_CSRT_DMA_CHANNEL 0x0000
479#define ACPI_CSRT_DMA_CONTROLLER 0x0001
480
481/*******************************************************************************
482 *
483 * DBG2 - Debug Port Table 2
484 * Version 0 (Both main table and subtables)
485 *
486 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
487 *
488 ******************************************************************************/
489
490struct acpi_table_dbg2 {
491 struct acpi_table_header header; /* Common ACPI table header */
492 u32 info_offset;
493 u32 info_count;
494};
495
496struct acpi_dbg2_header {
497 u32 info_offset;
498 u32 info_count;
499};
500
501/* Debug Device Information Subtable */
502
503struct acpi_dbg2_device {
504 u8 revision;
505 u16 length;
506 u8 register_count; /* Number of base_address registers */
507 u16 namepath_length;
508 u16 namepath_offset;
509 u16 oem_data_length;
510 u16 oem_data_offset;
511 u16 port_type;
512 u16 port_subtype;
513 u16 reserved;
514 u16 base_address_offset;
515 u16 address_size_offset;
516 /*
517 * Data that follows:
518 * base_address (required) - Each in 12-byte Generic Address Structure format.
519 * address_size (required) - Array of u32 sizes corresponding to each base_address register.
520 * Namepath (required) - Null terminated string. Single dot if not supported.
521 * oem_data (optional) - Length is oem_data_length.
522 */
523};
524
525/* Types for port_type field above */
526
527#define ACPI_DBG2_SERIAL_PORT 0x8000
528#define ACPI_DBG2_1394_PORT 0x8001
529#define ACPI_DBG2_USB_PORT 0x8002
530#define ACPI_DBG2_NET_PORT 0x8003
531
532/* Subtypes for port_subtype field above */
533
534#define ACPI_DBG2_16550_COMPATIBLE 0x0000
535#define ACPI_DBG2_16550_SUBSET 0x0001
536#define ACPI_DBG2_ARM_PL011 0x0003
537#define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
538#define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
539#define ACPI_DBG2_ARM_DCC 0x000F
540#define ACPI_DBG2_BCM2835 0x0010
541
542#define ACPI_DBG2_1394_STANDARD 0x0000
543
544#define ACPI_DBG2_USB_XHCI 0x0000
545#define ACPI_DBG2_USB_EHCI 0x0001
546
547/*******************************************************************************
548 *
549 * DBGP - Debug Port table
550 * Version 1
551 *
552 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
553 *
554 ******************************************************************************/
555
556struct acpi_table_dbgp {
557 struct acpi_table_header header; /* Common ACPI table header */
558 u8 type; /* 0=full 16550, 1=subset of 16550 */
559 u8 reserved[3];
560 struct acpi_generic_address debug_port;
561};
562
563/*******************************************************************************
564 *
565 * DMAR - DMA Remapping table
566 * Version 1
567 *
568 * Conforms to "Intel Virtualization Technology for Directed I/O",
569 * Version 2.3, October 2014
570 *
571 ******************************************************************************/
572
573struct acpi_table_dmar {
574 struct acpi_table_header header; /* Common ACPI table header */
575 u8 width; /* Host Address Width */
576 u8 flags;
577 u8 reserved[10];
578};
579
580/* Masks for Flags field above */
581
582#define ACPI_DMAR_INTR_REMAP (1)
583#define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
584#define ACPI_DMAR_X2APIC_MODE (1<<2)
585
586/* DMAR subtable header */
587
588struct acpi_dmar_header {
589 u16 type;
590 u16 length;
591};
592
593/* Values for subtable type in struct acpi_dmar_header */
594
595enum acpi_dmar_type {
596 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
597 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
598 ACPI_DMAR_TYPE_ROOT_ATS = 2,
599 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
600 ACPI_DMAR_TYPE_NAMESPACE = 4,
Yian Chen81d3c752021-02-04 09:43:59 +0800601 ACPI_DMAR_TYPE_SATC = 5,
602 ACPI_DMAR_TYPE_RESERVED = 6 /* 6 and greater are reserved */
Erik Schmausse62f8222018-02-15 13:09:26 -0800603};
604
605/* DMAR Device Scope structure */
606
607struct acpi_dmar_device_scope {
608 u8 entry_type;
609 u8 length;
610 u16 reserved;
611 u8 enumeration_id;
612 u8 bus;
613};
614
615/* Values for entry_type in struct acpi_dmar_device_scope - device types */
616
617enum acpi_dmar_scope_type {
618 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
619 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
620 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
621 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
622 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
623 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
624 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
625};
626
627struct acpi_dmar_pci_path {
628 u8 device;
629 u8 function;
630};
631
632/*
633 * DMAR Subtables, correspond to Type in struct acpi_dmar_header
634 */
635
636/* 0: Hardware Unit Definition */
637
638struct acpi_dmar_hardware_unit {
639 struct acpi_dmar_header header;
640 u8 flags;
641 u8 reserved;
642 u16 segment;
643 u64 address; /* Register Base Address */
644};
645
646/* Masks for Flags field above */
647
648#define ACPI_DMAR_INCLUDE_ALL (1)
649
Erik Schmaussc163f90c2019-02-15 13:36:19 -0800650/* 1: Reserved Memory Definition */
Erik Schmausse62f8222018-02-15 13:09:26 -0800651
652struct acpi_dmar_reserved_memory {
653 struct acpi_dmar_header header;
654 u16 reserved;
655 u16 segment;
656 u64 base_address; /* 4K aligned base address */
657 u64 end_address; /* 4K aligned limit address */
658};
659
660/* Masks for Flags field above */
661
662#define ACPI_DMAR_ALLOW_ALL (1)
663
664/* 2: Root Port ATS Capability Reporting Structure */
665
666struct acpi_dmar_atsr {
667 struct acpi_dmar_header header;
668 u8 flags;
669 u8 reserved;
670 u16 segment;
671};
672
673/* Masks for Flags field above */
674
675#define ACPI_DMAR_ALL_PORTS (1)
676
677/* 3: Remapping Hardware Static Affinity Structure */
678
679struct acpi_dmar_rhsa {
680 struct acpi_dmar_header header;
681 u32 reserved;
682 u64 base_address;
683 u32 proximity_domain;
684};
685
686/* 4: ACPI Namespace Device Declaration Structure */
687
688struct acpi_dmar_andd {
689 struct acpi_dmar_header header;
690 u8 reserved[3];
691 u8 device_number;
692 char device_name[1];
693};
694
Yian Chen81d3c752021-02-04 09:43:59 +0800695/* 5: SOC Integrated Address Translation Cache Reporting Structure */
696
697struct acpi_dmar_satc {
698 struct acpi_dmar_header header;
699 u8 flags;
700 u8 reserved;
701 u16 segment;
702};
Erik Schmausse62f8222018-02-15 13:09:26 -0800703/*******************************************************************************
704 *
705 * DRTM - Dynamic Root of Trust for Measurement table
706 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
707 * Table version 1
708 *
709 ******************************************************************************/
710
711struct acpi_table_drtm {
712 struct acpi_table_header header; /* Common ACPI table header */
713 u64 entry_base_address;
714 u64 entry_length;
715 u32 entry_address32;
716 u64 entry_address64;
717 u64 exit_address;
718 u64 log_area_address;
719 u32 log_area_length;
720 u64 arch_dependent_address;
721 u32 flags;
722};
723
724/* Flag Definitions for above */
725
726#define ACPI_DRTM_ACCESS_ALLOWED (1)
727#define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
728#define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
729#define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
730
731/* 1) Validated Tables List (64-bit addresses) */
732
733struct acpi_drtm_vtable_list {
734 u32 validated_table_count;
735 u64 validated_tables[1];
736};
737
738/* 2) Resources List (of Resource Descriptors) */
739
740/* Resource Descriptor */
741
742struct acpi_drtm_resource {
743 u8 size[7];
744 u8 type;
745 u64 address;
746};
747
748struct acpi_drtm_resource_list {
749 u32 resource_count;
750 struct acpi_drtm_resource resources[1];
751};
752
753/* 3) Platform-specific Identifiers List */
754
755struct acpi_drtm_dps_id {
756 u32 dps_id_length;
757 u8 dps_id[16];
758};
759
760/*******************************************************************************
761 *
Bob Moore793c2382006-03-31 00:00:00 -0500762 * ECDT - Embedded Controller Boot Resources Table
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800763 * Version 1
Bob Moore793c2382006-03-31 00:00:00 -0500764 *
765 ******************************************************************************/
766
Bob Mooref3d2e782007-02-02 19:48:18 +0300767struct acpi_table_ecdt {
768 struct acpi_table_header header; /* Common ACPI table header */
769 struct acpi_generic_address control; /* Address of EC command/status register */
770 struct acpi_generic_address data; /* Address of EC data register */
Bob Moore793c2382006-03-31 00:00:00 -0500771 u32 uid; /* Unique ID - must be same as the EC _UID method */
Bob Mooref3d2e782007-02-02 19:48:18 +0300772 u8 gpe; /* The GPE for the EC */
773 u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
Bob Moore793c2382006-03-31 00:00:00 -0500774};
775
776/*******************************************************************************
777 *
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800778 * EINJ - Error Injection Table (ACPI 4.0)
779 * Version 1
Bob Moore970d9c92008-04-10 19:06:42 +0400780 *
781 ******************************************************************************/
782
783struct acpi_table_einj {
784 struct acpi_table_header header; /* Common ACPI table header */
785 u32 header_length;
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800786 u8 flags;
787 u8 reserved[3];
Bob Moore970d9c92008-04-10 19:06:42 +0400788 u32 entries;
789};
790
791/* EINJ Injection Instruction Entries (actions) */
792
793struct acpi_einj_entry {
794 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
795};
796
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800797/* Masks for Flags field above */
798
799#define ACPI_EINJ_PRESERVE (1)
800
Bob Moore970d9c92008-04-10 19:06:42 +0400801/* Values for Action field above */
802
803enum acpi_einj_actions {
804 ACPI_EINJ_BEGIN_OPERATION = 0,
805 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
806 ACPI_EINJ_SET_ERROR_TYPE = 2,
807 ACPI_EINJ_GET_ERROR_TYPE = 3,
808 ACPI_EINJ_END_OPERATION = 4,
809 ACPI_EINJ_EXECUTE_OPERATION = 5,
810 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
811 ACPI_EINJ_GET_COMMAND_STATUS = 7,
Bob Moorec5bd6532011-11-16 11:04:00 +0800812 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
Bob Moorea88e0ce2016-03-24 09:39:36 +0800813 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
814 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
Bob Moore970d9c92008-04-10 19:06:42 +0400815 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
816};
817
818/* Values for Instruction field above */
819
820enum acpi_einj_instructions {
821 ACPI_EINJ_READ_REGISTER = 0,
822 ACPI_EINJ_READ_REGISTER_VALUE = 1,
823 ACPI_EINJ_WRITE_REGISTER = 2,
824 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
825 ACPI_EINJ_NOOP = 4,
Bob Moorec5bd6532011-11-16 11:04:00 +0800826 ACPI_EINJ_FLUSH_CACHELINE = 5,
827 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
828};
829
830struct acpi_einj_error_type_with_addr {
831 u32 error_type;
832 u32 vendor_struct_offset;
833 u32 flags;
834 u32 apic_id;
835 u64 address;
836 u64 range;
837 u32 pcie_id;
838};
839
840struct acpi_einj_vendor {
841 u32 length;
842 u32 pcie_id;
843 u16 vendor_id;
844 u16 device_id;
845 u8 revision_id;
846 u8 reserved[3];
Bob Moore970d9c92008-04-10 19:06:42 +0400847};
848
Bob Moore3fa34772008-04-10 19:06:43 +0400849/* EINJ Trigger Error Action Table */
850
851struct acpi_einj_trigger {
852 u32 header_size;
853 u32 revision;
854 u32 table_size;
855 u32 entry_count;
856};
857
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800858/* Command status return values */
859
860enum acpi_einj_command_status {
861 ACPI_EINJ_SUCCESS = 0,
862 ACPI_EINJ_FAILURE = 1,
863 ACPI_EINJ_INVALID_ACCESS = 2,
864 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
865};
866
867/* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
868
869#define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
870#define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
871#define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
872#define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
873#define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
874#define ACPI_EINJ_MEMORY_FATAL (1<<5)
875#define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
876#define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
877#define ACPI_EINJ_PCIX_FATAL (1<<8)
878#define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
879#define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
880#define ACPI_EINJ_PLATFORM_FATAL (1<<11)
Bob Moorec5bd6532011-11-16 11:04:00 +0800881#define ACPI_EINJ_VENDOR_DEFINED (1<<31)
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800882
Bob Moore970d9c92008-04-10 19:06:42 +0400883/*******************************************************************************
884 *
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800885 * ERST - Error Record Serialization Table (ACPI 4.0)
886 * Version 1
Bob Moore970d9c92008-04-10 19:06:42 +0400887 *
888 ******************************************************************************/
889
890struct acpi_table_erst {
891 struct acpi_table_header header; /* Common ACPI table header */
892 u32 header_length;
893 u32 reserved;
894 u32 entries;
895};
896
897/* ERST Serialization Entries (actions) */
898
899struct acpi_erst_entry {
900 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
901};
902
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800903/* Masks for Flags field above */
904
905#define ACPI_ERST_PRESERVE (1)
906
Bob Moore970d9c92008-04-10 19:06:42 +0400907/* Values for Action field above */
908
909enum acpi_erst_actions {
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800910 ACPI_ERST_BEGIN_WRITE = 0,
911 ACPI_ERST_BEGIN_READ = 1,
912 ACPI_ERST_BEGIN_CLEAR = 2,
913 ACPI_ERST_END = 3,
Bob Moore970d9c92008-04-10 19:06:42 +0400914 ACPI_ERST_SET_RECORD_OFFSET = 4,
915 ACPI_ERST_EXECUTE_OPERATION = 5,
916 ACPI_ERST_CHECK_BUSY_STATUS = 6,
917 ACPI_ERST_GET_COMMAND_STATUS = 7,
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800918 ACPI_ERST_GET_RECORD_ID = 8,
919 ACPI_ERST_SET_RECORD_ID = 9,
Bob Moore970d9c92008-04-10 19:06:42 +0400920 ACPI_ERST_GET_RECORD_COUNT = 10,
921 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
922 ACPI_ERST_NOT_USED = 12,
923 ACPI_ERST_GET_ERROR_RANGE = 13,
924 ACPI_ERST_GET_ERROR_LENGTH = 14,
925 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
Bob Moorea88e0ce2016-03-24 09:39:36 +0800926 ACPI_ERST_EXECUTE_TIMINGS = 16,
927 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
Bob Moore970d9c92008-04-10 19:06:42 +0400928};
929
930/* Values for Instruction field above */
931
932enum acpi_erst_instructions {
933 ACPI_ERST_READ_REGISTER = 0,
934 ACPI_ERST_READ_REGISTER_VALUE = 1,
935 ACPI_ERST_WRITE_REGISTER = 2,
936 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
937 ACPI_ERST_NOOP = 4,
938 ACPI_ERST_LOAD_VAR1 = 5,
939 ACPI_ERST_LOAD_VAR2 = 6,
940 ACPI_ERST_STORE_VAR1 = 7,
941 ACPI_ERST_ADD = 8,
942 ACPI_ERST_SUBTRACT = 9,
943 ACPI_ERST_ADD_VALUE = 10,
944 ACPI_ERST_SUBTRACT_VALUE = 11,
945 ACPI_ERST_STALL = 12,
946 ACPI_ERST_STALL_WHILE_TRUE = 13,
947 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
948 ACPI_ERST_GOTO = 15,
949 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
950 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
951 ACPI_ERST_MOVE_DATA = 18,
952 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
953};
954
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800955/* Command status return values */
956
957enum acpi_erst_command_status {
Bob Moore54a2a152020-02-14 10:48:03 -0800958 ACPI_ERST_SUCCESS = 0,
Bob Moore6e2d5eb2009-07-27 10:53:00 +0800959 ACPI_ERST_NO_SPACE = 1,
960 ACPI_ERST_NOT_AVAILABLE = 2,
961 ACPI_ERST_FAILURE = 3,
962 ACPI_ERST_RECORD_EMPTY = 4,
963 ACPI_ERST_NOT_FOUND = 5,
964 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
965};
966
967/* Error Record Serialization Information */
968
969struct acpi_erst_info {
970 u16 signature; /* Should be "ER" */
971 u8 data[48];
972};
973
Bob Moore970d9c92008-04-10 19:06:42 +0400974/*******************************************************************************
975 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800976 * FPDT - Firmware Performance Data Table (ACPI 5.0)
977 * Version 1
978 *
979 ******************************************************************************/
980
981struct acpi_table_fpdt {
982 struct acpi_table_header header; /* Common ACPI table header */
983};
984
985/* FPDT subtable header (Performance Record Structure) */
986
987struct acpi_fpdt_header {
988 u16 type;
989 u8 length;
990 u8 revision;
991};
992
993/* Values for Type field above */
994
995enum acpi_fpdt_type {
996 ACPI_FPDT_TYPE_BOOT = 0,
997 ACPI_FPDT_TYPE_S3PERF = 1
998};
999
1000/*
1001 * FPDT subtables
1002 */
1003
1004/* 0: Firmware Basic Boot Performance Record */
1005
1006struct acpi_fpdt_boot_pointer {
1007 struct acpi_fpdt_header header;
1008 u8 reserved[4];
1009 u64 address;
1010};
1011
1012/* 1: S3 Performance Table Pointer Record */
1013
1014struct acpi_fpdt_s3pt_pointer {
1015 struct acpi_fpdt_header header;
1016 u8 reserved[4];
1017 u64 address;
1018};
1019
1020/*
1021 * S3PT - S3 Performance Table. This table is pointed to by the
1022 * S3 Pointer Record above.
1023 */
1024struct acpi_table_s3pt {
1025 u8 signature[4]; /* "S3PT" */
1026 u32 length;
1027};
1028
1029/*
1030 * S3PT Subtables (Not part of the actual FPDT)
1031 */
1032
1033/* Values for Type field in S3PT header */
1034
1035enum acpi_s3pt_type {
1036 ACPI_S3PT_TYPE_RESUME = 0,
1037 ACPI_S3PT_TYPE_SUSPEND = 1,
1038 ACPI_FPDT_BOOT_PERFORMANCE = 2
1039};
1040
1041struct acpi_s3pt_resume {
1042 struct acpi_fpdt_header header;
1043 u32 resume_count;
1044 u64 full_resume;
1045 u64 average_resume;
1046};
1047
1048struct acpi_s3pt_suspend {
1049 struct acpi_fpdt_header header;
1050 u64 suspend_start;
1051 u64 suspend_end;
1052};
1053
1054/*
1055 * FPDT Boot Performance Record (Not part of the actual FPDT)
1056 */
1057struct acpi_fpdt_boot {
1058 struct acpi_fpdt_header header;
1059 u8 reserved[4];
1060 u64 reset_end;
1061 u64 load_start;
1062 u64 startup_start;
1063 u64 exit_services_entry;
1064 u64 exit_services_exit;
1065};
1066
1067/*******************************************************************************
1068 *
1069 * GTDT - Generic Timer Description Table (ACPI 5.1)
1070 * Version 2
1071 *
1072 ******************************************************************************/
1073
1074struct acpi_table_gtdt {
1075 struct acpi_table_header header; /* Common ACPI table header */
1076 u64 counter_block_addresss;
1077 u32 reserved;
1078 u32 secure_el1_interrupt;
1079 u32 secure_el1_flags;
1080 u32 non_secure_el1_interrupt;
1081 u32 non_secure_el1_flags;
1082 u32 virtual_timer_interrupt;
1083 u32 virtual_timer_flags;
1084 u32 non_secure_el2_interrupt;
1085 u32 non_secure_el2_flags;
1086 u64 counter_read_block_address;
1087 u32 platform_timer_count;
1088 u32 platform_timer_offset;
1089};
1090
1091/* Flag Definitions: Timer Block Physical Timers and Virtual timers */
1092
1093#define ACPI_GTDT_INTERRUPT_MODE (1)
1094#define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
1095#define ACPI_GTDT_ALWAYS_ON (1<<2)
1096
Erik Schmauss8f5a14d2019-02-15 13:36:18 -08001097struct acpi_gtdt_el2 {
1098 u32 virtual_el2_timer_gsiv;
1099 u32 virtual_el2_timer_flags;
1100};
1101
Erik Schmausse62f8222018-02-15 13:09:26 -08001102/* Common GTDT subtable header */
1103
1104struct acpi_gtdt_header {
1105 u8 type;
1106 u16 length;
1107};
1108
1109/* Values for GTDT subtable type above */
1110
1111enum acpi_gtdt_type {
1112 ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
1113 ACPI_GTDT_TYPE_WATCHDOG = 1,
1114 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
1115};
1116
1117/* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */
1118
1119/* 0: Generic Timer Block */
1120
1121struct acpi_gtdt_timer_block {
1122 struct acpi_gtdt_header header;
1123 u8 reserved;
1124 u64 block_address;
1125 u32 timer_count;
1126 u32 timer_offset;
1127};
1128
1129/* Timer Sub-Structure, one per timer */
1130
1131struct acpi_gtdt_timer_entry {
1132 u8 frame_number;
1133 u8 reserved[3];
1134 u64 base_address;
1135 u64 el0_base_address;
1136 u32 timer_interrupt;
1137 u32 timer_flags;
1138 u32 virtual_timer_interrupt;
1139 u32 virtual_timer_flags;
1140 u32 common_flags;
1141};
1142
1143/* Flag Definitions: timer_flags and virtual_timer_flags above */
1144
1145#define ACPI_GTDT_GT_IRQ_MODE (1)
1146#define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
1147
1148/* Flag Definitions: common_flags above */
1149
1150#define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
1151#define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
1152
1153/* 1: SBSA Generic Watchdog Structure */
1154
1155struct acpi_gtdt_watchdog {
1156 struct acpi_gtdt_header header;
1157 u8 reserved;
1158 u64 refresh_frame_address;
1159 u64 control_frame_address;
1160 u32 timer_interrupt;
1161 u32 timer_flags;
1162};
1163
1164/* Flag Definitions: timer_flags above */
1165
1166#define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
1167#define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
1168#define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
1169
1170/*******************************************************************************
1171 *
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001172 * HEST - Hardware Error Source Table (ACPI 4.0)
1173 * Version 1
Bob Moore970d9c92008-04-10 19:06:42 +04001174 *
1175 ******************************************************************************/
1176
1177struct acpi_table_hest {
1178 struct acpi_table_header header; /* Common ACPI table header */
1179 u32 error_source_count;
1180};
1181
Bob Moore3fa34772008-04-10 19:06:43 +04001182/* HEST subtable header */
1183
1184struct acpi_hest_header {
1185 u16 type;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001186 u16 source_id;
Bob Moore3fa34772008-04-10 19:06:43 +04001187};
1188
1189/* Values for Type field above for subtables */
1190
1191enum acpi_hest_types {
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001192 ACPI_HEST_TYPE_IA32_CHECK = 0,
1193 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
1194 ACPI_HEST_TYPE_IA32_NMI = 2,
1195 ACPI_HEST_TYPE_NOT_USED3 = 3,
1196 ACPI_HEST_TYPE_NOT_USED4 = 4,
1197 ACPI_HEST_TYPE_NOT_USED5 = 5,
Bob Moore3fa34772008-04-10 19:06:43 +04001198 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
1199 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
1200 ACPI_HEST_TYPE_AER_BRIDGE = 8,
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001201 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
Bob Moore7cd55c72016-03-24 09:38:57 +08001202 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
Bob Moorec0429332017-06-05 16:38:41 +08001203 ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,
1204 ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */
Bob Moore3fa34772008-04-10 19:06:43 +04001205};
1206
1207/*
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001208 * HEST substructures contained in subtables
Bob Moore3fa34772008-04-10 19:06:43 +04001209 */
1210
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001211/*
1212 * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and
1213 * struct acpi_hest_ia_corrected structures.
1214 */
1215struct acpi_hest_ia_error_bank {
Bob Moore3fa34772008-04-10 19:06:43 +04001216 u8 bank_number;
1217 u8 clear_status_on_init;
1218 u8 status_format;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001219 u8 reserved;
Bob Moore3fa34772008-04-10 19:06:43 +04001220 u32 control_register;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001221 u64 control_data;
Bob Moore3fa34772008-04-10 19:06:43 +04001222 u32 status_register;
1223 u32 address_register;
1224 u32 misc_register;
1225};
1226
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001227/* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
Bob Moore3fa34772008-04-10 19:06:43 +04001228
1229struct acpi_hest_aer_common {
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001230 u16 reserved1;
Bob Moore3fa34772008-04-10 19:06:43 +04001231 u8 flags;
1232 u8 enabled;
Bob Moorec276e382009-07-27 14:55:02 +08001233 u32 records_to_preallocate;
Bob Moore3fa34772008-04-10 19:06:43 +04001234 u32 max_sections_per_record;
Betty Dall4059a312014-01-13 12:17:47 -07001235 u32 bus; /* Bus and Segment numbers */
Bob Moore3fa34772008-04-10 19:06:43 +04001236 u16 device;
1237 u16 function;
1238 u16 device_control;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001239 u16 reserved2;
Bob Moorec276e382009-07-27 14:55:02 +08001240 u32 uncorrectable_mask;
1241 u32 uncorrectable_severity;
1242 u32 correctable_mask;
1243 u32 advanced_capabilities;
Bob Moore3fa34772008-04-10 19:06:43 +04001244};
1245
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001246/* Masks for HEST Flags fields */
1247
1248#define ACPI_HEST_FIRMWARE_FIRST (1)
1249#define ACPI_HEST_GLOBAL (1<<1)
Bob Moore2e166c732017-06-05 16:38:32 +08001250#define ACPI_HEST_GHES_ASSIST (1<<2)
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001251
Betty Dall4059a312014-01-13 12:17:47 -07001252/*
1253 * Macros to access the bus/segment numbers in Bus field above:
1254 * Bus number is encoded in bits 7:0
1255 * Segment number is encoded in bits 23:8
1256 */
1257#define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
1258#define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)
1259
Bob Moore3fa34772008-04-10 19:06:43 +04001260/* Hardware Error Notification */
1261
1262struct acpi_hest_notify {
1263 u8 type;
1264 u8 length;
1265 u16 config_write_enable;
1266 u32 poll_interval;
1267 u32 vector;
1268 u32 polling_threshold_value;
1269 u32 polling_threshold_window;
1270 u32 error_threshold_value;
1271 u32 error_threshold_window;
1272};
1273
1274/* Values for Notify Type field above */
1275
1276enum acpi_hest_notify_types {
1277 ACPI_HEST_NOTIFY_POLLED = 0,
1278 ACPI_HEST_NOTIFY_EXTERNAL = 1,
1279 ACPI_HEST_NOTIFY_LOCAL = 2,
1280 ACPI_HEST_NOTIFY_SCI = 3,
1281 ACPI_HEST_NOTIFY_NMI = 4,
Bob Mooreca4a03142012-08-24 10:25:12 -07001282 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
1283 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
Bob Moore7cd55c72016-03-24 09:38:57 +08001284 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
1285 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
1286 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
1287 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
Bob Moore4a8a6052017-06-05 16:38:20 +08001288 ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */
1289 ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */
Bob Moore3fa34772008-04-10 19:06:43 +04001290};
1291
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001292/* Values for config_write_enable bitfield above */
1293
1294#define ACPI_HEST_TYPE (1)
1295#define ACPI_HEST_POLL_INTERVAL (1<<1)
1296#define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
1297#define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
1298#define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
1299#define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
1300
Bob Moore3fa34772008-04-10 19:06:43 +04001301/*
1302 * HEST subtables
Bob Moore3fa34772008-04-10 19:06:43 +04001303 */
1304
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001305/* 0: IA32 Machine Check Exception */
Bob Moore3fa34772008-04-10 19:06:43 +04001306
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001307struct acpi_hest_ia_machine_check {
Bob Moore3fa34772008-04-10 19:06:43 +04001308 struct acpi_hest_header header;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001309 u16 reserved1;
Bob Moorec0429332017-06-05 16:38:41 +08001310 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001311 u8 enabled;
Bob Moorec276e382009-07-27 14:55:02 +08001312 u32 records_to_preallocate;
Bob Moore3fa34772008-04-10 19:06:43 +04001313 u32 max_sections_per_record;
1314 u64 global_capability_data;
1315 u64 global_control_data;
1316 u8 num_hardware_banks;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001317 u8 reserved3[7];
Bob Moore3fa34772008-04-10 19:06:43 +04001318};
1319
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001320/* 1: IA32 Corrected Machine Check */
Bob Moore3fa34772008-04-10 19:06:43 +04001321
Bob Moore1872bbc2009-08-13 13:31:00 +08001322struct acpi_hest_ia_corrected {
Bob Moore3fa34772008-04-10 19:06:43 +04001323 struct acpi_hest_header header;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001324 u16 reserved1;
Bob Moorec0429332017-06-05 16:38:41 +08001325 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
Bob Moore3fa34772008-04-10 19:06:43 +04001326 u8 enabled;
Bob Moorec276e382009-07-27 14:55:02 +08001327 u32 records_to_preallocate;
Bob Moore3fa34772008-04-10 19:06:43 +04001328 u32 max_sections_per_record;
1329 struct acpi_hest_notify notify;
1330 u8 num_hardware_banks;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001331 u8 reserved2[3];
Bob Moore3fa34772008-04-10 19:06:43 +04001332};
1333
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001334/* 2: IA32 Non-Maskable Interrupt */
Bob Moore3fa34772008-04-10 19:06:43 +04001335
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001336struct acpi_hest_ia_nmi {
Bob Moore3fa34772008-04-10 19:06:43 +04001337 struct acpi_hest_header header;
Bob Moore3fa34772008-04-10 19:06:43 +04001338 u32 reserved;
Bob Moorec276e382009-07-27 14:55:02 +08001339 u32 records_to_preallocate;
Bob Moore3fa34772008-04-10 19:06:43 +04001340 u32 max_sections_per_record;
1341 u32 max_raw_data_length;
1342};
1343
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001344/* 3,4,5: Not used */
Bob Moore3fa34772008-04-10 19:06:43 +04001345
1346/* 6: PCI Express Root Port AER */
1347
1348struct acpi_hest_aer_root {
1349 struct acpi_hest_header header;
1350 struct acpi_hest_aer_common aer;
1351 u32 root_error_command;
1352};
1353
1354/* 7: PCI Express AER (AER Endpoint) */
1355
1356struct acpi_hest_aer {
1357 struct acpi_hest_header header;
1358 struct acpi_hest_aer_common aer;
1359};
1360
1361/* 8: PCI Express/PCI-X Bridge AER */
1362
1363struct acpi_hest_aer_bridge {
1364 struct acpi_hest_header header;
1365 struct acpi_hest_aer_common aer;
Bob Moorec276e382009-07-27 14:55:02 +08001366 u32 uncorrectable_mask2;
1367 u32 uncorrectable_severity2;
1368 u32 advanced_capabilities2;
Bob Moore3fa34772008-04-10 19:06:43 +04001369};
1370
1371/* 9: Generic Hardware Error Source */
1372
1373struct acpi_hest_generic {
1374 struct acpi_hest_header header;
Bob Moore3fa34772008-04-10 19:06:43 +04001375 u16 related_source_id;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001376 u8 reserved;
Bob Moore3fa34772008-04-10 19:06:43 +04001377 u8 enabled;
Bob Moorec276e382009-07-27 14:55:02 +08001378 u32 records_to_preallocate;
Bob Moore3fa34772008-04-10 19:06:43 +04001379 u32 max_sections_per_record;
1380 u32 max_raw_data_length;
1381 struct acpi_generic_address error_status_address;
1382 struct acpi_hest_notify notify;
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001383 u32 error_block_length;
1384};
1385
Bob Moore7cd55c72016-03-24 09:38:57 +08001386/* 10: Generic Hardware Error Source, version 2 */
1387
1388struct acpi_hest_generic_v2 {
1389 struct acpi_hest_header header;
1390 u16 related_source_id;
1391 u8 reserved;
1392 u8 enabled;
1393 u32 records_to_preallocate;
1394 u32 max_sections_per_record;
1395 u32 max_raw_data_length;
1396 struct acpi_generic_address error_status_address;
1397 struct acpi_hest_notify notify;
1398 u32 error_block_length;
1399 struct acpi_generic_address read_ack_register;
1400 u64 read_ack_preserve;
1401 u64 read_ack_write;
1402};
1403
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001404/* Generic Error Status block */
1405
Lv Zheng0a00fd52014-06-03 16:32:53 +08001406struct acpi_hest_generic_status {
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001407 u32 block_status;
1408 u32 raw_data_offset;
1409 u32 raw_data_length;
1410 u32 data_length;
1411 u32 error_severity;
1412};
1413
1414/* Values for block_status flags above */
1415
Lv Zheng0a00fd52014-06-03 16:32:53 +08001416#define ACPI_HEST_UNCORRECTABLE (1)
1417#define ACPI_HEST_CORRECTABLE (1<<1)
1418#define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
1419#define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
1420#define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001421
1422/* Generic Error Data entry */
1423
Lv Zheng0a00fd52014-06-03 16:32:53 +08001424struct acpi_hest_generic_data {
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001425 u8 section_type[16];
1426 u32 error_severity;
1427 u16 revision;
1428 u8 validation_bits;
1429 u8 flags;
1430 u32 error_data_length;
1431 u8 fru_id[16];
1432 u8 fru_text[20];
Bob Moore3fa34772008-04-10 19:06:43 +04001433};
Bob Moore970d9c92008-04-10 19:06:42 +04001434
Bob Moore7cd55c72016-03-24 09:38:57 +08001435/* Extension for revision 0x0300 */
1436
1437struct acpi_hest_generic_data_v300 {
1438 u8 section_type[16];
1439 u32 error_severity;
1440 u16 revision;
1441 u8 validation_bits;
1442 u8 flags;
1443 u32 error_data_length;
1444 u8 fru_id[16];
1445 u8 fru_text[20];
1446 u64 time_stamp;
1447};
1448
1449/* Values for error_severity above */
1450
1451#define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
1452#define ACPI_HEST_GEN_ERROR_FATAL 1
1453#define ACPI_HEST_GEN_ERROR_CORRECTED 2
1454#define ACPI_HEST_GEN_ERROR_NONE 3
1455
1456/* Flags for validation_bits above */
1457
1458#define ACPI_HEST_GEN_VALID_FRU_ID (1)
1459#define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
1460#define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
1461
Bob Moorec0429332017-06-05 16:38:41 +08001462/* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
1463
1464struct acpi_hest_ia_deferred_check {
1465 struct acpi_hest_header header;
1466 u16 reserved1;
1467 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
1468 u8 enabled;
1469 u32 records_to_preallocate;
1470 u32 max_sections_per_record;
1471 struct acpi_hest_notify notify;
1472 u8 num_hardware_banks;
1473 u8 reserved2[3];
1474};
1475
Bob Moore970d9c92008-04-10 19:06:42 +04001476/*******************************************************************************
1477 *
Lv Zhengfa418dd2017-06-05 16:37:16 +08001478 * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
1479 * Version 1
1480 *
1481 ******************************************************************************/
1482
1483struct acpi_table_hmat {
1484 struct acpi_table_header header; /* Common ACPI table header */
1485 u32 reserved;
1486};
1487
1488/* Values for HMAT structure types */
1489
1490enum acpi_hmat_type {
Alison Schofield57f5cf62019-04-17 11:13:10 -07001491 ACPI_HMAT_TYPE_PROXIMITY = 0, /* Memory proximity domain attributes */
Lv Zhengfa418dd2017-06-05 16:37:16 +08001492 ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
1493 ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
1494 ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
1495};
1496
1497struct acpi_hmat_structure {
1498 u16 type;
1499 u16 reserved;
1500 u32 length;
1501};
1502
1503/*
1504 * HMAT Structures, correspond to Type in struct acpi_hmat_structure
1505 */
1506
Erik Schmauss9a8d9612019-02-15 13:36:17 -08001507/* 0: Memory proximity domain attributes */
Lv Zhengfa418dd2017-06-05 16:37:16 +08001508
Erik Schmauss9a8d9612019-02-15 13:36:17 -08001509struct acpi_hmat_proximity_domain {
Lv Zhengfa418dd2017-06-05 16:37:16 +08001510 struct acpi_hmat_structure header;
1511 u16 flags;
1512 u16 reserved1;
1513 u32 processor_PD; /* Processor proximity domain */
1514 u32 memory_PD; /* Memory proximity domain */
1515 u32 reserved2;
Erik Schmauss9a8d9612019-02-15 13:36:17 -08001516 u64 reserved3;
1517 u64 reserved4;
Lv Zhengfa418dd2017-06-05 16:37:16 +08001518};
1519
1520/* Masks for Flags field above */
1521
1522#define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: processor_PD field is valid */
1523#define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: memory_PD field is valid */
1524#define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
1525
1526/* 1: System locality latency and bandwidth information */
1527
1528struct acpi_hmat_locality {
1529 struct acpi_hmat_structure header;
1530 u8 flags;
1531 u8 data_type;
Bob Mooref1489db2021-04-06 14:30:16 -07001532 u8 min_transfer_size;
1533 u8 reserved1;
Lv Zhengfa418dd2017-06-05 16:37:16 +08001534 u32 number_of_initiator_Pds;
1535 u32 number_of_target_Pds;
1536 u32 reserved2;
1537 u64 entry_base_unit;
1538};
1539
1540/* Masks for Flags field above */
1541
Bob Mooref1489db2021-04-06 14:30:16 -07001542#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */
Lv Zhengfa418dd2017-06-05 16:37:16 +08001543
Bob Mooref1489db2021-04-06 14:30:16 -07001544/* Values for Memory Hierarchy flags */
Lv Zhengfa418dd2017-06-05 16:37:16 +08001545
1546#define ACPI_HMAT_MEMORY 0
1547#define ACPI_HMAT_LAST_LEVEL_CACHE 1
1548#define ACPI_HMAT_1ST_LEVEL_CACHE 2
1549#define ACPI_HMAT_2ND_LEVEL_CACHE 3
1550#define ACPI_HMAT_3RD_LEVEL_CACHE 4
Bob Mooref1489db2021-04-06 14:30:16 -07001551#define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */
1552#define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */
1553
Lv Zhengfa418dd2017-06-05 16:37:16 +08001554
1555/* Values for data_type field above */
1556
1557#define ACPI_HMAT_ACCESS_LATENCY 0
1558#define ACPI_HMAT_READ_LATENCY 1
1559#define ACPI_HMAT_WRITE_LATENCY 2
1560#define ACPI_HMAT_ACCESS_BANDWIDTH 3
1561#define ACPI_HMAT_READ_BANDWIDTH 4
1562#define ACPI_HMAT_WRITE_BANDWIDTH 5
1563
1564/* 2: Memory side cache information */
1565
1566struct acpi_hmat_cache {
1567 struct acpi_hmat_structure header;
1568 u32 memory_PD;
1569 u32 reserved1;
1570 u64 cache_size;
1571 u32 cache_attributes;
1572 u16 reserved2;
1573 u16 number_of_SMBIOShandles;
1574};
1575
1576/* Masks for cache_attributes field above */
1577
1578#define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)
1579#define ACPI_HMAT_CACHE_LEVEL (0x000000F0)
1580#define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)
1581#define ACPI_HMAT_WRITE_POLICY (0x0000F000)
1582#define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)
1583
1584/* Values for cache associativity flag */
1585
1586#define ACPI_HMAT_CA_NONE (0)
1587#define ACPI_HMAT_CA_DIRECT_MAPPED (1)
1588#define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)
1589
1590/* Values for write policy flag */
1591
1592#define ACPI_HMAT_CP_NONE (0)
1593#define ACPI_HMAT_CP_WB (1)
1594#define ACPI_HMAT_CP_WT (2)
1595
1596/*******************************************************************************
1597 *
Erik Schmausse62f8222018-02-15 13:09:26 -08001598 * HPET - High Precision Event Timer table
Bob Moore6e2d5eb2009-07-27 10:53:00 +08001599 * Version 1
1600 *
Erik Schmausse62f8222018-02-15 13:09:26 -08001601 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
1602 * Version 1.0a, October 2004
Bob Moore04f8e382015-05-21 10:31:58 +08001603 *
1604 ******************************************************************************/
1605
Erik Schmausse62f8222018-02-15 13:09:26 -08001606struct acpi_table_hpet {
Bob Moore04f8e382015-05-21 10:31:58 +08001607 struct acpi_table_header header; /* Common ACPI table header */
Erik Schmausse62f8222018-02-15 13:09:26 -08001608 u32 id; /* Hardware ID of event timer block */
1609 struct acpi_generic_address address; /* Address of event timer block */
1610 u8 sequence; /* HPET sequence number */
1611 u16 minimum_tick; /* Main counter min tick, periodic mode */
Bob Moore4c189c92017-11-17 15:40:22 -08001612 u8 flags;
Bob Moore81b7cb92017-09-20 10:00:30 +08001613};
1614
Erik Schmausse62f8222018-02-15 13:09:26 -08001615/* Masks for Flags field above */
Bob Moore81b7cb92017-09-20 10:00:30 +08001616
Erik Schmausse62f8222018-02-15 13:09:26 -08001617#define ACPI_HPET_PAGE_PROTECT_MASK (3)
1618
1619/* Values for Page Protect flags */
1620
1621enum acpi_hpet_page_protect {
1622 ACPI_HPET_NO_PAGE_PROTECT = 0,
1623 ACPI_HPET_PAGE_PROTECT4 = 1,
1624 ACPI_HPET_PAGE_PROTECT64 = 2
1625};
Bob Moore81b7cb92017-09-20 10:00:30 +08001626
1627/*******************************************************************************
1628 *
Erik Schmausse62f8222018-02-15 13:09:26 -08001629 * IBFT - Boot Firmware Table
Lv Zhengb8355bc2017-06-05 16:38:26 +08001630 * Version 1
1631 *
Erik Schmausse62f8222018-02-15 13:09:26 -08001632 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
1633 * Specification", Version 1.01, March 1, 2007
1634 *
1635 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
1636 * Therefore, it is not currently supported by the disassembler.
1637 *
Lv Zhengb8355bc2017-06-05 16:38:26 +08001638 ******************************************************************************/
1639
Erik Schmausse62f8222018-02-15 13:09:26 -08001640struct acpi_table_ibft {
Lv Zhengb8355bc2017-06-05 16:38:26 +08001641 struct acpi_table_header header; /* Common ACPI table header */
Erik Schmausse62f8222018-02-15 13:09:26 -08001642 u8 reserved[12];
1643};
1644
1645/* IBFT common subtable header */
1646
1647struct acpi_ibft_header {
1648 u8 type;
1649 u8 version;
1650 u16 length;
1651 u8 index;
1652 u8 flags;
Lv Zhengb8355bc2017-06-05 16:38:26 +08001653};
1654
1655/* Values for Type field above */
1656
Erik Schmausse62f8222018-02-15 13:09:26 -08001657enum acpi_ibft_type {
1658 ACPI_IBFT_TYPE_NOT_USED = 0,
1659 ACPI_IBFT_TYPE_CONTROL = 1,
1660 ACPI_IBFT_TYPE_INITIATOR = 2,
1661 ACPI_IBFT_TYPE_NIC = 3,
1662 ACPI_IBFT_TYPE_TARGET = 4,
1663 ACPI_IBFT_TYPE_EXTENSIONS = 5,
1664 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
Lv Zhengb8355bc2017-06-05 16:38:26 +08001665};
1666
Erik Schmausse62f8222018-02-15 13:09:26 -08001667/* IBFT subtables */
Lv Zhengb8355bc2017-06-05 16:38:26 +08001668
Erik Schmausse62f8222018-02-15 13:09:26 -08001669struct acpi_ibft_control {
1670 struct acpi_ibft_header header;
1671 u16 extensions;
1672 u16 initiator_offset;
1673 u16 nic0_offset;
1674 u16 target0_offset;
1675 u16 nic1_offset;
1676 u16 target1_offset;
Lv Zhengb8355bc2017-06-05 16:38:26 +08001677};
1678
Erik Schmausse62f8222018-02-15 13:09:26 -08001679struct acpi_ibft_initiator {
1680 struct acpi_ibft_header header;
1681 u8 sns_server[16];
1682 u8 slp_server[16];
1683 u8 primary_server[16];
1684 u8 secondary_server[16];
1685 u16 name_length;
1686 u16 name_offset;
Lv Zhengb8355bc2017-06-05 16:38:26 +08001687};
1688
Erik Schmausse62f8222018-02-15 13:09:26 -08001689struct acpi_ibft_nic {
1690 struct acpi_ibft_header header;
1691 u8 ip_address[16];
1692 u8 subnet_mask_prefix;
1693 u8 origin;
1694 u8 gateway[16];
1695 u8 primary_dns[16];
1696 u8 secondary_dns[16];
1697 u8 dhcp[16];
1698 u16 vlan;
1699 u8 mac_address[6];
1700 u16 pci_address;
1701 u16 name_length;
1702 u16 name_offset;
Lv Zhengb8355bc2017-06-05 16:38:26 +08001703};
1704
Erik Schmausse62f8222018-02-15 13:09:26 -08001705struct acpi_ibft_target {
1706 struct acpi_ibft_header header;
1707 u8 target_ip_address[16];
1708 u16 target_ip_socket;
1709 u8 target_boot_lun[8];
1710 u8 chap_type;
1711 u8 nic_association;
1712 u16 target_name_length;
1713 u16 target_name_offset;
1714 u16 chap_name_length;
1715 u16 chap_name_offset;
1716 u16 chap_secret_length;
1717 u16 chap_secret_offset;
1718 u16 reverse_chap_name_length;
1719 u16 reverse_chap_name_offset;
1720 u16 reverse_chap_secret_length;
1721 u16 reverse_chap_secret_offset;
Bob Moorea618c7f2017-06-05 16:38:47 +08001722};
1723
Robert Moore6e596082014-03-05 14:12:01 +08001724/* Reset to default packing */
1725
1726#pragma pack()
Linus Torvalds1da177e2005-04-16 15:20:36 -07001727
Len Brown4be44fc2005-08-05 00:44:28 -04001728#endif /* __ACTBL1_H__ */