actbl1.h 40 KB

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