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