actbl2.h 31 KB

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