actbl2.h 32 KB

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