actbl2.h 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692
  1. /******************************************************************************
  2. *
  3. * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2015, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #ifndef __ACTBL2_H__
  43. #define __ACTBL2_H__
  44. /*******************************************************************************
  45. *
  46. * Additional ACPI Tables (2)
  47. *
  48. * These tables are not consumed directly by the ACPICA subsystem, but are
  49. * included here to support device drivers and the AML disassembler.
  50. *
  51. * 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. #ifdef ACPI_UNDEFINED_TABLES
  87. /*
  88. * These tables have been seen in the field, but no definition has been found
  89. */
  90. #define ACPI_SIG_ATKG "ATKG"
  91. #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
  92. #define ACPI_SIG_IEIT "IEIT"
  93. #endif
  94. /*
  95. * All tables must be byte-packed to match the ACPI specification, since
  96. * the tables are provided by the system BIOS.
  97. */
  98. #pragma pack(1)
  99. /*
  100. * Note: C bitfields are not used for this reason:
  101. *
  102. * "Bitfields are great and easy to read, but unfortunately the C language
  103. * does not specify the layout of bitfields in memory, which means they are
  104. * essentially useless for dealing with packed data in on-disk formats or
  105. * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
  106. * this decision was a design error in C. Ritchie could have picked an order
  107. * and stuck with it." Norman Ramsey.
  108. * See http://stackoverflow.com/a/1053662/41661
  109. */
  110. /*******************************************************************************
  111. *
  112. * ASF - Alert Standard Format table (Signature "ASF!")
  113. * Revision 0x10
  114. *
  115. * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
  116. *
  117. ******************************************************************************/
  118. typedef struct acpi_table_asf
  119. {
  120. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  121. } ACPI_TABLE_ASF;
  122. /* ASF subtable header */
  123. typedef struct acpi_asf_header
  124. {
  125. UINT8 Type;
  126. UINT8 Reserved;
  127. UINT16 Length;
  128. } ACPI_ASF_HEADER;
  129. /* Values for Type field above */
  130. enum AcpiAsfType
  131. {
  132. ACPI_ASF_TYPE_INFO = 0,
  133. ACPI_ASF_TYPE_ALERT = 1,
  134. ACPI_ASF_TYPE_CONTROL = 2,
  135. ACPI_ASF_TYPE_BOOT = 3,
  136. ACPI_ASF_TYPE_ADDRESS = 4,
  137. ACPI_ASF_TYPE_RESERVED = 5
  138. };
  139. /*
  140. * ASF subtables
  141. */
  142. /* 0: ASF Information */
  143. typedef struct acpi_asf_info
  144. {
  145. ACPI_ASF_HEADER Header;
  146. UINT8 MinResetValue;
  147. UINT8 MinPollInterval;
  148. UINT16 SystemId;
  149. UINT32 MfgId;
  150. UINT8 Flags;
  151. UINT8 Reserved2[3];
  152. } ACPI_ASF_INFO;
  153. /* Masks for Flags field above */
  154. #define ACPI_ASF_SMBUS_PROTOCOLS (1)
  155. /* 1: ASF Alerts */
  156. typedef struct acpi_asf_alert
  157. {
  158. ACPI_ASF_HEADER Header;
  159. UINT8 AssertMask;
  160. UINT8 DeassertMask;
  161. UINT8 Alerts;
  162. UINT8 DataLength;
  163. } ACPI_ASF_ALERT;
  164. typedef struct acpi_asf_alert_data
  165. {
  166. UINT8 Address;
  167. UINT8 Command;
  168. UINT8 Mask;
  169. UINT8 Value;
  170. UINT8 SensorType;
  171. UINT8 Type;
  172. UINT8 Offset;
  173. UINT8 SourceType;
  174. UINT8 Severity;
  175. UINT8 SensorNumber;
  176. UINT8 Entity;
  177. UINT8 Instance;
  178. } ACPI_ASF_ALERT_DATA;
  179. /* 2: ASF Remote Control */
  180. typedef struct acpi_asf_remote
  181. {
  182. ACPI_ASF_HEADER Header;
  183. UINT8 Controls;
  184. UINT8 DataLength;
  185. UINT16 Reserved2;
  186. } ACPI_ASF_REMOTE;
  187. typedef struct acpi_asf_control_data
  188. {
  189. UINT8 Function;
  190. UINT8 Address;
  191. UINT8 Command;
  192. UINT8 Value;
  193. } ACPI_ASF_CONTROL_DATA;
  194. /* 3: ASF RMCP Boot Options */
  195. typedef struct acpi_asf_rmcp
  196. {
  197. ACPI_ASF_HEADER Header;
  198. UINT8 Capabilities[7];
  199. UINT8 CompletionCode;
  200. UINT32 EnterpriseId;
  201. UINT8 Command;
  202. UINT16 Parameter;
  203. UINT16 BootOptions;
  204. UINT16 OemParameters;
  205. } ACPI_ASF_RMCP;
  206. /* 4: ASF Address */
  207. typedef struct acpi_asf_address
  208. {
  209. ACPI_ASF_HEADER Header;
  210. UINT8 EpromAddress;
  211. UINT8 Devices;
  212. } ACPI_ASF_ADDRESS;
  213. /*******************************************************************************
  214. *
  215. * BOOT - Simple Boot Flag Table
  216. * Version 1
  217. *
  218. * Conforms to the "Simple Boot Flag Specification", Version 2.1
  219. *
  220. ******************************************************************************/
  221. typedef struct acpi_table_boot
  222. {
  223. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  224. UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */
  225. UINT8 Reserved[3];
  226. } ACPI_TABLE_BOOT;
  227. /*******************************************************************************
  228. *
  229. * CSRT - Core System Resource Table
  230. * Version 0
  231. *
  232. * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
  233. *
  234. ******************************************************************************/
  235. typedef struct acpi_table_csrt
  236. {
  237. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  238. } ACPI_TABLE_CSRT;
  239. /* Resource Group subtable */
  240. typedef struct acpi_csrt_group
  241. {
  242. UINT32 Length;
  243. UINT32 VendorId;
  244. UINT32 SubvendorId;
  245. UINT16 DeviceId;
  246. UINT16 SubdeviceId;
  247. UINT16 Revision;
  248. UINT16 Reserved;
  249. UINT32 SharedInfoLength;
  250. /* Shared data immediately follows (Length = SharedInfoLength) */
  251. } ACPI_CSRT_GROUP;
  252. /* Shared Info subtable */
  253. typedef struct acpi_csrt_shared_info
  254. {
  255. UINT16 MajorVersion;
  256. UINT16 MinorVersion;
  257. UINT32 MmioBaseLow;
  258. UINT32 MmioBaseHigh;
  259. UINT32 GsiInterrupt;
  260. UINT8 InterruptPolarity;
  261. UINT8 InterruptMode;
  262. UINT8 NumChannels;
  263. UINT8 DmaAddressWidth;
  264. UINT16 BaseRequestLine;
  265. UINT16 NumHandshakeSignals;
  266. UINT32 MaxBlockSize;
  267. /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
  268. } ACPI_CSRT_SHARED_INFO;
  269. /* Resource Descriptor subtable */
  270. typedef struct acpi_csrt_descriptor
  271. {
  272. UINT32 Length;
  273. UINT16 Type;
  274. UINT16 Subtype;
  275. UINT32 Uid;
  276. /* Resource-specific information immediately follows */
  277. } ACPI_CSRT_DESCRIPTOR;
  278. /* Resource Types */
  279. #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
  280. #define ACPI_CSRT_TYPE_TIMER 0x0002
  281. #define ACPI_CSRT_TYPE_DMA 0x0003
  282. /* Resource Subtypes */
  283. #define ACPI_CSRT_XRUPT_LINE 0x0000
  284. #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
  285. #define ACPI_CSRT_TIMER 0x0000
  286. #define ACPI_CSRT_DMA_CHANNEL 0x0000
  287. #define ACPI_CSRT_DMA_CONTROLLER 0x0001
  288. /*******************************************************************************
  289. *
  290. * DBG2 - Debug Port Table 2
  291. * Version 0 (Both main table and subtables)
  292. *
  293. * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
  294. *
  295. ******************************************************************************/
  296. typedef struct acpi_table_dbg2
  297. {
  298. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  299. UINT32 InfoOffset;
  300. UINT32 InfoCount;
  301. } ACPI_TABLE_DBG2;
  302. typedef struct acpi_dbg2_header
  303. {
  304. UINT32 InfoOffset;
  305. UINT32 InfoCount;
  306. } ACPI_DBG2_HEADER;
  307. /* Debug Device Information Subtable */
  308. typedef struct acpi_dbg2_device
  309. {
  310. UINT8 Revision;
  311. UINT16 Length;
  312. UINT8 RegisterCount; /* Number of BaseAddress registers */
  313. UINT16 NamepathLength;
  314. UINT16 NamepathOffset;
  315. UINT16 OemDataLength;
  316. UINT16 OemDataOffset;
  317. UINT16 PortType;
  318. UINT16 PortSubtype;
  319. UINT16 Reserved;
  320. UINT16 BaseAddressOffset;
  321. UINT16 AddressSizeOffset;
  322. /*
  323. * Data that follows:
  324. * BaseAddress (required) - Each in 12-byte Generic Address Structure format.
  325. * AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
  326. * Namepath (required) - Null terminated string. Single dot if not supported.
  327. * OemData (optional) - Length is OemDataLength.
  328. */
  329. } ACPI_DBG2_DEVICE;
  330. /* Types for PortType field above */
  331. #define ACPI_DBG2_SERIAL_PORT 0x8000
  332. #define ACPI_DBG2_1394_PORT 0x8001
  333. #define ACPI_DBG2_USB_PORT 0x8002
  334. #define ACPI_DBG2_NET_PORT 0x8003
  335. /* Subtypes for PortSubtype field above */
  336. #define ACPI_DBG2_16550_COMPATIBLE 0x0000
  337. #define ACPI_DBG2_16550_SUBSET 0x0001
  338. #define ACPI_DBG2_1394_STANDARD 0x0000
  339. #define ACPI_DBG2_USB_XHCI 0x0000
  340. #define ACPI_DBG2_USB_EHCI 0x0001
  341. /*******************************************************************************
  342. *
  343. * DBGP - Debug Port table
  344. * Version 1
  345. *
  346. * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
  347. *
  348. ******************************************************************************/
  349. typedef struct acpi_table_dbgp
  350. {
  351. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  352. UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
  353. UINT8 Reserved[3];
  354. ACPI_GENERIC_ADDRESS DebugPort;
  355. } ACPI_TABLE_DBGP;
  356. /*******************************************************************************
  357. *
  358. * DMAR - DMA Remapping table
  359. * Version 1
  360. *
  361. * Conforms to "Intel Virtualization Technology for Directed I/O",
  362. * Version 2.2, Sept. 2013
  363. *
  364. ******************************************************************************/
  365. typedef struct acpi_table_dmar
  366. {
  367. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  368. UINT8 Width; /* Host Address Width */
  369. UINT8 Flags;
  370. UINT8 Reserved[10];
  371. } ACPI_TABLE_DMAR;
  372. /* Masks for Flags field above */
  373. #define ACPI_DMAR_INTR_REMAP (1)
  374. /* DMAR subtable header */
  375. typedef struct acpi_dmar_header
  376. {
  377. UINT16 Type;
  378. UINT16 Length;
  379. } ACPI_DMAR_HEADER;
  380. /* Values for subtable type in ACPI_DMAR_HEADER */
  381. enum AcpiDmarType
  382. {
  383. ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
  384. ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
  385. ACPI_DMAR_TYPE_ROOT_ATS = 2,
  386. ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
  387. ACPI_DMAR_TYPE_NAMESPACE = 4,
  388. ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
  389. };
  390. /* DMAR Device Scope structure */
  391. typedef struct acpi_dmar_device_scope
  392. {
  393. UINT8 EntryType;
  394. UINT8 Length;
  395. UINT16 Reserved;
  396. UINT8 EnumerationId;
  397. UINT8 Bus;
  398. } ACPI_DMAR_DEVICE_SCOPE;
  399. /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
  400. enum AcpiDmarScopeType
  401. {
  402. ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
  403. ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
  404. ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
  405. ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
  406. ACPI_DMAR_SCOPE_TYPE_HPET = 4,
  407. ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
  408. ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  409. };
  410. typedef struct acpi_dmar_pci_path
  411. {
  412. UINT8 Device;
  413. UINT8 Function;
  414. } ACPI_DMAR_PCI_PATH;
  415. /*
  416. * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
  417. */
  418. /* 0: Hardware Unit Definition */
  419. typedef struct acpi_dmar_hardware_unit
  420. {
  421. ACPI_DMAR_HEADER Header;
  422. UINT8 Flags;
  423. UINT8 Reserved;
  424. UINT16 Segment;
  425. UINT64 Address; /* Register Base Address */
  426. } ACPI_DMAR_HARDWARE_UNIT;
  427. /* Masks for Flags field above */
  428. #define ACPI_DMAR_INCLUDE_ALL (1)
  429. /* 1: Reserved Memory Defininition */
  430. typedef struct acpi_dmar_reserved_memory
  431. {
  432. ACPI_DMAR_HEADER Header;
  433. UINT16 Reserved;
  434. UINT16 Segment;
  435. UINT64 BaseAddress; /* 4K aligned base address */
  436. UINT64 EndAddress; /* 4K aligned limit address */
  437. } ACPI_DMAR_RESERVED_MEMORY;
  438. /* Masks for Flags field above */
  439. #define ACPI_DMAR_ALLOW_ALL (1)
  440. /* 2: Root Port ATS Capability Reporting Structure */
  441. typedef struct acpi_dmar_atsr
  442. {
  443. ACPI_DMAR_HEADER Header;
  444. UINT8 Flags;
  445. UINT8 Reserved;
  446. UINT16 Segment;
  447. } ACPI_DMAR_ATSR;
  448. /* Masks for Flags field above */
  449. #define ACPI_DMAR_ALL_PORTS (1)
  450. /* 3: Remapping Hardware Static Affinity Structure */
  451. typedef struct acpi_dmar_rhsa
  452. {
  453. ACPI_DMAR_HEADER Header;
  454. UINT32 Reserved;
  455. UINT64 BaseAddress;
  456. UINT32 ProximityDomain;
  457. } ACPI_DMAR_RHSA;
  458. /* 4: ACPI Namespace Device Declaration Structure */
  459. typedef struct acpi_dmar_andd
  460. {
  461. ACPI_DMAR_HEADER Header;
  462. UINT8 Reserved[3];
  463. UINT8 DeviceNumber;
  464. char DeviceName[1];
  465. } ACPI_DMAR_ANDD;
  466. /*******************************************************************************
  467. *
  468. * HPET - High Precision Event Timer table
  469. * Version 1
  470. *
  471. * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
  472. * Version 1.0a, October 2004
  473. *
  474. ******************************************************************************/
  475. typedef struct acpi_table_hpet
  476. {
  477. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  478. UINT32 Id; /* Hardware ID of event timer block */
  479. ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
  480. UINT8 Sequence; /* HPET sequence number */
  481. UINT16 MinimumTick; /* Main counter min tick, periodic mode */
  482. UINT8 Flags;
  483. } ACPI_TABLE_HPET;
  484. /* Masks for Flags field above */
  485. #define ACPI_HPET_PAGE_PROTECT_MASK (3)
  486. /* Values for Page Protect flags */
  487. enum AcpiHpetPageProtect
  488. {
  489. ACPI_HPET_NO_PAGE_PROTECT = 0,
  490. ACPI_HPET_PAGE_PROTECT4 = 1,
  491. ACPI_HPET_PAGE_PROTECT64 = 2
  492. };
  493. /*******************************************************************************
  494. *
  495. * IBFT - Boot Firmware Table
  496. * Version 1
  497. *
  498. * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
  499. * Specification", Version 1.01, March 1, 2007
  500. *
  501. * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
  502. * Therefore, it is not currently supported by the disassembler.
  503. *
  504. ******************************************************************************/
  505. typedef struct acpi_table_ibft
  506. {
  507. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  508. UINT8 Reserved[12];
  509. } ACPI_TABLE_IBFT;
  510. /* IBFT common subtable header */
  511. typedef struct acpi_ibft_header
  512. {
  513. UINT8 Type;
  514. UINT8 Version;
  515. UINT16 Length;
  516. UINT8 Index;
  517. UINT8 Flags;
  518. } ACPI_IBFT_HEADER;
  519. /* Values for Type field above */
  520. enum AcpiIbftType
  521. {
  522. ACPI_IBFT_TYPE_NOT_USED = 0,
  523. ACPI_IBFT_TYPE_CONTROL = 1,
  524. ACPI_IBFT_TYPE_INITIATOR = 2,
  525. ACPI_IBFT_TYPE_NIC = 3,
  526. ACPI_IBFT_TYPE_TARGET = 4,
  527. ACPI_IBFT_TYPE_EXTENSIONS = 5,
  528. ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  529. };
  530. /* IBFT subtables */
  531. typedef struct acpi_ibft_control
  532. {
  533. ACPI_IBFT_HEADER Header;
  534. UINT16 Extensions;
  535. UINT16 InitiatorOffset;
  536. UINT16 Nic0Offset;
  537. UINT16 Target0Offset;
  538. UINT16 Nic1Offset;
  539. UINT16 Target1Offset;
  540. } ACPI_IBFT_CONTROL;
  541. typedef struct acpi_ibft_initiator
  542. {
  543. ACPI_IBFT_HEADER Header;
  544. UINT8 SnsServer[16];
  545. UINT8 SlpServer[16];
  546. UINT8 PrimaryServer[16];
  547. UINT8 SecondaryServer[16];
  548. UINT16 NameLength;
  549. UINT16 NameOffset;
  550. } ACPI_IBFT_INITIATOR;
  551. typedef struct acpi_ibft_nic
  552. {
  553. ACPI_IBFT_HEADER Header;
  554. UINT8 IpAddress[16];
  555. UINT8 SubnetMaskPrefix;
  556. UINT8 Origin;
  557. UINT8 Gateway[16];
  558. UINT8 PrimaryDns[16];
  559. UINT8 SecondaryDns[16];
  560. UINT8 Dhcp[16];
  561. UINT16 Vlan;
  562. UINT8 MacAddress[6];
  563. UINT16 PciAddress;
  564. UINT16 NameLength;
  565. UINT16 NameOffset;
  566. } ACPI_IBFT_NIC;
  567. typedef struct acpi_ibft_target
  568. {
  569. ACPI_IBFT_HEADER Header;
  570. UINT8 TargetIpAddress[16];
  571. UINT16 TargetIpSocket;
  572. UINT8 TargetBootLun[8];
  573. UINT8 ChapType;
  574. UINT8 NicAssociation;
  575. UINT16 TargetNameLength;
  576. UINT16 TargetNameOffset;
  577. UINT16 ChapNameLength;
  578. UINT16 ChapNameOffset;
  579. UINT16 ChapSecretLength;
  580. UINT16 ChapSecretOffset;
  581. UINT16 ReverseChapNameLength;
  582. UINT16 ReverseChapNameOffset;
  583. UINT16 ReverseChapSecretLength;
  584. UINT16 ReverseChapSecretOffset;
  585. } ACPI_IBFT_TARGET;
  586. /*******************************************************************************
  587. *
  588. * IORT - IO Remapping Table
  589. *
  590. * Conforms to "IO Remapping Table System Software on ARM Platforms",
  591. * Document number: ARM DEN 0049A, 2015
  592. *
  593. ******************************************************************************/
  594. typedef struct acpi_table_iort
  595. {
  596. ACPI_TABLE_HEADER Header;
  597. UINT32 NodeCount;
  598. UINT32 NodeOffset;
  599. UINT32 Reserved;
  600. } ACPI_TABLE_IORT;
  601. /*
  602. * IORT subtables
  603. */
  604. typedef struct acpi_iort_node
  605. {
  606. UINT8 Type;
  607. UINT16 Length;
  608. UINT8 Revision;
  609. UINT32 Reserved;
  610. UINT32 MappingCount;
  611. UINT32 MappingOffset;
  612. char NodeData[1];
  613. } ACPI_IORT_NODE;
  614. /* Values for subtable Type above */
  615. enum AcpiIortNodeType
  616. {
  617. ACPI_IORT_NODE_ITS_GROUP = 0x00,
  618. ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
  619. ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
  620. ACPI_IORT_NODE_SMMU = 0x03
  621. };
  622. typedef struct acpi_iort_id_mapping
  623. {
  624. UINT32 InputBase; /* Lowest value in input range */
  625. UINT32 IdCount; /* Number of IDs */
  626. UINT32 OutputBase; /* Lowest value in output range */
  627. UINT32 OutputReference; /* A reference to the output node */
  628. UINT32 Flags;
  629. } ACPI_IORT_ID_MAPPING;
  630. /* Masks for Flags field above for IORT subtable */
  631. #define ACPI_IORT_ID_SINGLE_MAPPING (1)
  632. typedef struct acpi_iort_memory_access
  633. {
  634. UINT32 CacheCoherency;
  635. UINT8 Hints;
  636. UINT16 Reserved;
  637. UINT8 MemoryFlags;
  638. } ACPI_IORT_MEMORY_ACCESS;
  639. /* Values for CacheCoherency field above */
  640. #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
  641. #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
  642. /* Masks for Hints field above */
  643. #define ACPI_IORT_HT_TRANSIENT (1)
  644. #define ACPI_IORT_HT_WRITE (1<<1)
  645. #define ACPI_IORT_HT_READ (1<<2)
  646. #define ACPI_IORT_HT_OVERRIDE (1<<3)
  647. /* Masks for MemoryFlags field above */
  648. #define ACPI_IORT_MF_COHERENCY (1)
  649. #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
  650. /*
  651. * IORT node specific subtables
  652. */
  653. typedef struct acpi_iort_its_group
  654. {
  655. UINT32 ItsCount;
  656. UINT32 Identifiers[1]; /* GIC ITS identifier arrary */
  657. } ACPI_IORT_ITS_GROUP;
  658. typedef struct acpi_iort_named_component
  659. {
  660. UINT32 NodeFlags;
  661. UINT64 MemoryProperties; /* Memory access properties */
  662. UINT8 MemoryAddressLimit; /* Memory address size limit */
  663. char DeviceName[1]; /* Path of namespace object */
  664. } ACPI_IORT_NAMED_COMPONENT;
  665. typedef struct acpi_iort_root_complex
  666. {
  667. UINT64 MemoryProperties; /* Memory access properties */
  668. UINT32 AtsAttribute;
  669. UINT32 PciSegmentNumber;
  670. } ACPI_IORT_ROOT_COMPLEX;
  671. /* Values for AtsAttribute field above */
  672. #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
  673. #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
  674. typedef struct acpi_iort_smmu
  675. {
  676. UINT64 BaseAddress; /* SMMU base address */
  677. UINT64 Span; /* Length of memory range */
  678. UINT32 Model;
  679. UINT32 Flags;
  680. UINT32 GlobalInterruptOffset;
  681. UINT32 ContextInterruptCount;
  682. UINT32 ContextInterruptOffset;
  683. UINT32 PmuInterruptCount;
  684. UINT32 PmuInterruptOffset;
  685. UINT64 Interrupts[1]; /* Interrupt array */
  686. } ACPI_IORT_SMMU;
  687. /* Values for Model field above */
  688. #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
  689. #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
  690. #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
  691. #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
  692. /* Masks for Flags field above */
  693. #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
  694. #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
  695. /*******************************************************************************
  696. *
  697. * IVRS - I/O Virtualization Reporting Structure
  698. * Version 1
  699. *
  700. * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
  701. * Revision 1.26, February 2009.
  702. *
  703. ******************************************************************************/
  704. typedef struct acpi_table_ivrs
  705. {
  706. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  707. UINT32 Info; /* Common virtualization info */
  708. UINT64 Reserved;
  709. } ACPI_TABLE_IVRS;
  710. /* Values for Info field above */
  711. #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
  712. #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
  713. #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
  714. /* IVRS subtable header */
  715. typedef struct acpi_ivrs_header
  716. {
  717. UINT8 Type; /* Subtable type */
  718. UINT8 Flags;
  719. UINT16 Length; /* Subtable length */
  720. UINT16 DeviceId; /* ID of IOMMU */
  721. } ACPI_IVRS_HEADER;
  722. /* Values for subtable Type above */
  723. enum AcpiIvrsType
  724. {
  725. ACPI_IVRS_TYPE_HARDWARE = 0x10,
  726. ACPI_IVRS_TYPE_MEMORY1 = 0x20,
  727. ACPI_IVRS_TYPE_MEMORY2 = 0x21,
  728. ACPI_IVRS_TYPE_MEMORY3 = 0x22
  729. };
  730. /* Masks for Flags field above for IVHD subtable */
  731. #define ACPI_IVHD_TT_ENABLE (1)
  732. #define ACPI_IVHD_PASS_PW (1<<1)
  733. #define ACPI_IVHD_RES_PASS_PW (1<<2)
  734. #define ACPI_IVHD_ISOC (1<<3)
  735. #define ACPI_IVHD_IOTLB (1<<4)
  736. /* Masks for Flags field above for IVMD subtable */
  737. #define ACPI_IVMD_UNITY (1)
  738. #define ACPI_IVMD_READ (1<<1)
  739. #define ACPI_IVMD_WRITE (1<<2)
  740. #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
  741. /*
  742. * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
  743. */
  744. /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
  745. typedef struct acpi_ivrs_hardware
  746. {
  747. ACPI_IVRS_HEADER Header;
  748. UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
  749. UINT64 BaseAddress; /* IOMMU control registers */
  750. UINT16 PciSegmentGroup;
  751. UINT16 Info; /* MSI number and unit ID */
  752. UINT32 Reserved;
  753. } ACPI_IVRS_HARDWARE;
  754. /* Masks for Info field above */
  755. #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
  756. #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
  757. /*
  758. * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
  759. * Upper two bits of the Type field are the (encoded) length of the structure.
  760. * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
  761. * are reserved for future use but not defined.
  762. */
  763. typedef struct acpi_ivrs_de_header
  764. {
  765. UINT8 Type;
  766. UINT16 Id;
  767. UINT8 DataSetting;
  768. } ACPI_IVRS_DE_HEADER;
  769. /* Length of device entry is in the top two bits of Type field above */
  770. #define ACPI_IVHD_ENTRY_LENGTH 0xC0
  771. /* Values for device entry Type field above */
  772. enum AcpiIvrsDeviceEntryType
  773. {
  774. /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
  775. ACPI_IVRS_TYPE_PAD4 = 0,
  776. ACPI_IVRS_TYPE_ALL = 1,
  777. ACPI_IVRS_TYPE_SELECT = 2,
  778. ACPI_IVRS_TYPE_START = 3,
  779. ACPI_IVRS_TYPE_END = 4,
  780. /* 8-byte device entries */
  781. ACPI_IVRS_TYPE_PAD8 = 64,
  782. ACPI_IVRS_TYPE_NOT_USED = 65,
  783. ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */
  784. ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
  785. ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
  786. ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
  787. ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */
  788. };
  789. /* Values for Data field above */
  790. #define ACPI_IVHD_INIT_PASS (1)
  791. #define ACPI_IVHD_EINT_PASS (1<<1)
  792. #define ACPI_IVHD_NMI_PASS (1<<2)
  793. #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
  794. #define ACPI_IVHD_LINT0_PASS (1<<6)
  795. #define ACPI_IVHD_LINT1_PASS (1<<7)
  796. /* Types 0-4: 4-byte device entry */
  797. typedef struct acpi_ivrs_device4
  798. {
  799. ACPI_IVRS_DE_HEADER Header;
  800. } ACPI_IVRS_DEVICE4;
  801. /* Types 66-67: 8-byte device entry */
  802. typedef struct acpi_ivrs_device8a
  803. {
  804. ACPI_IVRS_DE_HEADER Header;
  805. UINT8 Reserved1;
  806. UINT16 UsedId;
  807. UINT8 Reserved2;
  808. } ACPI_IVRS_DEVICE8A;
  809. /* Types 70-71: 8-byte device entry */
  810. typedef struct acpi_ivrs_device8b
  811. {
  812. ACPI_IVRS_DE_HEADER Header;
  813. UINT32 ExtendedData;
  814. } ACPI_IVRS_DEVICE8B;
  815. /* Values for ExtendedData above */
  816. #define ACPI_IVHD_ATS_DISABLED (1<<31)
  817. /* Type 72: 8-byte device entry */
  818. typedef struct acpi_ivrs_device8c
  819. {
  820. ACPI_IVRS_DE_HEADER Header;
  821. UINT8 Handle;
  822. UINT16 UsedId;
  823. UINT8 Variety;
  824. } ACPI_IVRS_DEVICE8C;
  825. /* Values for Variety field above */
  826. #define ACPI_IVHD_IOAPIC 1
  827. #define ACPI_IVHD_HPET 2
  828. /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
  829. typedef struct acpi_ivrs_memory
  830. {
  831. ACPI_IVRS_HEADER Header;
  832. UINT16 AuxData;
  833. UINT64 Reserved;
  834. UINT64 StartAddress;
  835. UINT64 MemoryLength;
  836. } ACPI_IVRS_MEMORY;
  837. /*******************************************************************************
  838. *
  839. * LPIT - Low Power Idle Table
  840. *
  841. * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
  842. *
  843. ******************************************************************************/
  844. typedef struct acpi_table_lpit
  845. {
  846. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  847. } ACPI_TABLE_LPIT;
  848. /* LPIT subtable header */
  849. typedef struct acpi_lpit_header
  850. {
  851. UINT32 Type; /* Subtable type */
  852. UINT32 Length; /* Subtable length */
  853. UINT16 UniqueId;
  854. UINT16 Reserved;
  855. UINT32 Flags;
  856. } ACPI_LPIT_HEADER;
  857. /* Values for subtable Type above */
  858. enum AcpiLpitType
  859. {
  860. ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
  861. ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
  862. };
  863. /* Masks for Flags field above */
  864. #define ACPI_LPIT_STATE_DISABLED (1)
  865. #define ACPI_LPIT_NO_COUNTER (1<<1)
  866. /*
  867. * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
  868. */
  869. /* 0x00: Native C-state instruction based LPI structure */
  870. typedef struct acpi_lpit_native
  871. {
  872. ACPI_LPIT_HEADER Header;
  873. ACPI_GENERIC_ADDRESS EntryTrigger;
  874. UINT32 Residency;
  875. UINT32 Latency;
  876. ACPI_GENERIC_ADDRESS ResidencyCounter;
  877. UINT64 CounterFrequency;
  878. } ACPI_LPIT_NATIVE;
  879. /*******************************************************************************
  880. *
  881. * MCFG - PCI Memory Mapped Configuration table and subtable
  882. * Version 1
  883. *
  884. * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
  885. *
  886. ******************************************************************************/
  887. typedef struct acpi_table_mcfg
  888. {
  889. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  890. UINT8 Reserved[8];
  891. } ACPI_TABLE_MCFG;
  892. /* Subtable */
  893. typedef struct acpi_mcfg_allocation
  894. {
  895. UINT64 Address; /* Base address, processor-relative */
  896. UINT16 PciSegment; /* PCI segment group number */
  897. UINT8 StartBusNumber; /* Starting PCI Bus number */
  898. UINT8 EndBusNumber; /* Final PCI Bus number */
  899. UINT32 Reserved;
  900. } ACPI_MCFG_ALLOCATION;
  901. /*******************************************************************************
  902. *
  903. * MCHI - Management Controller Host Interface Table
  904. * Version 1
  905. *
  906. * Conforms to "Management Component Transport Protocol (MCTP) Host
  907. * Interface Specification", Revision 1.0.0a, October 13, 2009
  908. *
  909. ******************************************************************************/
  910. typedef struct acpi_table_mchi
  911. {
  912. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  913. UINT8 InterfaceType;
  914. UINT8 Protocol;
  915. UINT64 ProtocolData;
  916. UINT8 InterruptType;
  917. UINT8 Gpe;
  918. UINT8 PciDeviceFlag;
  919. UINT32 GlobalInterrupt;
  920. ACPI_GENERIC_ADDRESS ControlRegister;
  921. UINT8 PciSegment;
  922. UINT8 PciBus;
  923. UINT8 PciDevice;
  924. UINT8 PciFunction;
  925. } ACPI_TABLE_MCHI;
  926. /*******************************************************************************
  927. *
  928. * MSDM - Microsoft Data Management table
  929. *
  930. * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
  931. * November 29, 2011. Copyright 2011 Microsoft
  932. *
  933. ******************************************************************************/
  934. /* Basic MSDM table is only the common ACPI header */
  935. typedef struct acpi_table_msdm
  936. {
  937. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  938. } ACPI_TABLE_MSDM;
  939. /*******************************************************************************
  940. *
  941. * MTMR - MID Timer Table
  942. * Version 1
  943. *
  944. * Conforms to "Simple Firmware Interface Specification",
  945. * Draft 0.8.2, Oct 19, 2010
  946. * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
  947. *
  948. ******************************************************************************/
  949. typedef struct acpi_table_mtmr
  950. {
  951. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  952. } ACPI_TABLE_MTMR;
  953. /* MTMR entry */
  954. typedef struct acpi_mtmr_entry
  955. {
  956. ACPI_GENERIC_ADDRESS PhysicalAddress;
  957. UINT32 Frequency;
  958. UINT32 Irq;
  959. } ACPI_MTMR_ENTRY;
  960. /*******************************************************************************
  961. *
  962. * SLIC - Software Licensing Description Table
  963. *
  964. * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
  965. * November 29, 2011. Copyright 2011 Microsoft
  966. *
  967. ******************************************************************************/
  968. /* Basic SLIC table is only the common ACPI header */
  969. typedef struct acpi_table_slic
  970. {
  971. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  972. } ACPI_TABLE_SLIC;
  973. /*******************************************************************************
  974. *
  975. * SPCR - Serial Port Console Redirection table
  976. * Version 1
  977. *
  978. * Conforms to "Serial Port Console Redirection Table",
  979. * Version 1.00, January 11, 2002
  980. *
  981. ******************************************************************************/
  982. typedef struct acpi_table_spcr
  983. {
  984. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  985. UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
  986. UINT8 Reserved[3];
  987. ACPI_GENERIC_ADDRESS SerialPort;
  988. UINT8 InterruptType;
  989. UINT8 PcInterrupt;
  990. UINT32 Interrupt;
  991. UINT8 BaudRate;
  992. UINT8 Parity;
  993. UINT8 StopBits;
  994. UINT8 FlowControl;
  995. UINT8 TerminalType;
  996. UINT8 Reserved1;
  997. UINT16 PciDeviceId;
  998. UINT16 PciVendorId;
  999. UINT8 PciBus;
  1000. UINT8 PciDevice;
  1001. UINT8 PciFunction;
  1002. UINT32 PciFlags;
  1003. UINT8 PciSegment;
  1004. UINT32 Reserved2;
  1005. } ACPI_TABLE_SPCR;
  1006. /* Masks for PciFlags field above */
  1007. #define ACPI_SPCR_DO_NOT_DISABLE (1)
  1008. /*******************************************************************************
  1009. *
  1010. * SPMI - Server Platform Management Interface table
  1011. * Version 5
  1012. *
  1013. * Conforms to "Intelligent Platform Management Interface Specification
  1014. * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
  1015. * June 12, 2009 markup.
  1016. *
  1017. ******************************************************************************/
  1018. typedef struct acpi_table_spmi
  1019. {
  1020. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1021. UINT8 InterfaceType;
  1022. UINT8 Reserved; /* Must be 1 */
  1023. UINT16 SpecRevision; /* Version of IPMI */
  1024. UINT8 InterruptType;
  1025. UINT8 GpeNumber; /* GPE assigned */
  1026. UINT8 Reserved1;
  1027. UINT8 PciDeviceFlag;
  1028. UINT32 Interrupt;
  1029. ACPI_GENERIC_ADDRESS IpmiRegister;
  1030. UINT8 PciSegment;
  1031. UINT8 PciBus;
  1032. UINT8 PciDevice;
  1033. UINT8 PciFunction;
  1034. UINT8 Reserved2;
  1035. } ACPI_TABLE_SPMI;
  1036. /* Values for InterfaceType above */
  1037. enum AcpiSpmiInterfaceTypes
  1038. {
  1039. ACPI_SPMI_NOT_USED = 0,
  1040. ACPI_SPMI_KEYBOARD = 1,
  1041. ACPI_SPMI_SMI = 2,
  1042. ACPI_SPMI_BLOCK_TRANSFER = 3,
  1043. ACPI_SPMI_SMBUS = 4,
  1044. ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
  1045. };
  1046. /*******************************************************************************
  1047. *
  1048. * TCPA - Trusted Computing Platform Alliance table
  1049. * Version 2
  1050. *
  1051. * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
  1052. * December 19, 2014
  1053. *
  1054. * NOTE: There are two versions of the table with the same signature --
  1055. * the client version and the server version. The common PlatformClass
  1056. * field is used to differentiate the two types of tables.
  1057. *
  1058. ******************************************************************************/
  1059. typedef struct acpi_table_tcpa_hdr
  1060. {
  1061. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1062. UINT16 PlatformClass;
  1063. } ACPI_TABLE_TCPA_HDR;
  1064. /*
  1065. * Values for PlatformClass above.
  1066. * This is how the client and server subtables are differentiated
  1067. */
  1068. #define ACPI_TCPA_CLIENT_TABLE 0
  1069. #define ACPI_TCPA_SERVER_TABLE 1
  1070. typedef struct acpi_table_tcpa_client
  1071. {
  1072. UINT32 MinimumLogLength; /* Minimum length for the event log area */
  1073. UINT64 LogAddress; /* Address of the event log area */
  1074. } ACPI_TABLE_TCPA_CLIENT;
  1075. typedef struct acpi_table_tcpa_server
  1076. {
  1077. UINT16 Reserved;
  1078. UINT64 MinimumLogLength; /* Minimum length for the event log area */
  1079. UINT64 LogAddress; /* Address of the event log area */
  1080. UINT16 SpecRevision;
  1081. UINT8 DeviceFlags;
  1082. UINT8 InterruptFlags;
  1083. UINT8 GpeNumber;
  1084. UINT8 Reserved2[3];
  1085. UINT32 GlobalInterrupt;
  1086. ACPI_GENERIC_ADDRESS Address;
  1087. UINT32 Reserved3;
  1088. ACPI_GENERIC_ADDRESS ConfigAddress;
  1089. UINT8 Group;
  1090. UINT8 Bus; /* PCI Bus/Segment/Function numbers */
  1091. UINT8 Device;
  1092. UINT8 Function;
  1093. } ACPI_TABLE_TCPA_SERVER;
  1094. /* Values for DeviceFlags above */
  1095. #define ACPI_TCPA_PCI_DEVICE (1)
  1096. #define ACPI_TCPA_BUS_PNP (1<<1)
  1097. #define ACPI_TCPA_ADDRESS_VALID (1<<2)
  1098. /* Values for InterruptFlags above */
  1099. #define ACPI_TCPA_INTERRUPT_MODE (1)
  1100. #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
  1101. #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
  1102. #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
  1103. /*******************************************************************************
  1104. *
  1105. * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
  1106. * Version 4
  1107. *
  1108. * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
  1109. * December 19, 2014
  1110. *
  1111. ******************************************************************************/
  1112. typedef struct acpi_table_tpm2
  1113. {
  1114. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1115. UINT16 PlatformClass;
  1116. UINT16 Reserved;
  1117. UINT64 ControlAddress;
  1118. UINT32 StartMethod;
  1119. /* Platform-specific data follows */
  1120. } ACPI_TABLE_TPM2;
  1121. /* Values for StartMethod above */
  1122. #define ACPI_TPM2_NOT_ALLOWED 0
  1123. #define ACPI_TPM2_START_METHOD 2
  1124. #define ACPI_TPM2_MEMORY_MAPPED 6
  1125. #define ACPI_TPM2_COMMAND_BUFFER 7
  1126. #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
  1127. /*******************************************************************************
  1128. *
  1129. * UEFI - UEFI Boot optimization Table
  1130. * Version 1
  1131. *
  1132. * Conforms to "Unified Extensible Firmware Interface Specification",
  1133. * Version 2.3, May 8, 2009
  1134. *
  1135. ******************************************************************************/
  1136. typedef struct acpi_table_uefi
  1137. {
  1138. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1139. UINT8 Identifier[16]; /* UUID identifier */
  1140. UINT16 DataOffset; /* Offset of remaining data in table */
  1141. } ACPI_TABLE_UEFI;
  1142. /*******************************************************************************
  1143. *
  1144. * VRTC - Virtual Real Time Clock Table
  1145. * Version 1
  1146. *
  1147. * Conforms to "Simple Firmware Interface Specification",
  1148. * Draft 0.8.2, Oct 19, 2010
  1149. * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
  1150. *
  1151. ******************************************************************************/
  1152. typedef struct acpi_table_vrtc
  1153. {
  1154. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1155. } ACPI_TABLE_VRTC;
  1156. /* VRTC entry */
  1157. typedef struct acpi_vrtc_entry
  1158. {
  1159. ACPI_GENERIC_ADDRESS PhysicalAddress;
  1160. UINT32 Irq;
  1161. } ACPI_VRTC_ENTRY;
  1162. /*******************************************************************************
  1163. *
  1164. * WAET - Windows ACPI Emulated devices Table
  1165. * Version 1
  1166. *
  1167. * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
  1168. *
  1169. ******************************************************************************/
  1170. typedef struct acpi_table_waet
  1171. {
  1172. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1173. UINT32 Flags;
  1174. } ACPI_TABLE_WAET;
  1175. /* Masks for Flags field above */
  1176. #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
  1177. #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
  1178. /*******************************************************************************
  1179. *
  1180. * WDAT - Watchdog Action Table
  1181. * Version 1
  1182. *
  1183. * Conforms to "Hardware Watchdog Timers Design Specification",
  1184. * Copyright 2006 Microsoft Corporation.
  1185. *
  1186. ******************************************************************************/
  1187. typedef struct acpi_table_wdat
  1188. {
  1189. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1190. UINT32 HeaderLength; /* Watchdog Header Length */
  1191. UINT16 PciSegment; /* PCI Segment number */
  1192. UINT8 PciBus; /* PCI Bus number */
  1193. UINT8 PciDevice; /* PCI Device number */
  1194. UINT8 PciFunction; /* PCI Function number */
  1195. UINT8 Reserved[3];
  1196. UINT32 TimerPeriod; /* Period of one timer count (msec) */
  1197. UINT32 MaxCount; /* Maximum counter value supported */
  1198. UINT32 MinCount; /* Minimum counter value */
  1199. UINT8 Flags;
  1200. UINT8 Reserved2[3];
  1201. UINT32 Entries; /* Number of watchdog entries that follow */
  1202. } ACPI_TABLE_WDAT;
  1203. /* Masks for Flags field above */
  1204. #define ACPI_WDAT_ENABLED (1)
  1205. #define ACPI_WDAT_STOPPED 0x80
  1206. /* WDAT Instruction Entries (actions) */
  1207. typedef struct acpi_wdat_entry
  1208. {
  1209. UINT8 Action;
  1210. UINT8 Instruction;
  1211. UINT16 Reserved;
  1212. ACPI_GENERIC_ADDRESS RegisterRegion;
  1213. UINT32 Value; /* Value used with Read/Write register */
  1214. UINT32 Mask; /* Bitmask required for this register instruction */
  1215. } ACPI_WDAT_ENTRY;
  1216. /* Values for Action field above */
  1217. enum AcpiWdatActions
  1218. {
  1219. ACPI_WDAT_RESET = 1,
  1220. ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
  1221. ACPI_WDAT_GET_COUNTDOWN = 5,
  1222. ACPI_WDAT_SET_COUNTDOWN = 6,
  1223. ACPI_WDAT_GET_RUNNING_STATE = 8,
  1224. ACPI_WDAT_SET_RUNNING_STATE = 9,
  1225. ACPI_WDAT_GET_STOPPED_STATE = 10,
  1226. ACPI_WDAT_SET_STOPPED_STATE = 11,
  1227. ACPI_WDAT_GET_REBOOT = 16,
  1228. ACPI_WDAT_SET_REBOOT = 17,
  1229. ACPI_WDAT_GET_SHUTDOWN = 18,
  1230. ACPI_WDAT_SET_SHUTDOWN = 19,
  1231. ACPI_WDAT_GET_STATUS = 32,
  1232. ACPI_WDAT_SET_STATUS = 33,
  1233. ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
  1234. };
  1235. /* Values for Instruction field above */
  1236. enum AcpiWdatInstructions
  1237. {
  1238. ACPI_WDAT_READ_VALUE = 0,
  1239. ACPI_WDAT_READ_COUNTDOWN = 1,
  1240. ACPI_WDAT_WRITE_VALUE = 2,
  1241. ACPI_WDAT_WRITE_COUNTDOWN = 3,
  1242. ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
  1243. ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
  1244. };
  1245. /*******************************************************************************
  1246. *
  1247. * WDDT - Watchdog Descriptor Table
  1248. * Version 1
  1249. *
  1250. * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
  1251. * Version 001, September 2002
  1252. *
  1253. ******************************************************************************/
  1254. typedef struct acpi_table_wddt
  1255. {
  1256. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1257. UINT16 SpecVersion;
  1258. UINT16 TableVersion;
  1259. UINT16 PciVendorId;
  1260. ACPI_GENERIC_ADDRESS Address;
  1261. UINT16 MaxCount; /* Maximum counter value supported */
  1262. UINT16 MinCount; /* Minimum counter value supported */
  1263. UINT16 Period;
  1264. UINT16 Status;
  1265. UINT16 Capability;
  1266. } ACPI_TABLE_WDDT;
  1267. /* Flags for Status field above */
  1268. #define ACPI_WDDT_AVAILABLE (1)
  1269. #define ACPI_WDDT_ACTIVE (1<<1)
  1270. #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
  1271. #define ACPI_WDDT_USER_RESET (1<<11)
  1272. #define ACPI_WDDT_WDT_RESET (1<<12)
  1273. #define ACPI_WDDT_POWER_FAIL (1<<13)
  1274. #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
  1275. /* Flags for Capability field above */
  1276. #define ACPI_WDDT_AUTO_RESET (1)
  1277. #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
  1278. /*******************************************************************************
  1279. *
  1280. * WDRT - Watchdog Resource Table
  1281. * Version 1
  1282. *
  1283. * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
  1284. * Version 1.01, August 28, 2006
  1285. *
  1286. ******************************************************************************/
  1287. typedef struct acpi_table_wdrt
  1288. {
  1289. ACPI_TABLE_HEADER Header; /* Common ACPI table header */
  1290. ACPI_GENERIC_ADDRESS ControlRegister;
  1291. ACPI_GENERIC_ADDRESS CountRegister;
  1292. UINT16 PciDeviceId;
  1293. UINT16 PciVendorId;
  1294. UINT8 PciBus; /* PCI Bus number */
  1295. UINT8 PciDevice; /* PCI Device number */
  1296. UINT8 PciFunction; /* PCI Function number */
  1297. UINT8 PciSegment; /* PCI Segment number */
  1298. UINT16 MaxCount; /* Maximum counter value supported */
  1299. UINT8 Units;
  1300. } ACPI_TABLE_WDRT;
  1301. /* Reset to default packing */
  1302. #pragma pack()
  1303. #endif /* __ACTBL2_H__ */