actbl1.h 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627
  1. /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2. /******************************************************************************
  3. *
  4. * Name: actbl1.h - Additional ACPI table definitions
  5. *
  6. * Copyright (C) 2000 - 2018, Intel Corp.
  7. *
  8. *****************************************************************************/
  9. #ifndef __ACTBL1_H__
  10. #define __ACTBL1_H__
  11. /*******************************************************************************
  12. *
  13. * Additional ACPI Tables
  14. *
  15. * These tables are not consumed directly by the ACPICA subsystem, but are
  16. * included here to support device drivers and the AML disassembler.
  17. *
  18. ******************************************************************************/
  19. /*
  20. * Values for description table header signatures for tables defined in this
  21. * file. Useful because they make it more difficult to inadvertently type in
  22. * the wrong signature.
  23. */
  24. #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
  25. #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
  26. #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
  27. #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
  28. #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
  29. #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
  30. #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
  31. #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
  32. #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
  33. #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
  34. #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
  35. #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
  36. #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
  37. #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
  38. #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
  39. #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
  40. #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
  41. #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
  42. #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
  43. #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
  44. #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
  45. /* Reserved table signatures */
  46. #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
  47. #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
  48. /*
  49. * These tables have been seen in the field, but no definition has been found
  50. */
  51. #ifdef ACPI_UNDEFINED_TABLES
  52. #define ACPI_SIG_ATKG "ATKG"
  53. #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
  54. #define ACPI_SIG_IEIT "IEIT"
  55. #endif
  56. /*
  57. * All tables must be byte-packed to match the ACPI specification, since
  58. * the tables are provided by the system BIOS.
  59. */
  60. #pragma pack(1)
  61. /*
  62. * Note: C bitfields are not used for this reason:
  63. *
  64. * "Bitfields are great and easy to read, but unfortunately the C language
  65. * does not specify the layout of bitfields in memory, which means they are
  66. * essentially useless for dealing with packed data in on-disk formats or
  67. * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
  68. * this decision was a design error in C. Ritchie could have picked an order
  69. * and stuck with it." Norman Ramsey.
  70. * See http://stackoverflow.com/a/1053662/41661
  71. */
  72. /*******************************************************************************
  73. *
  74. * Common subtable headers
  75. *
  76. ******************************************************************************/
  77. /* Generic subtable header (used in MADT, SRAT, etc.) */
  78. struct acpi_subtable_header {
  79. u8 type;
  80. u8 length;
  81. };
  82. /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
  83. struct acpi_whea_header {
  84. u8 action;
  85. u8 instruction;
  86. u8 flags;
  87. u8 reserved;
  88. struct acpi_generic_address register_region;
  89. u64 value; /* Value used with Read/Write register */
  90. u64 mask; /* Bitmask required for this register instruction */
  91. };
  92. /*******************************************************************************
  93. *
  94. * ASF - Alert Standard Format table (Signature "ASF!")
  95. * Revision 0x10
  96. *
  97. * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
  98. *
  99. ******************************************************************************/
  100. struct acpi_table_asf {
  101. struct acpi_table_header header; /* Common ACPI table header */
  102. };
  103. /* ASF subtable header */
  104. struct acpi_asf_header {
  105. u8 type;
  106. u8 reserved;
  107. u16 length;
  108. };
  109. /* Values for Type field above */
  110. enum acpi_asf_type {
  111. ACPI_ASF_TYPE_INFO = 0,
  112. ACPI_ASF_TYPE_ALERT = 1,
  113. ACPI_ASF_TYPE_CONTROL = 2,
  114. ACPI_ASF_TYPE_BOOT = 3,
  115. ACPI_ASF_TYPE_ADDRESS = 4,
  116. ACPI_ASF_TYPE_RESERVED = 5
  117. };
  118. /*
  119. * ASF subtables
  120. */
  121. /* 0: ASF Information */
  122. struct acpi_asf_info {
  123. struct acpi_asf_header header;
  124. u8 min_reset_value;
  125. u8 min_poll_interval;
  126. u16 system_id;
  127. u32 mfg_id;
  128. u8 flags;
  129. u8 reserved2[3];
  130. };
  131. /* Masks for Flags field above */
  132. #define ACPI_ASF_SMBUS_PROTOCOLS (1)
  133. /* 1: ASF Alerts */
  134. struct acpi_asf_alert {
  135. struct acpi_asf_header header;
  136. u8 assert_mask;
  137. u8 deassert_mask;
  138. u8 alerts;
  139. u8 data_length;
  140. };
  141. struct acpi_asf_alert_data {
  142. u8 address;
  143. u8 command;
  144. u8 mask;
  145. u8 value;
  146. u8 sensor_type;
  147. u8 type;
  148. u8 offset;
  149. u8 source_type;
  150. u8 severity;
  151. u8 sensor_number;
  152. u8 entity;
  153. u8 instance;
  154. };
  155. /* 2: ASF Remote Control */
  156. struct acpi_asf_remote {
  157. struct acpi_asf_header header;
  158. u8 controls;
  159. u8 data_length;
  160. u16 reserved2;
  161. };
  162. struct acpi_asf_control_data {
  163. u8 function;
  164. u8 address;
  165. u8 command;
  166. u8 value;
  167. };
  168. /* 3: ASF RMCP Boot Options */
  169. struct acpi_asf_rmcp {
  170. struct acpi_asf_header header;
  171. u8 capabilities[7];
  172. u8 completion_code;
  173. u32 enterprise_id;
  174. u8 command;
  175. u16 parameter;
  176. u16 boot_options;
  177. u16 oem_parameters;
  178. };
  179. /* 4: ASF Address */
  180. struct acpi_asf_address {
  181. struct acpi_asf_header header;
  182. u8 eprom_address;
  183. u8 devices;
  184. };
  185. /*******************************************************************************
  186. *
  187. * BERT - Boot Error Record Table (ACPI 4.0)
  188. * Version 1
  189. *
  190. ******************************************************************************/
  191. struct acpi_table_bert {
  192. struct acpi_table_header header; /* Common ACPI table header */
  193. u32 region_length; /* Length of the boot error region */
  194. u64 address; /* Physical address of the error region */
  195. };
  196. /* Boot Error Region (not a subtable, pointed to by Address field above) */
  197. struct acpi_bert_region {
  198. u32 block_status; /* Type of error information */
  199. u32 raw_data_offset; /* Offset to raw error data */
  200. u32 raw_data_length; /* Length of raw error data */
  201. u32 data_length; /* Length of generic error data */
  202. u32 error_severity; /* Severity code */
  203. };
  204. /* Values for block_status flags above */
  205. #define ACPI_BERT_UNCORRECTABLE (1)
  206. #define ACPI_BERT_CORRECTABLE (1<<1)
  207. #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
  208. #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
  209. #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
  210. /* Values for error_severity above */
  211. enum acpi_bert_error_severity {
  212. ACPI_BERT_ERROR_CORRECTABLE = 0,
  213. ACPI_BERT_ERROR_FATAL = 1,
  214. ACPI_BERT_ERROR_CORRECTED = 2,
  215. ACPI_BERT_ERROR_NONE = 3,
  216. ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
  217. };
  218. /*
  219. * Note: The generic error data that follows the error_severity field above
  220. * uses the struct acpi_hest_generic_data defined under the HEST table below
  221. */
  222. /*******************************************************************************
  223. *
  224. * BGRT - Boot Graphics Resource Table (ACPI 5.0)
  225. * Version 1
  226. *
  227. ******************************************************************************/
  228. struct acpi_table_bgrt {
  229. struct acpi_table_header header; /* Common ACPI table header */
  230. u16 version;
  231. u8 status;
  232. u8 image_type;
  233. u64 image_address;
  234. u32 image_offset_x;
  235. u32 image_offset_y;
  236. };
  237. /* Flags for Status field above */
  238. #define ACPI_BGRT_DISPLAYED (1)
  239. #define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
  240. /*******************************************************************************
  241. *
  242. * BOOT - Simple Boot Flag Table
  243. * Version 1
  244. *
  245. * Conforms to the "Simple Boot Flag Specification", Version 2.1
  246. *
  247. ******************************************************************************/
  248. struct acpi_table_boot {
  249. struct acpi_table_header header; /* Common ACPI table header */
  250. u8 cmos_index; /* Index in CMOS RAM for the boot register */
  251. u8 reserved[3];
  252. };
  253. /*******************************************************************************
  254. *
  255. * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
  256. * Version 1
  257. *
  258. ******************************************************************************/
  259. struct acpi_table_cpep {
  260. struct acpi_table_header header; /* Common ACPI table header */
  261. u64 reserved;
  262. };
  263. /* Subtable */
  264. struct acpi_cpep_polling {
  265. struct acpi_subtable_header header;
  266. u8 id; /* Processor ID */
  267. u8 eid; /* Processor EID */
  268. u32 interval; /* Polling interval (msec) */
  269. };
  270. /*******************************************************************************
  271. *
  272. * CSRT - Core System Resource Table
  273. * Version 0
  274. *
  275. * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
  276. *
  277. ******************************************************************************/
  278. struct acpi_table_csrt {
  279. struct acpi_table_header header; /* Common ACPI table header */
  280. };
  281. /* Resource Group subtable */
  282. struct acpi_csrt_group {
  283. u32 length;
  284. u32 vendor_id;
  285. u32 subvendor_id;
  286. u16 device_id;
  287. u16 subdevice_id;
  288. u16 revision;
  289. u16 reserved;
  290. u32 shared_info_length;
  291. /* Shared data immediately follows (Length = shared_info_length) */
  292. };
  293. /* Shared Info subtable */
  294. struct acpi_csrt_shared_info {
  295. u16 major_version;
  296. u16 minor_version;
  297. u32 mmio_base_low;
  298. u32 mmio_base_high;
  299. u32 gsi_interrupt;
  300. u8 interrupt_polarity;
  301. u8 interrupt_mode;
  302. u8 num_channels;
  303. u8 dma_address_width;
  304. u16 base_request_line;
  305. u16 num_handshake_signals;
  306. u32 max_block_size;
  307. /* Resource descriptors immediately follow (Length = Group length - shared_info_length) */
  308. };
  309. /* Resource Descriptor subtable */
  310. struct acpi_csrt_descriptor {
  311. u32 length;
  312. u16 type;
  313. u16 subtype;
  314. u32 uid;
  315. /* Resource-specific information immediately follows */
  316. };
  317. /* Resource Types */
  318. #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
  319. #define ACPI_CSRT_TYPE_TIMER 0x0002
  320. #define ACPI_CSRT_TYPE_DMA 0x0003
  321. /* Resource Subtypes */
  322. #define ACPI_CSRT_XRUPT_LINE 0x0000
  323. #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
  324. #define ACPI_CSRT_TIMER 0x0000
  325. #define ACPI_CSRT_DMA_CHANNEL 0x0000
  326. #define ACPI_CSRT_DMA_CONTROLLER 0x0001
  327. /*******************************************************************************
  328. *
  329. * DBG2 - Debug Port Table 2
  330. * Version 0 (Both main table and subtables)
  331. *
  332. * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
  333. *
  334. ******************************************************************************/
  335. struct acpi_table_dbg2 {
  336. struct acpi_table_header header; /* Common ACPI table header */
  337. u32 info_offset;
  338. u32 info_count;
  339. };
  340. struct acpi_dbg2_header {
  341. u32 info_offset;
  342. u32 info_count;
  343. };
  344. /* Debug Device Information Subtable */
  345. struct acpi_dbg2_device {
  346. u8 revision;
  347. u16 length;
  348. u8 register_count; /* Number of base_address registers */
  349. u16 namepath_length;
  350. u16 namepath_offset;
  351. u16 oem_data_length;
  352. u16 oem_data_offset;
  353. u16 port_type;
  354. u16 port_subtype;
  355. u16 reserved;
  356. u16 base_address_offset;
  357. u16 address_size_offset;
  358. /*
  359. * Data that follows:
  360. * base_address (required) - Each in 12-byte Generic Address Structure format.
  361. * address_size (required) - Array of u32 sizes corresponding to each base_address register.
  362. * Namepath (required) - Null terminated string. Single dot if not supported.
  363. * oem_data (optional) - Length is oem_data_length.
  364. */
  365. };
  366. /* Types for port_type field above */
  367. #define ACPI_DBG2_SERIAL_PORT 0x8000
  368. #define ACPI_DBG2_1394_PORT 0x8001
  369. #define ACPI_DBG2_USB_PORT 0x8002
  370. #define ACPI_DBG2_NET_PORT 0x8003
  371. /* Subtypes for port_subtype field above */
  372. #define ACPI_DBG2_16550_COMPATIBLE 0x0000
  373. #define ACPI_DBG2_16550_SUBSET 0x0001
  374. #define ACPI_DBG2_ARM_PL011 0x0003
  375. #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
  376. #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
  377. #define ACPI_DBG2_ARM_DCC 0x000F
  378. #define ACPI_DBG2_BCM2835 0x0010
  379. #define ACPI_DBG2_1394_STANDARD 0x0000
  380. #define ACPI_DBG2_USB_XHCI 0x0000
  381. #define ACPI_DBG2_USB_EHCI 0x0001
  382. /*******************************************************************************
  383. *
  384. * DBGP - Debug Port table
  385. * Version 1
  386. *
  387. * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
  388. *
  389. ******************************************************************************/
  390. struct acpi_table_dbgp {
  391. struct acpi_table_header header; /* Common ACPI table header */
  392. u8 type; /* 0=full 16550, 1=subset of 16550 */
  393. u8 reserved[3];
  394. struct acpi_generic_address debug_port;
  395. };
  396. /*******************************************************************************
  397. *
  398. * DMAR - DMA Remapping table
  399. * Version 1
  400. *
  401. * Conforms to "Intel Virtualization Technology for Directed I/O",
  402. * Version 2.3, October 2014
  403. *
  404. ******************************************************************************/
  405. struct acpi_table_dmar {
  406. struct acpi_table_header header; /* Common ACPI table header */
  407. u8 width; /* Host Address Width */
  408. u8 flags;
  409. u8 reserved[10];
  410. };
  411. /* Masks for Flags field above */
  412. #define ACPI_DMAR_INTR_REMAP (1)
  413. #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
  414. #define ACPI_DMAR_X2APIC_MODE (1<<2)
  415. /* DMAR subtable header */
  416. struct acpi_dmar_header {
  417. u16 type;
  418. u16 length;
  419. };
  420. /* Values for subtable type in struct acpi_dmar_header */
  421. enum acpi_dmar_type {
  422. ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
  423. ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
  424. ACPI_DMAR_TYPE_ROOT_ATS = 2,
  425. ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
  426. ACPI_DMAR_TYPE_NAMESPACE = 4,
  427. ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
  428. };
  429. /* DMAR Device Scope structure */
  430. struct acpi_dmar_device_scope {
  431. u8 entry_type;
  432. u8 length;
  433. u16 reserved;
  434. u8 enumeration_id;
  435. u8 bus;
  436. };
  437. /* Values for entry_type in struct acpi_dmar_device_scope - device types */
  438. enum acpi_dmar_scope_type {
  439. ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
  440. ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
  441. ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
  442. ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
  443. ACPI_DMAR_SCOPE_TYPE_HPET = 4,
  444. ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
  445. ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  446. };
  447. struct acpi_dmar_pci_path {
  448. u8 device;
  449. u8 function;
  450. };
  451. /*
  452. * DMAR Subtables, correspond to Type in struct acpi_dmar_header
  453. */
  454. /* 0: Hardware Unit Definition */
  455. struct acpi_dmar_hardware_unit {
  456. struct acpi_dmar_header header;
  457. u8 flags;
  458. u8 reserved;
  459. u16 segment;
  460. u64 address; /* Register Base Address */
  461. };
  462. /* Masks for Flags field above */
  463. #define ACPI_DMAR_INCLUDE_ALL (1)
  464. /* 1: Reserved Memory Defininition */
  465. struct acpi_dmar_reserved_memory {
  466. struct acpi_dmar_header header;
  467. u16 reserved;
  468. u16 segment;
  469. u64 base_address; /* 4K aligned base address */
  470. u64 end_address; /* 4K aligned limit address */
  471. };
  472. /* Masks for Flags field above */
  473. #define ACPI_DMAR_ALLOW_ALL (1)
  474. /* 2: Root Port ATS Capability Reporting Structure */
  475. struct acpi_dmar_atsr {
  476. struct acpi_dmar_header header;
  477. u8 flags;
  478. u8 reserved;
  479. u16 segment;
  480. };
  481. /* Masks for Flags field above */
  482. #define ACPI_DMAR_ALL_PORTS (1)
  483. /* 3: Remapping Hardware Static Affinity Structure */
  484. struct acpi_dmar_rhsa {
  485. struct acpi_dmar_header header;
  486. u32 reserved;
  487. u64 base_address;
  488. u32 proximity_domain;
  489. };
  490. /* 4: ACPI Namespace Device Declaration Structure */
  491. struct acpi_dmar_andd {
  492. struct acpi_dmar_header header;
  493. u8 reserved[3];
  494. u8 device_number;
  495. char device_name[1];
  496. };
  497. /*******************************************************************************
  498. *
  499. * DRTM - Dynamic Root of Trust for Measurement table
  500. * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
  501. * Table version 1
  502. *
  503. ******************************************************************************/
  504. struct acpi_table_drtm {
  505. struct acpi_table_header header; /* Common ACPI table header */
  506. u64 entry_base_address;
  507. u64 entry_length;
  508. u32 entry_address32;
  509. u64 entry_address64;
  510. u64 exit_address;
  511. u64 log_area_address;
  512. u32 log_area_length;
  513. u64 arch_dependent_address;
  514. u32 flags;
  515. };
  516. /* Flag Definitions for above */
  517. #define ACPI_DRTM_ACCESS_ALLOWED (1)
  518. #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
  519. #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
  520. #define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
  521. /* 1) Validated Tables List (64-bit addresses) */
  522. struct acpi_drtm_vtable_list {
  523. u32 validated_table_count;
  524. u64 validated_tables[1];
  525. };
  526. /* 2) Resources List (of Resource Descriptors) */
  527. /* Resource Descriptor */
  528. struct acpi_drtm_resource {
  529. u8 size[7];
  530. u8 type;
  531. u64 address;
  532. };
  533. struct acpi_drtm_resource_list {
  534. u32 resource_count;
  535. struct acpi_drtm_resource resources[1];
  536. };
  537. /* 3) Platform-specific Identifiers List */
  538. struct acpi_drtm_dps_id {
  539. u32 dps_id_length;
  540. u8 dps_id[16];
  541. };
  542. /*******************************************************************************
  543. *
  544. * ECDT - Embedded Controller Boot Resources Table
  545. * Version 1
  546. *
  547. ******************************************************************************/
  548. struct acpi_table_ecdt {
  549. struct acpi_table_header header; /* Common ACPI table header */
  550. struct acpi_generic_address control; /* Address of EC command/status register */
  551. struct acpi_generic_address data; /* Address of EC data register */
  552. u32 uid; /* Unique ID - must be same as the EC _UID method */
  553. u8 gpe; /* The GPE for the EC */
  554. u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
  555. };
  556. /*******************************************************************************
  557. *
  558. * EINJ - Error Injection Table (ACPI 4.0)
  559. * Version 1
  560. *
  561. ******************************************************************************/
  562. struct acpi_table_einj {
  563. struct acpi_table_header header; /* Common ACPI table header */
  564. u32 header_length;
  565. u8 flags;
  566. u8 reserved[3];
  567. u32 entries;
  568. };
  569. /* EINJ Injection Instruction Entries (actions) */
  570. struct acpi_einj_entry {
  571. struct acpi_whea_header whea_header; /* Common header for WHEA tables */
  572. };
  573. /* Masks for Flags field above */
  574. #define ACPI_EINJ_PRESERVE (1)
  575. /* Values for Action field above */
  576. enum acpi_einj_actions {
  577. ACPI_EINJ_BEGIN_OPERATION = 0,
  578. ACPI_EINJ_GET_TRIGGER_TABLE = 1,
  579. ACPI_EINJ_SET_ERROR_TYPE = 2,
  580. ACPI_EINJ_GET_ERROR_TYPE = 3,
  581. ACPI_EINJ_END_OPERATION = 4,
  582. ACPI_EINJ_EXECUTE_OPERATION = 5,
  583. ACPI_EINJ_CHECK_BUSY_STATUS = 6,
  584. ACPI_EINJ_GET_COMMAND_STATUS = 7,
  585. ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
  586. ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
  587. ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
  588. ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
  589. };
  590. /* Values for Instruction field above */
  591. enum acpi_einj_instructions {
  592. ACPI_EINJ_READ_REGISTER = 0,
  593. ACPI_EINJ_READ_REGISTER_VALUE = 1,
  594. ACPI_EINJ_WRITE_REGISTER = 2,
  595. ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
  596. ACPI_EINJ_NOOP = 4,
  597. ACPI_EINJ_FLUSH_CACHELINE = 5,
  598. ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
  599. };
  600. struct acpi_einj_error_type_with_addr {
  601. u32 error_type;
  602. u32 vendor_struct_offset;
  603. u32 flags;
  604. u32 apic_id;
  605. u64 address;
  606. u64 range;
  607. u32 pcie_id;
  608. };
  609. struct acpi_einj_vendor {
  610. u32 length;
  611. u32 pcie_id;
  612. u16 vendor_id;
  613. u16 device_id;
  614. u8 revision_id;
  615. u8 reserved[3];
  616. };
  617. /* EINJ Trigger Error Action Table */
  618. struct acpi_einj_trigger {
  619. u32 header_size;
  620. u32 revision;
  621. u32 table_size;
  622. u32 entry_count;
  623. };
  624. /* Command status return values */
  625. enum acpi_einj_command_status {
  626. ACPI_EINJ_SUCCESS = 0,
  627. ACPI_EINJ_FAILURE = 1,
  628. ACPI_EINJ_INVALID_ACCESS = 2,
  629. ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
  630. };
  631. /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
  632. #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
  633. #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
  634. #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
  635. #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
  636. #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
  637. #define ACPI_EINJ_MEMORY_FATAL (1<<5)
  638. #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
  639. #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
  640. #define ACPI_EINJ_PCIX_FATAL (1<<8)
  641. #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
  642. #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
  643. #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
  644. #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
  645. /*******************************************************************************
  646. *
  647. * ERST - Error Record Serialization Table (ACPI 4.0)
  648. * Version 1
  649. *
  650. ******************************************************************************/
  651. struct acpi_table_erst {
  652. struct acpi_table_header header; /* Common ACPI table header */
  653. u32 header_length;
  654. u32 reserved;
  655. u32 entries;
  656. };
  657. /* ERST Serialization Entries (actions) */
  658. struct acpi_erst_entry {
  659. struct acpi_whea_header whea_header; /* Common header for WHEA tables */
  660. };
  661. /* Masks for Flags field above */
  662. #define ACPI_ERST_PRESERVE (1)
  663. /* Values for Action field above */
  664. enum acpi_erst_actions {
  665. ACPI_ERST_BEGIN_WRITE = 0,
  666. ACPI_ERST_BEGIN_READ = 1,
  667. ACPI_ERST_BEGIN_CLEAR = 2,
  668. ACPI_ERST_END = 3,
  669. ACPI_ERST_SET_RECORD_OFFSET = 4,
  670. ACPI_ERST_EXECUTE_OPERATION = 5,
  671. ACPI_ERST_CHECK_BUSY_STATUS = 6,
  672. ACPI_ERST_GET_COMMAND_STATUS = 7,
  673. ACPI_ERST_GET_RECORD_ID = 8,
  674. ACPI_ERST_SET_RECORD_ID = 9,
  675. ACPI_ERST_GET_RECORD_COUNT = 10,
  676. ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
  677. ACPI_ERST_NOT_USED = 12,
  678. ACPI_ERST_GET_ERROR_RANGE = 13,
  679. ACPI_ERST_GET_ERROR_LENGTH = 14,
  680. ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
  681. ACPI_ERST_EXECUTE_TIMINGS = 16,
  682. ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
  683. };
  684. /* Values for Instruction field above */
  685. enum acpi_erst_instructions {
  686. ACPI_ERST_READ_REGISTER = 0,
  687. ACPI_ERST_READ_REGISTER_VALUE = 1,
  688. ACPI_ERST_WRITE_REGISTER = 2,
  689. ACPI_ERST_WRITE_REGISTER_VALUE = 3,
  690. ACPI_ERST_NOOP = 4,
  691. ACPI_ERST_LOAD_VAR1 = 5,
  692. ACPI_ERST_LOAD_VAR2 = 6,
  693. ACPI_ERST_STORE_VAR1 = 7,
  694. ACPI_ERST_ADD = 8,
  695. ACPI_ERST_SUBTRACT = 9,
  696. ACPI_ERST_ADD_VALUE = 10,
  697. ACPI_ERST_SUBTRACT_VALUE = 11,
  698. ACPI_ERST_STALL = 12,
  699. ACPI_ERST_STALL_WHILE_TRUE = 13,
  700. ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
  701. ACPI_ERST_GOTO = 15,
  702. ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
  703. ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
  704. ACPI_ERST_MOVE_DATA = 18,
  705. ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
  706. };
  707. /* Command status return values */
  708. enum acpi_erst_command_status {
  709. ACPI_ERST_SUCESS = 0,
  710. ACPI_ERST_NO_SPACE = 1,
  711. ACPI_ERST_NOT_AVAILABLE = 2,
  712. ACPI_ERST_FAILURE = 3,
  713. ACPI_ERST_RECORD_EMPTY = 4,
  714. ACPI_ERST_NOT_FOUND = 5,
  715. ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
  716. };
  717. /* Error Record Serialization Information */
  718. struct acpi_erst_info {
  719. u16 signature; /* Should be "ER" */
  720. u8 data[48];
  721. };
  722. /*******************************************************************************
  723. *
  724. * FPDT - Firmware Performance Data Table (ACPI 5.0)
  725. * Version 1
  726. *
  727. ******************************************************************************/
  728. struct acpi_table_fpdt {
  729. struct acpi_table_header header; /* Common ACPI table header */
  730. };
  731. /* FPDT subtable header (Performance Record Structure) */
  732. struct acpi_fpdt_header {
  733. u16 type;
  734. u8 length;
  735. u8 revision;
  736. };
  737. /* Values for Type field above */
  738. enum acpi_fpdt_type {
  739. ACPI_FPDT_TYPE_BOOT = 0,
  740. ACPI_FPDT_TYPE_S3PERF = 1
  741. };
  742. /*
  743. * FPDT subtables
  744. */
  745. /* 0: Firmware Basic Boot Performance Record */
  746. struct acpi_fpdt_boot_pointer {
  747. struct acpi_fpdt_header header;
  748. u8 reserved[4];
  749. u64 address;
  750. };
  751. /* 1: S3 Performance Table Pointer Record */
  752. struct acpi_fpdt_s3pt_pointer {
  753. struct acpi_fpdt_header header;
  754. u8 reserved[4];
  755. u64 address;
  756. };
  757. /*
  758. * S3PT - S3 Performance Table. This table is pointed to by the
  759. * S3 Pointer Record above.
  760. */
  761. struct acpi_table_s3pt {
  762. u8 signature[4]; /* "S3PT" */
  763. u32 length;
  764. };
  765. /*
  766. * S3PT Subtables (Not part of the actual FPDT)
  767. */
  768. /* Values for Type field in S3PT header */
  769. enum acpi_s3pt_type {
  770. ACPI_S3PT_TYPE_RESUME = 0,
  771. ACPI_S3PT_TYPE_SUSPEND = 1,
  772. ACPI_FPDT_BOOT_PERFORMANCE = 2
  773. };
  774. struct acpi_s3pt_resume {
  775. struct acpi_fpdt_header header;
  776. u32 resume_count;
  777. u64 full_resume;
  778. u64 average_resume;
  779. };
  780. struct acpi_s3pt_suspend {
  781. struct acpi_fpdt_header header;
  782. u64 suspend_start;
  783. u64 suspend_end;
  784. };
  785. /*
  786. * FPDT Boot Performance Record (Not part of the actual FPDT)
  787. */
  788. struct acpi_fpdt_boot {
  789. struct acpi_fpdt_header header;
  790. u8 reserved[4];
  791. u64 reset_end;
  792. u64 load_start;
  793. u64 startup_start;
  794. u64 exit_services_entry;
  795. u64 exit_services_exit;
  796. };
  797. /*******************************************************************************
  798. *
  799. * GTDT - Generic Timer Description Table (ACPI 5.1)
  800. * Version 2
  801. *
  802. ******************************************************************************/
  803. struct acpi_table_gtdt {
  804. struct acpi_table_header header; /* Common ACPI table header */
  805. u64 counter_block_addresss;
  806. u32 reserved;
  807. u32 secure_el1_interrupt;
  808. u32 secure_el1_flags;
  809. u32 non_secure_el1_interrupt;
  810. u32 non_secure_el1_flags;
  811. u32 virtual_timer_interrupt;
  812. u32 virtual_timer_flags;
  813. u32 non_secure_el2_interrupt;
  814. u32 non_secure_el2_flags;
  815. u64 counter_read_block_address;
  816. u32 platform_timer_count;
  817. u32 platform_timer_offset;
  818. };
  819. /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
  820. #define ACPI_GTDT_INTERRUPT_MODE (1)
  821. #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
  822. #define ACPI_GTDT_ALWAYS_ON (1<<2)
  823. /* Common GTDT subtable header */
  824. struct acpi_gtdt_header {
  825. u8 type;
  826. u16 length;
  827. };
  828. /* Values for GTDT subtable type above */
  829. enum acpi_gtdt_type {
  830. ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
  831. ACPI_GTDT_TYPE_WATCHDOG = 1,
  832. ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
  833. };
  834. /* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */
  835. /* 0: Generic Timer Block */
  836. struct acpi_gtdt_timer_block {
  837. struct acpi_gtdt_header header;
  838. u8 reserved;
  839. u64 block_address;
  840. u32 timer_count;
  841. u32 timer_offset;
  842. };
  843. /* Timer Sub-Structure, one per timer */
  844. struct acpi_gtdt_timer_entry {
  845. u8 frame_number;
  846. u8 reserved[3];
  847. u64 base_address;
  848. u64 el0_base_address;
  849. u32 timer_interrupt;
  850. u32 timer_flags;
  851. u32 virtual_timer_interrupt;
  852. u32 virtual_timer_flags;
  853. u32 common_flags;
  854. };
  855. /* Flag Definitions: timer_flags and virtual_timer_flags above */
  856. #define ACPI_GTDT_GT_IRQ_MODE (1)
  857. #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
  858. /* Flag Definitions: common_flags above */
  859. #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
  860. #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
  861. /* 1: SBSA Generic Watchdog Structure */
  862. struct acpi_gtdt_watchdog {
  863. struct acpi_gtdt_header header;
  864. u8 reserved;
  865. u64 refresh_frame_address;
  866. u64 control_frame_address;
  867. u32 timer_interrupt;
  868. u32 timer_flags;
  869. };
  870. /* Flag Definitions: timer_flags above */
  871. #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
  872. #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
  873. #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
  874. /*******************************************************************************
  875. *
  876. * HEST - Hardware Error Source Table (ACPI 4.0)
  877. * Version 1
  878. *
  879. ******************************************************************************/
  880. struct acpi_table_hest {
  881. struct acpi_table_header header; /* Common ACPI table header */
  882. u32 error_source_count;
  883. };
  884. /* HEST subtable header */
  885. struct acpi_hest_header {
  886. u16 type;
  887. u16 source_id;
  888. };
  889. /* Values for Type field above for subtables */
  890. enum acpi_hest_types {
  891. ACPI_HEST_TYPE_IA32_CHECK = 0,
  892. ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
  893. ACPI_HEST_TYPE_IA32_NMI = 2,
  894. ACPI_HEST_TYPE_NOT_USED3 = 3,
  895. ACPI_HEST_TYPE_NOT_USED4 = 4,
  896. ACPI_HEST_TYPE_NOT_USED5 = 5,
  897. ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
  898. ACPI_HEST_TYPE_AER_ENDPOINT = 7,
  899. ACPI_HEST_TYPE_AER_BRIDGE = 8,
  900. ACPI_HEST_TYPE_GENERIC_ERROR = 9,
  901. ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
  902. ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,
  903. ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */
  904. };
  905. /*
  906. * HEST substructures contained in subtables
  907. */
  908. /*
  909. * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and
  910. * struct acpi_hest_ia_corrected structures.
  911. */
  912. struct acpi_hest_ia_error_bank {
  913. u8 bank_number;
  914. u8 clear_status_on_init;
  915. u8 status_format;
  916. u8 reserved;
  917. u32 control_register;
  918. u64 control_data;
  919. u32 status_register;
  920. u32 address_register;
  921. u32 misc_register;
  922. };
  923. /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
  924. struct acpi_hest_aer_common {
  925. u16 reserved1;
  926. u8 flags;
  927. u8 enabled;
  928. u32 records_to_preallocate;
  929. u32 max_sections_per_record;
  930. u32 bus; /* Bus and Segment numbers */
  931. u16 device;
  932. u16 function;
  933. u16 device_control;
  934. u16 reserved2;
  935. u32 uncorrectable_mask;
  936. u32 uncorrectable_severity;
  937. u32 correctable_mask;
  938. u32 advanced_capabilities;
  939. };
  940. /* Masks for HEST Flags fields */
  941. #define ACPI_HEST_FIRMWARE_FIRST (1)
  942. #define ACPI_HEST_GLOBAL (1<<1)
  943. #define ACPI_HEST_GHES_ASSIST (1<<2)
  944. /*
  945. * Macros to access the bus/segment numbers in Bus field above:
  946. * Bus number is encoded in bits 7:0
  947. * Segment number is encoded in bits 23:8
  948. */
  949. #define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
  950. #define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)
  951. /* Hardware Error Notification */
  952. struct acpi_hest_notify {
  953. u8 type;
  954. u8 length;
  955. u16 config_write_enable;
  956. u32 poll_interval;
  957. u32 vector;
  958. u32 polling_threshold_value;
  959. u32 polling_threshold_window;
  960. u32 error_threshold_value;
  961. u32 error_threshold_window;
  962. };
  963. /* Values for Notify Type field above */
  964. enum acpi_hest_notify_types {
  965. ACPI_HEST_NOTIFY_POLLED = 0,
  966. ACPI_HEST_NOTIFY_EXTERNAL = 1,
  967. ACPI_HEST_NOTIFY_LOCAL = 2,
  968. ACPI_HEST_NOTIFY_SCI = 3,
  969. ACPI_HEST_NOTIFY_NMI = 4,
  970. ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
  971. ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
  972. ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
  973. ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
  974. ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
  975. ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
  976. ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */
  977. ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */
  978. };
  979. /* Values for config_write_enable bitfield above */
  980. #define ACPI_HEST_TYPE (1)
  981. #define ACPI_HEST_POLL_INTERVAL (1<<1)
  982. #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
  983. #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
  984. #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
  985. #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
  986. /*
  987. * HEST subtables
  988. */
  989. /* 0: IA32 Machine Check Exception */
  990. struct acpi_hest_ia_machine_check {
  991. struct acpi_hest_header header;
  992. u16 reserved1;
  993. u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
  994. u8 enabled;
  995. u32 records_to_preallocate;
  996. u32 max_sections_per_record;
  997. u64 global_capability_data;
  998. u64 global_control_data;
  999. u8 num_hardware_banks;
  1000. u8 reserved3[7];
  1001. };
  1002. /* 1: IA32 Corrected Machine Check */
  1003. struct acpi_hest_ia_corrected {
  1004. struct acpi_hest_header header;
  1005. u16 reserved1;
  1006. u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
  1007. u8 enabled;
  1008. u32 records_to_preallocate;
  1009. u32 max_sections_per_record;
  1010. struct acpi_hest_notify notify;
  1011. u8 num_hardware_banks;
  1012. u8 reserved2[3];
  1013. };
  1014. /* 2: IA32 Non-Maskable Interrupt */
  1015. struct acpi_hest_ia_nmi {
  1016. struct acpi_hest_header header;
  1017. u32 reserved;
  1018. u32 records_to_preallocate;
  1019. u32 max_sections_per_record;
  1020. u32 max_raw_data_length;
  1021. };
  1022. /* 3,4,5: Not used */
  1023. /* 6: PCI Express Root Port AER */
  1024. struct acpi_hest_aer_root {
  1025. struct acpi_hest_header header;
  1026. struct acpi_hest_aer_common aer;
  1027. u32 root_error_command;
  1028. };
  1029. /* 7: PCI Express AER (AER Endpoint) */
  1030. struct acpi_hest_aer {
  1031. struct acpi_hest_header header;
  1032. struct acpi_hest_aer_common aer;
  1033. };
  1034. /* 8: PCI Express/PCI-X Bridge AER */
  1035. struct acpi_hest_aer_bridge {
  1036. struct acpi_hest_header header;
  1037. struct acpi_hest_aer_common aer;
  1038. u32 uncorrectable_mask2;
  1039. u32 uncorrectable_severity2;
  1040. u32 advanced_capabilities2;
  1041. };
  1042. /* 9: Generic Hardware Error Source */
  1043. struct acpi_hest_generic {
  1044. struct acpi_hest_header header;
  1045. u16 related_source_id;
  1046. u8 reserved;
  1047. u8 enabled;
  1048. u32 records_to_preallocate;
  1049. u32 max_sections_per_record;
  1050. u32 max_raw_data_length;
  1051. struct acpi_generic_address error_status_address;
  1052. struct acpi_hest_notify notify;
  1053. u32 error_block_length;
  1054. };
  1055. /* 10: Generic Hardware Error Source, version 2 */
  1056. struct acpi_hest_generic_v2 {
  1057. struct acpi_hest_header header;
  1058. u16 related_source_id;
  1059. u8 reserved;
  1060. u8 enabled;
  1061. u32 records_to_preallocate;
  1062. u32 max_sections_per_record;
  1063. u32 max_raw_data_length;
  1064. struct acpi_generic_address error_status_address;
  1065. struct acpi_hest_notify notify;
  1066. u32 error_block_length;
  1067. struct acpi_generic_address read_ack_register;
  1068. u64 read_ack_preserve;
  1069. u64 read_ack_write;
  1070. };
  1071. /* Generic Error Status block */
  1072. struct acpi_hest_generic_status {
  1073. u32 block_status;
  1074. u32 raw_data_offset;
  1075. u32 raw_data_length;
  1076. u32 data_length;
  1077. u32 error_severity;
  1078. };
  1079. /* Values for block_status flags above */
  1080. #define ACPI_HEST_UNCORRECTABLE (1)
  1081. #define ACPI_HEST_CORRECTABLE (1<<1)
  1082. #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
  1083. #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
  1084. #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
  1085. /* Generic Error Data entry */
  1086. struct acpi_hest_generic_data {
  1087. u8 section_type[16];
  1088. u32 error_severity;
  1089. u16 revision;
  1090. u8 validation_bits;
  1091. u8 flags;
  1092. u32 error_data_length;
  1093. u8 fru_id[16];
  1094. u8 fru_text[20];
  1095. };
  1096. /* Extension for revision 0x0300 */
  1097. struct acpi_hest_generic_data_v300 {
  1098. u8 section_type[16];
  1099. u32 error_severity;
  1100. u16 revision;
  1101. u8 validation_bits;
  1102. u8 flags;
  1103. u32 error_data_length;
  1104. u8 fru_id[16];
  1105. u8 fru_text[20];
  1106. u64 time_stamp;
  1107. };
  1108. /* Values for error_severity above */
  1109. #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
  1110. #define ACPI_HEST_GEN_ERROR_FATAL 1
  1111. #define ACPI_HEST_GEN_ERROR_CORRECTED 2
  1112. #define ACPI_HEST_GEN_ERROR_NONE 3
  1113. /* Flags for validation_bits above */
  1114. #define ACPI_HEST_GEN_VALID_FRU_ID (1)
  1115. #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
  1116. #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
  1117. /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
  1118. struct acpi_hest_ia_deferred_check {
  1119. struct acpi_hest_header header;
  1120. u16 reserved1;
  1121. u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
  1122. u8 enabled;
  1123. u32 records_to_preallocate;
  1124. u32 max_sections_per_record;
  1125. struct acpi_hest_notify notify;
  1126. u8 num_hardware_banks;
  1127. u8 reserved2[3];
  1128. };
  1129. /*******************************************************************************
  1130. *
  1131. * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
  1132. * Version 1
  1133. *
  1134. ******************************************************************************/
  1135. struct acpi_table_hmat {
  1136. struct acpi_table_header header; /* Common ACPI table header */
  1137. u32 reserved;
  1138. };
  1139. /* Values for HMAT structure types */
  1140. enum acpi_hmat_type {
  1141. ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */
  1142. ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
  1143. ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
  1144. ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
  1145. };
  1146. struct acpi_hmat_structure {
  1147. u16 type;
  1148. u16 reserved;
  1149. u32 length;
  1150. };
  1151. /*
  1152. * HMAT Structures, correspond to Type in struct acpi_hmat_structure
  1153. */
  1154. /* 0: Memory subystem address range */
  1155. struct acpi_hmat_address_range {
  1156. struct acpi_hmat_structure header;
  1157. u16 flags;
  1158. u16 reserved1;
  1159. u32 processor_PD; /* Processor proximity domain */
  1160. u32 memory_PD; /* Memory proximity domain */
  1161. u32 reserved2;
  1162. u64 physical_address_base; /* Physical address range base */
  1163. u64 physical_address_length; /* Physical address range length */
  1164. };
  1165. /* Masks for Flags field above */
  1166. #define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: processor_PD field is valid */
  1167. #define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: memory_PD field is valid */
  1168. #define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
  1169. /* 1: System locality latency and bandwidth information */
  1170. struct acpi_hmat_locality {
  1171. struct acpi_hmat_structure header;
  1172. u8 flags;
  1173. u8 data_type;
  1174. u16 reserved1;
  1175. u32 number_of_initiator_Pds;
  1176. u32 number_of_target_Pds;
  1177. u32 reserved2;
  1178. u64 entry_base_unit;
  1179. };
  1180. /* Masks for Flags field above */
  1181. #define ACPI_HMAT_MEMORY_HIERARCHY (0x0F)
  1182. /* Values for Memory Hierarchy flag */
  1183. #define ACPI_HMAT_MEMORY 0
  1184. #define ACPI_HMAT_LAST_LEVEL_CACHE 1
  1185. #define ACPI_HMAT_1ST_LEVEL_CACHE 2
  1186. #define ACPI_HMAT_2ND_LEVEL_CACHE 3
  1187. #define ACPI_HMAT_3RD_LEVEL_CACHE 4
  1188. /* Values for data_type field above */
  1189. #define ACPI_HMAT_ACCESS_LATENCY 0
  1190. #define ACPI_HMAT_READ_LATENCY 1
  1191. #define ACPI_HMAT_WRITE_LATENCY 2
  1192. #define ACPI_HMAT_ACCESS_BANDWIDTH 3
  1193. #define ACPI_HMAT_READ_BANDWIDTH 4
  1194. #define ACPI_HMAT_WRITE_BANDWIDTH 5
  1195. /* 2: Memory side cache information */
  1196. struct acpi_hmat_cache {
  1197. struct acpi_hmat_structure header;
  1198. u32 memory_PD;
  1199. u32 reserved1;
  1200. u64 cache_size;
  1201. u32 cache_attributes;
  1202. u16 reserved2;
  1203. u16 number_of_SMBIOShandles;
  1204. };
  1205. /* Masks for cache_attributes field above */
  1206. #define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)
  1207. #define ACPI_HMAT_CACHE_LEVEL (0x000000F0)
  1208. #define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)
  1209. #define ACPI_HMAT_WRITE_POLICY (0x0000F000)
  1210. #define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)
  1211. /* Values for cache associativity flag */
  1212. #define ACPI_HMAT_CA_NONE (0)
  1213. #define ACPI_HMAT_CA_DIRECT_MAPPED (1)
  1214. #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)
  1215. /* Values for write policy flag */
  1216. #define ACPI_HMAT_CP_NONE (0)
  1217. #define ACPI_HMAT_CP_WB (1)
  1218. #define ACPI_HMAT_CP_WT (2)
  1219. /*******************************************************************************
  1220. *
  1221. * HPET - High Precision Event Timer table
  1222. * Version 1
  1223. *
  1224. * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
  1225. * Version 1.0a, October 2004
  1226. *
  1227. ******************************************************************************/
  1228. struct acpi_table_hpet {
  1229. struct acpi_table_header header; /* Common ACPI table header */
  1230. u32 id; /* Hardware ID of event timer block */
  1231. struct acpi_generic_address address; /* Address of event timer block */
  1232. u8 sequence; /* HPET sequence number */
  1233. u16 minimum_tick; /* Main counter min tick, periodic mode */
  1234. u8 flags;
  1235. };
  1236. /* Masks for Flags field above */
  1237. #define ACPI_HPET_PAGE_PROTECT_MASK (3)
  1238. /* Values for Page Protect flags */
  1239. enum acpi_hpet_page_protect {
  1240. ACPI_HPET_NO_PAGE_PROTECT = 0,
  1241. ACPI_HPET_PAGE_PROTECT4 = 1,
  1242. ACPI_HPET_PAGE_PROTECT64 = 2
  1243. };
  1244. /*******************************************************************************
  1245. *
  1246. * IBFT - Boot Firmware Table
  1247. * Version 1
  1248. *
  1249. * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
  1250. * Specification", Version 1.01, March 1, 2007
  1251. *
  1252. * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
  1253. * Therefore, it is not currently supported by the disassembler.
  1254. *
  1255. ******************************************************************************/
  1256. struct acpi_table_ibft {
  1257. struct acpi_table_header header; /* Common ACPI table header */
  1258. u8 reserved[12];
  1259. };
  1260. /* IBFT common subtable header */
  1261. struct acpi_ibft_header {
  1262. u8 type;
  1263. u8 version;
  1264. u16 length;
  1265. u8 index;
  1266. u8 flags;
  1267. };
  1268. /* Values for Type field above */
  1269. enum acpi_ibft_type {
  1270. ACPI_IBFT_TYPE_NOT_USED = 0,
  1271. ACPI_IBFT_TYPE_CONTROL = 1,
  1272. ACPI_IBFT_TYPE_INITIATOR = 2,
  1273. ACPI_IBFT_TYPE_NIC = 3,
  1274. ACPI_IBFT_TYPE_TARGET = 4,
  1275. ACPI_IBFT_TYPE_EXTENSIONS = 5,
  1276. ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  1277. };
  1278. /* IBFT subtables */
  1279. struct acpi_ibft_control {
  1280. struct acpi_ibft_header header;
  1281. u16 extensions;
  1282. u16 initiator_offset;
  1283. u16 nic0_offset;
  1284. u16 target0_offset;
  1285. u16 nic1_offset;
  1286. u16 target1_offset;
  1287. };
  1288. struct acpi_ibft_initiator {
  1289. struct acpi_ibft_header header;
  1290. u8 sns_server[16];
  1291. u8 slp_server[16];
  1292. u8 primary_server[16];
  1293. u8 secondary_server[16];
  1294. u16 name_length;
  1295. u16 name_offset;
  1296. };
  1297. struct acpi_ibft_nic {
  1298. struct acpi_ibft_header header;
  1299. u8 ip_address[16];
  1300. u8 subnet_mask_prefix;
  1301. u8 origin;
  1302. u8 gateway[16];
  1303. u8 primary_dns[16];
  1304. u8 secondary_dns[16];
  1305. u8 dhcp[16];
  1306. u16 vlan;
  1307. u8 mac_address[6];
  1308. u16 pci_address;
  1309. u16 name_length;
  1310. u16 name_offset;
  1311. };
  1312. struct acpi_ibft_target {
  1313. struct acpi_ibft_header header;
  1314. u8 target_ip_address[16];
  1315. u16 target_ip_socket;
  1316. u8 target_boot_lun[8];
  1317. u8 chap_type;
  1318. u8 nic_association;
  1319. u16 target_name_length;
  1320. u16 target_name_offset;
  1321. u16 chap_name_length;
  1322. u16 chap_name_offset;
  1323. u16 chap_secret_length;
  1324. u16 chap_secret_offset;
  1325. u16 reverse_chap_name_length;
  1326. u16 reverse_chap_name_offset;
  1327. u16 reverse_chap_secret_length;
  1328. u16 reverse_chap_secret_offset;
  1329. };
  1330. /* Reset to default packing */
  1331. #pragma pack()
  1332. #endif /* __ACTBL1_H__ */