actbl1.h 48 KB

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