actbl2.h 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247
  1. /******************************************************************************
  2. *
  3. * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2014, 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_ANDD = 4,
  362. ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
  363. };
  364. /* DMAR Device Scope structure */
  365. struct acpi_dmar_device_scope {
  366. u8 entry_type;
  367. u8 length;
  368. u16 reserved;
  369. u8 enumeration_id;
  370. u8 bus;
  371. };
  372. /* Values for entry_type in struct acpi_dmar_device_scope */
  373. enum acpi_dmar_scope_type {
  374. ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
  375. ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
  376. ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
  377. ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
  378. ACPI_DMAR_SCOPE_TYPE_HPET = 4,
  379. ACPI_DMAR_SCOPE_TYPE_ACPI = 5,
  380. ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  381. };
  382. struct acpi_dmar_pci_path {
  383. u8 device;
  384. u8 function;
  385. };
  386. /*
  387. * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
  388. */
  389. /* 0: Hardware Unit Definition */
  390. struct acpi_dmar_hardware_unit {
  391. struct acpi_dmar_header header;
  392. u8 flags;
  393. u8 reserved;
  394. u16 segment;
  395. u64 address; /* Register Base Address */
  396. };
  397. /* Masks for Flags field above */
  398. #define ACPI_DMAR_INCLUDE_ALL (1)
  399. /* 1: Reserved Memory Defininition */
  400. struct acpi_dmar_reserved_memory {
  401. struct acpi_dmar_header header;
  402. u16 reserved;
  403. u16 segment;
  404. u64 base_address; /* 4K aligned base address */
  405. u64 end_address; /* 4K aligned limit address */
  406. };
  407. /* Masks for Flags field above */
  408. #define ACPI_DMAR_ALLOW_ALL (1)
  409. /* 2: Root Port ATS Capability Reporting Structure */
  410. struct acpi_dmar_atsr {
  411. struct acpi_dmar_header header;
  412. u8 flags;
  413. u8 reserved;
  414. u16 segment;
  415. };
  416. /* Masks for Flags field above */
  417. #define ACPI_DMAR_ALL_PORTS (1)
  418. /* 3: Remapping Hardware Static Affinity Structure */
  419. struct acpi_dmar_rhsa {
  420. struct acpi_dmar_header header;
  421. u32 reserved;
  422. u64 base_address;
  423. u32 proximity_domain;
  424. };
  425. /* 4: ACPI Namespace Device Declaration Structure */
  426. struct acpi_dmar_andd {
  427. struct acpi_dmar_header header;
  428. u8 reserved[3];
  429. u8 device_number;
  430. u8 object_name[];
  431. };
  432. /*******************************************************************************
  433. *
  434. * HPET - High Precision Event Timer table
  435. * Version 1
  436. *
  437. * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
  438. * Version 1.0a, October 2004
  439. *
  440. ******************************************************************************/
  441. struct acpi_table_hpet {
  442. struct acpi_table_header header; /* Common ACPI table header */
  443. u32 id; /* Hardware ID of event timer block */
  444. struct acpi_generic_address address; /* Address of event timer block */
  445. u8 sequence; /* HPET sequence number */
  446. u16 minimum_tick; /* Main counter min tick, periodic mode */
  447. u8 flags;
  448. };
  449. /* Masks for Flags field above */
  450. #define ACPI_HPET_PAGE_PROTECT_MASK (3)
  451. /* Values for Page Protect flags */
  452. enum acpi_hpet_page_protect {
  453. ACPI_HPET_NO_PAGE_PROTECT = 0,
  454. ACPI_HPET_PAGE_PROTECT4 = 1,
  455. ACPI_HPET_PAGE_PROTECT64 = 2
  456. };
  457. /*******************************************************************************
  458. *
  459. * IBFT - Boot Firmware Table
  460. * Version 1
  461. *
  462. * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
  463. * Specification", Version 1.01, March 1, 2007
  464. *
  465. * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
  466. * Therefore, it is not currently supported by the disassembler.
  467. *
  468. ******************************************************************************/
  469. struct acpi_table_ibft {
  470. struct acpi_table_header header; /* Common ACPI table header */
  471. u8 reserved[12];
  472. };
  473. /* IBFT common subtable header */
  474. struct acpi_ibft_header {
  475. u8 type;
  476. u8 version;
  477. u16 length;
  478. u8 index;
  479. u8 flags;
  480. };
  481. /* Values for Type field above */
  482. enum acpi_ibft_type {
  483. ACPI_IBFT_TYPE_NOT_USED = 0,
  484. ACPI_IBFT_TYPE_CONTROL = 1,
  485. ACPI_IBFT_TYPE_INITIATOR = 2,
  486. ACPI_IBFT_TYPE_NIC = 3,
  487. ACPI_IBFT_TYPE_TARGET = 4,
  488. ACPI_IBFT_TYPE_EXTENSIONS = 5,
  489. ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  490. };
  491. /* IBFT subtables */
  492. struct acpi_ibft_control {
  493. struct acpi_ibft_header header;
  494. u16 extensions;
  495. u16 initiator_offset;
  496. u16 nic0_offset;
  497. u16 target0_offset;
  498. u16 nic1_offset;
  499. u16 target1_offset;
  500. };
  501. struct acpi_ibft_initiator {
  502. struct acpi_ibft_header header;
  503. u8 sns_server[16];
  504. u8 slp_server[16];
  505. u8 primary_server[16];
  506. u8 secondary_server[16];
  507. u16 name_length;
  508. u16 name_offset;
  509. };
  510. struct acpi_ibft_nic {
  511. struct acpi_ibft_header header;
  512. u8 ip_address[16];
  513. u8 subnet_mask_prefix;
  514. u8 origin;
  515. u8 gateway[16];
  516. u8 primary_dns[16];
  517. u8 secondary_dns[16];
  518. u8 dhcp[16];
  519. u16 vlan;
  520. u8 mac_address[6];
  521. u16 pci_address;
  522. u16 name_length;
  523. u16 name_offset;
  524. };
  525. struct acpi_ibft_target {
  526. struct acpi_ibft_header header;
  527. u8 target_ip_address[16];
  528. u16 target_ip_socket;
  529. u8 target_boot_lun[8];
  530. u8 chap_type;
  531. u8 nic_association;
  532. u16 target_name_length;
  533. u16 target_name_offset;
  534. u16 chap_name_length;
  535. u16 chap_name_offset;
  536. u16 chap_secret_length;
  537. u16 chap_secret_offset;
  538. u16 reverse_chap_name_length;
  539. u16 reverse_chap_name_offset;
  540. u16 reverse_chap_secret_length;
  541. u16 reverse_chap_secret_offset;
  542. };
  543. /*******************************************************************************
  544. *
  545. * IVRS - I/O Virtualization Reporting Structure
  546. * Version 1
  547. *
  548. * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
  549. * Revision 1.26, February 2009.
  550. *
  551. ******************************************************************************/
  552. struct acpi_table_ivrs {
  553. struct acpi_table_header header; /* Common ACPI table header */
  554. u32 info; /* Common virtualization info */
  555. u64 reserved;
  556. };
  557. /* Values for Info field above */
  558. #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
  559. #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
  560. #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
  561. /* IVRS subtable header */
  562. struct acpi_ivrs_header {
  563. u8 type; /* Subtable type */
  564. u8 flags;
  565. u16 length; /* Subtable length */
  566. u16 device_id; /* ID of IOMMU */
  567. };
  568. /* Values for subtable Type above */
  569. enum acpi_ivrs_type {
  570. ACPI_IVRS_TYPE_HARDWARE = 0x10,
  571. ACPI_IVRS_TYPE_MEMORY1 = 0x20,
  572. ACPI_IVRS_TYPE_MEMORY2 = 0x21,
  573. ACPI_IVRS_TYPE_MEMORY3 = 0x22
  574. };
  575. /* Masks for Flags field above for IVHD subtable */
  576. #define ACPI_IVHD_TT_ENABLE (1)
  577. #define ACPI_IVHD_PASS_PW (1<<1)
  578. #define ACPI_IVHD_RES_PASS_PW (1<<2)
  579. #define ACPI_IVHD_ISOC (1<<3)
  580. #define ACPI_IVHD_IOTLB (1<<4)
  581. /* Masks for Flags field above for IVMD subtable */
  582. #define ACPI_IVMD_UNITY (1)
  583. #define ACPI_IVMD_READ (1<<1)
  584. #define ACPI_IVMD_WRITE (1<<2)
  585. #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
  586. /*
  587. * IVRS subtables, correspond to Type in struct acpi_ivrs_header
  588. */
  589. /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
  590. struct acpi_ivrs_hardware {
  591. struct acpi_ivrs_header header;
  592. u16 capability_offset; /* Offset for IOMMU control fields */
  593. u64 base_address; /* IOMMU control registers */
  594. u16 pci_segment_group;
  595. u16 info; /* MSI number and unit ID */
  596. u32 reserved;
  597. };
  598. /* Masks for Info field above */
  599. #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
  600. #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_ID */
  601. /*
  602. * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure.
  603. * Upper two bits of the Type field are the (encoded) length of the structure.
  604. * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
  605. * are reserved for future use but not defined.
  606. */
  607. struct acpi_ivrs_de_header {
  608. u8 type;
  609. u16 id;
  610. u8 data_setting;
  611. };
  612. /* Length of device entry is in the top two bits of Type field above */
  613. #define ACPI_IVHD_ENTRY_LENGTH 0xC0
  614. /* Values for device entry Type field above */
  615. enum acpi_ivrs_device_entry_type {
  616. /* 4-byte device entries, all use struct acpi_ivrs_device4 */
  617. ACPI_IVRS_TYPE_PAD4 = 0,
  618. ACPI_IVRS_TYPE_ALL = 1,
  619. ACPI_IVRS_TYPE_SELECT = 2,
  620. ACPI_IVRS_TYPE_START = 3,
  621. ACPI_IVRS_TYPE_END = 4,
  622. /* 8-byte device entries */
  623. ACPI_IVRS_TYPE_PAD8 = 64,
  624. ACPI_IVRS_TYPE_NOT_USED = 65,
  625. ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses struct acpi_ivrs_device8a */
  626. ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses struct acpi_ivrs_device8a */
  627. ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses struct acpi_ivrs_device8b */
  628. ACPI_IVRS_TYPE_EXT_START = 71, /* Uses struct acpi_ivrs_device8b */
  629. ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses struct acpi_ivrs_device8c */
  630. };
  631. /* Values for Data field above */
  632. #define ACPI_IVHD_INIT_PASS (1)
  633. #define ACPI_IVHD_EINT_PASS (1<<1)
  634. #define ACPI_IVHD_NMI_PASS (1<<2)
  635. #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
  636. #define ACPI_IVHD_LINT0_PASS (1<<6)
  637. #define ACPI_IVHD_LINT1_PASS (1<<7)
  638. /* Types 0-4: 4-byte device entry */
  639. struct acpi_ivrs_device4 {
  640. struct acpi_ivrs_de_header header;
  641. };
  642. /* Types 66-67: 8-byte device entry */
  643. struct acpi_ivrs_device8a {
  644. struct acpi_ivrs_de_header header;
  645. u8 reserved1;
  646. u16 used_id;
  647. u8 reserved2;
  648. };
  649. /* Types 70-71: 8-byte device entry */
  650. struct acpi_ivrs_device8b {
  651. struct acpi_ivrs_de_header header;
  652. u32 extended_data;
  653. };
  654. /* Values for extended_data above */
  655. #define ACPI_IVHD_ATS_DISABLED (1<<31)
  656. /* Type 72: 8-byte device entry */
  657. struct acpi_ivrs_device8c {
  658. struct acpi_ivrs_de_header header;
  659. u8 handle;
  660. u16 used_id;
  661. u8 variety;
  662. };
  663. /* Values for Variety field above */
  664. #define ACPI_IVHD_IOAPIC 1
  665. #define ACPI_IVHD_HPET 2
  666. /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
  667. struct acpi_ivrs_memory {
  668. struct acpi_ivrs_header header;
  669. u16 aux_data;
  670. u64 reserved;
  671. u64 start_address;
  672. u64 memory_length;
  673. };
  674. /*******************************************************************************
  675. *
  676. * MCFG - PCI Memory Mapped Configuration table and sub-table
  677. * Version 1
  678. *
  679. * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
  680. *
  681. ******************************************************************************/
  682. struct acpi_table_mcfg {
  683. struct acpi_table_header header; /* Common ACPI table header */
  684. u8 reserved[8];
  685. };
  686. /* Subtable */
  687. struct acpi_mcfg_allocation {
  688. u64 address; /* Base address, processor-relative */
  689. u16 pci_segment; /* PCI segment group number */
  690. u8 start_bus_number; /* Starting PCI Bus number */
  691. u8 end_bus_number; /* Final PCI Bus number */
  692. u32 reserved;
  693. };
  694. /*******************************************************************************
  695. *
  696. * MCHI - Management Controller Host Interface Table
  697. * Version 1
  698. *
  699. * Conforms to "Management Component Transport Protocol (MCTP) Host
  700. * Interface Specification", Revision 1.0.0a, October 13, 2009
  701. *
  702. ******************************************************************************/
  703. struct acpi_table_mchi {
  704. struct acpi_table_header header; /* Common ACPI table header */
  705. u8 interface_type;
  706. u8 protocol;
  707. u64 protocol_data;
  708. u8 interrupt_type;
  709. u8 gpe;
  710. u8 pci_device_flag;
  711. u32 global_interrupt;
  712. struct acpi_generic_address control_register;
  713. u8 pci_segment;
  714. u8 pci_bus;
  715. u8 pci_device;
  716. u8 pci_function;
  717. };
  718. /*******************************************************************************
  719. *
  720. * MTMR - MID Timer Table
  721. * Version 1
  722. *
  723. * Conforms to "Simple Firmware Interface Specification",
  724. * Draft 0.8.2, Oct 19, 2010
  725. * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
  726. *
  727. ******************************************************************************/
  728. struct acpi_table_mtmr {
  729. struct acpi_table_header header; /* Common ACPI table header */
  730. };
  731. /* MTMR entry */
  732. struct acpi_mtmr_entry {
  733. struct acpi_generic_address physical_address;
  734. u32 frequency;
  735. u32 irq;
  736. };
  737. /*******************************************************************************
  738. *
  739. * SLIC - Software Licensing Description Table
  740. * Version 1
  741. *
  742. * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems",
  743. * Copyright 2006
  744. *
  745. ******************************************************************************/
  746. /* Basic SLIC table is only the common ACPI header */
  747. struct acpi_table_slic {
  748. struct acpi_table_header header; /* Common ACPI table header */
  749. };
  750. /* Common SLIC subtable header */
  751. struct acpi_slic_header {
  752. u32 type;
  753. u32 length;
  754. };
  755. /* Values for Type field above */
  756. enum acpi_slic_type {
  757. ACPI_SLIC_TYPE_PUBLIC_KEY = 0,
  758. ACPI_SLIC_TYPE_WINDOWS_MARKER = 1,
  759. ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */
  760. };
  761. /*
  762. * SLIC Sub-tables, correspond to Type in struct acpi_slic_header
  763. */
  764. /* 0: Public Key Structure */
  765. struct acpi_slic_key {
  766. struct acpi_slic_header header;
  767. u8 key_type;
  768. u8 version;
  769. u16 reserved;
  770. u32 algorithm;
  771. char magic[4];
  772. u32 bit_length;
  773. u32 exponent;
  774. u8 modulus[128];
  775. };
  776. /* 1: Windows Marker Structure */
  777. struct acpi_slic_marker {
  778. struct acpi_slic_header header;
  779. u32 version;
  780. char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
  781. char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
  782. char windows_flag[8];
  783. u32 slic_version;
  784. u8 reserved[16];
  785. u8 signature[128];
  786. };
  787. /*******************************************************************************
  788. *
  789. * SPCR - Serial Port Console Redirection table
  790. * Version 1
  791. *
  792. * Conforms to "Serial Port Console Redirection Table",
  793. * Version 1.00, January 11, 2002
  794. *
  795. ******************************************************************************/
  796. struct acpi_table_spcr {
  797. struct acpi_table_header header; /* Common ACPI table header */
  798. u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
  799. u8 reserved[3];
  800. struct acpi_generic_address serial_port;
  801. u8 interrupt_type;
  802. u8 pc_interrupt;
  803. u32 interrupt;
  804. u8 baud_rate;
  805. u8 parity;
  806. u8 stop_bits;
  807. u8 flow_control;
  808. u8 terminal_type;
  809. u8 reserved1;
  810. u16 pci_device_id;
  811. u16 pci_vendor_id;
  812. u8 pci_bus;
  813. u8 pci_device;
  814. u8 pci_function;
  815. u32 pci_flags;
  816. u8 pci_segment;
  817. u32 reserved2;
  818. };
  819. /* Masks for pci_flags field above */
  820. #define ACPI_SPCR_DO_NOT_DISABLE (1)
  821. /*******************************************************************************
  822. *
  823. * SPMI - Server Platform Management Interface table
  824. * Version 5
  825. *
  826. * Conforms to "Intelligent Platform Management Interface Specification
  827. * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
  828. * June 12, 2009 markup.
  829. *
  830. ******************************************************************************/
  831. struct acpi_table_spmi {
  832. struct acpi_table_header header; /* Common ACPI table header */
  833. u8 interface_type;
  834. u8 reserved; /* Must be 1 */
  835. u16 spec_revision; /* Version of IPMI */
  836. u8 interrupt_type;
  837. u8 gpe_number; /* GPE assigned */
  838. u8 reserved1;
  839. u8 pci_device_flag;
  840. u32 interrupt;
  841. struct acpi_generic_address ipmi_register;
  842. u8 pci_segment;
  843. u8 pci_bus;
  844. u8 pci_device;
  845. u8 pci_function;
  846. u8 reserved2;
  847. };
  848. /* Values for interface_type above */
  849. enum acpi_spmi_interface_types {
  850. ACPI_SPMI_NOT_USED = 0,
  851. ACPI_SPMI_KEYBOARD = 1,
  852. ACPI_SPMI_SMI = 2,
  853. ACPI_SPMI_BLOCK_TRANSFER = 3,
  854. ACPI_SPMI_SMBUS = 4,
  855. ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
  856. };
  857. /*******************************************************************************
  858. *
  859. * TCPA - Trusted Computing Platform Alliance table
  860. * Version 1
  861. *
  862. * Conforms to "TCG PC Specific Implementation Specification",
  863. * Version 1.1, August 18, 2003
  864. *
  865. ******************************************************************************/
  866. struct acpi_table_tcpa {
  867. struct acpi_table_header header; /* Common ACPI table header */
  868. u16 reserved;
  869. u32 max_log_length; /* Maximum length for the event log area */
  870. u64 log_address; /* Address of the event log area */
  871. };
  872. /*******************************************************************************
  873. *
  874. * UEFI - UEFI Boot optimization Table
  875. * Version 1
  876. *
  877. * Conforms to "Unified Extensible Firmware Interface Specification",
  878. * Version 2.3, May 8, 2009
  879. *
  880. ******************************************************************************/
  881. struct acpi_table_uefi {
  882. struct acpi_table_header header; /* Common ACPI table header */
  883. u8 identifier[16]; /* UUID identifier */
  884. u16 data_offset; /* Offset of remaining data in table */
  885. };
  886. /*******************************************************************************
  887. *
  888. * VRTC - Virtual Real Time Clock Table
  889. * Version 1
  890. *
  891. * Conforms to "Simple Firmware Interface Specification",
  892. * Draft 0.8.2, Oct 19, 2010
  893. * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
  894. *
  895. ******************************************************************************/
  896. struct acpi_table_vrtc {
  897. struct acpi_table_header header; /* Common ACPI table header */
  898. };
  899. /* VRTC entry */
  900. struct acpi_vrtc_entry {
  901. struct acpi_generic_address physical_address;
  902. u32 irq;
  903. };
  904. /*******************************************************************************
  905. *
  906. * WAET - Windows ACPI Emulated devices Table
  907. * Version 1
  908. *
  909. * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
  910. *
  911. ******************************************************************************/
  912. struct acpi_table_waet {
  913. struct acpi_table_header header; /* Common ACPI table header */
  914. u32 flags;
  915. };
  916. /* Masks for Flags field above */
  917. #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
  918. #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
  919. /*******************************************************************************
  920. *
  921. * WDAT - Watchdog Action Table
  922. * Version 1
  923. *
  924. * Conforms to "Hardware Watchdog Timers Design Specification",
  925. * Copyright 2006 Microsoft Corporation.
  926. *
  927. ******************************************************************************/
  928. struct acpi_table_wdat {
  929. struct acpi_table_header header; /* Common ACPI table header */
  930. u32 header_length; /* Watchdog Header Length */
  931. u16 pci_segment; /* PCI Segment number */
  932. u8 pci_bus; /* PCI Bus number */
  933. u8 pci_device; /* PCI Device number */
  934. u8 pci_function; /* PCI Function number */
  935. u8 reserved[3];
  936. u32 timer_period; /* Period of one timer count (msec) */
  937. u32 max_count; /* Maximum counter value supported */
  938. u32 min_count; /* Minimum counter value */
  939. u8 flags;
  940. u8 reserved2[3];
  941. u32 entries; /* Number of watchdog entries that follow */
  942. };
  943. /* Masks for Flags field above */
  944. #define ACPI_WDAT_ENABLED (1)
  945. #define ACPI_WDAT_STOPPED 0x80
  946. /* WDAT Instruction Entries (actions) */
  947. struct acpi_wdat_entry {
  948. u8 action;
  949. u8 instruction;
  950. u16 reserved;
  951. struct acpi_generic_address register_region;
  952. u32 value; /* Value used with Read/Write register */
  953. u32 mask; /* Bitmask required for this register instruction */
  954. };
  955. /* Values for Action field above */
  956. enum acpi_wdat_actions {
  957. ACPI_WDAT_RESET = 1,
  958. ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
  959. ACPI_WDAT_GET_COUNTDOWN = 5,
  960. ACPI_WDAT_SET_COUNTDOWN = 6,
  961. ACPI_WDAT_GET_RUNNING_STATE = 8,
  962. ACPI_WDAT_SET_RUNNING_STATE = 9,
  963. ACPI_WDAT_GET_STOPPED_STATE = 10,
  964. ACPI_WDAT_SET_STOPPED_STATE = 11,
  965. ACPI_WDAT_GET_REBOOT = 16,
  966. ACPI_WDAT_SET_REBOOT = 17,
  967. ACPI_WDAT_GET_SHUTDOWN = 18,
  968. ACPI_WDAT_SET_SHUTDOWN = 19,
  969. ACPI_WDAT_GET_STATUS = 32,
  970. ACPI_WDAT_SET_STATUS = 33,
  971. ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
  972. };
  973. /* Values for Instruction field above */
  974. enum acpi_wdat_instructions {
  975. ACPI_WDAT_READ_VALUE = 0,
  976. ACPI_WDAT_READ_COUNTDOWN = 1,
  977. ACPI_WDAT_WRITE_VALUE = 2,
  978. ACPI_WDAT_WRITE_COUNTDOWN = 3,
  979. ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
  980. ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
  981. };
  982. /*******************************************************************************
  983. *
  984. * WDDT - Watchdog Descriptor Table
  985. * Version 1
  986. *
  987. * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
  988. * Version 001, September 2002
  989. *
  990. ******************************************************************************/
  991. struct acpi_table_wddt {
  992. struct acpi_table_header header; /* Common ACPI table header */
  993. u16 spec_version;
  994. u16 table_version;
  995. u16 pci_vendor_id;
  996. struct acpi_generic_address address;
  997. u16 max_count; /* Maximum counter value supported */
  998. u16 min_count; /* Minimum counter value supported */
  999. u16 period;
  1000. u16 status;
  1001. u16 capability;
  1002. };
  1003. /* Flags for Status field above */
  1004. #define ACPI_WDDT_AVAILABLE (1)
  1005. #define ACPI_WDDT_ACTIVE (1<<1)
  1006. #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
  1007. #define ACPI_WDDT_USER_RESET (1<<11)
  1008. #define ACPI_WDDT_WDT_RESET (1<<12)
  1009. #define ACPI_WDDT_POWER_FAIL (1<<13)
  1010. #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
  1011. /* Flags for Capability field above */
  1012. #define ACPI_WDDT_AUTO_RESET (1)
  1013. #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
  1014. /*******************************************************************************
  1015. *
  1016. * WDRT - Watchdog Resource Table
  1017. * Version 1
  1018. *
  1019. * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
  1020. * Version 1.01, August 28, 2006
  1021. *
  1022. ******************************************************************************/
  1023. struct acpi_table_wdrt {
  1024. struct acpi_table_header header; /* Common ACPI table header */
  1025. struct acpi_generic_address control_register;
  1026. struct acpi_generic_address count_register;
  1027. u16 pci_device_id;
  1028. u16 pci_vendor_id;
  1029. u8 pci_bus; /* PCI Bus number */
  1030. u8 pci_device; /* PCI Device number */
  1031. u8 pci_function; /* PCI Function number */
  1032. u8 pci_segment; /* PCI Segment number */
  1033. u16 max_count; /* Maximum counter value supported */
  1034. u8 units;
  1035. };
  1036. /* Reset to default packing */
  1037. #pragma pack()
  1038. #endif /* __ACTBL2_H__ */