actbl3.h 23 KB

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