actbl1.h 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745
  1. /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2. /******************************************************************************
  3. *
  4. * Name: actbl1.h - Additional ACPI table definitions
  5. *
  6. * Copyright (C) 2000 - 2022, Intel Corp.
  7. *
  8. *****************************************************************************/
  9. #ifndef __ACTBL1_H__
  10. #define __ACTBL1_H__
  11. /*******************************************************************************
  12. *
  13. * Additional ACPI Tables
  14. *
  15. * These tables are not consumed directly by the ACPICA subsystem, but are
  16. * included here to support device drivers and the AML disassembler.
  17. *
  18. ******************************************************************************/
  19. /*
  20. * Values for description table header signatures for tables defined in this
  21. * file. Useful because they make it more difficult to inadvertently type in
  22. * the wrong signature.
  23. */
  24. #define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */
  25. #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
  26. #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
  27. #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
  28. #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
  29. #define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */
  30. #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
  31. #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
  32. #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
  33. #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
  34. #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
  35. #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
  36. #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
  37. #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
  38. #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
  39. #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
  40. #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
  41. #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
  42. #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
  43. #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
  44. #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
  45. #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
  46. #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
  47. /* Reserved table signatures */
  48. #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
  49. #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
  50. /*
  51. * These tables have been seen in the field, but no definition has been found
  52. */
  53. #ifdef ACPI_UNDEFINED_TABLES
  54. #define ACPI_SIG_ATKG "ATKG"
  55. #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
  56. #define ACPI_SIG_IEIT "IEIT"
  57. #endif
  58. /*
  59. * All tables must be byte-packed to match the ACPI specification, since
  60. * the tables are provided by the system BIOS.
  61. */
  62. #pragma pack(1)
  63. /*
  64. * Note: C bitfields are not used for this reason:
  65. *
  66. * "Bitfields are great and easy to read, but unfortunately the C language
  67. * does not specify the layout of bitfields in memory, which means they are
  68. * essentially useless for dealing with packed data in on-disk formats or
  69. * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
  70. * this decision was a design error in C. Ritchie could have picked an order
  71. * and stuck with it." Norman Ramsey.
  72. * See http://stackoverflow.com/a/1053662/41661
  73. */
  74. /*******************************************************************************
  75. *
  76. * Common subtable headers
  77. *
  78. ******************************************************************************/
  79. /* Generic subtable header (used in MADT, SRAT, etc.) */
  80. struct acpi_subtable_header {
  81. u8 type;
  82. u8 length;
  83. };
  84. /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
  85. struct acpi_whea_header {
  86. u8 action;
  87. u8 instruction;
  88. u8 flags;
  89. u8 reserved;
  90. struct acpi_generic_address register_region;
  91. u64 value; /* Value used with Read/Write register */
  92. u64 mask; /* Bitmask required for this register instruction */
  93. };
  94. /*******************************************************************************
  95. *
  96. * ASF - Alert Standard Format table (Signature "ASF!")
  97. * Revision 0x10
  98. *
  99. * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
  100. *
  101. ******************************************************************************/
  102. struct acpi_table_asf {
  103. struct acpi_table_header header; /* Common ACPI table header */
  104. };
  105. /* ASF subtable header */
  106. struct acpi_asf_header {
  107. u8 type;
  108. u8 reserved;
  109. u16 length;
  110. };
  111. /* Values for Type field above */
  112. enum acpi_asf_type {
  113. ACPI_ASF_TYPE_INFO = 0,
  114. ACPI_ASF_TYPE_ALERT = 1,
  115. ACPI_ASF_TYPE_CONTROL = 2,
  116. ACPI_ASF_TYPE_BOOT = 3,
  117. ACPI_ASF_TYPE_ADDRESS = 4,
  118. ACPI_ASF_TYPE_RESERVED = 5
  119. };
  120. /*
  121. * ASF subtables
  122. */
  123. /* 0: ASF Information */
  124. struct acpi_asf_info {
  125. struct acpi_asf_header header;
  126. u8 min_reset_value;
  127. u8 min_poll_interval;
  128. u16 system_id;
  129. u32 mfg_id;
  130. u8 flags;
  131. u8 reserved2[3];
  132. };
  133. /* Masks for Flags field above */
  134. #define ACPI_ASF_SMBUS_PROTOCOLS (1)
  135. /* 1: ASF Alerts */
  136. struct acpi_asf_alert {
  137. struct acpi_asf_header header;
  138. u8 assert_mask;
  139. u8 deassert_mask;
  140. u8 alerts;
  141. u8 data_length;
  142. };
  143. struct acpi_asf_alert_data {
  144. u8 address;
  145. u8 command;
  146. u8 mask;
  147. u8 value;
  148. u8 sensor_type;
  149. u8 type;
  150. u8 offset;
  151. u8 source_type;
  152. u8 severity;
  153. u8 sensor_number;
  154. u8 entity;
  155. u8 instance;
  156. };
  157. /* 2: ASF Remote Control */
  158. struct acpi_asf_remote {
  159. struct acpi_asf_header header;
  160. u8 controls;
  161. u8 data_length;
  162. u16 reserved2;
  163. };
  164. struct acpi_asf_control_data {
  165. u8 function;
  166. u8 address;
  167. u8 command;
  168. u8 value;
  169. };
  170. /* 3: ASF RMCP Boot Options */
  171. struct acpi_asf_rmcp {
  172. struct acpi_asf_header header;
  173. u8 capabilities[7];
  174. u8 completion_code;
  175. u32 enterprise_id;
  176. u8 command;
  177. u16 parameter;
  178. u16 boot_options;
  179. u16 oem_parameters;
  180. };
  181. /* 4: ASF Address */
  182. struct acpi_asf_address {
  183. struct acpi_asf_header header;
  184. u8 eprom_address;
  185. u8 devices;
  186. };
  187. /*******************************************************************************
  188. *
  189. * BERT - Boot Error Record Table (ACPI 4.0)
  190. * Version 1
  191. *
  192. ******************************************************************************/
  193. struct acpi_table_bert {
  194. struct acpi_table_header header; /* Common ACPI table header */
  195. u32 region_length; /* Length of the boot error region */
  196. u64 address; /* Physical address of the error region */
  197. };
  198. /* Boot Error Region (not a subtable, pointed to by Address field above) */
  199. struct acpi_bert_region {
  200. u32 block_status; /* Type of error information */
  201. u32 raw_data_offset; /* Offset to raw error data */
  202. u32 raw_data_length; /* Length of raw error data */
  203. u32 data_length; /* Length of generic error data */
  204. u32 error_severity; /* Severity code */
  205. };
  206. /* Values for block_status flags above */
  207. #define ACPI_BERT_UNCORRECTABLE (1)
  208. #define ACPI_BERT_CORRECTABLE (1<<1)
  209. #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
  210. #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
  211. #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
  212. /* Values for error_severity above */
  213. enum acpi_bert_error_severity {
  214. ACPI_BERT_ERROR_CORRECTABLE = 0,
  215. ACPI_BERT_ERROR_FATAL = 1,
  216. ACPI_BERT_ERROR_CORRECTED = 2,
  217. ACPI_BERT_ERROR_NONE = 3,
  218. ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
  219. };
  220. /*
  221. * Note: The generic error data that follows the error_severity field above
  222. * uses the struct acpi_hest_generic_data defined under the HEST table below
  223. */
  224. /*******************************************************************************
  225. *
  226. * BGRT - Boot Graphics Resource Table (ACPI 5.0)
  227. * Version 1
  228. *
  229. ******************************************************************************/
  230. struct acpi_table_bgrt {
  231. struct acpi_table_header header; /* Common ACPI table header */
  232. u16 version;
  233. u8 status;
  234. u8 image_type;
  235. u64 image_address;
  236. u32 image_offset_x;
  237. u32 image_offset_y;
  238. };
  239. /* Flags for Status field above */
  240. #define ACPI_BGRT_DISPLAYED (1)
  241. #define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
  242. /*******************************************************************************
  243. *
  244. * BOOT - Simple Boot Flag Table
  245. * Version 1
  246. *
  247. * Conforms to the "Simple Boot Flag Specification", Version 2.1
  248. *
  249. ******************************************************************************/
  250. struct acpi_table_boot {
  251. struct acpi_table_header header; /* Common ACPI table header */
  252. u8 cmos_index; /* Index in CMOS RAM for the boot register */
  253. u8 reserved[3];
  254. };
  255. /*******************************************************************************
  256. *
  257. * CEDT - CXL Early Discovery Table
  258. * Version 1
  259. *
  260. * Conforms to the "CXL Early Discovery Table" (CXL 2.0)
  261. *
  262. ******************************************************************************/
  263. struct acpi_table_cedt {
  264. struct acpi_table_header header; /* Common ACPI table header */
  265. };
  266. /* CEDT subtable header (Performance Record Structure) */
  267. struct acpi_cedt_header {
  268. u8 type;
  269. u8 reserved;
  270. u16 length;
  271. };
  272. /* Values for Type field above */
  273. enum acpi_cedt_type {
  274. ACPI_CEDT_TYPE_CHBS = 0,
  275. ACPI_CEDT_TYPE_CFMWS = 1,
  276. ACPI_CEDT_TYPE_RESERVED = 2,
  277. };
  278. /* Values for version field above */
  279. #define ACPI_CEDT_CHBS_VERSION_CXL11 (0)
  280. #define ACPI_CEDT_CHBS_VERSION_CXL20 (1)
  281. /* Values for length field above */
  282. #define ACPI_CEDT_CHBS_LENGTH_CXL11 (0x2000)
  283. #define ACPI_CEDT_CHBS_LENGTH_CXL20 (0x10000)
  284. /*
  285. * CEDT subtables
  286. */
  287. /* 0: CXL Host Bridge Structure */
  288. struct acpi_cedt_chbs {
  289. struct acpi_cedt_header header;
  290. u32 uid;
  291. u32 cxl_version;
  292. u32 reserved;
  293. u64 base;
  294. u64 length;
  295. };
  296. /* 1: CXL Fixed Memory Window Structure */
  297. struct acpi_cedt_cfmws {
  298. struct acpi_cedt_header header;
  299. u32 reserved1;
  300. u64 base_hpa;
  301. u64 window_size;
  302. u8 interleave_ways;
  303. u8 interleave_arithmetic;
  304. u16 reserved2;
  305. u32 granularity;
  306. u16 restrictions;
  307. u16 qtg_id;
  308. u32 interleave_targets[];
  309. };
  310. struct acpi_cedt_cfmws_target_element {
  311. u32 interleave_target;
  312. };
  313. /* Values for Interleave Arithmetic field above */
  314. #define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
  315. /* Values for Restrictions field above */
  316. #define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)
  317. #define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)
  318. #define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)
  319. #define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
  320. #define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
  321. /*******************************************************************************
  322. *
  323. * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
  324. * Version 1
  325. *
  326. ******************************************************************************/
  327. struct acpi_table_cpep {
  328. struct acpi_table_header header; /* Common ACPI table header */
  329. u64 reserved;
  330. };
  331. /* Subtable */
  332. struct acpi_cpep_polling {
  333. struct acpi_subtable_header header;
  334. u8 id; /* Processor ID */
  335. u8 eid; /* Processor EID */
  336. u32 interval; /* Polling interval (msec) */
  337. };
  338. /*******************************************************************************
  339. *
  340. * CSRT - Core System Resource Table
  341. * Version 0
  342. *
  343. * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
  344. *
  345. ******************************************************************************/
  346. struct acpi_table_csrt {
  347. struct acpi_table_header header; /* Common ACPI table header */
  348. };
  349. /* Resource Group subtable */
  350. struct acpi_csrt_group {
  351. u32 length;
  352. u32 vendor_id;
  353. u32 subvendor_id;
  354. u16 device_id;
  355. u16 subdevice_id;
  356. u16 revision;
  357. u16 reserved;
  358. u32 shared_info_length;
  359. /* Shared data immediately follows (Length = shared_info_length) */
  360. };
  361. /* Shared Info subtable */
  362. struct acpi_csrt_shared_info {
  363. u16 major_version;
  364. u16 minor_version;
  365. u32 mmio_base_low;
  366. u32 mmio_base_high;
  367. u32 gsi_interrupt;
  368. u8 interrupt_polarity;
  369. u8 interrupt_mode;
  370. u8 num_channels;
  371. u8 dma_address_width;
  372. u16 base_request_line;
  373. u16 num_handshake_signals;
  374. u32 max_block_size;
  375. /* Resource descriptors immediately follow (Length = Group length - shared_info_length) */
  376. };
  377. /* Resource Descriptor subtable */
  378. struct acpi_csrt_descriptor {
  379. u32 length;
  380. u16 type;
  381. u16 subtype;
  382. u32 uid;
  383. /* Resource-specific information immediately follows */
  384. };
  385. /* Resource Types */
  386. #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
  387. #define ACPI_CSRT_TYPE_TIMER 0x0002
  388. #define ACPI_CSRT_TYPE_DMA 0x0003
  389. /* Resource Subtypes */
  390. #define ACPI_CSRT_XRUPT_LINE 0x0000
  391. #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
  392. #define ACPI_CSRT_TIMER 0x0000
  393. #define ACPI_CSRT_DMA_CHANNEL 0x0000
  394. #define ACPI_CSRT_DMA_CONTROLLER 0x0001
  395. /*******************************************************************************
  396. *
  397. * DBG2 - Debug Port Table 2
  398. * Version 0 (Both main table and subtables)
  399. *
  400. * Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020
  401. *
  402. ******************************************************************************/
  403. struct acpi_table_dbg2 {
  404. struct acpi_table_header header; /* Common ACPI table header */
  405. u32 info_offset;
  406. u32 info_count;
  407. };
  408. struct acpi_dbg2_header {
  409. u32 info_offset;
  410. u32 info_count;
  411. };
  412. /* Debug Device Information Subtable */
  413. struct acpi_dbg2_device {
  414. u8 revision;
  415. u16 length;
  416. u8 register_count; /* Number of base_address registers */
  417. u16 namepath_length;
  418. u16 namepath_offset;
  419. u16 oem_data_length;
  420. u16 oem_data_offset;
  421. u16 port_type;
  422. u16 port_subtype;
  423. u16 reserved;
  424. u16 base_address_offset;
  425. u16 address_size_offset;
  426. /*
  427. * Data that follows:
  428. * base_address (required) - Each in 12-byte Generic Address Structure format.
  429. * address_size (required) - Array of u32 sizes corresponding to each base_address register.
  430. * Namepath (required) - Null terminated string. Single dot if not supported.
  431. * oem_data (optional) - Length is oem_data_length.
  432. */
  433. };
  434. /* Types for port_type field above */
  435. #define ACPI_DBG2_SERIAL_PORT 0x8000
  436. #define ACPI_DBG2_1394_PORT 0x8001
  437. #define ACPI_DBG2_USB_PORT 0x8002
  438. #define ACPI_DBG2_NET_PORT 0x8003
  439. /* Subtypes for port_subtype field above */
  440. #define ACPI_DBG2_16550_COMPATIBLE 0x0000
  441. #define ACPI_DBG2_16550_SUBSET 0x0001
  442. #define ACPI_DBG2_MAX311XE_SPI 0x0002
  443. #define ACPI_DBG2_ARM_PL011 0x0003
  444. #define ACPI_DBG2_MSM8X60 0x0004
  445. #define ACPI_DBG2_16550_NVIDIA 0x0005
  446. #define ACPI_DBG2_TI_OMAP 0x0006
  447. #define ACPI_DBG2_APM88XXXX 0x0008
  448. #define ACPI_DBG2_MSM8974 0x0009
  449. #define ACPI_DBG2_SAM5250 0x000A
  450. #define ACPI_DBG2_INTEL_USIF 0x000B
  451. #define ACPI_DBG2_IMX6 0x000C
  452. #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
  453. #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
  454. #define ACPI_DBG2_ARM_DCC 0x000F
  455. #define ACPI_DBG2_BCM2835 0x0010
  456. #define ACPI_DBG2_SDM845_1_8432MHZ 0x0011
  457. #define ACPI_DBG2_16550_WITH_GAS 0x0012
  458. #define ACPI_DBG2_SDM845_7_372MHZ 0x0013
  459. #define ACPI_DBG2_INTEL_LPSS 0x0014
  460. #define ACPI_DBG2_1394_STANDARD 0x0000
  461. #define ACPI_DBG2_USB_XHCI 0x0000
  462. #define ACPI_DBG2_USB_EHCI 0x0001
  463. /*******************************************************************************
  464. *
  465. * DBGP - Debug Port table
  466. * Version 1
  467. *
  468. * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
  469. *
  470. ******************************************************************************/
  471. struct acpi_table_dbgp {
  472. struct acpi_table_header header; /* Common ACPI table header */
  473. u8 type; /* 0=full 16550, 1=subset of 16550 */
  474. u8 reserved[3];
  475. struct acpi_generic_address debug_port;
  476. };
  477. /*******************************************************************************
  478. *
  479. * DMAR - DMA Remapping table
  480. * Version 1
  481. *
  482. * Conforms to "Intel Virtualization Technology for Directed I/O",
  483. * Version 2.3, October 2014
  484. *
  485. ******************************************************************************/
  486. struct acpi_table_dmar {
  487. struct acpi_table_header header; /* Common ACPI table header */
  488. u8 width; /* Host Address Width */
  489. u8 flags;
  490. u8 reserved[10];
  491. };
  492. /* Masks for Flags field above */
  493. #define ACPI_DMAR_INTR_REMAP (1)
  494. #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
  495. #define ACPI_DMAR_X2APIC_MODE (1<<2)
  496. /* DMAR subtable header */
  497. struct acpi_dmar_header {
  498. u16 type;
  499. u16 length;
  500. };
  501. /* Values for subtable type in struct acpi_dmar_header */
  502. enum acpi_dmar_type {
  503. ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
  504. ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
  505. ACPI_DMAR_TYPE_ROOT_ATS = 2,
  506. ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
  507. ACPI_DMAR_TYPE_NAMESPACE = 4,
  508. ACPI_DMAR_TYPE_SATC = 5,
  509. ACPI_DMAR_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  510. };
  511. /* DMAR Device Scope structure */
  512. struct acpi_dmar_device_scope {
  513. u8 entry_type;
  514. u8 length;
  515. u16 reserved;
  516. u8 enumeration_id;
  517. u8 bus;
  518. };
  519. /* Values for entry_type in struct acpi_dmar_device_scope - device types */
  520. enum acpi_dmar_scope_type {
  521. ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
  522. ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
  523. ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
  524. ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
  525. ACPI_DMAR_SCOPE_TYPE_HPET = 4,
  526. ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
  527. ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  528. };
  529. struct acpi_dmar_pci_path {
  530. u8 device;
  531. u8 function;
  532. };
  533. /*
  534. * DMAR Subtables, correspond to Type in struct acpi_dmar_header
  535. */
  536. /* 0: Hardware Unit Definition */
  537. struct acpi_dmar_hardware_unit {
  538. struct acpi_dmar_header header;
  539. u8 flags;
  540. u8 reserved;
  541. u16 segment;
  542. u64 address; /* Register Base Address */
  543. };
  544. /* Masks for Flags field above */
  545. #define ACPI_DMAR_INCLUDE_ALL (1)
  546. /* 1: Reserved Memory Definition */
  547. struct acpi_dmar_reserved_memory {
  548. struct acpi_dmar_header header;
  549. u16 reserved;
  550. u16 segment;
  551. u64 base_address; /* 4K aligned base address */
  552. u64 end_address; /* 4K aligned limit address */
  553. };
  554. /* Masks for Flags field above */
  555. #define ACPI_DMAR_ALLOW_ALL (1)
  556. /* 2: Root Port ATS Capability Reporting Structure */
  557. struct acpi_dmar_atsr {
  558. struct acpi_dmar_header header;
  559. u8 flags;
  560. u8 reserved;
  561. u16 segment;
  562. };
  563. /* Masks for Flags field above */
  564. #define ACPI_DMAR_ALL_PORTS (1)
  565. /* 3: Remapping Hardware Static Affinity Structure */
  566. struct acpi_dmar_rhsa {
  567. struct acpi_dmar_header header;
  568. u32 reserved;
  569. u64 base_address;
  570. u32 proximity_domain;
  571. };
  572. /* 4: ACPI Namespace Device Declaration Structure */
  573. struct acpi_dmar_andd {
  574. struct acpi_dmar_header header;
  575. u8 reserved[3];
  576. u8 device_number;
  577. char device_name[1];
  578. };
  579. /* 5: SOC Integrated Address Translation Cache Reporting Structure */
  580. struct acpi_dmar_satc {
  581. struct acpi_dmar_header header;
  582. u8 flags;
  583. u8 reserved;
  584. u16 segment;
  585. };
  586. /*******************************************************************************
  587. *
  588. * DRTM - Dynamic Root of Trust for Measurement table
  589. * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
  590. * Table version 1
  591. *
  592. ******************************************************************************/
  593. struct acpi_table_drtm {
  594. struct acpi_table_header header; /* Common ACPI table header */
  595. u64 entry_base_address;
  596. u64 entry_length;
  597. u32 entry_address32;
  598. u64 entry_address64;
  599. u64 exit_address;
  600. u64 log_area_address;
  601. u32 log_area_length;
  602. u64 arch_dependent_address;
  603. u32 flags;
  604. };
  605. /* Flag Definitions for above */
  606. #define ACPI_DRTM_ACCESS_ALLOWED (1)
  607. #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
  608. #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
  609. #define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
  610. /* 1) Validated Tables List (64-bit addresses) */
  611. struct acpi_drtm_vtable_list {
  612. u32 validated_table_count;
  613. u64 validated_tables[1];
  614. };
  615. /* 2) Resources List (of Resource Descriptors) */
  616. /* Resource Descriptor */
  617. struct acpi_drtm_resource {
  618. u8 size[7];
  619. u8 type;
  620. u64 address;
  621. };
  622. struct acpi_drtm_resource_list {
  623. u32 resource_count;
  624. struct acpi_drtm_resource resources[1];
  625. };
  626. /* 3) Platform-specific Identifiers List */
  627. struct acpi_drtm_dps_id {
  628. u32 dps_id_length;
  629. u8 dps_id[16];
  630. };
  631. /*******************************************************************************
  632. *
  633. * ECDT - Embedded Controller Boot Resources Table
  634. * Version 1
  635. *
  636. ******************************************************************************/
  637. struct acpi_table_ecdt {
  638. struct acpi_table_header header; /* Common ACPI table header */
  639. struct acpi_generic_address control; /* Address of EC command/status register */
  640. struct acpi_generic_address data; /* Address of EC data register */
  641. u32 uid; /* Unique ID - must be same as the EC _UID method */
  642. u8 gpe; /* The GPE for the EC */
  643. u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
  644. };
  645. /*******************************************************************************
  646. *
  647. * EINJ - Error Injection Table (ACPI 4.0)
  648. * Version 1
  649. *
  650. ******************************************************************************/
  651. struct acpi_table_einj {
  652. struct acpi_table_header header; /* Common ACPI table header */
  653. u32 header_length;
  654. u8 flags;
  655. u8 reserved[3];
  656. u32 entries;
  657. };
  658. /* EINJ Injection Instruction Entries (actions) */
  659. struct acpi_einj_entry {
  660. struct acpi_whea_header whea_header; /* Common header for WHEA tables */
  661. };
  662. /* Masks for Flags field above */
  663. #define ACPI_EINJ_PRESERVE (1)
  664. /* Values for Action field above */
  665. enum acpi_einj_actions {
  666. ACPI_EINJ_BEGIN_OPERATION = 0,
  667. ACPI_EINJ_GET_TRIGGER_TABLE = 1,
  668. ACPI_EINJ_SET_ERROR_TYPE = 2,
  669. ACPI_EINJ_GET_ERROR_TYPE = 3,
  670. ACPI_EINJ_END_OPERATION = 4,
  671. ACPI_EINJ_EXECUTE_OPERATION = 5,
  672. ACPI_EINJ_CHECK_BUSY_STATUS = 6,
  673. ACPI_EINJ_GET_COMMAND_STATUS = 7,
  674. ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
  675. ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
  676. ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
  677. ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
  678. };
  679. /* Values for Instruction field above */
  680. enum acpi_einj_instructions {
  681. ACPI_EINJ_READ_REGISTER = 0,
  682. ACPI_EINJ_READ_REGISTER_VALUE = 1,
  683. ACPI_EINJ_WRITE_REGISTER = 2,
  684. ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
  685. ACPI_EINJ_NOOP = 4,
  686. ACPI_EINJ_FLUSH_CACHELINE = 5,
  687. ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
  688. };
  689. struct acpi_einj_error_type_with_addr {
  690. u32 error_type;
  691. u32 vendor_struct_offset;
  692. u32 flags;
  693. u32 apic_id;
  694. u64 address;
  695. u64 range;
  696. u32 pcie_id;
  697. };
  698. struct acpi_einj_vendor {
  699. u32 length;
  700. u32 pcie_id;
  701. u16 vendor_id;
  702. u16 device_id;
  703. u8 revision_id;
  704. u8 reserved[3];
  705. };
  706. /* EINJ Trigger Error Action Table */
  707. struct acpi_einj_trigger {
  708. u32 header_size;
  709. u32 revision;
  710. u32 table_size;
  711. u32 entry_count;
  712. };
  713. /* Command status return values */
  714. enum acpi_einj_command_status {
  715. ACPI_EINJ_SUCCESS = 0,
  716. ACPI_EINJ_FAILURE = 1,
  717. ACPI_EINJ_INVALID_ACCESS = 2,
  718. ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
  719. };
  720. /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
  721. #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
  722. #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
  723. #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
  724. #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
  725. #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
  726. #define ACPI_EINJ_MEMORY_FATAL (1<<5)
  727. #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
  728. #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
  729. #define ACPI_EINJ_PCIX_FATAL (1<<8)
  730. #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
  731. #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
  732. #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
  733. #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
  734. /*******************************************************************************
  735. *
  736. * ERST - Error Record Serialization Table (ACPI 4.0)
  737. * Version 1
  738. *
  739. ******************************************************************************/
  740. struct acpi_table_erst {
  741. struct acpi_table_header header; /* Common ACPI table header */
  742. u32 header_length;
  743. u32 reserved;
  744. u32 entries;
  745. };
  746. /* ERST Serialization Entries (actions) */
  747. struct acpi_erst_entry {
  748. struct acpi_whea_header whea_header; /* Common header for WHEA tables */
  749. };
  750. /* Masks for Flags field above */
  751. #define ACPI_ERST_PRESERVE (1)
  752. /* Values for Action field above */
  753. enum acpi_erst_actions {
  754. ACPI_ERST_BEGIN_WRITE = 0,
  755. ACPI_ERST_BEGIN_READ = 1,
  756. ACPI_ERST_BEGIN_CLEAR = 2,
  757. ACPI_ERST_END = 3,
  758. ACPI_ERST_SET_RECORD_OFFSET = 4,
  759. ACPI_ERST_EXECUTE_OPERATION = 5,
  760. ACPI_ERST_CHECK_BUSY_STATUS = 6,
  761. ACPI_ERST_GET_COMMAND_STATUS = 7,
  762. ACPI_ERST_GET_RECORD_ID = 8,
  763. ACPI_ERST_SET_RECORD_ID = 9,
  764. ACPI_ERST_GET_RECORD_COUNT = 10,
  765. ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
  766. ACPI_ERST_NOT_USED = 12,
  767. ACPI_ERST_GET_ERROR_RANGE = 13,
  768. ACPI_ERST_GET_ERROR_LENGTH = 14,
  769. ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
  770. ACPI_ERST_EXECUTE_TIMINGS = 16,
  771. ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
  772. };
  773. /* Values for Instruction field above */
  774. enum acpi_erst_instructions {
  775. ACPI_ERST_READ_REGISTER = 0,
  776. ACPI_ERST_READ_REGISTER_VALUE = 1,
  777. ACPI_ERST_WRITE_REGISTER = 2,
  778. ACPI_ERST_WRITE_REGISTER_VALUE = 3,
  779. ACPI_ERST_NOOP = 4,
  780. ACPI_ERST_LOAD_VAR1 = 5,
  781. ACPI_ERST_LOAD_VAR2 = 6,
  782. ACPI_ERST_STORE_VAR1 = 7,
  783. ACPI_ERST_ADD = 8,
  784. ACPI_ERST_SUBTRACT = 9,
  785. ACPI_ERST_ADD_VALUE = 10,
  786. ACPI_ERST_SUBTRACT_VALUE = 11,
  787. ACPI_ERST_STALL = 12,
  788. ACPI_ERST_STALL_WHILE_TRUE = 13,
  789. ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
  790. ACPI_ERST_GOTO = 15,
  791. ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
  792. ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
  793. ACPI_ERST_MOVE_DATA = 18,
  794. ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
  795. };
  796. /* Command status return values */
  797. enum acpi_erst_command_status {
  798. ACPI_ERST_SUCCESS = 0,
  799. ACPI_ERST_NO_SPACE = 1,
  800. ACPI_ERST_NOT_AVAILABLE = 2,
  801. ACPI_ERST_FAILURE = 3,
  802. ACPI_ERST_RECORD_EMPTY = 4,
  803. ACPI_ERST_NOT_FOUND = 5,
  804. ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
  805. };
  806. /* Error Record Serialization Information */
  807. struct acpi_erst_info {
  808. u16 signature; /* Should be "ER" */
  809. u8 data[48];
  810. };
  811. /*******************************************************************************
  812. *
  813. * FPDT - Firmware Performance Data Table (ACPI 5.0)
  814. * Version 1
  815. *
  816. ******************************************************************************/
  817. struct acpi_table_fpdt {
  818. struct acpi_table_header header; /* Common ACPI table header */
  819. };
  820. /* FPDT subtable header (Performance Record Structure) */
  821. struct acpi_fpdt_header {
  822. u16 type;
  823. u8 length;
  824. u8 revision;
  825. };
  826. /* Values for Type field above */
  827. enum acpi_fpdt_type {
  828. ACPI_FPDT_TYPE_BOOT = 0,
  829. ACPI_FPDT_TYPE_S3PERF = 1
  830. };
  831. /*
  832. * FPDT subtables
  833. */
  834. /* 0: Firmware Basic Boot Performance Record */
  835. struct acpi_fpdt_boot_pointer {
  836. struct acpi_fpdt_header header;
  837. u8 reserved[4];
  838. u64 address;
  839. };
  840. /* 1: S3 Performance Table Pointer Record */
  841. struct acpi_fpdt_s3pt_pointer {
  842. struct acpi_fpdt_header header;
  843. u8 reserved[4];
  844. u64 address;
  845. };
  846. /*
  847. * S3PT - S3 Performance Table. This table is pointed to by the
  848. * S3 Pointer Record above.
  849. */
  850. struct acpi_table_s3pt {
  851. u8 signature[4]; /* "S3PT" */
  852. u32 length;
  853. };
  854. /*
  855. * S3PT Subtables (Not part of the actual FPDT)
  856. */
  857. /* Values for Type field in S3PT header */
  858. enum acpi_s3pt_type {
  859. ACPI_S3PT_TYPE_RESUME = 0,
  860. ACPI_S3PT_TYPE_SUSPEND = 1,
  861. ACPI_FPDT_BOOT_PERFORMANCE = 2
  862. };
  863. struct acpi_s3pt_resume {
  864. struct acpi_fpdt_header header;
  865. u32 resume_count;
  866. u64 full_resume;
  867. u64 average_resume;
  868. };
  869. struct acpi_s3pt_suspend {
  870. struct acpi_fpdt_header header;
  871. u64 suspend_start;
  872. u64 suspend_end;
  873. };
  874. /*
  875. * FPDT Boot Performance Record (Not part of the actual FPDT)
  876. */
  877. struct acpi_fpdt_boot {
  878. struct acpi_fpdt_header header;
  879. u8 reserved[4];
  880. u64 reset_end;
  881. u64 load_start;
  882. u64 startup_start;
  883. u64 exit_services_entry;
  884. u64 exit_services_exit;
  885. };
  886. /*******************************************************************************
  887. *
  888. * GTDT - Generic Timer Description Table (ACPI 5.1)
  889. * Version 2
  890. *
  891. ******************************************************************************/
  892. struct acpi_table_gtdt {
  893. struct acpi_table_header header; /* Common ACPI table header */
  894. u64 counter_block_addresss;
  895. u32 reserved;
  896. u32 secure_el1_interrupt;
  897. u32 secure_el1_flags;
  898. u32 non_secure_el1_interrupt;
  899. u32 non_secure_el1_flags;
  900. u32 virtual_timer_interrupt;
  901. u32 virtual_timer_flags;
  902. u32 non_secure_el2_interrupt;
  903. u32 non_secure_el2_flags;
  904. u64 counter_read_block_address;
  905. u32 platform_timer_count;
  906. u32 platform_timer_offset;
  907. };
  908. /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
  909. #define ACPI_GTDT_INTERRUPT_MODE (1)
  910. #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
  911. #define ACPI_GTDT_ALWAYS_ON (1<<2)
  912. struct acpi_gtdt_el2 {
  913. u32 virtual_el2_timer_gsiv;
  914. u32 virtual_el2_timer_flags;
  915. };
  916. /* Common GTDT subtable header */
  917. struct acpi_gtdt_header {
  918. u8 type;
  919. u16 length;
  920. };
  921. /* Values for GTDT subtable type above */
  922. enum acpi_gtdt_type {
  923. ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
  924. ACPI_GTDT_TYPE_WATCHDOG = 1,
  925. ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
  926. };
  927. /* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */
  928. /* 0: Generic Timer Block */
  929. struct acpi_gtdt_timer_block {
  930. struct acpi_gtdt_header header;
  931. u8 reserved;
  932. u64 block_address;
  933. u32 timer_count;
  934. u32 timer_offset;
  935. };
  936. /* Timer Sub-Structure, one per timer */
  937. struct acpi_gtdt_timer_entry {
  938. u8 frame_number;
  939. u8 reserved[3];
  940. u64 base_address;
  941. u64 el0_base_address;
  942. u32 timer_interrupt;
  943. u32 timer_flags;
  944. u32 virtual_timer_interrupt;
  945. u32 virtual_timer_flags;
  946. u32 common_flags;
  947. };
  948. /* Flag Definitions: timer_flags and virtual_timer_flags above */
  949. #define ACPI_GTDT_GT_IRQ_MODE (1)
  950. #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
  951. /* Flag Definitions: common_flags above */
  952. #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
  953. #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
  954. /* 1: SBSA Generic Watchdog Structure */
  955. struct acpi_gtdt_watchdog {
  956. struct acpi_gtdt_header header;
  957. u8 reserved;
  958. u64 refresh_frame_address;
  959. u64 control_frame_address;
  960. u32 timer_interrupt;
  961. u32 timer_flags;
  962. };
  963. /* Flag Definitions: timer_flags above */
  964. #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
  965. #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
  966. #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
  967. /*******************************************************************************
  968. *
  969. * HEST - Hardware Error Source Table (ACPI 4.0)
  970. * Version 1
  971. *
  972. ******************************************************************************/
  973. struct acpi_table_hest {
  974. struct acpi_table_header header; /* Common ACPI table header */
  975. u32 error_source_count;
  976. };
  977. /* HEST subtable header */
  978. struct acpi_hest_header {
  979. u16 type;
  980. u16 source_id;
  981. };
  982. /* Values for Type field above for subtables */
  983. enum acpi_hest_types {
  984. ACPI_HEST_TYPE_IA32_CHECK = 0,
  985. ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
  986. ACPI_HEST_TYPE_IA32_NMI = 2,
  987. ACPI_HEST_TYPE_NOT_USED3 = 3,
  988. ACPI_HEST_TYPE_NOT_USED4 = 4,
  989. ACPI_HEST_TYPE_NOT_USED5 = 5,
  990. ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
  991. ACPI_HEST_TYPE_AER_ENDPOINT = 7,
  992. ACPI_HEST_TYPE_AER_BRIDGE = 8,
  993. ACPI_HEST_TYPE_GENERIC_ERROR = 9,
  994. ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
  995. ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,
  996. ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */
  997. };
  998. /*
  999. * HEST substructures contained in subtables
  1000. */
  1001. /*
  1002. * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and
  1003. * struct acpi_hest_ia_corrected structures.
  1004. */
  1005. struct acpi_hest_ia_error_bank {
  1006. u8 bank_number;
  1007. u8 clear_status_on_init;
  1008. u8 status_format;
  1009. u8 reserved;
  1010. u32 control_register;
  1011. u64 control_data;
  1012. u32 status_register;
  1013. u32 address_register;
  1014. u32 misc_register;
  1015. };
  1016. /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
  1017. struct acpi_hest_aer_common {
  1018. u16 reserved1;
  1019. u8 flags;
  1020. u8 enabled;
  1021. u32 records_to_preallocate;
  1022. u32 max_sections_per_record;
  1023. u32 bus; /* Bus and Segment numbers */
  1024. u16 device;
  1025. u16 function;
  1026. u16 device_control;
  1027. u16 reserved2;
  1028. u32 uncorrectable_mask;
  1029. u32 uncorrectable_severity;
  1030. u32 correctable_mask;
  1031. u32 advanced_capabilities;
  1032. };
  1033. /* Masks for HEST Flags fields */
  1034. #define ACPI_HEST_FIRMWARE_FIRST (1)
  1035. #define ACPI_HEST_GLOBAL (1<<1)
  1036. #define ACPI_HEST_GHES_ASSIST (1<<2)
  1037. /*
  1038. * Macros to access the bus/segment numbers in Bus field above:
  1039. * Bus number is encoded in bits 7:0
  1040. * Segment number is encoded in bits 23:8
  1041. */
  1042. #define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
  1043. #define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)
  1044. /* Hardware Error Notification */
  1045. struct acpi_hest_notify {
  1046. u8 type;
  1047. u8 length;
  1048. u16 config_write_enable;
  1049. u32 poll_interval;
  1050. u32 vector;
  1051. u32 polling_threshold_value;
  1052. u32 polling_threshold_window;
  1053. u32 error_threshold_value;
  1054. u32 error_threshold_window;
  1055. };
  1056. /* Values for Notify Type field above */
  1057. enum acpi_hest_notify_types {
  1058. ACPI_HEST_NOTIFY_POLLED = 0,
  1059. ACPI_HEST_NOTIFY_EXTERNAL = 1,
  1060. ACPI_HEST_NOTIFY_LOCAL = 2,
  1061. ACPI_HEST_NOTIFY_SCI = 3,
  1062. ACPI_HEST_NOTIFY_NMI = 4,
  1063. ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
  1064. ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
  1065. ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
  1066. ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
  1067. ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
  1068. ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
  1069. ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */
  1070. ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */
  1071. };
  1072. /* Values for config_write_enable bitfield above */
  1073. #define ACPI_HEST_TYPE (1)
  1074. #define ACPI_HEST_POLL_INTERVAL (1<<1)
  1075. #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
  1076. #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
  1077. #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
  1078. #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
  1079. /*
  1080. * HEST subtables
  1081. */
  1082. /* 0: IA32 Machine Check Exception */
  1083. struct acpi_hest_ia_machine_check {
  1084. struct acpi_hest_header header;
  1085. u16 reserved1;
  1086. u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
  1087. u8 enabled;
  1088. u32 records_to_preallocate;
  1089. u32 max_sections_per_record;
  1090. u64 global_capability_data;
  1091. u64 global_control_data;
  1092. u8 num_hardware_banks;
  1093. u8 reserved3[7];
  1094. };
  1095. /* 1: IA32 Corrected Machine Check */
  1096. struct acpi_hest_ia_corrected {
  1097. struct acpi_hest_header header;
  1098. u16 reserved1;
  1099. u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
  1100. u8 enabled;
  1101. u32 records_to_preallocate;
  1102. u32 max_sections_per_record;
  1103. struct acpi_hest_notify notify;
  1104. u8 num_hardware_banks;
  1105. u8 reserved2[3];
  1106. };
  1107. /* 2: IA32 Non-Maskable Interrupt */
  1108. struct acpi_hest_ia_nmi {
  1109. struct acpi_hest_header header;
  1110. u32 reserved;
  1111. u32 records_to_preallocate;
  1112. u32 max_sections_per_record;
  1113. u32 max_raw_data_length;
  1114. };
  1115. /* 3,4,5: Not used */
  1116. /* 6: PCI Express Root Port AER */
  1117. struct acpi_hest_aer_root {
  1118. struct acpi_hest_header header;
  1119. struct acpi_hest_aer_common aer;
  1120. u32 root_error_command;
  1121. };
  1122. /* 7: PCI Express AER (AER Endpoint) */
  1123. struct acpi_hest_aer {
  1124. struct acpi_hest_header header;
  1125. struct acpi_hest_aer_common aer;
  1126. };
  1127. /* 8: PCI Express/PCI-X Bridge AER */
  1128. struct acpi_hest_aer_bridge {
  1129. struct acpi_hest_header header;
  1130. struct acpi_hest_aer_common aer;
  1131. u32 uncorrectable_mask2;
  1132. u32 uncorrectable_severity2;
  1133. u32 advanced_capabilities2;
  1134. };
  1135. /* 9: Generic Hardware Error Source */
  1136. struct acpi_hest_generic {
  1137. struct acpi_hest_header header;
  1138. u16 related_source_id;
  1139. u8 reserved;
  1140. u8 enabled;
  1141. u32 records_to_preallocate;
  1142. u32 max_sections_per_record;
  1143. u32 max_raw_data_length;
  1144. struct acpi_generic_address error_status_address;
  1145. struct acpi_hest_notify notify;
  1146. u32 error_block_length;
  1147. };
  1148. /* 10: Generic Hardware Error Source, version 2 */
  1149. struct acpi_hest_generic_v2 {
  1150. struct acpi_hest_header header;
  1151. u16 related_source_id;
  1152. u8 reserved;
  1153. u8 enabled;
  1154. u32 records_to_preallocate;
  1155. u32 max_sections_per_record;
  1156. u32 max_raw_data_length;
  1157. struct acpi_generic_address error_status_address;
  1158. struct acpi_hest_notify notify;
  1159. u32 error_block_length;
  1160. struct acpi_generic_address read_ack_register;
  1161. u64 read_ack_preserve;
  1162. u64 read_ack_write;
  1163. };
  1164. /* Generic Error Status block */
  1165. struct acpi_hest_generic_status {
  1166. u32 block_status;
  1167. u32 raw_data_offset;
  1168. u32 raw_data_length;
  1169. u32 data_length;
  1170. u32 error_severity;
  1171. };
  1172. /* Values for block_status flags above */
  1173. #define ACPI_HEST_UNCORRECTABLE (1)
  1174. #define ACPI_HEST_CORRECTABLE (1<<1)
  1175. #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
  1176. #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
  1177. #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
  1178. /* Generic Error Data entry */
  1179. struct acpi_hest_generic_data {
  1180. u8 section_type[16];
  1181. u32 error_severity;
  1182. u16 revision;
  1183. u8 validation_bits;
  1184. u8 flags;
  1185. u32 error_data_length;
  1186. u8 fru_id[16];
  1187. u8 fru_text[20];
  1188. };
  1189. /* Extension for revision 0x0300 */
  1190. struct acpi_hest_generic_data_v300 {
  1191. u8 section_type[16];
  1192. u32 error_severity;
  1193. u16 revision;
  1194. u8 validation_bits;
  1195. u8 flags;
  1196. u32 error_data_length;
  1197. u8 fru_id[16];
  1198. u8 fru_text[20];
  1199. u64 time_stamp;
  1200. };
  1201. /* Values for error_severity above */
  1202. #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
  1203. #define ACPI_HEST_GEN_ERROR_FATAL 1
  1204. #define ACPI_HEST_GEN_ERROR_CORRECTED 2
  1205. #define ACPI_HEST_GEN_ERROR_NONE 3
  1206. /* Flags for validation_bits above */
  1207. #define ACPI_HEST_GEN_VALID_FRU_ID (1)
  1208. #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
  1209. #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
  1210. /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
  1211. struct acpi_hest_ia_deferred_check {
  1212. struct acpi_hest_header header;
  1213. u16 reserved1;
  1214. u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
  1215. u8 enabled;
  1216. u32 records_to_preallocate;
  1217. u32 max_sections_per_record;
  1218. struct acpi_hest_notify notify;
  1219. u8 num_hardware_banks;
  1220. u8 reserved2[3];
  1221. };
  1222. /*******************************************************************************
  1223. *
  1224. * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
  1225. * Version 1
  1226. *
  1227. ******************************************************************************/
  1228. struct acpi_table_hmat {
  1229. struct acpi_table_header header; /* Common ACPI table header */
  1230. u32 reserved;
  1231. };
  1232. /* Values for HMAT structure types */
  1233. enum acpi_hmat_type {
  1234. ACPI_HMAT_TYPE_PROXIMITY = 0, /* Memory proximity domain attributes */
  1235. ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
  1236. ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
  1237. ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
  1238. };
  1239. struct acpi_hmat_structure {
  1240. u16 type;
  1241. u16 reserved;
  1242. u32 length;
  1243. };
  1244. /*
  1245. * HMAT Structures, correspond to Type in struct acpi_hmat_structure
  1246. */
  1247. /* 0: Memory proximity domain attributes */
  1248. struct acpi_hmat_proximity_domain {
  1249. struct acpi_hmat_structure header;
  1250. u16 flags;
  1251. u16 reserved1;
  1252. u32 processor_PD; /* Processor proximity domain */
  1253. u32 memory_PD; /* Memory proximity domain */
  1254. u32 reserved2;
  1255. u64 reserved3;
  1256. u64 reserved4;
  1257. };
  1258. /* Masks for Flags field above */
  1259. #define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: processor_PD field is valid */
  1260. #define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: memory_PD field is valid */
  1261. #define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
  1262. /* 1: System locality latency and bandwidth information */
  1263. struct acpi_hmat_locality {
  1264. struct acpi_hmat_structure header;
  1265. u8 flags;
  1266. u8 data_type;
  1267. u8 min_transfer_size;
  1268. u8 reserved1;
  1269. u32 number_of_initiator_Pds;
  1270. u32 number_of_target_Pds;
  1271. u32 reserved2;
  1272. u64 entry_base_unit;
  1273. };
  1274. /* Masks for Flags field above */
  1275. #define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */
  1276. /* Values for Memory Hierarchy flags */
  1277. #define ACPI_HMAT_MEMORY 0
  1278. #define ACPI_HMAT_LAST_LEVEL_CACHE 1
  1279. #define ACPI_HMAT_1ST_LEVEL_CACHE 2
  1280. #define ACPI_HMAT_2ND_LEVEL_CACHE 3
  1281. #define ACPI_HMAT_3RD_LEVEL_CACHE 4
  1282. #define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */
  1283. #define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */
  1284. /* Values for data_type field above */
  1285. #define ACPI_HMAT_ACCESS_LATENCY 0
  1286. #define ACPI_HMAT_READ_LATENCY 1
  1287. #define ACPI_HMAT_WRITE_LATENCY 2
  1288. #define ACPI_HMAT_ACCESS_BANDWIDTH 3
  1289. #define ACPI_HMAT_READ_BANDWIDTH 4
  1290. #define ACPI_HMAT_WRITE_BANDWIDTH 5
  1291. /* 2: Memory side cache information */
  1292. struct acpi_hmat_cache {
  1293. struct acpi_hmat_structure header;
  1294. u32 memory_PD;
  1295. u32 reserved1;
  1296. u64 cache_size;
  1297. u32 cache_attributes;
  1298. u16 reserved2;
  1299. u16 number_of_SMBIOShandles;
  1300. };
  1301. /* Masks for cache_attributes field above */
  1302. #define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)
  1303. #define ACPI_HMAT_CACHE_LEVEL (0x000000F0)
  1304. #define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)
  1305. #define ACPI_HMAT_WRITE_POLICY (0x0000F000)
  1306. #define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)
  1307. /* Values for cache associativity flag */
  1308. #define ACPI_HMAT_CA_NONE (0)
  1309. #define ACPI_HMAT_CA_DIRECT_MAPPED (1)
  1310. #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)
  1311. /* Values for write policy flag */
  1312. #define ACPI_HMAT_CP_NONE (0)
  1313. #define ACPI_HMAT_CP_WB (1)
  1314. #define ACPI_HMAT_CP_WT (2)
  1315. /*******************************************************************************
  1316. *
  1317. * HPET - High Precision Event Timer table
  1318. * Version 1
  1319. *
  1320. * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
  1321. * Version 1.0a, October 2004
  1322. *
  1323. ******************************************************************************/
  1324. struct acpi_table_hpet {
  1325. struct acpi_table_header header; /* Common ACPI table header */
  1326. u32 id; /* Hardware ID of event timer block */
  1327. struct acpi_generic_address address; /* Address of event timer block */
  1328. u8 sequence; /* HPET sequence number */
  1329. u16 minimum_tick; /* Main counter min tick, periodic mode */
  1330. u8 flags;
  1331. };
  1332. /* Masks for Flags field above */
  1333. #define ACPI_HPET_PAGE_PROTECT_MASK (3)
  1334. /* Values for Page Protect flags */
  1335. enum acpi_hpet_page_protect {
  1336. ACPI_HPET_NO_PAGE_PROTECT = 0,
  1337. ACPI_HPET_PAGE_PROTECT4 = 1,
  1338. ACPI_HPET_PAGE_PROTECT64 = 2
  1339. };
  1340. /*******************************************************************************
  1341. *
  1342. * IBFT - Boot Firmware Table
  1343. * Version 1
  1344. *
  1345. * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
  1346. * Specification", Version 1.01, March 1, 2007
  1347. *
  1348. * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
  1349. * Therefore, it is not currently supported by the disassembler.
  1350. *
  1351. ******************************************************************************/
  1352. struct acpi_table_ibft {
  1353. struct acpi_table_header header; /* Common ACPI table header */
  1354. u8 reserved[12];
  1355. };
  1356. /* IBFT common subtable header */
  1357. struct acpi_ibft_header {
  1358. u8 type;
  1359. u8 version;
  1360. u16 length;
  1361. u8 index;
  1362. u8 flags;
  1363. };
  1364. /* Values for Type field above */
  1365. enum acpi_ibft_type {
  1366. ACPI_IBFT_TYPE_NOT_USED = 0,
  1367. ACPI_IBFT_TYPE_CONTROL = 1,
  1368. ACPI_IBFT_TYPE_INITIATOR = 2,
  1369. ACPI_IBFT_TYPE_NIC = 3,
  1370. ACPI_IBFT_TYPE_TARGET = 4,
  1371. ACPI_IBFT_TYPE_EXTENSIONS = 5,
  1372. ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  1373. };
  1374. /* IBFT subtables */
  1375. struct acpi_ibft_control {
  1376. struct acpi_ibft_header header;
  1377. u16 extensions;
  1378. u16 initiator_offset;
  1379. u16 nic0_offset;
  1380. u16 target0_offset;
  1381. u16 nic1_offset;
  1382. u16 target1_offset;
  1383. };
  1384. struct acpi_ibft_initiator {
  1385. struct acpi_ibft_header header;
  1386. u8 sns_server[16];
  1387. u8 slp_server[16];
  1388. u8 primary_server[16];
  1389. u8 secondary_server[16];
  1390. u16 name_length;
  1391. u16 name_offset;
  1392. };
  1393. struct acpi_ibft_nic {
  1394. struct acpi_ibft_header header;
  1395. u8 ip_address[16];
  1396. u8 subnet_mask_prefix;
  1397. u8 origin;
  1398. u8 gateway[16];
  1399. u8 primary_dns[16];
  1400. u8 secondary_dns[16];
  1401. u8 dhcp[16];
  1402. u16 vlan;
  1403. u8 mac_address[6];
  1404. u16 pci_address;
  1405. u16 name_length;
  1406. u16 name_offset;
  1407. };
  1408. struct acpi_ibft_target {
  1409. struct acpi_ibft_header header;
  1410. u8 target_ip_address[16];
  1411. u16 target_ip_socket;
  1412. u8 target_boot_lun[8];
  1413. u8 chap_type;
  1414. u8 nic_association;
  1415. u16 target_name_length;
  1416. u16 target_name_offset;
  1417. u16 chap_name_length;
  1418. u16 chap_name_offset;
  1419. u16 chap_secret_length;
  1420. u16 chap_secret_offset;
  1421. u16 reverse_chap_name_length;
  1422. u16 reverse_chap_name_offset;
  1423. u16 reverse_chap_secret_length;
  1424. u16 reverse_chap_secret_offset;
  1425. };
  1426. /* Reset to default packing */
  1427. #pragma pack()
  1428. #endif /* __ACTBL1_H__ */