actbl2.h 28 KB

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