actbl2.h 37 KB

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