actbl2.h 39 KB

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