actbl3.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2. /******************************************************************************
  3. *
  4. * Name: actbl3.h - ACPI Table Definitions
  5. *
  6. * Copyright (C) 2000 - 2022, Intel Corp.
  7. *
  8. *****************************************************************************/
  9. #ifndef __ACTBL3_H__
  10. #define __ACTBL3_H__
  11. /*******************************************************************************
  12. *
  13. * Additional ACPI Tables
  14. *
  15. * These tables are not consumed directly by the ACPICA subsystem, but are
  16. * included here to support device drivers and the AML disassembler.
  17. *
  18. ******************************************************************************/
  19. /*
  20. * Values for description table header signatures for tables defined in this
  21. * file. Useful because they make it more difficult to inadvertently type in
  22. * the wrong signature.
  23. */
  24. #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
  25. #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
  26. #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
  27. #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
  28. #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
  29. #define ACPI_SIG_STAO "STAO" /* Status Override table */
  30. #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
  31. #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
  32. #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
  33. #define ACPI_SIG_VIOT "VIOT" /* Virtual I/O Translation Table */
  34. #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
  35. #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
  36. #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
  37. #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
  38. #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
  39. #define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Mitigations Table */
  40. #define ACPI_SIG_XENV "XENV" /* Xen Environment table */
  41. #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
  42. /*
  43. * All tables must be byte-packed to match the ACPI specification, since
  44. * the tables are provided by the system BIOS.
  45. */
  46. #pragma pack(1)
  47. /*
  48. * Note: C bitfields are not used for this reason:
  49. *
  50. * "Bitfields are great and easy to read, but unfortunately the C language
  51. * does not specify the layout of bitfields in memory, which means they are
  52. * essentially useless for dealing with packed data in on-disk formats or
  53. * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
  54. * this decision was a design error in C. Ritchie could have picked an order
  55. * and stuck with it." Norman Ramsey.
  56. * See http://stackoverflow.com/a/1053662/41661
  57. */
  58. /*******************************************************************************
  59. *
  60. * SLIC - Software Licensing Description Table
  61. *
  62. * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
  63. * November 29, 2011. Copyright 2011 Microsoft
  64. *
  65. ******************************************************************************/
  66. /* Basic SLIC table is only the common ACPI header */
  67. struct acpi_table_slic {
  68. struct acpi_table_header header; /* Common ACPI table header */
  69. };
  70. /*******************************************************************************
  71. *
  72. * SLIT - System Locality Distance Information Table
  73. * Version 1
  74. *
  75. ******************************************************************************/
  76. struct acpi_table_slit {
  77. struct acpi_table_header header; /* Common ACPI table header */
  78. u64 locality_count;
  79. u8 entry[1]; /* Real size = localities^2 */
  80. };
  81. /*******************************************************************************
  82. *
  83. * SPCR - Serial Port Console Redirection table
  84. * Version 2
  85. *
  86. * Conforms to "Serial Port Console Redirection Table",
  87. * Version 1.03, August 10, 2015
  88. *
  89. ******************************************************************************/
  90. struct acpi_table_spcr {
  91. struct acpi_table_header header; /* Common ACPI table header */
  92. u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
  93. u8 reserved[3];
  94. struct acpi_generic_address serial_port;
  95. u8 interrupt_type;
  96. u8 pc_interrupt;
  97. u32 interrupt;
  98. u8 baud_rate;
  99. u8 parity;
  100. u8 stop_bits;
  101. u8 flow_control;
  102. u8 terminal_type;
  103. u8 reserved1;
  104. u16 pci_device_id;
  105. u16 pci_vendor_id;
  106. u8 pci_bus;
  107. u8 pci_device;
  108. u8 pci_function;
  109. u32 pci_flags;
  110. u8 pci_segment;
  111. u32 reserved2;
  112. };
  113. /* Masks for pci_flags field above */
  114. #define ACPI_SPCR_DO_NOT_DISABLE (1)
  115. /* Values for Interface Type: See the definition of the DBG2 table */
  116. /*******************************************************************************
  117. *
  118. * SPMI - Server Platform Management Interface table
  119. * Version 5
  120. *
  121. * Conforms to "Intelligent Platform Management Interface Specification
  122. * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
  123. * June 12, 2009 markup.
  124. *
  125. ******************************************************************************/
  126. struct acpi_table_spmi {
  127. struct acpi_table_header header; /* Common ACPI table header */
  128. u8 interface_type;
  129. u8 reserved; /* Must be 1 */
  130. u16 spec_revision; /* Version of IPMI */
  131. u8 interrupt_type;
  132. u8 gpe_number; /* GPE assigned */
  133. u8 reserved1;
  134. u8 pci_device_flag;
  135. u32 interrupt;
  136. struct acpi_generic_address ipmi_register;
  137. u8 pci_segment;
  138. u8 pci_bus;
  139. u8 pci_device;
  140. u8 pci_function;
  141. u8 reserved2;
  142. };
  143. /* Values for interface_type above */
  144. enum acpi_spmi_interface_types {
  145. ACPI_SPMI_NOT_USED = 0,
  146. ACPI_SPMI_KEYBOARD = 1,
  147. ACPI_SPMI_SMI = 2,
  148. ACPI_SPMI_BLOCK_TRANSFER = 3,
  149. ACPI_SPMI_SMBUS = 4,
  150. ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
  151. };
  152. /*******************************************************************************
  153. *
  154. * SRAT - System Resource Affinity Table
  155. * Version 3
  156. *
  157. ******************************************************************************/
  158. struct acpi_table_srat {
  159. struct acpi_table_header header; /* Common ACPI table header */
  160. u32 table_revision; /* Must be value '1' */
  161. u64 reserved; /* Reserved, must be zero */
  162. };
  163. /* Values for subtable type in struct acpi_subtable_header */
  164. enum acpi_srat_type {
  165. ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
  166. ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
  167. ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
  168. ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
  169. ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */
  170. ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */
  171. ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */
  172. ACPI_SRAT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
  173. };
  174. /*
  175. * SRAT Subtables, correspond to Type in struct acpi_subtable_header
  176. */
  177. /* 0: Processor Local APIC/SAPIC Affinity */
  178. struct acpi_srat_cpu_affinity {
  179. struct acpi_subtable_header header;
  180. u8 proximity_domain_lo;
  181. u8 apic_id;
  182. u32 flags;
  183. u8 local_sapic_eid;
  184. u8 proximity_domain_hi[3];
  185. u32 clock_domain;
  186. };
  187. /* Flags */
  188. #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
  189. /* 1: Memory Affinity */
  190. struct acpi_srat_mem_affinity {
  191. struct acpi_subtable_header header;
  192. u32 proximity_domain;
  193. u16 reserved; /* Reserved, must be zero */
  194. u64 base_address;
  195. u64 length;
  196. u32 reserved1;
  197. u32 flags;
  198. u64 reserved2; /* Reserved, must be zero */
  199. };
  200. /* Flags */
  201. #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
  202. #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
  203. #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
  204. /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
  205. struct acpi_srat_x2apic_cpu_affinity {
  206. struct acpi_subtable_header header;
  207. u16 reserved; /* Reserved, must be zero */
  208. u32 proximity_domain;
  209. u32 apic_id;
  210. u32 flags;
  211. u32 clock_domain;
  212. u32 reserved2;
  213. };
  214. /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
  215. #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
  216. /* 3: GICC Affinity (ACPI 5.1) */
  217. struct acpi_srat_gicc_affinity {
  218. struct acpi_subtable_header header;
  219. u32 proximity_domain;
  220. u32 acpi_processor_uid;
  221. u32 flags;
  222. u32 clock_domain;
  223. };
  224. /* Flags for struct acpi_srat_gicc_affinity */
  225. #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
  226. /* 4: GCC ITS Affinity (ACPI 6.2) */
  227. struct acpi_srat_gic_its_affinity {
  228. struct acpi_subtable_header header;
  229. u32 proximity_domain;
  230. u16 reserved;
  231. u32 its_id;
  232. };
  233. /*
  234. * Common structure for SRAT subtable types:
  235. * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY
  236. * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY
  237. */
  238. struct acpi_srat_generic_affinity {
  239. struct acpi_subtable_header header;
  240. u8 reserved;
  241. u8 device_handle_type;
  242. u32 proximity_domain;
  243. u8 device_handle[16];
  244. u32 flags;
  245. u32 reserved1;
  246. };
  247. /* Flags for struct acpi_srat_generic_affinity */
  248. #define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */
  249. #define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */
  250. /*******************************************************************************
  251. *
  252. * STAO - Status Override Table (_STA override) - ACPI 6.0
  253. * Version 1
  254. *
  255. * Conforms to "ACPI Specification for Status Override Table"
  256. * 6 January 2015
  257. *
  258. ******************************************************************************/
  259. struct acpi_table_stao {
  260. struct acpi_table_header header; /* Common ACPI table header */
  261. u8 ignore_uart;
  262. };
  263. /*******************************************************************************
  264. *
  265. * TCPA - Trusted Computing Platform Alliance table
  266. * Version 2
  267. *
  268. * TCG Hardware Interface Table for TPM 1.2 Clients and Servers
  269. *
  270. * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
  271. * Version 1.2, Revision 8
  272. * February 27, 2017
  273. *
  274. * NOTE: There are two versions of the table with the same signature --
  275. * the client version and the server version. The common platform_class
  276. * field is used to differentiate the two types of tables.
  277. *
  278. ******************************************************************************/
  279. struct acpi_table_tcpa_hdr {
  280. struct acpi_table_header header; /* Common ACPI table header */
  281. u16 platform_class;
  282. };
  283. /*
  284. * Values for platform_class above.
  285. * This is how the client and server subtables are differentiated
  286. */
  287. #define ACPI_TCPA_CLIENT_TABLE 0
  288. #define ACPI_TCPA_SERVER_TABLE 1
  289. struct acpi_table_tcpa_client {
  290. u32 minimum_log_length; /* Minimum length for the event log area */
  291. u64 log_address; /* Address of the event log area */
  292. };
  293. struct acpi_table_tcpa_server {
  294. u16 reserved;
  295. u64 minimum_log_length; /* Minimum length for the event log area */
  296. u64 log_address; /* Address of the event log area */
  297. u16 spec_revision;
  298. u8 device_flags;
  299. u8 interrupt_flags;
  300. u8 gpe_number;
  301. u8 reserved2[3];
  302. u32 global_interrupt;
  303. struct acpi_generic_address address;
  304. u32 reserved3;
  305. struct acpi_generic_address config_address;
  306. u8 group;
  307. u8 bus; /* PCI Bus/Segment/Function numbers */
  308. u8 device;
  309. u8 function;
  310. };
  311. /* Values for device_flags above */
  312. #define ACPI_TCPA_PCI_DEVICE (1)
  313. #define ACPI_TCPA_BUS_PNP (1<<1)
  314. #define ACPI_TCPA_ADDRESS_VALID (1<<2)
  315. /* Values for interrupt_flags above */
  316. #define ACPI_TCPA_INTERRUPT_MODE (1)
  317. #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
  318. #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
  319. #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
  320. /*******************************************************************************
  321. *
  322. * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
  323. * Version 4
  324. *
  325. * TCG Hardware Interface Table for TPM 2.0 Clients and Servers
  326. *
  327. * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
  328. * Version 1.2, Revision 8
  329. * February 27, 2017
  330. *
  331. ******************************************************************************/
  332. /* Revision 3 */
  333. struct acpi_table_tpm23 {
  334. struct acpi_table_header header; /* Common ACPI table header */
  335. u32 reserved;
  336. u64 control_address;
  337. u32 start_method;
  338. };
  339. /* Value for start_method above */
  340. #define ACPI_TPM23_ACPI_START_METHOD 2
  341. /*
  342. * Optional trailer for revision 3. If start method is 2, there is a 4 byte
  343. * reserved area of all zeros.
  344. */
  345. struct acpi_tmp23_trailer {
  346. u32 reserved;
  347. };
  348. /* Revision 4 */
  349. struct acpi_table_tpm2 {
  350. struct acpi_table_header header; /* Common ACPI table header */
  351. u16 platform_class;
  352. u16 reserved;
  353. u64 control_address;
  354. u32 start_method;
  355. /* Platform-specific data follows */
  356. };
  357. /* Optional trailer for revision 4 holding platform-specific data */
  358. struct acpi_tpm2_phy {
  359. u8 start_method_specific[12];
  360. u32 log_area_minimum_length;
  361. u64 log_area_start_address;
  362. };
  363. /* Values for start_method above */
  364. #define ACPI_TPM2_NOT_ALLOWED 0
  365. #define ACPI_TPM2_RESERVED1 1
  366. #define ACPI_TPM2_START_METHOD 2
  367. #define ACPI_TPM2_RESERVED3 3
  368. #define ACPI_TPM2_RESERVED4 4
  369. #define ACPI_TPM2_RESERVED5 5
  370. #define ACPI_TPM2_MEMORY_MAPPED 6
  371. #define ACPI_TPM2_COMMAND_BUFFER 7
  372. #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
  373. #define ACPI_TPM2_RESERVED9 9
  374. #define ACPI_TPM2_RESERVED10 10
  375. #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */
  376. #define ACPI_TPM2_RESERVED 12
  377. #define ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON 13
  378. /* Optional trailer appears after any start_method subtables */
  379. struct acpi_tpm2_trailer {
  380. u8 method_parameters[12];
  381. u32 minimum_log_length; /* Minimum length for the event log area */
  382. u64 log_address; /* Address of the event log area */
  383. };
  384. /*
  385. * Subtables (start_method-specific)
  386. */
  387. /* 11: Start Method for ARM SMC (V1.2 Rev 8) */
  388. struct acpi_tpm2_arm_smc {
  389. u32 global_interrupt;
  390. u8 interrupt_flags;
  391. u8 operation_flags;
  392. u16 reserved;
  393. u32 function_id;
  394. };
  395. /* Values for interrupt_flags above */
  396. #define ACPI_TPM2_INTERRUPT_SUPPORT (1)
  397. /* Values for operation_flags above */
  398. #define ACPI_TPM2_IDLE_SUPPORT (1)
  399. /*******************************************************************************
  400. *
  401. * UEFI - UEFI Boot optimization Table
  402. * Version 1
  403. *
  404. * Conforms to "Unified Extensible Firmware Interface Specification",
  405. * Version 2.3, May 8, 2009
  406. *
  407. ******************************************************************************/
  408. struct acpi_table_uefi {
  409. struct acpi_table_header header; /* Common ACPI table header */
  410. u8 identifier[16]; /* UUID identifier */
  411. u16 data_offset; /* Offset of remaining data in table */
  412. };
  413. /*******************************************************************************
  414. *
  415. * VIOT - Virtual I/O Translation Table
  416. * Version 1
  417. *
  418. ******************************************************************************/
  419. struct acpi_table_viot {
  420. struct acpi_table_header header; /* Common ACPI table header */
  421. u16 node_count;
  422. u16 node_offset;
  423. u8 reserved[8];
  424. };
  425. /* VIOT subtable header */
  426. struct acpi_viot_header {
  427. u8 type;
  428. u8 reserved;
  429. u16 length;
  430. };
  431. /* Values for Type field above */
  432. enum acpi_viot_node_type {
  433. ACPI_VIOT_NODE_PCI_RANGE = 0x01,
  434. ACPI_VIOT_NODE_MMIO = 0x02,
  435. ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,
  436. ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,
  437. ACPI_VIOT_RESERVED = 0x05
  438. };
  439. /* VIOT subtables */
  440. struct acpi_viot_pci_range {
  441. struct acpi_viot_header header;
  442. u32 endpoint_start;
  443. u16 segment_start;
  444. u16 segment_end;
  445. u16 bdf_start;
  446. u16 bdf_end;
  447. u16 output_node;
  448. u8 reserved[6];
  449. };
  450. struct acpi_viot_mmio {
  451. struct acpi_viot_header header;
  452. u32 endpoint;
  453. u64 base_address;
  454. u16 output_node;
  455. u8 reserved[6];
  456. };
  457. struct acpi_viot_virtio_iommu_pci {
  458. struct acpi_viot_header header;
  459. u16 segment;
  460. u16 bdf;
  461. u8 reserved[8];
  462. };
  463. struct acpi_viot_virtio_iommu_mmio {
  464. struct acpi_viot_header header;
  465. u8 reserved[4];
  466. u64 base_address;
  467. };
  468. /*******************************************************************************
  469. *
  470. * WAET - Windows ACPI Emulated devices Table
  471. * Version 1
  472. *
  473. * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
  474. *
  475. ******************************************************************************/
  476. struct acpi_table_waet {
  477. struct acpi_table_header header; /* Common ACPI table header */
  478. u32 flags;
  479. };
  480. /* Masks for Flags field above */
  481. #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
  482. #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
  483. /*******************************************************************************
  484. *
  485. * WDAT - Watchdog Action Table
  486. * Version 1
  487. *
  488. * Conforms to "Hardware Watchdog Timers Design Specification",
  489. * Copyright 2006 Microsoft Corporation.
  490. *
  491. ******************************************************************************/
  492. struct acpi_table_wdat {
  493. struct acpi_table_header header; /* Common ACPI table header */
  494. u32 header_length; /* Watchdog Header Length */
  495. u16 pci_segment; /* PCI Segment number */
  496. u8 pci_bus; /* PCI Bus number */
  497. u8 pci_device; /* PCI Device number */
  498. u8 pci_function; /* PCI Function number */
  499. u8 reserved[3];
  500. u32 timer_period; /* Period of one timer count (msec) */
  501. u32 max_count; /* Maximum counter value supported */
  502. u32 min_count; /* Minimum counter value */
  503. u8 flags;
  504. u8 reserved2[3];
  505. u32 entries; /* Number of watchdog entries that follow */
  506. };
  507. /* Masks for Flags field above */
  508. #define ACPI_WDAT_ENABLED (1)
  509. #define ACPI_WDAT_STOPPED 0x80
  510. /* WDAT Instruction Entries (actions) */
  511. struct acpi_wdat_entry {
  512. u8 action;
  513. u8 instruction;
  514. u16 reserved;
  515. struct acpi_generic_address register_region;
  516. u32 value; /* Value used with Read/Write register */
  517. u32 mask; /* Bitmask required for this register instruction */
  518. };
  519. /* Values for Action field above */
  520. enum acpi_wdat_actions {
  521. ACPI_WDAT_RESET = 1,
  522. ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
  523. ACPI_WDAT_GET_COUNTDOWN = 5,
  524. ACPI_WDAT_SET_COUNTDOWN = 6,
  525. ACPI_WDAT_GET_RUNNING_STATE = 8,
  526. ACPI_WDAT_SET_RUNNING_STATE = 9,
  527. ACPI_WDAT_GET_STOPPED_STATE = 10,
  528. ACPI_WDAT_SET_STOPPED_STATE = 11,
  529. ACPI_WDAT_GET_REBOOT = 16,
  530. ACPI_WDAT_SET_REBOOT = 17,
  531. ACPI_WDAT_GET_SHUTDOWN = 18,
  532. ACPI_WDAT_SET_SHUTDOWN = 19,
  533. ACPI_WDAT_GET_STATUS = 32,
  534. ACPI_WDAT_SET_STATUS = 33,
  535. ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
  536. };
  537. /* Values for Instruction field above */
  538. enum acpi_wdat_instructions {
  539. ACPI_WDAT_READ_VALUE = 0,
  540. ACPI_WDAT_READ_COUNTDOWN = 1,
  541. ACPI_WDAT_WRITE_VALUE = 2,
  542. ACPI_WDAT_WRITE_COUNTDOWN = 3,
  543. ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
  544. ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
  545. };
  546. /*******************************************************************************
  547. *
  548. * WDDT - Watchdog Descriptor Table
  549. * Version 1
  550. *
  551. * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
  552. * Version 001, September 2002
  553. *
  554. ******************************************************************************/
  555. struct acpi_table_wddt {
  556. struct acpi_table_header header; /* Common ACPI table header */
  557. u16 spec_version;
  558. u16 table_version;
  559. u16 pci_vendor_id;
  560. struct acpi_generic_address address;
  561. u16 max_count; /* Maximum counter value supported */
  562. u16 min_count; /* Minimum counter value supported */
  563. u16 period;
  564. u16 status;
  565. u16 capability;
  566. };
  567. /* Flags for Status field above */
  568. #define ACPI_WDDT_AVAILABLE (1)
  569. #define ACPI_WDDT_ACTIVE (1<<1)
  570. #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
  571. #define ACPI_WDDT_USER_RESET (1<<11)
  572. #define ACPI_WDDT_WDT_RESET (1<<12)
  573. #define ACPI_WDDT_POWER_FAIL (1<<13)
  574. #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
  575. /* Flags for Capability field above */
  576. #define ACPI_WDDT_AUTO_RESET (1)
  577. #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
  578. /*******************************************************************************
  579. *
  580. * WDRT - Watchdog Resource Table
  581. * Version 1
  582. *
  583. * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
  584. * Version 1.01, August 28, 2006
  585. *
  586. ******************************************************************************/
  587. struct acpi_table_wdrt {
  588. struct acpi_table_header header; /* Common ACPI table header */
  589. struct acpi_generic_address control_register;
  590. struct acpi_generic_address count_register;
  591. u16 pci_device_id;
  592. u16 pci_vendor_id;
  593. u8 pci_bus; /* PCI Bus number */
  594. u8 pci_device; /* PCI Device number */
  595. u8 pci_function; /* PCI Function number */
  596. u8 pci_segment; /* PCI Segment number */
  597. u16 max_count; /* Maximum counter value supported */
  598. u8 units;
  599. };
  600. /*******************************************************************************
  601. *
  602. * WPBT - Windows Platform Environment Table (ACPI 6.0)
  603. * Version 1
  604. *
  605. * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
  606. *
  607. ******************************************************************************/
  608. struct acpi_table_wpbt {
  609. struct acpi_table_header header; /* Common ACPI table header */
  610. u32 handoff_size;
  611. u64 handoff_address;
  612. u8 layout;
  613. u8 type;
  614. u16 arguments_length;
  615. };
  616. struct acpi_wpbt_unicode {
  617. u16 *unicode_string;
  618. };
  619. /*******************************************************************************
  620. *
  621. * WSMT - Windows SMM Security Mitigations Table
  622. * Version 1
  623. *
  624. * Conforms to "Windows SMM Security Mitigations Table",
  625. * Version 1.0, April 18, 2016
  626. *
  627. ******************************************************************************/
  628. struct acpi_table_wsmt {
  629. struct acpi_table_header header; /* Common ACPI table header */
  630. u32 protection_flags;
  631. };
  632. /* Flags for protection_flags field above */
  633. #define ACPI_WSMT_FIXED_COMM_BUFFERS (1)
  634. #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
  635. #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4)
  636. /*******************************************************************************
  637. *
  638. * XENV - Xen Environment Table (ACPI 6.0)
  639. * Version 1
  640. *
  641. * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
  642. *
  643. ******************************************************************************/
  644. struct acpi_table_xenv {
  645. struct acpi_table_header header; /* Common ACPI table header */
  646. u64 grant_table_address;
  647. u64 grant_table_size;
  648. u32 event_interrupt;
  649. u8 event_flags;
  650. };
  651. /* Reset to default packing */
  652. #pragma pack()
  653. #endif /* __ACTBL3_H__ */