actbl2.h 24 KB

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