actbl2.h 25 KB

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