actbl2.h 33 KB

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