actbl2.h 32 KB

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