actbl2.h 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282
  1. /******************************************************************************
  2. *
  3. * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2015, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #ifndef __ACTBL2_H__
  43. #define __ACTBL2_H__
  44. /*******************************************************************************
  45. *
  46. * Additional ACPI Tables (2)
  47. *
  48. * These tables are not consumed directly by the ACPICA subsystem, but are
  49. * included here to support device drivers and the AML disassembler.
  50. *
  51. * The tables in this file are defined by third-party specifications, and are
  52. * not defined directly by the ACPI specification itself.
  53. *
  54. ******************************************************************************/
  55. /*
  56. * Values for description table header signatures for tables defined in this
  57. * file. Useful because they make it more difficult to inadvertently type in
  58. * the wrong signature.
  59. */
  60. #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
  61. #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
  62. #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
  63. #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
  64. #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
  65. #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
  66. #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
  67. #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
  68. #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
  69. #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
  70. #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
  71. #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
  72. #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
  73. #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
  74. #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
  75. #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
  76. #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
  77. #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
  78. #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
  79. #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
  80. #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
  81. #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
  82. #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
  83. #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
  84. #ifdef ACPI_UNDEFINED_TABLES
  85. /*
  86. * These tables have been seen in the field, but no definition has been found
  87. */
  88. #define ACPI_SIG_ATKG "ATKG"
  89. #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
  90. #define ACPI_SIG_IEIT "IEIT"
  91. #endif
  92. /*
  93. * All tables must be byte-packed to match the ACPI specification, since
  94. * the tables are provided by the system BIOS.
  95. */
  96. #pragma pack(1)
  97. /*
  98. * Note: C bitfields are not used for this reason:
  99. *
  100. * "Bitfields are great and easy to read, but unfortunately the C language
  101. * does not specify the layout of bitfields in memory, which means they are
  102. * essentially useless for dealing with packed data in on-disk formats or
  103. * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
  104. * this decision was a design error in C. Ritchie could have picked an order
  105. * and stuck with it." Norman Ramsey.
  106. * See http://stackoverflow.com/a/1053662/41661
  107. */
  108. /*******************************************************************************
  109. *
  110. * ASF - Alert Standard Format table (Signature "ASF!")
  111. * Revision 0x10
  112. *
  113. * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
  114. *
  115. ******************************************************************************/
  116. struct acpi_table_asf {
  117. struct acpi_table_header header; /* Common ACPI table header */
  118. };
  119. /* ASF subtable header */
  120. struct acpi_asf_header {
  121. u8 type;
  122. u8 reserved;
  123. u16 length;
  124. };
  125. /* Values for Type field above */
  126. enum acpi_asf_type {
  127. ACPI_ASF_TYPE_INFO = 0,
  128. ACPI_ASF_TYPE_ALERT = 1,
  129. ACPI_ASF_TYPE_CONTROL = 2,
  130. ACPI_ASF_TYPE_BOOT = 3,
  131. ACPI_ASF_TYPE_ADDRESS = 4,
  132. ACPI_ASF_TYPE_RESERVED = 5
  133. };
  134. /*
  135. * ASF subtables
  136. */
  137. /* 0: ASF Information */
  138. struct acpi_asf_info {
  139. struct acpi_asf_header header;
  140. u8 min_reset_value;
  141. u8 min_poll_interval;
  142. u16 system_id;
  143. u32 mfg_id;
  144. u8 flags;
  145. u8 reserved2[3];
  146. };
  147. /* Masks for Flags field above */
  148. #define ACPI_ASF_SMBUS_PROTOCOLS (1)
  149. /* 1: ASF Alerts */
  150. struct acpi_asf_alert {
  151. struct acpi_asf_header header;
  152. u8 assert_mask;
  153. u8 deassert_mask;
  154. u8 alerts;
  155. u8 data_length;
  156. };
  157. struct acpi_asf_alert_data {
  158. u8 address;
  159. u8 command;
  160. u8 mask;
  161. u8 value;
  162. u8 sensor_type;
  163. u8 type;
  164. u8 offset;
  165. u8 source_type;
  166. u8 severity;
  167. u8 sensor_number;
  168. u8 entity;
  169. u8 instance;
  170. };
  171. /* 2: ASF Remote Control */
  172. struct acpi_asf_remote {
  173. struct acpi_asf_header header;
  174. u8 controls;
  175. u8 data_length;
  176. u16 reserved2;
  177. };
  178. struct acpi_asf_control_data {
  179. u8 function;
  180. u8 address;
  181. u8 command;
  182. u8 value;
  183. };
  184. /* 3: ASF RMCP Boot Options */
  185. struct acpi_asf_rmcp {
  186. struct acpi_asf_header header;
  187. u8 capabilities[7];
  188. u8 completion_code;
  189. u32 enterprise_id;
  190. u8 command;
  191. u16 parameter;
  192. u16 boot_options;
  193. u16 oem_parameters;
  194. };
  195. /* 4: ASF Address */
  196. struct acpi_asf_address {
  197. struct acpi_asf_header header;
  198. u8 eprom_address;
  199. u8 devices;
  200. };
  201. /*******************************************************************************
  202. *
  203. * BOOT - Simple Boot Flag Table
  204. * Version 1
  205. *
  206. * Conforms to the "Simple Boot Flag Specification", Version 2.1
  207. *
  208. ******************************************************************************/
  209. struct acpi_table_boot {
  210. struct acpi_table_header header; /* Common ACPI table header */
  211. u8 cmos_index; /* Index in CMOS RAM for the boot register */
  212. u8 reserved[3];
  213. };
  214. /*******************************************************************************
  215. *
  216. * CSRT - Core System Resource Table
  217. * Version 0
  218. *
  219. * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
  220. *
  221. ******************************************************************************/
  222. struct acpi_table_csrt {
  223. struct acpi_table_header header; /* Common ACPI table header */
  224. };
  225. /* Resource Group subtable */
  226. struct acpi_csrt_group {
  227. u32 length;
  228. u32 vendor_id;
  229. u32 subvendor_id;
  230. u16 device_id;
  231. u16 subdevice_id;
  232. u16 revision;
  233. u16 reserved;
  234. u32 shared_info_length;
  235. /* Shared data immediately follows (Length = shared_info_length) */
  236. };
  237. /* Shared Info subtable */
  238. struct acpi_csrt_shared_info {
  239. u16 major_version;
  240. u16 minor_version;
  241. u32 mmio_base_low;
  242. u32 mmio_base_high;
  243. u32 gsi_interrupt;
  244. u8 interrupt_polarity;
  245. u8 interrupt_mode;
  246. u8 num_channels;
  247. u8 dma_address_width;
  248. u16 base_request_line;
  249. u16 num_handshake_signals;
  250. u32 max_block_size;
  251. /* Resource descriptors immediately follow (Length = Group length - shared_info_length) */
  252. };
  253. /* Resource Descriptor subtable */
  254. struct acpi_csrt_descriptor {
  255. u32 length;
  256. u16 type;
  257. u16 subtype;
  258. u32 uid;
  259. /* Resource-specific information immediately follows */
  260. };
  261. /* Resource Types */
  262. #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
  263. #define ACPI_CSRT_TYPE_TIMER 0x0002
  264. #define ACPI_CSRT_TYPE_DMA 0x0003
  265. /* Resource Subtypes */
  266. #define ACPI_CSRT_XRUPT_LINE 0x0000
  267. #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
  268. #define ACPI_CSRT_TIMER 0x0000
  269. #define ACPI_CSRT_DMA_CHANNEL 0x0000
  270. #define ACPI_CSRT_DMA_CONTROLLER 0x0001
  271. /*******************************************************************************
  272. *
  273. * DBG2 - Debug Port Table 2
  274. * Version 0 (Both main table and subtables)
  275. *
  276. * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
  277. *
  278. ******************************************************************************/
  279. struct acpi_table_dbg2 {
  280. struct acpi_table_header header; /* Common ACPI table header */
  281. u32 info_offset;
  282. u32 info_count;
  283. };
  284. struct acpi_dbg2_header {
  285. u32 info_offset;
  286. u32 info_count;
  287. };
  288. /* Debug Device Information Subtable */
  289. struct acpi_dbg2_device {
  290. u8 revision;
  291. u16 length;
  292. u8 register_count; /* Number of base_address registers */
  293. u16 namepath_length;
  294. u16 namepath_offset;
  295. u16 oem_data_length;
  296. u16 oem_data_offset;
  297. u16 port_type;
  298. u16 port_subtype;
  299. u16 reserved;
  300. u16 base_address_offset;
  301. u16 address_size_offset;
  302. /*
  303. * Data that follows:
  304. * base_address (required) - Each in 12-byte Generic Address Structure format.
  305. * address_size (required) - Array of u32 sizes corresponding to each base_address register.
  306. * Namepath (required) - Null terminated string. Single dot if not supported.
  307. * oem_data (optional) - Length is oem_data_length.
  308. */
  309. };
  310. /* Types for port_type field above */
  311. #define ACPI_DBG2_SERIAL_PORT 0x8000
  312. #define ACPI_DBG2_1394_PORT 0x8001
  313. #define ACPI_DBG2_USB_PORT 0x8002
  314. #define ACPI_DBG2_NET_PORT 0x8003
  315. /* Subtypes for port_subtype field above */
  316. #define ACPI_DBG2_16550_COMPATIBLE 0x0000
  317. #define ACPI_DBG2_16550_SUBSET 0x0001
  318. #define ACPI_DBG2_1394_STANDARD 0x0000
  319. #define ACPI_DBG2_USB_XHCI 0x0000
  320. #define ACPI_DBG2_USB_EHCI 0x0001
  321. /*******************************************************************************
  322. *
  323. * DBGP - Debug Port table
  324. * Version 1
  325. *
  326. * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
  327. *
  328. ******************************************************************************/
  329. struct acpi_table_dbgp {
  330. struct acpi_table_header header; /* Common ACPI table header */
  331. u8 type; /* 0=full 16550, 1=subset of 16550 */
  332. u8 reserved[3];
  333. struct acpi_generic_address debug_port;
  334. };
  335. /*******************************************************************************
  336. *
  337. * DMAR - DMA Remapping table
  338. * Version 1
  339. *
  340. * Conforms to "Intel Virtualization Technology for Directed I/O",
  341. * Version 2.2, Sept. 2013
  342. *
  343. ******************************************************************************/
  344. struct acpi_table_dmar {
  345. struct acpi_table_header header; /* Common ACPI table header */
  346. u8 width; /* Host Address Width */
  347. u8 flags;
  348. u8 reserved[10];
  349. };
  350. /* Masks for Flags field above */
  351. #define ACPI_DMAR_INTR_REMAP (1)
  352. /* DMAR subtable header */
  353. struct acpi_dmar_header {
  354. u16 type;
  355. u16 length;
  356. };
  357. /* Values for subtable type in struct acpi_dmar_header */
  358. enum acpi_dmar_type {
  359. ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
  360. ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
  361. ACPI_DMAR_TYPE_ROOT_ATS = 2,
  362. ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
  363. ACPI_DMAR_TYPE_NAMESPACE = 4,
  364. ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
  365. };
  366. /* DMAR Device Scope structure */
  367. struct acpi_dmar_device_scope {
  368. u8 entry_type;
  369. u8 length;
  370. u16 reserved;
  371. u8 enumeration_id;
  372. u8 bus;
  373. };
  374. /* Values for entry_type in struct acpi_dmar_device_scope - device types */
  375. enum acpi_dmar_scope_type {
  376. ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
  377. ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
  378. ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
  379. ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
  380. ACPI_DMAR_SCOPE_TYPE_HPET = 4,
  381. ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
  382. ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  383. };
  384. struct acpi_dmar_pci_path {
  385. u8 device;
  386. u8 function;
  387. };
  388. /*
  389. * DMAR Subtables, correspond to Type in struct acpi_dmar_header
  390. */
  391. /* 0: Hardware Unit Definition */
  392. struct acpi_dmar_hardware_unit {
  393. struct acpi_dmar_header header;
  394. u8 flags;
  395. u8 reserved;
  396. u16 segment;
  397. u64 address; /* Register Base Address */
  398. };
  399. /* Masks for Flags field above */
  400. #define ACPI_DMAR_INCLUDE_ALL (1)
  401. /* 1: Reserved Memory Defininition */
  402. struct acpi_dmar_reserved_memory {
  403. struct acpi_dmar_header header;
  404. u16 reserved;
  405. u16 segment;
  406. u64 base_address; /* 4K aligned base address */
  407. u64 end_address; /* 4K aligned limit address */
  408. };
  409. /* Masks for Flags field above */
  410. #define ACPI_DMAR_ALLOW_ALL (1)
  411. /* 2: Root Port ATS Capability Reporting Structure */
  412. struct acpi_dmar_atsr {
  413. struct acpi_dmar_header header;
  414. u8 flags;
  415. u8 reserved;
  416. u16 segment;
  417. };
  418. /* Masks for Flags field above */
  419. #define ACPI_DMAR_ALL_PORTS (1)
  420. /* 3: Remapping Hardware Static Affinity Structure */
  421. struct acpi_dmar_rhsa {
  422. struct acpi_dmar_header header;
  423. u32 reserved;
  424. u64 base_address;
  425. u32 proximity_domain;
  426. };
  427. /* 4: ACPI Namespace Device Declaration Structure */
  428. struct acpi_dmar_andd {
  429. struct acpi_dmar_header header;
  430. u8 reserved[3];
  431. u8 device_number;
  432. char device_name[1];
  433. };
  434. /*******************************************************************************
  435. *
  436. * HPET - High Precision Event Timer table
  437. * Version 1
  438. *
  439. * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
  440. * Version 1.0a, October 2004
  441. *
  442. ******************************************************************************/
  443. struct acpi_table_hpet {
  444. struct acpi_table_header header; /* Common ACPI table header */
  445. u32 id; /* Hardware ID of event timer block */
  446. struct acpi_generic_address address; /* Address of event timer block */
  447. u8 sequence; /* HPET sequence number */
  448. u16 minimum_tick; /* Main counter min tick, periodic mode */
  449. u8 flags;
  450. };
  451. /* Masks for Flags field above */
  452. #define ACPI_HPET_PAGE_PROTECT_MASK (3)
  453. /* Values for Page Protect flags */
  454. enum acpi_hpet_page_protect {
  455. ACPI_HPET_NO_PAGE_PROTECT = 0,
  456. ACPI_HPET_PAGE_PROTECT4 = 1,
  457. ACPI_HPET_PAGE_PROTECT64 = 2
  458. };
  459. /*******************************************************************************
  460. *
  461. * IBFT - Boot Firmware Table
  462. * Version 1
  463. *
  464. * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
  465. * Specification", Version 1.01, March 1, 2007
  466. *
  467. * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
  468. * Therefore, it is not currently supported by the disassembler.
  469. *
  470. ******************************************************************************/
  471. struct acpi_table_ibft {
  472. struct acpi_table_header header; /* Common ACPI table header */
  473. u8 reserved[12];
  474. };
  475. /* IBFT common subtable header */
  476. struct acpi_ibft_header {
  477. u8 type;
  478. u8 version;
  479. u16 length;
  480. u8 index;
  481. u8 flags;
  482. };
  483. /* Values for Type field above */
  484. enum acpi_ibft_type {
  485. ACPI_IBFT_TYPE_NOT_USED = 0,
  486. ACPI_IBFT_TYPE_CONTROL = 1,
  487. ACPI_IBFT_TYPE_INITIATOR = 2,
  488. ACPI_IBFT_TYPE_NIC = 3,
  489. ACPI_IBFT_TYPE_TARGET = 4,
  490. ACPI_IBFT_TYPE_EXTENSIONS = 5,
  491. ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  492. };
  493. /* IBFT subtables */
  494. struct acpi_ibft_control {
  495. struct acpi_ibft_header header;
  496. u16 extensions;
  497. u16 initiator_offset;
  498. u16 nic0_offset;
  499. u16 target0_offset;
  500. u16 nic1_offset;
  501. u16 target1_offset;
  502. };
  503. struct acpi_ibft_initiator {
  504. struct acpi_ibft_header header;
  505. u8 sns_server[16];
  506. u8 slp_server[16];
  507. u8 primary_server[16];
  508. u8 secondary_server[16];
  509. u16 name_length;
  510. u16 name_offset;
  511. };
  512. struct acpi_ibft_nic {
  513. struct acpi_ibft_header header;
  514. u8 ip_address[16];
  515. u8 subnet_mask_prefix;
  516. u8 origin;
  517. u8 gateway[16];
  518. u8 primary_dns[16];
  519. u8 secondary_dns[16];
  520. u8 dhcp[16];
  521. u16 vlan;
  522. u8 mac_address[6];
  523. u16 pci_address;
  524. u16 name_length;
  525. u16 name_offset;
  526. };
  527. struct acpi_ibft_target {
  528. struct acpi_ibft_header header;
  529. u8 target_ip_address[16];
  530. u16 target_ip_socket;
  531. u8 target_boot_lun[8];
  532. u8 chap_type;
  533. u8 nic_association;
  534. u16 target_name_length;
  535. u16 target_name_offset;
  536. u16 chap_name_length;
  537. u16 chap_name_offset;
  538. u16 chap_secret_length;
  539. u16 chap_secret_offset;
  540. u16 reverse_chap_name_length;
  541. u16 reverse_chap_name_offset;
  542. u16 reverse_chap_secret_length;
  543. u16 reverse_chap_secret_offset;
  544. };
  545. /*******************************************************************************
  546. *
  547. * IVRS - I/O Virtualization Reporting Structure
  548. * Version 1
  549. *
  550. * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
  551. * Revision 1.26, February 2009.
  552. *
  553. ******************************************************************************/
  554. struct acpi_table_ivrs {
  555. struct acpi_table_header header; /* Common ACPI table header */
  556. u32 info; /* Common virtualization info */
  557. u64 reserved;
  558. };
  559. /* Values for Info field above */
  560. #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
  561. #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
  562. #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
  563. /* IVRS subtable header */
  564. struct acpi_ivrs_header {
  565. u8 type; /* Subtable type */
  566. u8 flags;
  567. u16 length; /* Subtable length */
  568. u16 device_id; /* ID of IOMMU */
  569. };
  570. /* Values for subtable Type above */
  571. enum acpi_ivrs_type {
  572. ACPI_IVRS_TYPE_HARDWARE = 0x10,
  573. ACPI_IVRS_TYPE_MEMORY1 = 0x20,
  574. ACPI_IVRS_TYPE_MEMORY2 = 0x21,
  575. ACPI_IVRS_TYPE_MEMORY3 = 0x22
  576. };
  577. /* Masks for Flags field above for IVHD subtable */
  578. #define ACPI_IVHD_TT_ENABLE (1)
  579. #define ACPI_IVHD_PASS_PW (1<<1)
  580. #define ACPI_IVHD_RES_PASS_PW (1<<2)
  581. #define ACPI_IVHD_ISOC (1<<3)
  582. #define ACPI_IVHD_IOTLB (1<<4)
  583. /* Masks for Flags field above for IVMD subtable */
  584. #define ACPI_IVMD_UNITY (1)
  585. #define ACPI_IVMD_READ (1<<1)
  586. #define ACPI_IVMD_WRITE (1<<2)
  587. #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
  588. /*
  589. * IVRS subtables, correspond to Type in struct acpi_ivrs_header
  590. */
  591. /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
  592. struct acpi_ivrs_hardware {
  593. struct acpi_ivrs_header header;
  594. u16 capability_offset; /* Offset for IOMMU control fields */
  595. u64 base_address; /* IOMMU control registers */
  596. u16 pci_segment_group;
  597. u16 info; /* MSI number and unit ID */
  598. u32 reserved;
  599. };
  600. /* Masks for Info field above */
  601. #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
  602. #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_ID */
  603. /*
  604. * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure.
  605. * Upper two bits of the Type field are the (encoded) length of the structure.
  606. * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
  607. * are reserved for future use but not defined.
  608. */
  609. struct acpi_ivrs_de_header {
  610. u8 type;
  611. u16 id;
  612. u8 data_setting;
  613. };
  614. /* Length of device entry is in the top two bits of Type field above */
  615. #define ACPI_IVHD_ENTRY_LENGTH 0xC0
  616. /* Values for device entry Type field above */
  617. enum acpi_ivrs_device_entry_type {
  618. /* 4-byte device entries, all use struct acpi_ivrs_device4 */
  619. ACPI_IVRS_TYPE_PAD4 = 0,
  620. ACPI_IVRS_TYPE_ALL = 1,
  621. ACPI_IVRS_TYPE_SELECT = 2,
  622. ACPI_IVRS_TYPE_START = 3,
  623. ACPI_IVRS_TYPE_END = 4,
  624. /* 8-byte device entries */
  625. ACPI_IVRS_TYPE_PAD8 = 64,
  626. ACPI_IVRS_TYPE_NOT_USED = 65,
  627. ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses struct acpi_ivrs_device8a */
  628. ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses struct acpi_ivrs_device8a */
  629. ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses struct acpi_ivrs_device8b */
  630. ACPI_IVRS_TYPE_EXT_START = 71, /* Uses struct acpi_ivrs_device8b */
  631. ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses struct acpi_ivrs_device8c */
  632. };
  633. /* Values for Data field above */
  634. #define ACPI_IVHD_INIT_PASS (1)
  635. #define ACPI_IVHD_EINT_PASS (1<<1)
  636. #define ACPI_IVHD_NMI_PASS (1<<2)
  637. #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
  638. #define ACPI_IVHD_LINT0_PASS (1<<6)
  639. #define ACPI_IVHD_LINT1_PASS (1<<7)
  640. /* Types 0-4: 4-byte device entry */
  641. struct acpi_ivrs_device4 {
  642. struct acpi_ivrs_de_header header;
  643. };
  644. /* Types 66-67: 8-byte device entry */
  645. struct acpi_ivrs_device8a {
  646. struct acpi_ivrs_de_header header;
  647. u8 reserved1;
  648. u16 used_id;
  649. u8 reserved2;
  650. };
  651. /* Types 70-71: 8-byte device entry */
  652. struct acpi_ivrs_device8b {
  653. struct acpi_ivrs_de_header header;
  654. u32 extended_data;
  655. };
  656. /* Values for extended_data above */
  657. #define ACPI_IVHD_ATS_DISABLED (1<<31)
  658. /* Type 72: 8-byte device entry */
  659. struct acpi_ivrs_device8c {
  660. struct acpi_ivrs_de_header header;
  661. u8 handle;
  662. u16 used_id;
  663. u8 variety;
  664. };
  665. /* Values for Variety field above */
  666. #define ACPI_IVHD_IOAPIC 1
  667. #define ACPI_IVHD_HPET 2
  668. /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
  669. struct acpi_ivrs_memory {
  670. struct acpi_ivrs_header header;
  671. u16 aux_data;
  672. u64 reserved;
  673. u64 start_address;
  674. u64 memory_length;
  675. };
  676. /*******************************************************************************
  677. *
  678. * LPIT - Low Power Idle Table
  679. *
  680. * Conforms to "ACPI Low Power Idle Table (LPIT) and _LPD Proposal (DRAFT)"
  681. *
  682. ******************************************************************************/
  683. struct acpi_table_lpit {
  684. struct acpi_table_header header; /* Common ACPI table header */
  685. };
  686. /* LPIT subtable header */
  687. struct acpi_lpit_header {
  688. u32 type; /* Subtable type */
  689. u32 length; /* Subtable length */
  690. u16 unique_id;
  691. u16 reserved;
  692. u32 flags;
  693. };
  694. /* Values for subtable Type above */
  695. enum acpi_lpit_type {
  696. ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
  697. ACPI_LPIT_TYPE_SIMPLE_IO = 0x01,
  698. ACPI_LPIT_TYPE_RESERVED = 0x02 /* 2 and above are reserved */
  699. };
  700. /* Masks for Flags field above */
  701. #define ACPI_LPIT_STATE_DISABLED (1)
  702. #define ACPI_LPIT_NO_COUNTER (1<<1)
  703. /*
  704. * LPIT subtables, correspond to Type in struct acpi_lpit_header
  705. */
  706. /* 0x00: Native C-state instruction based LPI structure */
  707. struct acpi_lpit_native {
  708. struct acpi_lpit_header header;
  709. struct acpi_generic_address entry_trigger;
  710. u32 residency;
  711. u32 latency;
  712. struct acpi_generic_address residency_counter;
  713. u64 counter_frequency;
  714. };
  715. /* 0x01: Simple I/O based LPI structure */
  716. struct acpi_lpit_io {
  717. struct acpi_lpit_header header;
  718. struct acpi_generic_address entry_trigger;
  719. u32 trigger_action;
  720. u64 trigger_value;
  721. u64 trigger_mask;
  722. struct acpi_generic_address minimum_idle_state;
  723. u32 residency;
  724. u32 latency;
  725. struct acpi_generic_address residency_counter;
  726. u64 counter_frequency;
  727. };
  728. /*******************************************************************************
  729. *
  730. * MCFG - PCI Memory Mapped Configuration table and subtable
  731. * Version 1
  732. *
  733. * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
  734. *
  735. ******************************************************************************/
  736. struct acpi_table_mcfg {
  737. struct acpi_table_header header; /* Common ACPI table header */
  738. u8 reserved[8];
  739. };
  740. /* Subtable */
  741. struct acpi_mcfg_allocation {
  742. u64 address; /* Base address, processor-relative */
  743. u16 pci_segment; /* PCI segment group number */
  744. u8 start_bus_number; /* Starting PCI Bus number */
  745. u8 end_bus_number; /* Final PCI Bus number */
  746. u32 reserved;
  747. };
  748. /*******************************************************************************
  749. *
  750. * MCHI - Management Controller Host Interface Table
  751. * Version 1
  752. *
  753. * Conforms to "Management Component Transport Protocol (MCTP) Host
  754. * Interface Specification", Revision 1.0.0a, October 13, 2009
  755. *
  756. ******************************************************************************/
  757. struct acpi_table_mchi {
  758. struct acpi_table_header header; /* Common ACPI table header */
  759. u8 interface_type;
  760. u8 protocol;
  761. u64 protocol_data;
  762. u8 interrupt_type;
  763. u8 gpe;
  764. u8 pci_device_flag;
  765. u32 global_interrupt;
  766. struct acpi_generic_address control_register;
  767. u8 pci_segment;
  768. u8 pci_bus;
  769. u8 pci_device;
  770. u8 pci_function;
  771. };
  772. /*******************************************************************************
  773. *
  774. * MSDM - Microsoft Data Management table
  775. *
  776. * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
  777. * November 29, 2011. Copyright 2011 Microsoft
  778. *
  779. ******************************************************************************/
  780. /* Basic MSDM table is only the common ACPI header */
  781. struct acpi_table_msdm {
  782. struct acpi_table_header header; /* Common ACPI table header */
  783. };
  784. /*******************************************************************************
  785. *
  786. * MTMR - MID Timer Table
  787. * Version 1
  788. *
  789. * Conforms to "Simple Firmware Interface Specification",
  790. * Draft 0.8.2, Oct 19, 2010
  791. * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
  792. *
  793. ******************************************************************************/
  794. struct acpi_table_mtmr {
  795. struct acpi_table_header header; /* Common ACPI table header */
  796. };
  797. /* MTMR entry */
  798. struct acpi_mtmr_entry {
  799. struct acpi_generic_address physical_address;
  800. u32 frequency;
  801. u32 irq;
  802. };
  803. /*******************************************************************************
  804. *
  805. * SLIC - Software Licensing Description Table
  806. *
  807. * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
  808. * November 29, 2011. Copyright 2011 Microsoft
  809. *
  810. ******************************************************************************/
  811. /* Basic SLIC table is only the common ACPI header */
  812. struct acpi_table_slic {
  813. struct acpi_table_header header; /* Common ACPI table header */
  814. };
  815. /*******************************************************************************
  816. *
  817. * SPCR - Serial Port Console Redirection table
  818. * Version 1
  819. *
  820. * Conforms to "Serial Port Console Redirection Table",
  821. * Version 1.00, January 11, 2002
  822. *
  823. ******************************************************************************/
  824. struct acpi_table_spcr {
  825. struct acpi_table_header header; /* Common ACPI table header */
  826. u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
  827. u8 reserved[3];
  828. struct acpi_generic_address serial_port;
  829. u8 interrupt_type;
  830. u8 pc_interrupt;
  831. u32 interrupt;
  832. u8 baud_rate;
  833. u8 parity;
  834. u8 stop_bits;
  835. u8 flow_control;
  836. u8 terminal_type;
  837. u8 reserved1;
  838. u16 pci_device_id;
  839. u16 pci_vendor_id;
  840. u8 pci_bus;
  841. u8 pci_device;
  842. u8 pci_function;
  843. u32 pci_flags;
  844. u8 pci_segment;
  845. u32 reserved2;
  846. };
  847. /* Masks for pci_flags field above */
  848. #define ACPI_SPCR_DO_NOT_DISABLE (1)
  849. /*******************************************************************************
  850. *
  851. * SPMI - Server Platform Management Interface table
  852. * Version 5
  853. *
  854. * Conforms to "Intelligent Platform Management Interface Specification
  855. * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
  856. * June 12, 2009 markup.
  857. *
  858. ******************************************************************************/
  859. struct acpi_table_spmi {
  860. struct acpi_table_header header; /* Common ACPI table header */
  861. u8 interface_type;
  862. u8 reserved; /* Must be 1 */
  863. u16 spec_revision; /* Version of IPMI */
  864. u8 interrupt_type;
  865. u8 gpe_number; /* GPE assigned */
  866. u8 reserved1;
  867. u8 pci_device_flag;
  868. u32 interrupt;
  869. struct acpi_generic_address ipmi_register;
  870. u8 pci_segment;
  871. u8 pci_bus;
  872. u8 pci_device;
  873. u8 pci_function;
  874. u8 reserved2;
  875. };
  876. /* Values for interface_type above */
  877. enum acpi_spmi_interface_types {
  878. ACPI_SPMI_NOT_USED = 0,
  879. ACPI_SPMI_KEYBOARD = 1,
  880. ACPI_SPMI_SMI = 2,
  881. ACPI_SPMI_BLOCK_TRANSFER = 3,
  882. ACPI_SPMI_SMBUS = 4,
  883. ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
  884. };
  885. /*******************************************************************************
  886. *
  887. * TCPA - Trusted Computing Platform Alliance table
  888. * Version 1
  889. *
  890. * Conforms to "TCG PC Specific Implementation Specification",
  891. * Version 1.1, August 18, 2003
  892. *
  893. ******************************************************************************/
  894. struct acpi_table_tcpa {
  895. struct acpi_table_header header; /* Common ACPI table header */
  896. u16 reserved;
  897. u32 max_log_length; /* Maximum length for the event log area */
  898. u64 log_address; /* Address of the event log area */
  899. };
  900. /*******************************************************************************
  901. *
  902. * UEFI - UEFI Boot optimization Table
  903. * Version 1
  904. *
  905. * Conforms to "Unified Extensible Firmware Interface Specification",
  906. * Version 2.3, May 8, 2009
  907. *
  908. ******************************************************************************/
  909. struct acpi_table_uefi {
  910. struct acpi_table_header header; /* Common ACPI table header */
  911. u8 identifier[16]; /* UUID identifier */
  912. u16 data_offset; /* Offset of remaining data in table */
  913. };
  914. /*******************************************************************************
  915. *
  916. * VRTC - Virtual Real Time Clock Table
  917. * Version 1
  918. *
  919. * Conforms to "Simple Firmware Interface Specification",
  920. * Draft 0.8.2, Oct 19, 2010
  921. * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
  922. *
  923. ******************************************************************************/
  924. struct acpi_table_vrtc {
  925. struct acpi_table_header header; /* Common ACPI table header */
  926. };
  927. /* VRTC entry */
  928. struct acpi_vrtc_entry {
  929. struct acpi_generic_address physical_address;
  930. u32 irq;
  931. };
  932. /*******************************************************************************
  933. *
  934. * WAET - Windows ACPI Emulated devices Table
  935. * Version 1
  936. *
  937. * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
  938. *
  939. ******************************************************************************/
  940. struct acpi_table_waet {
  941. struct acpi_table_header header; /* Common ACPI table header */
  942. u32 flags;
  943. };
  944. /* Masks for Flags field above */
  945. #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
  946. #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
  947. /*******************************************************************************
  948. *
  949. * WDAT - Watchdog Action Table
  950. * Version 1
  951. *
  952. * Conforms to "Hardware Watchdog Timers Design Specification",
  953. * Copyright 2006 Microsoft Corporation.
  954. *
  955. ******************************************************************************/
  956. struct acpi_table_wdat {
  957. struct acpi_table_header header; /* Common ACPI table header */
  958. u32 header_length; /* Watchdog Header Length */
  959. u16 pci_segment; /* PCI Segment number */
  960. u8 pci_bus; /* PCI Bus number */
  961. u8 pci_device; /* PCI Device number */
  962. u8 pci_function; /* PCI Function number */
  963. u8 reserved[3];
  964. u32 timer_period; /* Period of one timer count (msec) */
  965. u32 max_count; /* Maximum counter value supported */
  966. u32 min_count; /* Minimum counter value */
  967. u8 flags;
  968. u8 reserved2[3];
  969. u32 entries; /* Number of watchdog entries that follow */
  970. };
  971. /* Masks for Flags field above */
  972. #define ACPI_WDAT_ENABLED (1)
  973. #define ACPI_WDAT_STOPPED 0x80
  974. /* WDAT Instruction Entries (actions) */
  975. struct acpi_wdat_entry {
  976. u8 action;
  977. u8 instruction;
  978. u16 reserved;
  979. struct acpi_generic_address register_region;
  980. u32 value; /* Value used with Read/Write register */
  981. u32 mask; /* Bitmask required for this register instruction */
  982. };
  983. /* Values for Action field above */
  984. enum acpi_wdat_actions {
  985. ACPI_WDAT_RESET = 1,
  986. ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
  987. ACPI_WDAT_GET_COUNTDOWN = 5,
  988. ACPI_WDAT_SET_COUNTDOWN = 6,
  989. ACPI_WDAT_GET_RUNNING_STATE = 8,
  990. ACPI_WDAT_SET_RUNNING_STATE = 9,
  991. ACPI_WDAT_GET_STOPPED_STATE = 10,
  992. ACPI_WDAT_SET_STOPPED_STATE = 11,
  993. ACPI_WDAT_GET_REBOOT = 16,
  994. ACPI_WDAT_SET_REBOOT = 17,
  995. ACPI_WDAT_GET_SHUTDOWN = 18,
  996. ACPI_WDAT_SET_SHUTDOWN = 19,
  997. ACPI_WDAT_GET_STATUS = 32,
  998. ACPI_WDAT_SET_STATUS = 33,
  999. ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
  1000. };
  1001. /* Values for Instruction field above */
  1002. enum acpi_wdat_instructions {
  1003. ACPI_WDAT_READ_VALUE = 0,
  1004. ACPI_WDAT_READ_COUNTDOWN = 1,
  1005. ACPI_WDAT_WRITE_VALUE = 2,
  1006. ACPI_WDAT_WRITE_COUNTDOWN = 3,
  1007. ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
  1008. ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
  1009. };
  1010. /*******************************************************************************
  1011. *
  1012. * WDDT - Watchdog Descriptor Table
  1013. * Version 1
  1014. *
  1015. * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
  1016. * Version 001, September 2002
  1017. *
  1018. ******************************************************************************/
  1019. struct acpi_table_wddt {
  1020. struct acpi_table_header header; /* Common ACPI table header */
  1021. u16 spec_version;
  1022. u16 table_version;
  1023. u16 pci_vendor_id;
  1024. struct acpi_generic_address address;
  1025. u16 max_count; /* Maximum counter value supported */
  1026. u16 min_count; /* Minimum counter value supported */
  1027. u16 period;
  1028. u16 status;
  1029. u16 capability;
  1030. };
  1031. /* Flags for Status field above */
  1032. #define ACPI_WDDT_AVAILABLE (1)
  1033. #define ACPI_WDDT_ACTIVE (1<<1)
  1034. #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
  1035. #define ACPI_WDDT_USER_RESET (1<<11)
  1036. #define ACPI_WDDT_WDT_RESET (1<<12)
  1037. #define ACPI_WDDT_POWER_FAIL (1<<13)
  1038. #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
  1039. /* Flags for Capability field above */
  1040. #define ACPI_WDDT_AUTO_RESET (1)
  1041. #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
  1042. /*******************************************************************************
  1043. *
  1044. * WDRT - Watchdog Resource Table
  1045. * Version 1
  1046. *
  1047. * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
  1048. * Version 1.01, August 28, 2006
  1049. *
  1050. ******************************************************************************/
  1051. struct acpi_table_wdrt {
  1052. struct acpi_table_header header; /* Common ACPI table header */
  1053. struct acpi_generic_address control_register;
  1054. struct acpi_generic_address count_register;
  1055. u16 pci_device_id;
  1056. u16 pci_vendor_id;
  1057. u8 pci_bus; /* PCI Bus number */
  1058. u8 pci_device; /* PCI Device number */
  1059. u8 pci_function; /* PCI Function number */
  1060. u8 pci_segment; /* PCI Segment number */
  1061. u16 max_count; /* Maximum counter value supported */
  1062. u8 units;
  1063. };
  1064. /* Reset to default packing */
  1065. #pragma pack()
  1066. #endif /* __ACTBL2_H__ */