actbl2.h 22 KB

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