actbl2.h 41 KB

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