actbl2.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986
  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_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. * SPCR - Serial Port Console Redirection table
  595. * Version 1
  596. *
  597. * Conforms to "Serial Port Console Redirection Table",
  598. * Version 1.00, January 11, 2002
  599. *
  600. ******************************************************************************/
  601. struct acpi_table_spcr {
  602. struct acpi_table_header header; /* Common ACPI table header */
  603. u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
  604. u8 reserved[3];
  605. struct acpi_generic_address serial_port;
  606. u8 interrupt_type;
  607. u8 pc_interrupt;
  608. u32 interrupt;
  609. u8 baud_rate;
  610. u8 parity;
  611. u8 stop_bits;
  612. u8 flow_control;
  613. u8 terminal_type;
  614. u8 reserved1;
  615. u16 pci_device_id;
  616. u16 pci_vendor_id;
  617. u8 pci_bus;
  618. u8 pci_device;
  619. u8 pci_function;
  620. u32 pci_flags;
  621. u8 pci_segment;
  622. u32 reserved2;
  623. };
  624. /* Masks for pci_flags field above */
  625. #define ACPI_SPCR_DO_NOT_DISABLE (1)
  626. /*******************************************************************************
  627. *
  628. * SPMI - Server Platform Management Interface table
  629. * Version 5
  630. *
  631. * Conforms to "Intelligent Platform Management Interface Specification
  632. * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
  633. * June 12, 2009 markup.
  634. *
  635. ******************************************************************************/
  636. struct acpi_table_spmi {
  637. struct acpi_table_header header; /* Common ACPI table header */
  638. u8 interface_type;
  639. u8 reserved; /* Must be 1 */
  640. u16 spec_revision; /* Version of IPMI */
  641. u8 interrupt_type;
  642. u8 gpe_number; /* GPE assigned */
  643. u8 reserved1;
  644. u8 pci_device_flag;
  645. u32 interrupt;
  646. struct acpi_generic_address ipmi_register;
  647. u8 pci_segment;
  648. u8 pci_bus;
  649. u8 pci_device;
  650. u8 pci_function;
  651. u8 reserved2;
  652. };
  653. /* Values for interface_type above */
  654. enum acpi_spmi_interface_types {
  655. ACPI_SPMI_NOT_USED = 0,
  656. ACPI_SPMI_KEYBOARD = 1,
  657. ACPI_SPMI_SMI = 2,
  658. ACPI_SPMI_BLOCK_TRANSFER = 3,
  659. ACPI_SPMI_SMBUS = 4,
  660. ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
  661. };
  662. /*******************************************************************************
  663. *
  664. * TCPA - Trusted Computing Platform Alliance table
  665. * Version 1
  666. *
  667. * Conforms to "TCG PC Specific Implementation Specification",
  668. * Version 1.1, August 18, 2003
  669. *
  670. ******************************************************************************/
  671. struct acpi_table_tcpa {
  672. struct acpi_table_header header; /* Common ACPI table header */
  673. u16 reserved;
  674. u32 max_log_length; /* Maximum length for the event log area */
  675. u64 log_address; /* Address of the event log area */
  676. };
  677. /*******************************************************************************
  678. *
  679. * UEFI - UEFI Boot optimization Table
  680. * Version 1
  681. *
  682. * Conforms to "Unified Extensible Firmware Interface Specification",
  683. * Version 2.3, May 8, 2009
  684. *
  685. ******************************************************************************/
  686. struct acpi_table_uefi {
  687. struct acpi_table_header header; /* Common ACPI table header */
  688. u8 identifier[16]; /* UUID identifier */
  689. u16 data_offset; /* Offset of remaining data in table */
  690. };
  691. /*******************************************************************************
  692. *
  693. * WAET - Windows ACPI Emulated devices Table
  694. * Version 1
  695. *
  696. * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
  697. *
  698. ******************************************************************************/
  699. struct acpi_table_waet {
  700. struct acpi_table_header header; /* Common ACPI table header */
  701. u32 flags;
  702. };
  703. /* Masks for Flags field above */
  704. #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
  705. #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
  706. /*******************************************************************************
  707. *
  708. * WDAT - Watchdog Action Table
  709. * Version 1
  710. *
  711. * Conforms to "Hardware Watchdog Timers Design Specification",
  712. * Copyright 2006 Microsoft Corporation.
  713. *
  714. ******************************************************************************/
  715. struct acpi_table_wdat {
  716. struct acpi_table_header header; /* Common ACPI table header */
  717. u32 header_length; /* Watchdog Header Length */
  718. u16 pci_segment; /* PCI Segment number */
  719. u8 pci_bus; /* PCI Bus number */
  720. u8 pci_device; /* PCI Device number */
  721. u8 pci_function; /* PCI Function number */
  722. u8 reserved[3];
  723. u32 timer_period; /* Period of one timer count (msec) */
  724. u32 max_count; /* Maximum counter value supported */
  725. u32 min_count; /* Minimum counter value */
  726. u8 flags;
  727. u8 reserved2[3];
  728. u32 entries; /* Number of watchdog entries that follow */
  729. };
  730. /* Masks for Flags field above */
  731. #define ACPI_WDAT_ENABLED (1)
  732. #define ACPI_WDAT_STOPPED 0x80
  733. /* WDAT Instruction Entries (actions) */
  734. struct acpi_wdat_entry {
  735. u8 action;
  736. u8 instruction;
  737. u16 reserved;
  738. struct acpi_generic_address register_region;
  739. u32 value; /* Value used with Read/Write register */
  740. u32 mask; /* Bitmask required for this register instruction */
  741. };
  742. /* Values for Action field above */
  743. enum acpi_wdat_actions {
  744. ACPI_WDAT_RESET = 1,
  745. ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
  746. ACPI_WDAT_GET_COUNTDOWN = 5,
  747. ACPI_WDAT_SET_COUNTDOWN = 6,
  748. ACPI_WDAT_GET_RUNNING_STATE = 8,
  749. ACPI_WDAT_SET_RUNNING_STATE = 9,
  750. ACPI_WDAT_GET_STOPPED_STATE = 10,
  751. ACPI_WDAT_SET_STOPPED_STATE = 11,
  752. ACPI_WDAT_GET_REBOOT = 16,
  753. ACPI_WDAT_SET_REBOOT = 17,
  754. ACPI_WDAT_GET_SHUTDOWN = 18,
  755. ACPI_WDAT_SET_SHUTDOWN = 19,
  756. ACPI_WDAT_GET_STATUS = 32,
  757. ACPI_WDAT_SET_STATUS = 33,
  758. ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
  759. };
  760. /* Values for Instruction field above */
  761. enum acpi_wdat_instructions {
  762. ACPI_WDAT_READ_VALUE = 0,
  763. ACPI_WDAT_READ_COUNTDOWN = 1,
  764. ACPI_WDAT_WRITE_VALUE = 2,
  765. ACPI_WDAT_WRITE_COUNTDOWN = 3,
  766. ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
  767. ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
  768. };
  769. /*******************************************************************************
  770. *
  771. * WDDT - Watchdog Descriptor Table
  772. * Version 1
  773. *
  774. * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
  775. * Version 001, September 2002
  776. *
  777. ******************************************************************************/
  778. struct acpi_table_wddt {
  779. struct acpi_table_header header; /* Common ACPI table header */
  780. u16 spec_version;
  781. u16 table_version;
  782. u16 pci_vendor_id;
  783. struct acpi_generic_address address;
  784. u16 max_count; /* Maximum counter value supported */
  785. u16 min_count; /* Minimum counter value supported */
  786. u16 period;
  787. u16 status;
  788. u16 capability;
  789. };
  790. /* Flags for Status field above */
  791. #define ACPI_WDDT_AVAILABLE (1)
  792. #define ACPI_WDDT_ACTIVE (1<<1)
  793. #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
  794. #define ACPI_WDDT_USER_RESET (1<<11)
  795. #define ACPI_WDDT_WDT_RESET (1<<12)
  796. #define ACPI_WDDT_POWER_FAIL (1<<13)
  797. #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
  798. /* Flags for Capability field above */
  799. #define ACPI_WDDT_AUTO_RESET (1)
  800. #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
  801. /*******************************************************************************
  802. *
  803. * WDRT - Watchdog Resource Table
  804. * Version 1
  805. *
  806. * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
  807. * Version 1.01, August 28, 2006
  808. *
  809. ******************************************************************************/
  810. struct acpi_table_wdrt {
  811. struct acpi_table_header header; /* Common ACPI table header */
  812. struct acpi_generic_address control_register;
  813. struct acpi_generic_address count_register;
  814. u16 pci_device_id;
  815. u16 pci_vendor_id;
  816. u8 pci_bus; /* PCI Bus number */
  817. u8 pci_device; /* PCI Device number */
  818. u8 pci_function; /* PCI Function number */
  819. u8 pci_segment; /* PCI Segment number */
  820. u16 max_count; /* Maximum counter value supported */
  821. u8 units;
  822. };
  823. /* Reset to default packing */
  824. #pragma pack()
  825. #endif /* __ACTBL2_H__ */