actbl3.h 23 KB

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