actbl2.h 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585
  1. /******************************************************************************
  2. *
  3. * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2017, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #ifndef __ACTBL2_H__
  43. #define __ACTBL2_H__
  44. /*******************************************************************************
  45. *
  46. * Additional ACPI Tables (2)
  47. *
  48. * These tables are not consumed directly by the ACPICA subsystem, but are
  49. * included here to support device drivers and the AML disassembler.
  50. *
  51. * Generally, the tables in this file are defined by third-party specifications,
  52. * and are not defined directly by the ACPI specification itself.
  53. *
  54. ******************************************************************************/
  55. /*
  56. * Values for description table header signatures for tables defined in this
  57. * file. Useful because they make it more difficult to inadvertently type in
  58. * the wrong signature.
  59. */
  60. #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
  61. #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
  62. #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
  63. #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
  64. #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
  65. #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
  66. #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
  67. #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
  68. #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
  69. #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
  70. #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
  71. #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
  72. #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
  73. #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
  74. #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
  75. #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
  76. #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
  77. #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
  78. #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
  79. #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
  80. #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
  81. #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
  82. #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
  83. #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
  84. #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
  85. #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
  86. #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
  87. #define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */
  88. #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
  89. #ifdef ACPI_UNDEFINED_TABLES
  90. /*
  91. * These tables have been seen in the field, but no definition has been found
  92. */
  93. #define ACPI_SIG_ATKG "ATKG"
  94. #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
  95. #define ACPI_SIG_IEIT "IEIT"
  96. #endif
  97. /*
  98. * All tables must be byte-packed to match the ACPI specification, since
  99. * the tables are provided by the system BIOS.
  100. */
  101. #pragma pack(1)
  102. /*
  103. * Note: C bitfields are not used for this reason:
  104. *
  105. * "Bitfields are great and easy to read, but unfortunately the C language
  106. * does not specify the layout of bitfields in memory, which means they are
  107. * essentially useless for dealing with packed data in on-disk formats or
  108. * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
  109. * this decision was a design error in C. Ritchie could have picked an order
  110. * and stuck with it." Norman Ramsey.
  111. * See http://stackoverflow.com/a/1053662/41661
  112. */
  113. /*******************************************************************************
  114. *
  115. * ASF - Alert Standard Format table (Signature "ASF!")
  116. * Revision 0x10
  117. *
  118. * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
  119. *
  120. ******************************************************************************/
  121. struct acpi_table_asf {
  122. struct acpi_table_header header; /* Common ACPI table header */
  123. };
  124. /* ASF subtable header */
  125. struct acpi_asf_header {
  126. u8 type;
  127. u8 reserved;
  128. u16 length;
  129. };
  130. /* Values for Type field above */
  131. enum acpi_asf_type {
  132. ACPI_ASF_TYPE_INFO = 0,
  133. ACPI_ASF_TYPE_ALERT = 1,
  134. ACPI_ASF_TYPE_CONTROL = 2,
  135. ACPI_ASF_TYPE_BOOT = 3,
  136. ACPI_ASF_TYPE_ADDRESS = 4,
  137. ACPI_ASF_TYPE_RESERVED = 5
  138. };
  139. /*
  140. * ASF subtables
  141. */
  142. /* 0: ASF Information */
  143. struct acpi_asf_info {
  144. struct acpi_asf_header header;
  145. u8 min_reset_value;
  146. u8 min_poll_interval;
  147. u16 system_id;
  148. u32 mfg_id;
  149. u8 flags;
  150. u8 reserved2[3];
  151. };
  152. /* Masks for Flags field above */
  153. #define ACPI_ASF_SMBUS_PROTOCOLS (1)
  154. /* 1: ASF Alerts */
  155. struct acpi_asf_alert {
  156. struct acpi_asf_header header;
  157. u8 assert_mask;
  158. u8 deassert_mask;
  159. u8 alerts;
  160. u8 data_length;
  161. };
  162. struct acpi_asf_alert_data {
  163. u8 address;
  164. u8 command;
  165. u8 mask;
  166. u8 value;
  167. u8 sensor_type;
  168. u8 type;
  169. u8 offset;
  170. u8 source_type;
  171. u8 severity;
  172. u8 sensor_number;
  173. u8 entity;
  174. u8 instance;
  175. };
  176. /* 2: ASF Remote Control */
  177. struct acpi_asf_remote {
  178. struct acpi_asf_header header;
  179. u8 controls;
  180. u8 data_length;
  181. u16 reserved2;
  182. };
  183. struct acpi_asf_control_data {
  184. u8 function;
  185. u8 address;
  186. u8 command;
  187. u8 value;
  188. };
  189. /* 3: ASF RMCP Boot Options */
  190. struct acpi_asf_rmcp {
  191. struct acpi_asf_header header;
  192. u8 capabilities[7];
  193. u8 completion_code;
  194. u32 enterprise_id;
  195. u8 command;
  196. u16 parameter;
  197. u16 boot_options;
  198. u16 oem_parameters;
  199. };
  200. /* 4: ASF Address */
  201. struct acpi_asf_address {
  202. struct acpi_asf_header header;
  203. u8 eprom_address;
  204. u8 devices;
  205. };
  206. /*******************************************************************************
  207. *
  208. * BOOT - Simple Boot Flag Table
  209. * Version 1
  210. *
  211. * Conforms to the "Simple Boot Flag Specification", Version 2.1
  212. *
  213. ******************************************************************************/
  214. struct acpi_table_boot {
  215. struct acpi_table_header header; /* Common ACPI table header */
  216. u8 cmos_index; /* Index in CMOS RAM for the boot register */
  217. u8 reserved[3];
  218. };
  219. /*******************************************************************************
  220. *
  221. * CSRT - Core System Resource Table
  222. * Version 0
  223. *
  224. * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
  225. *
  226. ******************************************************************************/
  227. struct acpi_table_csrt {
  228. struct acpi_table_header header; /* Common ACPI table header */
  229. };
  230. /* Resource Group subtable */
  231. struct acpi_csrt_group {
  232. u32 length;
  233. u32 vendor_id;
  234. u32 subvendor_id;
  235. u16 device_id;
  236. u16 subdevice_id;
  237. u16 revision;
  238. u16 reserved;
  239. u32 shared_info_length;
  240. /* Shared data immediately follows (Length = shared_info_length) */
  241. };
  242. /* Shared Info subtable */
  243. struct acpi_csrt_shared_info {
  244. u16 major_version;
  245. u16 minor_version;
  246. u32 mmio_base_low;
  247. u32 mmio_base_high;
  248. u32 gsi_interrupt;
  249. u8 interrupt_polarity;
  250. u8 interrupt_mode;
  251. u8 num_channels;
  252. u8 dma_address_width;
  253. u16 base_request_line;
  254. u16 num_handshake_signals;
  255. u32 max_block_size;
  256. /* Resource descriptors immediately follow (Length = Group length - shared_info_length) */
  257. };
  258. /* Resource Descriptor subtable */
  259. struct acpi_csrt_descriptor {
  260. u32 length;
  261. u16 type;
  262. u16 subtype;
  263. u32 uid;
  264. /* Resource-specific information immediately follows */
  265. };
  266. /* Resource Types */
  267. #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
  268. #define ACPI_CSRT_TYPE_TIMER 0x0002
  269. #define ACPI_CSRT_TYPE_DMA 0x0003
  270. /* Resource Subtypes */
  271. #define ACPI_CSRT_XRUPT_LINE 0x0000
  272. #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
  273. #define ACPI_CSRT_TIMER 0x0000
  274. #define ACPI_CSRT_DMA_CHANNEL 0x0000
  275. #define ACPI_CSRT_DMA_CONTROLLER 0x0001
  276. /*******************************************************************************
  277. *
  278. * DBG2 - Debug Port Table 2
  279. * Version 0 (Both main table and subtables)
  280. *
  281. * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
  282. *
  283. ******************************************************************************/
  284. struct acpi_table_dbg2 {
  285. struct acpi_table_header header; /* Common ACPI table header */
  286. u32 info_offset;
  287. u32 info_count;
  288. };
  289. struct acpi_dbg2_header {
  290. u32 info_offset;
  291. u32 info_count;
  292. };
  293. /* Debug Device Information Subtable */
  294. struct acpi_dbg2_device {
  295. u8 revision;
  296. u16 length;
  297. u8 register_count; /* Number of base_address registers */
  298. u16 namepath_length;
  299. u16 namepath_offset;
  300. u16 oem_data_length;
  301. u16 oem_data_offset;
  302. u16 port_type;
  303. u16 port_subtype;
  304. u16 reserved;
  305. u16 base_address_offset;
  306. u16 address_size_offset;
  307. /*
  308. * Data that follows:
  309. * base_address (required) - Each in 12-byte Generic Address Structure format.
  310. * address_size (required) - Array of u32 sizes corresponding to each base_address register.
  311. * Namepath (required) - Null terminated string. Single dot if not supported.
  312. * oem_data (optional) - Length is oem_data_length.
  313. */
  314. };
  315. /* Types for port_type field above */
  316. #define ACPI_DBG2_SERIAL_PORT 0x8000
  317. #define ACPI_DBG2_1394_PORT 0x8001
  318. #define ACPI_DBG2_USB_PORT 0x8002
  319. #define ACPI_DBG2_NET_PORT 0x8003
  320. /* Subtypes for port_subtype field above */
  321. #define ACPI_DBG2_16550_COMPATIBLE 0x0000
  322. #define ACPI_DBG2_16550_SUBSET 0x0001
  323. #define ACPI_DBG2_ARM_PL011 0x0003
  324. #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
  325. #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
  326. #define ACPI_DBG2_ARM_DCC 0x000F
  327. #define ACPI_DBG2_BCM2835 0x0010
  328. #define ACPI_DBG2_1394_STANDARD 0x0000
  329. #define ACPI_DBG2_USB_XHCI 0x0000
  330. #define ACPI_DBG2_USB_EHCI 0x0001
  331. /*******************************************************************************
  332. *
  333. * DBGP - Debug Port table
  334. * Version 1
  335. *
  336. * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
  337. *
  338. ******************************************************************************/
  339. struct acpi_table_dbgp {
  340. struct acpi_table_header header; /* Common ACPI table header */
  341. u8 type; /* 0=full 16550, 1=subset of 16550 */
  342. u8 reserved[3];
  343. struct acpi_generic_address debug_port;
  344. };
  345. /*******************************************************************************
  346. *
  347. * DMAR - DMA Remapping table
  348. * Version 1
  349. *
  350. * Conforms to "Intel Virtualization Technology for Directed I/O",
  351. * Version 2.3, October 2014
  352. *
  353. ******************************************************************************/
  354. struct acpi_table_dmar {
  355. struct acpi_table_header header; /* Common ACPI table header */
  356. u8 width; /* Host Address Width */
  357. u8 flags;
  358. u8 reserved[10];
  359. };
  360. /* Masks for Flags field above */
  361. #define ACPI_DMAR_INTR_REMAP (1)
  362. #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
  363. #define ACPI_DMAR_X2APIC_MODE (1<<2)
  364. /* DMAR subtable header */
  365. struct acpi_dmar_header {
  366. u16 type;
  367. u16 length;
  368. };
  369. /* Values for subtable type in struct acpi_dmar_header */
  370. enum acpi_dmar_type {
  371. ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
  372. ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
  373. ACPI_DMAR_TYPE_ROOT_ATS = 2,
  374. ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
  375. ACPI_DMAR_TYPE_NAMESPACE = 4,
  376. ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
  377. };
  378. /* DMAR Device Scope structure */
  379. struct acpi_dmar_device_scope {
  380. u8 entry_type;
  381. u8 length;
  382. u16 reserved;
  383. u8 enumeration_id;
  384. u8 bus;
  385. };
  386. /* Values for entry_type in struct acpi_dmar_device_scope - device types */
  387. enum acpi_dmar_scope_type {
  388. ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
  389. ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
  390. ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
  391. ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
  392. ACPI_DMAR_SCOPE_TYPE_HPET = 4,
  393. ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
  394. ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  395. };
  396. struct acpi_dmar_pci_path {
  397. u8 device;
  398. u8 function;
  399. };
  400. /*
  401. * DMAR Subtables, correspond to Type in struct acpi_dmar_header
  402. */
  403. /* 0: Hardware Unit Definition */
  404. struct acpi_dmar_hardware_unit {
  405. struct acpi_dmar_header header;
  406. u8 flags;
  407. u8 reserved;
  408. u16 segment;
  409. u64 address; /* Register Base Address */
  410. };
  411. /* Masks for Flags field above */
  412. #define ACPI_DMAR_INCLUDE_ALL (1)
  413. /* 1: Reserved Memory Defininition */
  414. struct acpi_dmar_reserved_memory {
  415. struct acpi_dmar_header header;
  416. u16 reserved;
  417. u16 segment;
  418. u64 base_address; /* 4K aligned base address */
  419. u64 end_address; /* 4K aligned limit address */
  420. };
  421. /* Masks for Flags field above */
  422. #define ACPI_DMAR_ALLOW_ALL (1)
  423. /* 2: Root Port ATS Capability Reporting Structure */
  424. struct acpi_dmar_atsr {
  425. struct acpi_dmar_header header;
  426. u8 flags;
  427. u8 reserved;
  428. u16 segment;
  429. };
  430. /* Masks for Flags field above */
  431. #define ACPI_DMAR_ALL_PORTS (1)
  432. /* 3: Remapping Hardware Static Affinity Structure */
  433. struct acpi_dmar_rhsa {
  434. struct acpi_dmar_header header;
  435. u32 reserved;
  436. u64 base_address;
  437. u32 proximity_domain;
  438. };
  439. /* 4: ACPI Namespace Device Declaration Structure */
  440. struct acpi_dmar_andd {
  441. struct acpi_dmar_header header;
  442. u8 reserved[3];
  443. u8 device_number;
  444. char device_name[1];
  445. };
  446. /*******************************************************************************
  447. *
  448. * HPET - High Precision Event Timer table
  449. * Version 1
  450. *
  451. * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
  452. * Version 1.0a, October 2004
  453. *
  454. ******************************************************************************/
  455. struct acpi_table_hpet {
  456. struct acpi_table_header header; /* Common ACPI table header */
  457. u32 id; /* Hardware ID of event timer block */
  458. struct acpi_generic_address address; /* Address of event timer block */
  459. u8 sequence; /* HPET sequence number */
  460. u16 minimum_tick; /* Main counter min tick, periodic mode */
  461. u8 flags;
  462. };
  463. /* Masks for Flags field above */
  464. #define ACPI_HPET_PAGE_PROTECT_MASK (3)
  465. /* Values for Page Protect flags */
  466. enum acpi_hpet_page_protect {
  467. ACPI_HPET_NO_PAGE_PROTECT = 0,
  468. ACPI_HPET_PAGE_PROTECT4 = 1,
  469. ACPI_HPET_PAGE_PROTECT64 = 2
  470. };
  471. /*******************************************************************************
  472. *
  473. * IBFT - Boot Firmware Table
  474. * Version 1
  475. *
  476. * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
  477. * Specification", Version 1.01, March 1, 2007
  478. *
  479. * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
  480. * Therefore, it is not currently supported by the disassembler.
  481. *
  482. ******************************************************************************/
  483. struct acpi_table_ibft {
  484. struct acpi_table_header header; /* Common ACPI table header */
  485. u8 reserved[12];
  486. };
  487. /* IBFT common subtable header */
  488. struct acpi_ibft_header {
  489. u8 type;
  490. u8 version;
  491. u16 length;
  492. u8 index;
  493. u8 flags;
  494. };
  495. /* Values for Type field above */
  496. enum acpi_ibft_type {
  497. ACPI_IBFT_TYPE_NOT_USED = 0,
  498. ACPI_IBFT_TYPE_CONTROL = 1,
  499. ACPI_IBFT_TYPE_INITIATOR = 2,
  500. ACPI_IBFT_TYPE_NIC = 3,
  501. ACPI_IBFT_TYPE_TARGET = 4,
  502. ACPI_IBFT_TYPE_EXTENSIONS = 5,
  503. ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  504. };
  505. /* IBFT subtables */
  506. struct acpi_ibft_control {
  507. struct acpi_ibft_header header;
  508. u16 extensions;
  509. u16 initiator_offset;
  510. u16 nic0_offset;
  511. u16 target0_offset;
  512. u16 nic1_offset;
  513. u16 target1_offset;
  514. };
  515. struct acpi_ibft_initiator {
  516. struct acpi_ibft_header header;
  517. u8 sns_server[16];
  518. u8 slp_server[16];
  519. u8 primary_server[16];
  520. u8 secondary_server[16];
  521. u16 name_length;
  522. u16 name_offset;
  523. };
  524. struct acpi_ibft_nic {
  525. struct acpi_ibft_header header;
  526. u8 ip_address[16];
  527. u8 subnet_mask_prefix;
  528. u8 origin;
  529. u8 gateway[16];
  530. u8 primary_dns[16];
  531. u8 secondary_dns[16];
  532. u8 dhcp[16];
  533. u16 vlan;
  534. u8 mac_address[6];
  535. u16 pci_address;
  536. u16 name_length;
  537. u16 name_offset;
  538. };
  539. struct acpi_ibft_target {
  540. struct acpi_ibft_header header;
  541. u8 target_ip_address[16];
  542. u16 target_ip_socket;
  543. u8 target_boot_lun[8];
  544. u8 chap_type;
  545. u8 nic_association;
  546. u16 target_name_length;
  547. u16 target_name_offset;
  548. u16 chap_name_length;
  549. u16 chap_name_offset;
  550. u16 chap_secret_length;
  551. u16 chap_secret_offset;
  552. u16 reverse_chap_name_length;
  553. u16 reverse_chap_name_offset;
  554. u16 reverse_chap_secret_length;
  555. u16 reverse_chap_secret_offset;
  556. };
  557. /*******************************************************************************
  558. *
  559. * IORT - IO Remapping Table
  560. *
  561. * Conforms to "IO Remapping Table System Software on ARM Platforms",
  562. * Document number: ARM DEN 0049C, May 2017
  563. *
  564. ******************************************************************************/
  565. struct acpi_table_iort {
  566. struct acpi_table_header header;
  567. u32 node_count;
  568. u32 node_offset;
  569. u32 reserved;
  570. };
  571. /*
  572. * IORT subtables
  573. */
  574. struct acpi_iort_node {
  575. u8 type;
  576. u16 length;
  577. u8 revision;
  578. u32 reserved;
  579. u32 mapping_count;
  580. u32 mapping_offset;
  581. char node_data[1];
  582. };
  583. /* Values for subtable Type above */
  584. enum acpi_iort_node_type {
  585. ACPI_IORT_NODE_ITS_GROUP = 0x00,
  586. ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
  587. ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
  588. ACPI_IORT_NODE_SMMU = 0x03,
  589. ACPI_IORT_NODE_SMMU_V3 = 0x04
  590. };
  591. struct acpi_iort_id_mapping {
  592. u32 input_base; /* Lowest value in input range */
  593. u32 id_count; /* Number of IDs */
  594. u32 output_base; /* Lowest value in output range */
  595. u32 output_reference; /* A reference to the output node */
  596. u32 flags;
  597. };
  598. /* Masks for Flags field above for IORT subtable */
  599. #define ACPI_IORT_ID_SINGLE_MAPPING (1)
  600. struct acpi_iort_memory_access {
  601. u32 cache_coherency;
  602. u8 hints;
  603. u16 reserved;
  604. u8 memory_flags;
  605. };
  606. /* Values for cache_coherency field above */
  607. #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
  608. #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
  609. /* Masks for Hints field above */
  610. #define ACPI_IORT_HT_TRANSIENT (1)
  611. #define ACPI_IORT_HT_WRITE (1<<1)
  612. #define ACPI_IORT_HT_READ (1<<2)
  613. #define ACPI_IORT_HT_OVERRIDE (1<<3)
  614. /* Masks for memory_flags field above */
  615. #define ACPI_IORT_MF_COHERENCY (1)
  616. #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
  617. /*
  618. * IORT node specific subtables
  619. */
  620. struct acpi_iort_its_group {
  621. u32 its_count;
  622. u32 identifiers[1]; /* GIC ITS identifier arrary */
  623. };
  624. struct acpi_iort_named_component {
  625. u32 node_flags;
  626. u64 memory_properties; /* Memory access properties */
  627. u8 memory_address_limit; /* Memory address size limit */
  628. char device_name[1]; /* Path of namespace object */
  629. };
  630. struct acpi_iort_root_complex {
  631. u64 memory_properties; /* Memory access properties */
  632. u32 ats_attribute;
  633. u32 pci_segment_number;
  634. };
  635. /* Values for ats_attribute field above */
  636. #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
  637. #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
  638. struct acpi_iort_smmu {
  639. u64 base_address; /* SMMU base address */
  640. u64 span; /* Length of memory range */
  641. u32 model;
  642. u32 flags;
  643. u32 global_interrupt_offset;
  644. u32 context_interrupt_count;
  645. u32 context_interrupt_offset;
  646. u32 pmu_interrupt_count;
  647. u32 pmu_interrupt_offset;
  648. u64 interrupts[1]; /* Interrupt array */
  649. };
  650. /* Values for Model field above */
  651. #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
  652. #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
  653. #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
  654. #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
  655. #define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */
  656. #define ACPI_IORT_SMMU_CAVIUM_THUNDERX 0x00000005 /* Cavium thunder_x SMMUv2 */
  657. /* Masks for Flags field above */
  658. #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
  659. #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
  660. /* Global interrupt format */
  661. struct acpi_iort_smmu_gsi {
  662. u32 nsg_irpt;
  663. u32 nsg_irpt_flags;
  664. u32 nsg_cfg_irpt;
  665. u32 nsg_cfg_irpt_flags;
  666. };
  667. struct acpi_iort_smmu_v3 {
  668. u64 base_address; /* SMMUv3 base address */
  669. u32 flags;
  670. u32 reserved;
  671. u64 vatos_address;
  672. u32 model;
  673. u32 event_gsiv;
  674. u32 pri_gsiv;
  675. u32 gerr_gsiv;
  676. u32 sync_gsiv;
  677. u8 pxm;
  678. u8 reserved1;
  679. u16 reserved2;
  680. };
  681. /* Values for Model field above */
  682. #define ACPI_IORT_SMMU_V3_GENERIC 0x00000000 /* Generic SMMUv3 */
  683. #define ACPI_IORT_SMMU_V3_HISILICON_HI161X 0x00000001 /* hi_silicon Hi161x SMMUv3 */
  684. #define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */
  685. /* Masks for Flags field above */
  686. #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
  687. #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1)
  688. #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
  689. /*******************************************************************************
  690. *
  691. * IVRS - I/O Virtualization Reporting Structure
  692. * Version 1
  693. *
  694. * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
  695. * Revision 1.26, February 2009.
  696. *
  697. ******************************************************************************/
  698. struct acpi_table_ivrs {
  699. struct acpi_table_header header; /* Common ACPI table header */
  700. u32 info; /* Common virtualization info */
  701. u64 reserved;
  702. };
  703. /* Values for Info field above */
  704. #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
  705. #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
  706. #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
  707. /* IVRS subtable header */
  708. struct acpi_ivrs_header {
  709. u8 type; /* Subtable type */
  710. u8 flags;
  711. u16 length; /* Subtable length */
  712. u16 device_id; /* ID of IOMMU */
  713. };
  714. /* Values for subtable Type above */
  715. enum acpi_ivrs_type {
  716. ACPI_IVRS_TYPE_HARDWARE = 0x10,
  717. ACPI_IVRS_TYPE_MEMORY1 = 0x20,
  718. ACPI_IVRS_TYPE_MEMORY2 = 0x21,
  719. ACPI_IVRS_TYPE_MEMORY3 = 0x22
  720. };
  721. /* Masks for Flags field above for IVHD subtable */
  722. #define ACPI_IVHD_TT_ENABLE (1)
  723. #define ACPI_IVHD_PASS_PW (1<<1)
  724. #define ACPI_IVHD_RES_PASS_PW (1<<2)
  725. #define ACPI_IVHD_ISOC (1<<3)
  726. #define ACPI_IVHD_IOTLB (1<<4)
  727. /* Masks for Flags field above for IVMD subtable */
  728. #define ACPI_IVMD_UNITY (1)
  729. #define ACPI_IVMD_READ (1<<1)
  730. #define ACPI_IVMD_WRITE (1<<2)
  731. #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
  732. /*
  733. * IVRS subtables, correspond to Type in struct acpi_ivrs_header
  734. */
  735. /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
  736. struct acpi_ivrs_hardware {
  737. struct acpi_ivrs_header header;
  738. u16 capability_offset; /* Offset for IOMMU control fields */
  739. u64 base_address; /* IOMMU control registers */
  740. u16 pci_segment_group;
  741. u16 info; /* MSI number and unit ID */
  742. u32 reserved;
  743. };
  744. /* Masks for Info field above */
  745. #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
  746. #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_ID */
  747. /*
  748. * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure.
  749. * Upper two bits of the Type field are the (encoded) length of the structure.
  750. * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
  751. * are reserved for future use but not defined.
  752. */
  753. struct acpi_ivrs_de_header {
  754. u8 type;
  755. u16 id;
  756. u8 data_setting;
  757. };
  758. /* Length of device entry is in the top two bits of Type field above */
  759. #define ACPI_IVHD_ENTRY_LENGTH 0xC0
  760. /* Values for device entry Type field above */
  761. enum acpi_ivrs_device_entry_type {
  762. /* 4-byte device entries, all use struct acpi_ivrs_device4 */
  763. ACPI_IVRS_TYPE_PAD4 = 0,
  764. ACPI_IVRS_TYPE_ALL = 1,
  765. ACPI_IVRS_TYPE_SELECT = 2,
  766. ACPI_IVRS_TYPE_START = 3,
  767. ACPI_IVRS_TYPE_END = 4,
  768. /* 8-byte device entries */
  769. ACPI_IVRS_TYPE_PAD8 = 64,
  770. ACPI_IVRS_TYPE_NOT_USED = 65,
  771. ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses struct acpi_ivrs_device8a */
  772. ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses struct acpi_ivrs_device8a */
  773. ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses struct acpi_ivrs_device8b */
  774. ACPI_IVRS_TYPE_EXT_START = 71, /* Uses struct acpi_ivrs_device8b */
  775. ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses struct acpi_ivrs_device8c */
  776. };
  777. /* Values for Data field above */
  778. #define ACPI_IVHD_INIT_PASS (1)
  779. #define ACPI_IVHD_EINT_PASS (1<<1)
  780. #define ACPI_IVHD_NMI_PASS (1<<2)
  781. #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
  782. #define ACPI_IVHD_LINT0_PASS (1<<6)
  783. #define ACPI_IVHD_LINT1_PASS (1<<7)
  784. /* Types 0-4: 4-byte device entry */
  785. struct acpi_ivrs_device4 {
  786. struct acpi_ivrs_de_header header;
  787. };
  788. /* Types 66-67: 8-byte device entry */
  789. struct acpi_ivrs_device8a {
  790. struct acpi_ivrs_de_header header;
  791. u8 reserved1;
  792. u16 used_id;
  793. u8 reserved2;
  794. };
  795. /* Types 70-71: 8-byte device entry */
  796. struct acpi_ivrs_device8b {
  797. struct acpi_ivrs_de_header header;
  798. u32 extended_data;
  799. };
  800. /* Values for extended_data above */
  801. #define ACPI_IVHD_ATS_DISABLED (1<<31)
  802. /* Type 72: 8-byte device entry */
  803. struct acpi_ivrs_device8c {
  804. struct acpi_ivrs_de_header header;
  805. u8 handle;
  806. u16 used_id;
  807. u8 variety;
  808. };
  809. /* Values for Variety field above */
  810. #define ACPI_IVHD_IOAPIC 1
  811. #define ACPI_IVHD_HPET 2
  812. /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
  813. struct acpi_ivrs_memory {
  814. struct acpi_ivrs_header header;
  815. u16 aux_data;
  816. u64 reserved;
  817. u64 start_address;
  818. u64 memory_length;
  819. };
  820. /*******************************************************************************
  821. *
  822. * LPIT - Low Power Idle Table
  823. *
  824. * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
  825. *
  826. ******************************************************************************/
  827. struct acpi_table_lpit {
  828. struct acpi_table_header header; /* Common ACPI table header */
  829. };
  830. /* LPIT subtable header */
  831. struct acpi_lpit_header {
  832. u32 type; /* Subtable type */
  833. u32 length; /* Subtable length */
  834. u16 unique_id;
  835. u16 reserved;
  836. u32 flags;
  837. };
  838. /* Values for subtable Type above */
  839. enum acpi_lpit_type {
  840. ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
  841. ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
  842. };
  843. /* Masks for Flags field above */
  844. #define ACPI_LPIT_STATE_DISABLED (1)
  845. #define ACPI_LPIT_NO_COUNTER (1<<1)
  846. /*
  847. * LPIT subtables, correspond to Type in struct acpi_lpit_header
  848. */
  849. /* 0x00: Native C-state instruction based LPI structure */
  850. struct acpi_lpit_native {
  851. struct acpi_lpit_header header;
  852. struct acpi_generic_address entry_trigger;
  853. u32 residency;
  854. u32 latency;
  855. struct acpi_generic_address residency_counter;
  856. u64 counter_frequency;
  857. };
  858. /*******************************************************************************
  859. *
  860. * MCFG - PCI Memory Mapped Configuration table and subtable
  861. * Version 1
  862. *
  863. * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
  864. *
  865. ******************************************************************************/
  866. struct acpi_table_mcfg {
  867. struct acpi_table_header header; /* Common ACPI table header */
  868. u8 reserved[8];
  869. };
  870. /* Subtable */
  871. struct acpi_mcfg_allocation {
  872. u64 address; /* Base address, processor-relative */
  873. u16 pci_segment; /* PCI segment group number */
  874. u8 start_bus_number; /* Starting PCI Bus number */
  875. u8 end_bus_number; /* Final PCI Bus number */
  876. u32 reserved;
  877. };
  878. /*******************************************************************************
  879. *
  880. * MCHI - Management Controller Host Interface Table
  881. * Version 1
  882. *
  883. * Conforms to "Management Component Transport Protocol (MCTP) Host
  884. * Interface Specification", Revision 1.0.0a, October 13, 2009
  885. *
  886. ******************************************************************************/
  887. struct acpi_table_mchi {
  888. struct acpi_table_header header; /* Common ACPI table header */
  889. u8 interface_type;
  890. u8 protocol;
  891. u64 protocol_data;
  892. u8 interrupt_type;
  893. u8 gpe;
  894. u8 pci_device_flag;
  895. u32 global_interrupt;
  896. struct acpi_generic_address control_register;
  897. u8 pci_segment;
  898. u8 pci_bus;
  899. u8 pci_device;
  900. u8 pci_function;
  901. };
  902. /*******************************************************************************
  903. *
  904. * MSDM - Microsoft Data Management table
  905. *
  906. * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
  907. * November 29, 2011. Copyright 2011 Microsoft
  908. *
  909. ******************************************************************************/
  910. /* Basic MSDM table is only the common ACPI header */
  911. struct acpi_table_msdm {
  912. struct acpi_table_header header; /* Common ACPI table header */
  913. };
  914. /*******************************************************************************
  915. *
  916. * MTMR - MID Timer Table
  917. * Version 1
  918. *
  919. * Conforms to "Simple Firmware Interface Specification",
  920. * Draft 0.8.2, Oct 19, 2010
  921. * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
  922. *
  923. ******************************************************************************/
  924. struct acpi_table_mtmr {
  925. struct acpi_table_header header; /* Common ACPI table header */
  926. };
  927. /* MTMR entry */
  928. struct acpi_mtmr_entry {
  929. struct acpi_generic_address physical_address;
  930. u32 frequency;
  931. u32 irq;
  932. };
  933. /*******************************************************************************
  934. *
  935. * SDEI - Software Delegated Exception Interface Descriptor Table
  936. *
  937. * Conforms to "Software Delegated Exception Interface (SDEI)" ARM DEN0054A,
  938. * May 8th, 2017. Copyright 2017 ARM Ltd.
  939. *
  940. ******************************************************************************/
  941. struct acpi_table_sdei {
  942. struct acpi_table_header header; /* Common ACPI table header */
  943. };
  944. /*******************************************************************************
  945. *
  946. * SLIC - Software Licensing Description Table
  947. *
  948. * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
  949. * November 29, 2011. Copyright 2011 Microsoft
  950. *
  951. ******************************************************************************/
  952. /* Basic SLIC table is only the common ACPI header */
  953. struct acpi_table_slic {
  954. struct acpi_table_header header; /* Common ACPI table header */
  955. };
  956. /*******************************************************************************
  957. *
  958. * SPCR - Serial Port Console Redirection table
  959. * Version 2
  960. *
  961. * Conforms to "Serial Port Console Redirection Table",
  962. * Version 1.03, August 10, 2015
  963. *
  964. ******************************************************************************/
  965. struct acpi_table_spcr {
  966. struct acpi_table_header header; /* Common ACPI table header */
  967. u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
  968. u8 reserved[3];
  969. struct acpi_generic_address serial_port;
  970. u8 interrupt_type;
  971. u8 pc_interrupt;
  972. u32 interrupt;
  973. u8 baud_rate;
  974. u8 parity;
  975. u8 stop_bits;
  976. u8 flow_control;
  977. u8 terminal_type;
  978. u8 reserved1;
  979. u16 pci_device_id;
  980. u16 pci_vendor_id;
  981. u8 pci_bus;
  982. u8 pci_device;
  983. u8 pci_function;
  984. u32 pci_flags;
  985. u8 pci_segment;
  986. u32 reserved2;
  987. };
  988. /* Masks for pci_flags field above */
  989. #define ACPI_SPCR_DO_NOT_DISABLE (1)
  990. /* Values for Interface Type: See the definition of the DBG2 table */
  991. /*******************************************************************************
  992. *
  993. * SPMI - Server Platform Management Interface table
  994. * Version 5
  995. *
  996. * Conforms to "Intelligent Platform Management Interface Specification
  997. * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
  998. * June 12, 2009 markup.
  999. *
  1000. ******************************************************************************/
  1001. struct acpi_table_spmi {
  1002. struct acpi_table_header header; /* Common ACPI table header */
  1003. u8 interface_type;
  1004. u8 reserved; /* Must be 1 */
  1005. u16 spec_revision; /* Version of IPMI */
  1006. u8 interrupt_type;
  1007. u8 gpe_number; /* GPE assigned */
  1008. u8 reserved1;
  1009. u8 pci_device_flag;
  1010. u32 interrupt;
  1011. struct acpi_generic_address ipmi_register;
  1012. u8 pci_segment;
  1013. u8 pci_bus;
  1014. u8 pci_device;
  1015. u8 pci_function;
  1016. u8 reserved2;
  1017. };
  1018. /* Values for interface_type above */
  1019. enum acpi_spmi_interface_types {
  1020. ACPI_SPMI_NOT_USED = 0,
  1021. ACPI_SPMI_KEYBOARD = 1,
  1022. ACPI_SPMI_SMI = 2,
  1023. ACPI_SPMI_BLOCK_TRANSFER = 3,
  1024. ACPI_SPMI_SMBUS = 4,
  1025. ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
  1026. };
  1027. /*******************************************************************************
  1028. *
  1029. * TCPA - Trusted Computing Platform Alliance table
  1030. * Version 2
  1031. *
  1032. * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
  1033. * Version 1.2, Revision 8
  1034. * February 27, 2017
  1035. *
  1036. * NOTE: There are two versions of the table with the same signature --
  1037. * the client version and the server version. The common platform_class
  1038. * field is used to differentiate the two types of tables.
  1039. *
  1040. ******************************************************************************/
  1041. struct acpi_table_tcpa_hdr {
  1042. struct acpi_table_header header; /* Common ACPI table header */
  1043. u16 platform_class;
  1044. };
  1045. /*
  1046. * Values for platform_class above.
  1047. * This is how the client and server subtables are differentiated
  1048. */
  1049. #define ACPI_TCPA_CLIENT_TABLE 0
  1050. #define ACPI_TCPA_SERVER_TABLE 1
  1051. struct acpi_table_tcpa_client {
  1052. u32 minimum_log_length; /* Minimum length for the event log area */
  1053. u64 log_address; /* Address of the event log area */
  1054. };
  1055. struct acpi_table_tcpa_server {
  1056. u16 reserved;
  1057. u64 minimum_log_length; /* Minimum length for the event log area */
  1058. u64 log_address; /* Address of the event log area */
  1059. u16 spec_revision;
  1060. u8 device_flags;
  1061. u8 interrupt_flags;
  1062. u8 gpe_number;
  1063. u8 reserved2[3];
  1064. u32 global_interrupt;
  1065. struct acpi_generic_address address;
  1066. u32 reserved3;
  1067. struct acpi_generic_address config_address;
  1068. u8 group;
  1069. u8 bus; /* PCI Bus/Segment/Function numbers */
  1070. u8 device;
  1071. u8 function;
  1072. };
  1073. /* Values for device_flags above */
  1074. #define ACPI_TCPA_PCI_DEVICE (1)
  1075. #define ACPI_TCPA_BUS_PNP (1<<1)
  1076. #define ACPI_TCPA_ADDRESS_VALID (1<<2)
  1077. /* Values for interrupt_flags above */
  1078. #define ACPI_TCPA_INTERRUPT_MODE (1)
  1079. #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
  1080. #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
  1081. #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
  1082. /*******************************************************************************
  1083. *
  1084. * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
  1085. * Version 4
  1086. *
  1087. * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
  1088. * Version 1.2, Revision 8
  1089. * February 27, 2017
  1090. *
  1091. ******************************************************************************/
  1092. struct acpi_table_tpm2 {
  1093. struct acpi_table_header header; /* Common ACPI table header */
  1094. u16 platform_class;
  1095. u16 reserved;
  1096. u64 control_address;
  1097. u32 start_method;
  1098. /* Platform-specific data follows */
  1099. };
  1100. /* Values for start_method above */
  1101. #define ACPI_TPM2_NOT_ALLOWED 0
  1102. #define ACPI_TPM2_START_METHOD 2
  1103. #define ACPI_TPM2_MEMORY_MAPPED 6
  1104. #define ACPI_TPM2_COMMAND_BUFFER 7
  1105. #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
  1106. #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */
  1107. /* Trailer appears after any start_method subtables */
  1108. struct acpi_tpm2_trailer {
  1109. u32 minimum_log_length; /* Minimum length for the event log area */
  1110. u64 log_address; /* Address of the event log area */
  1111. };
  1112. /*
  1113. * Subtables (start_method-specific)
  1114. */
  1115. /* 11: Start Method for ARM SMC (V1.2 Rev 8) */
  1116. struct acpi_tpm2_arm_smc {
  1117. u32 global_interrupt;
  1118. u8 interrupt_flags;
  1119. u8 operation_flags;
  1120. u16 reserved;
  1121. u32 function_id;
  1122. };
  1123. /* Values for interrupt_flags above */
  1124. #define ACPI_TPM2_INTERRUPT_SUPPORT (1)
  1125. /* Values for operation_flags above */
  1126. #define ACPI_TPM2_IDLE_SUPPORT (1)
  1127. /*******************************************************************************
  1128. *
  1129. * UEFI - UEFI Boot optimization Table
  1130. * Version 1
  1131. *
  1132. * Conforms to "Unified Extensible Firmware Interface Specification",
  1133. * Version 2.3, May 8, 2009
  1134. *
  1135. ******************************************************************************/
  1136. struct acpi_table_uefi {
  1137. struct acpi_table_header header; /* Common ACPI table header */
  1138. u8 identifier[16]; /* UUID identifier */
  1139. u16 data_offset; /* Offset of remaining data in table */
  1140. };
  1141. /*******************************************************************************
  1142. *
  1143. * VRTC - Virtual Real Time Clock Table
  1144. * Version 1
  1145. *
  1146. * Conforms to "Simple Firmware Interface Specification",
  1147. * Draft 0.8.2, Oct 19, 2010
  1148. * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
  1149. *
  1150. ******************************************************************************/
  1151. struct acpi_table_vrtc {
  1152. struct acpi_table_header header; /* Common ACPI table header */
  1153. };
  1154. /* VRTC entry */
  1155. struct acpi_vrtc_entry {
  1156. struct acpi_generic_address physical_address;
  1157. u32 irq;
  1158. };
  1159. /*******************************************************************************
  1160. *
  1161. * WAET - Windows ACPI Emulated devices Table
  1162. * Version 1
  1163. *
  1164. * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
  1165. *
  1166. ******************************************************************************/
  1167. struct acpi_table_waet {
  1168. struct acpi_table_header header; /* Common ACPI table header */
  1169. u32 flags;
  1170. };
  1171. /* Masks for Flags field above */
  1172. #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
  1173. #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
  1174. /*******************************************************************************
  1175. *
  1176. * WDAT - Watchdog Action Table
  1177. * Version 1
  1178. *
  1179. * Conforms to "Hardware Watchdog Timers Design Specification",
  1180. * Copyright 2006 Microsoft Corporation.
  1181. *
  1182. ******************************************************************************/
  1183. struct acpi_table_wdat {
  1184. struct acpi_table_header header; /* Common ACPI table header */
  1185. u32 header_length; /* Watchdog Header Length */
  1186. u16 pci_segment; /* PCI Segment number */
  1187. u8 pci_bus; /* PCI Bus number */
  1188. u8 pci_device; /* PCI Device number */
  1189. u8 pci_function; /* PCI Function number */
  1190. u8 reserved[3];
  1191. u32 timer_period; /* Period of one timer count (msec) */
  1192. u32 max_count; /* Maximum counter value supported */
  1193. u32 min_count; /* Minimum counter value */
  1194. u8 flags;
  1195. u8 reserved2[3];
  1196. u32 entries; /* Number of watchdog entries that follow */
  1197. };
  1198. /* Masks for Flags field above */
  1199. #define ACPI_WDAT_ENABLED (1)
  1200. #define ACPI_WDAT_STOPPED 0x80
  1201. /* WDAT Instruction Entries (actions) */
  1202. struct acpi_wdat_entry {
  1203. u8 action;
  1204. u8 instruction;
  1205. u16 reserved;
  1206. struct acpi_generic_address register_region;
  1207. u32 value; /* Value used with Read/Write register */
  1208. u32 mask; /* Bitmask required for this register instruction */
  1209. };
  1210. /* Values for Action field above */
  1211. enum acpi_wdat_actions {
  1212. ACPI_WDAT_RESET = 1,
  1213. ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
  1214. ACPI_WDAT_GET_COUNTDOWN = 5,
  1215. ACPI_WDAT_SET_COUNTDOWN = 6,
  1216. ACPI_WDAT_GET_RUNNING_STATE = 8,
  1217. ACPI_WDAT_SET_RUNNING_STATE = 9,
  1218. ACPI_WDAT_GET_STOPPED_STATE = 10,
  1219. ACPI_WDAT_SET_STOPPED_STATE = 11,
  1220. ACPI_WDAT_GET_REBOOT = 16,
  1221. ACPI_WDAT_SET_REBOOT = 17,
  1222. ACPI_WDAT_GET_SHUTDOWN = 18,
  1223. ACPI_WDAT_SET_SHUTDOWN = 19,
  1224. ACPI_WDAT_GET_STATUS = 32,
  1225. ACPI_WDAT_SET_STATUS = 33,
  1226. ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
  1227. };
  1228. /* Values for Instruction field above */
  1229. enum acpi_wdat_instructions {
  1230. ACPI_WDAT_READ_VALUE = 0,
  1231. ACPI_WDAT_READ_COUNTDOWN = 1,
  1232. ACPI_WDAT_WRITE_VALUE = 2,
  1233. ACPI_WDAT_WRITE_COUNTDOWN = 3,
  1234. ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
  1235. ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
  1236. };
  1237. /*******************************************************************************
  1238. *
  1239. * WDDT - Watchdog Descriptor Table
  1240. * Version 1
  1241. *
  1242. * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
  1243. * Version 001, September 2002
  1244. *
  1245. ******************************************************************************/
  1246. struct acpi_table_wddt {
  1247. struct acpi_table_header header; /* Common ACPI table header */
  1248. u16 spec_version;
  1249. u16 table_version;
  1250. u16 pci_vendor_id;
  1251. struct acpi_generic_address address;
  1252. u16 max_count; /* Maximum counter value supported */
  1253. u16 min_count; /* Minimum counter value supported */
  1254. u16 period;
  1255. u16 status;
  1256. u16 capability;
  1257. };
  1258. /* Flags for Status field above */
  1259. #define ACPI_WDDT_AVAILABLE (1)
  1260. #define ACPI_WDDT_ACTIVE (1<<1)
  1261. #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
  1262. #define ACPI_WDDT_USER_RESET (1<<11)
  1263. #define ACPI_WDDT_WDT_RESET (1<<12)
  1264. #define ACPI_WDDT_POWER_FAIL (1<<13)
  1265. #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
  1266. /* Flags for Capability field above */
  1267. #define ACPI_WDDT_AUTO_RESET (1)
  1268. #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
  1269. /*******************************************************************************
  1270. *
  1271. * WDRT - Watchdog Resource Table
  1272. * Version 1
  1273. *
  1274. * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
  1275. * Version 1.01, August 28, 2006
  1276. *
  1277. ******************************************************************************/
  1278. struct acpi_table_wdrt {
  1279. struct acpi_table_header header; /* Common ACPI table header */
  1280. struct acpi_generic_address control_register;
  1281. struct acpi_generic_address count_register;
  1282. u16 pci_device_id;
  1283. u16 pci_vendor_id;
  1284. u8 pci_bus; /* PCI Bus number */
  1285. u8 pci_device; /* PCI Device number */
  1286. u8 pci_function; /* PCI Function number */
  1287. u8 pci_segment; /* PCI Segment number */
  1288. u16 max_count; /* Maximum counter value supported */
  1289. u8 units;
  1290. };
  1291. /*******************************************************************************
  1292. *
  1293. * WSMT - Windows SMM Security Migrations Table
  1294. * Version 1
  1295. *
  1296. * Conforms to "Windows SMM Security Migrations Table",
  1297. * Version 1.0, April 18, 2016
  1298. *
  1299. ******************************************************************************/
  1300. struct acpi_table_wsmt {
  1301. struct acpi_table_header header; /* Common ACPI table header */
  1302. u32 protection_flags;
  1303. };
  1304. /* Flags for protection_flags field above */
  1305. #define ACPI_WSMT_FIXED_COMM_BUFFERS (1)
  1306. #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
  1307. #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4)
  1308. /* Reset to default packing */
  1309. #pragma pack()
  1310. #endif /* __ACTBL2_H__ */