actbl1.h 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342
  1. /******************************************************************************
  2. *
  3. * Name: actbl1.h - Additional ACPI table definitions
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2008, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #ifndef __ACTBL1_H__
  43. #define __ACTBL1_H__
  44. /*******************************************************************************
  45. *
  46. * Additional ACPI Tables
  47. *
  48. * These tables are not consumed directly by the ACPICA subsystem, but are
  49. * included here to support device drivers and the AML disassembler.
  50. *
  51. ******************************************************************************/
  52. /*
  53. * Values for description table header signatures. Useful because they make
  54. * it more difficult to inadvertently type in the wrong signature.
  55. */
  56. #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
  57. #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
  58. #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
  59. #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
  60. #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
  61. #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
  62. #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
  63. #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
  64. #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
  65. #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
  66. #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
  67. #define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */
  68. #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
  69. #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
  70. #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
  71. #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
  72. #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
  73. #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
  74. #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
  75. #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
  76. #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
  77. #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
  78. #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
  79. #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
  80. /*
  81. * All tables must be byte-packed to match the ACPI specification, since
  82. * the tables are provided by the system BIOS.
  83. */
  84. #pragma pack(1)
  85. /*
  86. * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
  87. * This is the only type that is even remotely portable. Anything else is not
  88. * portable, so do not use any other bitfield types.
  89. */
  90. /* Common Subtable header (used in MADT, SRAT, etc.) */
  91. struct acpi_subtable_header {
  92. u8 type;
  93. u8 length;
  94. };
  95. /* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */
  96. struct acpi_whea_header {
  97. u8 action;
  98. u8 instruction;
  99. u8 flags;
  100. u8 reserved;
  101. struct acpi_generic_address register_region;
  102. u64 value; /* Value used with Read/Write register */
  103. u64 mask; /* Bitmask required for this register instruction */
  104. };
  105. /*******************************************************************************
  106. *
  107. * ASF - Alert Standard Format table (Signature "ASF!")
  108. *
  109. * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
  110. *
  111. ******************************************************************************/
  112. struct acpi_table_asf {
  113. struct acpi_table_header header; /* Common ACPI table header */
  114. };
  115. /* ASF subtable header */
  116. struct acpi_asf_header {
  117. u8 type;
  118. u8 reserved;
  119. u16 length;
  120. };
  121. /* Values for Type field above */
  122. enum acpi_asf_type {
  123. ACPI_ASF_TYPE_INFO = 0,
  124. ACPI_ASF_TYPE_ALERT = 1,
  125. ACPI_ASF_TYPE_CONTROL = 2,
  126. ACPI_ASF_TYPE_BOOT = 3,
  127. ACPI_ASF_TYPE_ADDRESS = 4,
  128. ACPI_ASF_TYPE_RESERVED = 5
  129. };
  130. /*
  131. * ASF subtables
  132. */
  133. /* 0: ASF Information */
  134. struct acpi_asf_info {
  135. struct acpi_asf_header header;
  136. u8 min_reset_value;
  137. u8 min_poll_interval;
  138. u16 system_id;
  139. u32 mfg_id;
  140. u8 flags;
  141. u8 reserved2[3];
  142. };
  143. /* 1: ASF Alerts */
  144. struct acpi_asf_alert {
  145. struct acpi_asf_header header;
  146. u8 assert_mask;
  147. u8 deassert_mask;
  148. u8 alerts;
  149. u8 data_length;
  150. };
  151. struct acpi_asf_alert_data {
  152. u8 address;
  153. u8 command;
  154. u8 mask;
  155. u8 value;
  156. u8 sensor_type;
  157. u8 type;
  158. u8 offset;
  159. u8 source_type;
  160. u8 severity;
  161. u8 sensor_number;
  162. u8 entity;
  163. u8 instance;
  164. };
  165. /* 2: ASF Remote Control */
  166. struct acpi_asf_remote {
  167. struct acpi_asf_header header;
  168. u8 controls;
  169. u8 data_length;
  170. u16 reserved2;
  171. };
  172. struct acpi_asf_control_data {
  173. u8 function;
  174. u8 address;
  175. u8 command;
  176. u8 value;
  177. };
  178. /* 3: ASF RMCP Boot Options */
  179. struct acpi_asf_rmcp {
  180. struct acpi_asf_header header;
  181. u8 capabilities[7];
  182. u8 completion_code;
  183. u32 enterprise_id;
  184. u8 command;
  185. u16 parameter;
  186. u16 boot_options;
  187. u16 oem_parameters;
  188. };
  189. /* 4: ASF Address */
  190. struct acpi_asf_address {
  191. struct acpi_asf_header header;
  192. u8 eprom_address;
  193. u8 devices;
  194. };
  195. /*******************************************************************************
  196. *
  197. * BERT - Boot Error Record Table
  198. *
  199. ******************************************************************************/
  200. struct acpi_table_bert {
  201. struct acpi_table_header header; /* Common ACPI table header */
  202. u32 region_length; /* Length of the boot error region */
  203. u64 address; /* Physical addresss of the error region */
  204. };
  205. /* Boot Error Region */
  206. struct acpi_bert_region {
  207. u32 block_status;
  208. u32 raw_data_offset;
  209. u32 raw_data_length;
  210. u32 data_length;
  211. u32 error_severity;
  212. };
  213. /* block_status Flags */
  214. #define ACPI_BERT_UNCORRECTABLE (1)
  215. #define ACPI_BERT_CORRECTABLE (2)
  216. #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (4)
  217. #define ACPI_BERT_MULTIPLE_CORRECTABLE (8)
  218. /*******************************************************************************
  219. *
  220. * BOOT - Simple Boot Flag Table
  221. *
  222. ******************************************************************************/
  223. struct acpi_table_boot {
  224. struct acpi_table_header header; /* Common ACPI table header */
  225. u8 cmos_index; /* Index in CMOS RAM for the boot register */
  226. u8 reserved[3];
  227. };
  228. /*******************************************************************************
  229. *
  230. * CPEP - Corrected Platform Error Polling table
  231. *
  232. ******************************************************************************/
  233. struct acpi_table_cpep {
  234. struct acpi_table_header header; /* Common ACPI table header */
  235. u64 reserved;
  236. };
  237. /* Subtable */
  238. struct acpi_cpep_polling {
  239. u8 type;
  240. u8 length;
  241. u8 id; /* Processor ID */
  242. u8 eid; /* Processor EID */
  243. u32 interval; /* Polling interval (msec) */
  244. };
  245. /*******************************************************************************
  246. *
  247. * DBGP - Debug Port table
  248. *
  249. ******************************************************************************/
  250. struct acpi_table_dbgp {
  251. struct acpi_table_header header; /* Common ACPI table header */
  252. u8 type; /* 0=full 16550, 1=subset of 16550 */
  253. u8 reserved[3];
  254. struct acpi_generic_address debug_port;
  255. };
  256. /*******************************************************************************
  257. *
  258. * DMAR - DMA Remapping table
  259. * From "Intel Virtualization Technology for Directed I/O", Sept. 2007
  260. *
  261. ******************************************************************************/
  262. struct acpi_table_dmar {
  263. struct acpi_table_header header; /* Common ACPI table header */
  264. u8 width; /* Host Address Width */
  265. u8 flags;
  266. u8 reserved[10];
  267. };
  268. /* Flags */
  269. #define ACPI_DMAR_INTR_REMAP (1)
  270. /* DMAR subtable header */
  271. struct acpi_dmar_header {
  272. u16 type;
  273. u16 length;
  274. };
  275. /* Values for subtable type in struct acpi_dmar_header */
  276. enum acpi_dmar_type {
  277. ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
  278. ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
  279. ACPI_DMAR_TYPE_ATSR = 2,
  280. ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */
  281. };
  282. struct acpi_dmar_device_scope {
  283. u8 entry_type;
  284. u8 length;
  285. u16 reserved;
  286. u8 enumeration_id;
  287. u8 bus;
  288. };
  289. /* Values for entry_type in struct acpi_dmar_device_scope */
  290. enum acpi_dmar_scope_type {
  291. ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
  292. ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
  293. ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
  294. ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
  295. ACPI_DMAR_SCOPE_TYPE_HPET = 4,
  296. ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
  297. };
  298. struct acpi_dmar_pci_path {
  299. u8 dev;
  300. u8 fn;
  301. };
  302. /*
  303. * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
  304. */
  305. /* 0: Hardware Unit Definition */
  306. struct acpi_dmar_hardware_unit {
  307. struct acpi_dmar_header header;
  308. u8 flags;
  309. u8 reserved;
  310. u16 segment;
  311. u64 address; /* Register Base Address */
  312. };
  313. /* Flags */
  314. #define ACPI_DMAR_INCLUDE_ALL (1)
  315. /* 1: Reserved Memory Defininition */
  316. struct acpi_dmar_reserved_memory {
  317. struct acpi_dmar_header header;
  318. u16 reserved;
  319. u16 segment;
  320. u64 base_address; /* 4_k aligned base address */
  321. u64 end_address; /* 4_k aligned limit address */
  322. };
  323. /* Flags */
  324. #define ACPI_DMAR_ALLOW_ALL (1)
  325. /* 2: Root Port ATS Capability Reporting Structure */
  326. struct acpi_dmar_atsr {
  327. struct acpi_dmar_header header;
  328. u8 flags;
  329. u8 reserved;
  330. u16 segment;
  331. };
  332. /* Flags */
  333. #define ACPI_DMAR_ALL_PORTS (1)
  334. /*******************************************************************************
  335. *
  336. * ECDT - Embedded Controller Boot Resources Table
  337. *
  338. ******************************************************************************/
  339. struct acpi_table_ecdt {
  340. struct acpi_table_header header; /* Common ACPI table header */
  341. struct acpi_generic_address control; /* Address of EC command/status register */
  342. struct acpi_generic_address data; /* Address of EC data register */
  343. u32 uid; /* Unique ID - must be same as the EC _UID method */
  344. u8 gpe; /* The GPE for the EC */
  345. u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
  346. };
  347. /*******************************************************************************
  348. *
  349. * EINJ - Error Injection Table
  350. *
  351. ******************************************************************************/
  352. struct acpi_table_einj {
  353. struct acpi_table_header header; /* Common ACPI table header */
  354. u32 header_length;
  355. u32 reserved;
  356. u32 entries;
  357. };
  358. /* EINJ Injection Instruction Entries (actions) */
  359. struct acpi_einj_entry {
  360. struct acpi_whea_header whea_header; /* Common header for WHEA tables */
  361. };
  362. /* Values for Action field above */
  363. enum acpi_einj_actions {
  364. ACPI_EINJ_BEGIN_OPERATION = 0,
  365. ACPI_EINJ_GET_TRIGGER_TABLE = 1,
  366. ACPI_EINJ_SET_ERROR_TYPE = 2,
  367. ACPI_EINJ_GET_ERROR_TYPE = 3,
  368. ACPI_EINJ_END_OPERATION = 4,
  369. ACPI_EINJ_EXECUTE_OPERATION = 5,
  370. ACPI_EINJ_CHECK_BUSY_STATUS = 6,
  371. ACPI_EINJ_GET_COMMAND_STATUS = 7,
  372. ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */
  373. ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
  374. };
  375. /* Values for Instruction field above */
  376. enum acpi_einj_instructions {
  377. ACPI_EINJ_READ_REGISTER = 0,
  378. ACPI_EINJ_READ_REGISTER_VALUE = 1,
  379. ACPI_EINJ_WRITE_REGISTER = 2,
  380. ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
  381. ACPI_EINJ_NOOP = 4,
  382. ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */
  383. };
  384. /* EINJ Trigger Error Action Table */
  385. struct acpi_einj_trigger {
  386. u32 header_size;
  387. u32 revision;
  388. u32 table_size;
  389. u32 entry_count;
  390. };
  391. /*******************************************************************************
  392. *
  393. * ERST - Error Record Serialization Table
  394. *
  395. ******************************************************************************/
  396. struct acpi_table_erst {
  397. struct acpi_table_header header; /* Common ACPI table header */
  398. u32 header_length;
  399. u32 reserved;
  400. u32 entries;
  401. };
  402. /* ERST Serialization Entries (actions) */
  403. struct acpi_erst_entry {
  404. struct acpi_whea_header whea_header; /* Common header for WHEA tables */
  405. };
  406. /* Values for Action field above */
  407. enum acpi_erst_actions {
  408. ACPI_ERST_BEGIN_WRITE_OPERATION = 0,
  409. ACPI_ERST_BEGIN_READ_OPERATION = 1,
  410. ACPI_ERST_BETGIN_CLEAR_OPERATION = 2,
  411. ACPI_ERST_END_OPERATION = 3,
  412. ACPI_ERST_SET_RECORD_OFFSET = 4,
  413. ACPI_ERST_EXECUTE_OPERATION = 5,
  414. ACPI_ERST_CHECK_BUSY_STATUS = 6,
  415. ACPI_ERST_GET_COMMAND_STATUS = 7,
  416. ACPI_ERST_GET_RECORD_IDENTIFIER = 8,
  417. ACPI_ERST_SET_RECORD_IDENTIFIER = 9,
  418. ACPI_ERST_GET_RECORD_COUNT = 10,
  419. ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
  420. ACPI_ERST_NOT_USED = 12,
  421. ACPI_ERST_GET_ERROR_RANGE = 13,
  422. ACPI_ERST_GET_ERROR_LENGTH = 14,
  423. ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
  424. ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */
  425. };
  426. /* Values for Instruction field above */
  427. enum acpi_erst_instructions {
  428. ACPI_ERST_READ_REGISTER = 0,
  429. ACPI_ERST_READ_REGISTER_VALUE = 1,
  430. ACPI_ERST_WRITE_REGISTER = 2,
  431. ACPI_ERST_WRITE_REGISTER_VALUE = 3,
  432. ACPI_ERST_NOOP = 4,
  433. ACPI_ERST_LOAD_VAR1 = 5,
  434. ACPI_ERST_LOAD_VAR2 = 6,
  435. ACPI_ERST_STORE_VAR1 = 7,
  436. ACPI_ERST_ADD = 8,
  437. ACPI_ERST_SUBTRACT = 9,
  438. ACPI_ERST_ADD_VALUE = 10,
  439. ACPI_ERST_SUBTRACT_VALUE = 11,
  440. ACPI_ERST_STALL = 12,
  441. ACPI_ERST_STALL_WHILE_TRUE = 13,
  442. ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
  443. ACPI_ERST_GOTO = 15,
  444. ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
  445. ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
  446. ACPI_ERST_MOVE_DATA = 18,
  447. ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
  448. };
  449. /*******************************************************************************
  450. *
  451. * HEST - Hardware Error Source Table
  452. *
  453. ******************************************************************************/
  454. struct acpi_table_hest {
  455. struct acpi_table_header header; /* Common ACPI table header */
  456. u32 error_source_count;
  457. };
  458. /* HEST subtable header */
  459. struct acpi_hest_header {
  460. u16 type;
  461. };
  462. /* Values for Type field above for subtables */
  463. enum acpi_hest_types {
  464. ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0,
  465. ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1,
  466. ACPI_HEST_TYPE_XPF_UNUSED = 2,
  467. ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3,
  468. ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4,
  469. ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5,
  470. ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
  471. ACPI_HEST_TYPE_AER_ENDPOINT = 7,
  472. ACPI_HEST_TYPE_AER_BRIDGE = 8,
  473. ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9,
  474. ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */
  475. };
  476. /*
  477. * HEST Sub-subtables
  478. */
  479. /* XPF Machine Check Error Bank */
  480. struct acpi_hest_xpf_error_bank {
  481. u8 bank_number;
  482. u8 clear_status_on_init;
  483. u8 status_format;
  484. u8 config_write_enable;
  485. u32 control_register;
  486. u64 control_init_data;
  487. u32 status_register;
  488. u32 address_register;
  489. u32 misc_register;
  490. };
  491. /* Generic Error Status */
  492. struct acpi_hest_generic_status {
  493. u32 block_status;
  494. u32 raw_data_offset;
  495. u32 raw_data_length;
  496. u32 data_length;
  497. u32 error_severity;
  498. };
  499. /* Generic Error Data */
  500. struct acpi_hest_generic_data {
  501. u8 section_type[16];
  502. u32 error_severity;
  503. u16 revision;
  504. u8 validation_bits;
  505. u8 flags;
  506. u32 error_data_length;
  507. u8 fru_id[16];
  508. u8 fru_text[20];
  509. };
  510. /* Common HEST structure for PCI/AER types below (6,7,8) */
  511. struct acpi_hest_aer_common {
  512. u16 source_id;
  513. u16 config_write_enable;
  514. u8 flags;
  515. u8 enabled;
  516. u32 records_to_pre_allocate;
  517. u32 max_sections_per_record;
  518. u32 bus;
  519. u16 device;
  520. u16 function;
  521. u16 device_control;
  522. u16 reserved;
  523. u32 uncorrectable_error_mask;
  524. u32 uncorrectable_error_severity;
  525. u32 correctable_error_mask;
  526. u32 advanced_error_capabilities;
  527. };
  528. /* Hardware Error Notification */
  529. struct acpi_hest_notify {
  530. u8 type;
  531. u8 length;
  532. u16 config_write_enable;
  533. u32 poll_interval;
  534. u32 vector;
  535. u32 polling_threshold_value;
  536. u32 polling_threshold_window;
  537. u32 error_threshold_value;
  538. u32 error_threshold_window;
  539. };
  540. /* Values for Notify Type field above */
  541. enum acpi_hest_notify_types {
  542. ACPI_HEST_NOTIFY_POLLED = 0,
  543. ACPI_HEST_NOTIFY_EXTERNAL = 1,
  544. ACPI_HEST_NOTIFY_LOCAL = 2,
  545. ACPI_HEST_NOTIFY_SCI = 3,
  546. ACPI_HEST_NOTIFY_NMI = 4,
  547. ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */
  548. };
  549. /*
  550. * HEST subtables
  551. *
  552. * From WHEA Design Document, 16 May 2007.
  553. * Note: There is no subtable type 2 in this version of the document,
  554. * and there are two different subtable type 3s.
  555. */
  556. /* 0: XPF Machine Check Exception */
  557. struct acpi_hest_xpf_machine_check {
  558. struct acpi_hest_header header;
  559. u16 source_id;
  560. u16 config_write_enable;
  561. u8 flags;
  562. u8 reserved1;
  563. u32 records_to_pre_allocate;
  564. u32 max_sections_per_record;
  565. u64 global_capability_data;
  566. u64 global_control_data;
  567. u8 num_hardware_banks;
  568. u8 reserved2[7];
  569. };
  570. /* 1: XPF Corrected Machine Check */
  571. struct acpi_table_hest_xpf_corrected {
  572. struct acpi_hest_header header;
  573. u16 source_id;
  574. u16 config_write_enable;
  575. u8 flags;
  576. u8 enabled;
  577. u32 records_to_pre_allocate;
  578. u32 max_sections_per_record;
  579. struct acpi_hest_notify notify;
  580. u8 num_hardware_banks;
  581. u8 reserved[3];
  582. };
  583. /* 3: XPF Non-Maskable Interrupt */
  584. struct acpi_hest_xpf_nmi {
  585. struct acpi_hest_header header;
  586. u16 source_id;
  587. u32 reserved;
  588. u32 records_to_pre_allocate;
  589. u32 max_sections_per_record;
  590. u32 max_raw_data_length;
  591. };
  592. /* 4: IPF Corrected Machine Check */
  593. struct acpi_hest_ipf_corrected {
  594. struct acpi_hest_header header;
  595. u8 enabled;
  596. u8 reserved;
  597. };
  598. /* 5: IPF Corrected Platform Error */
  599. struct acpi_hest_ipf_corrected_platform {
  600. struct acpi_hest_header header;
  601. u8 enabled;
  602. u8 reserved;
  603. };
  604. /* 6: PCI Express Root Port AER */
  605. struct acpi_hest_aer_root {
  606. struct acpi_hest_header header;
  607. struct acpi_hest_aer_common aer;
  608. u32 root_error_command;
  609. };
  610. /* 7: PCI Express AER (AER Endpoint) */
  611. struct acpi_hest_aer {
  612. struct acpi_hest_header header;
  613. struct acpi_hest_aer_common aer;
  614. };
  615. /* 8: PCI Express/PCI-X Bridge AER */
  616. struct acpi_hest_aer_bridge {
  617. struct acpi_hest_header header;
  618. struct acpi_hest_aer_common aer;
  619. u32 secondary_uncorrectable_error_mask;
  620. u32 secondary_uncorrectable_error_severity;
  621. u32 secondary_advanced_capabilities;
  622. };
  623. /* 9: Generic Hardware Error Source */
  624. struct acpi_hest_generic {
  625. struct acpi_hest_header header;
  626. u16 source_id;
  627. u16 related_source_id;
  628. u8 config_write_enable;
  629. u8 enabled;
  630. u32 records_to_pre_allocate;
  631. u32 max_sections_per_record;
  632. u32 max_raw_data_length;
  633. struct acpi_generic_address error_status_address;
  634. struct acpi_hest_notify notify;
  635. u32 error_status_block_length;
  636. };
  637. /*******************************************************************************
  638. *
  639. * HPET - High Precision Event Timer table
  640. *
  641. ******************************************************************************/
  642. struct acpi_table_hpet {
  643. struct acpi_table_header header; /* Common ACPI table header */
  644. u32 id; /* Hardware ID of event timer block */
  645. struct acpi_generic_address address; /* Address of event timer block */
  646. u8 sequence; /* HPET sequence number */
  647. u16 minimum_tick; /* Main counter min tick, periodic mode */
  648. u8 flags;
  649. };
  650. /*! Flags */
  651. #define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */
  652. #define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */
  653. #define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */
  654. /*! [End] no source code translation !*/
  655. /*******************************************************************************
  656. *
  657. * IBFT - Boot Firmware Table
  658. *
  659. ******************************************************************************/
  660. struct acpi_table_ibft {
  661. struct acpi_table_header header; /* Common ACPI table header */
  662. u8 reserved[12];
  663. };
  664. /* IBFT common subtable header */
  665. struct acpi_ibft_header {
  666. u8 type;
  667. u8 version;
  668. u16 length;
  669. u8 index;
  670. u8 flags;
  671. };
  672. /* Values for Type field above */
  673. enum acpi_ibft_type {
  674. ACPI_IBFT_TYPE_NOT_USED = 0,
  675. ACPI_IBFT_TYPE_CONTROL = 1,
  676. ACPI_IBFT_TYPE_INITIATOR = 2,
  677. ACPI_IBFT_TYPE_NIC = 3,
  678. ACPI_IBFT_TYPE_TARGET = 4,
  679. ACPI_IBFT_TYPE_EXTENSIONS = 5,
  680. ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
  681. };
  682. /* IBFT subtables */
  683. struct acpi_ibft_control {
  684. struct acpi_ibft_header header;
  685. u16 extensions;
  686. u16 initiator_offset;
  687. u16 nic0_offset;
  688. u16 target0_offset;
  689. u16 nic1_offset;
  690. u16 target1_offset;
  691. };
  692. struct acpi_ibft_initiator {
  693. struct acpi_ibft_header header;
  694. u8 sns_server[16];
  695. u8 slp_server[16];
  696. u8 primary_server[16];
  697. u8 secondary_server[16];
  698. u16 name_length;
  699. u16 name_offset;
  700. };
  701. struct acpi_ibft_nic {
  702. struct acpi_ibft_header header;
  703. u8 ip_address[16];
  704. u8 subnet_mask_prefix;
  705. u8 origin;
  706. u8 gateway[16];
  707. u8 primary_dns[16];
  708. u8 secondary_dns[16];
  709. u8 dhcp[16];
  710. u16 vlan;
  711. u8 mac_address[6];
  712. u16 pci_address;
  713. u16 name_length;
  714. u16 name_offset;
  715. };
  716. struct acpi_ibft_target {
  717. struct acpi_ibft_header header;
  718. u8 target_ip_address[16];
  719. u16 target_ip_socket;
  720. u8 target_boot_lun[8];
  721. u8 chap_type;
  722. u8 nic_association;
  723. u16 target_name_length;
  724. u16 target_name_offset;
  725. u16 chap_name_length;
  726. u16 chap_name_offset;
  727. u16 chap_secret_length;
  728. u16 chap_secret_offset;
  729. u16 reverse_chap_name_length;
  730. u16 reverse_chap_name_offset;
  731. u16 reverse_chap_secret_length;
  732. u16 reverse_chap_secret_offset;
  733. };
  734. /*******************************************************************************
  735. *
  736. * MADT - Multiple APIC Description Table
  737. *
  738. ******************************************************************************/
  739. struct acpi_table_madt {
  740. struct acpi_table_header header; /* Common ACPI table header */
  741. u32 address; /* Physical address of local APIC */
  742. u32 flags;
  743. };
  744. /* Flags */
  745. #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
  746. /* Values for PCATCompat flag */
  747. #define ACPI_MADT_DUAL_PIC 0
  748. #define ACPI_MADT_MULTIPLE_APIC 1
  749. /* Values for subtable type in struct acpi_subtable_header */
  750. enum acpi_madt_type {
  751. ACPI_MADT_TYPE_LOCAL_APIC = 0,
  752. ACPI_MADT_TYPE_IO_APIC = 1,
  753. ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
  754. ACPI_MADT_TYPE_NMI_SOURCE = 3,
  755. ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
  756. ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
  757. ACPI_MADT_TYPE_IO_SAPIC = 6,
  758. ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
  759. ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
  760. ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
  761. ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
  762. ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */
  763. };
  764. /*
  765. * MADT Sub-tables, correspond to Type in struct acpi_subtable_header
  766. */
  767. /* 0: Processor Local APIC */
  768. struct acpi_madt_local_apic {
  769. struct acpi_subtable_header header;
  770. u8 processor_id; /* ACPI processor id */
  771. u8 id; /* Processor's local APIC id */
  772. u32 lapic_flags;
  773. };
  774. /* 1: IO APIC */
  775. struct acpi_madt_io_apic {
  776. struct acpi_subtable_header header;
  777. u8 id; /* I/O APIC ID */
  778. u8 reserved; /* Reserved - must be zero */
  779. u32 address; /* APIC physical address */
  780. u32 global_irq_base; /* Global system interrupt where INTI lines start */
  781. };
  782. /* 2: Interrupt Override */
  783. struct acpi_madt_interrupt_override {
  784. struct acpi_subtable_header header;
  785. u8 bus; /* 0 - ISA */
  786. u8 source_irq; /* Interrupt source (IRQ) */
  787. u32 global_irq; /* Global system interrupt */
  788. u16 inti_flags;
  789. };
  790. /* 3: NMI Source */
  791. struct acpi_madt_nmi_source {
  792. struct acpi_subtable_header header;
  793. u16 inti_flags;
  794. u32 global_irq; /* Global system interrupt */
  795. };
  796. /* 4: Local APIC NMI */
  797. struct acpi_madt_local_apic_nmi {
  798. struct acpi_subtable_header header;
  799. u8 processor_id; /* ACPI processor id */
  800. u16 inti_flags;
  801. u8 lint; /* LINTn to which NMI is connected */
  802. };
  803. /* 5: Address Override */
  804. struct acpi_madt_local_apic_override {
  805. struct acpi_subtable_header header;
  806. u16 reserved; /* Reserved, must be zero */
  807. u64 address; /* APIC physical address */
  808. };
  809. /* 6: I/O Sapic */
  810. struct acpi_madt_io_sapic {
  811. struct acpi_subtable_header header;
  812. u8 id; /* I/O SAPIC ID */
  813. u8 reserved; /* Reserved, must be zero */
  814. u32 global_irq_base; /* Global interrupt for SAPIC start */
  815. u64 address; /* SAPIC physical address */
  816. };
  817. /* 7: Local Sapic */
  818. struct acpi_madt_local_sapic {
  819. struct acpi_subtable_header header;
  820. u8 processor_id; /* ACPI processor id */
  821. u8 id; /* SAPIC ID */
  822. u8 eid; /* SAPIC EID */
  823. u8 reserved[3]; /* Reserved, must be zero */
  824. u32 lapic_flags;
  825. u32 uid; /* Numeric UID - ACPI 3.0 */
  826. char uid_string[1]; /* String UID - ACPI 3.0 */
  827. };
  828. /* 8: Platform Interrupt Source */
  829. struct acpi_madt_interrupt_source {
  830. struct acpi_subtable_header header;
  831. u16 inti_flags;
  832. u8 type; /* 1=PMI, 2=INIT, 3=corrected */
  833. u8 id; /* Processor ID */
  834. u8 eid; /* Processor EID */
  835. u8 io_sapic_vector; /* Vector value for PMI interrupts */
  836. u32 global_irq; /* Global system interrupt */
  837. u32 flags; /* Interrupt Source Flags */
  838. };
  839. /* Flags field above */
  840. #define ACPI_MADT_CPEI_OVERRIDE (1)
  841. /* 9: Processor Local X2_APIC (07/2008) */
  842. struct acpi_madt_local_x2apic {
  843. struct acpi_subtable_header header;
  844. u16 reserved; /* Reserved - must be zero */
  845. u32 local_apic_id; /* Processor x2APIC ID */
  846. u32 lapic_flags;
  847. u32 uid; /* ACPI processor UID */
  848. };
  849. /* 10: Local X2APIC NMI (07/2008) */
  850. struct acpi_madt_local_x2apic_nmi {
  851. struct acpi_subtable_header header;
  852. u16 inti_flags;
  853. u32 uid; /* ACPI processor UID */
  854. u8 lint; /* LINTn to which NMI is connected */
  855. u8 reserved[3];
  856. };
  857. /*
  858. * Common flags fields for MADT subtables
  859. */
  860. /* MADT Local APIC flags (lapic_flags) */
  861. #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
  862. /* MADT MPS INTI flags (inti_flags) */
  863. #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
  864. #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
  865. /* Values for MPS INTI flags */
  866. #define ACPI_MADT_POLARITY_CONFORMS 0
  867. #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
  868. #define ACPI_MADT_POLARITY_RESERVED 2
  869. #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
  870. #define ACPI_MADT_TRIGGER_CONFORMS (0)
  871. #define ACPI_MADT_TRIGGER_EDGE (1<<2)
  872. #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
  873. #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
  874. /*******************************************************************************
  875. *
  876. * MCFG - PCI Memory Mapped Configuration table and sub-table
  877. *
  878. ******************************************************************************/
  879. struct acpi_table_mcfg {
  880. struct acpi_table_header header; /* Common ACPI table header */
  881. u8 reserved[8];
  882. };
  883. /* Subtable */
  884. struct acpi_mcfg_allocation {
  885. u64 address; /* Base address, processor-relative */
  886. u16 pci_segment; /* PCI segment group number */
  887. u8 start_bus_number; /* Starting PCI Bus number */
  888. u8 end_bus_number; /* Final PCI Bus number */
  889. u32 reserved;
  890. };
  891. /*******************************************************************************
  892. *
  893. * SBST - Smart Battery Specification Table
  894. *
  895. ******************************************************************************/
  896. struct acpi_table_sbst {
  897. struct acpi_table_header header; /* Common ACPI table header */
  898. u32 warning_level;
  899. u32 low_level;
  900. u32 critical_level;
  901. };
  902. /*******************************************************************************
  903. *
  904. * SLIT - System Locality Distance Information Table
  905. *
  906. ******************************************************************************/
  907. struct acpi_table_slit {
  908. struct acpi_table_header header; /* Common ACPI table header */
  909. u64 locality_count;
  910. u8 entry[1]; /* Real size = localities^2 */
  911. };
  912. /*******************************************************************************
  913. *
  914. * SPCR - Serial Port Console Redirection table
  915. *
  916. ******************************************************************************/
  917. struct acpi_table_spcr {
  918. struct acpi_table_header header; /* Common ACPI table header */
  919. u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
  920. u8 reserved[3];
  921. struct acpi_generic_address serial_port;
  922. u8 interrupt_type;
  923. u8 pc_interrupt;
  924. u32 interrupt;
  925. u8 baud_rate;
  926. u8 parity;
  927. u8 stop_bits;
  928. u8 flow_control;
  929. u8 terminal_type;
  930. u8 reserved1;
  931. u16 pci_device_id;
  932. u16 pci_vendor_id;
  933. u8 pci_bus;
  934. u8 pci_device;
  935. u8 pci_function;
  936. u32 pci_flags;
  937. u8 pci_segment;
  938. u32 reserved2;
  939. };
  940. /*******************************************************************************
  941. *
  942. * SPMI - Server Platform Management Interface table
  943. *
  944. ******************************************************************************/
  945. struct acpi_table_spmi {
  946. struct acpi_table_header header; /* Common ACPI table header */
  947. u8 reserved;
  948. u8 interface_type;
  949. u16 spec_revision; /* Version of IPMI */
  950. u8 interrupt_type;
  951. u8 gpe_number; /* GPE assigned */
  952. u8 reserved1;
  953. u8 pci_device_flag;
  954. u32 interrupt;
  955. struct acpi_generic_address ipmi_register;
  956. u8 pci_segment;
  957. u8 pci_bus;
  958. u8 pci_device;
  959. u8 pci_function;
  960. };
  961. /*******************************************************************************
  962. *
  963. * SRAT - System Resource Affinity Table
  964. *
  965. ******************************************************************************/
  966. struct acpi_table_srat {
  967. struct acpi_table_header header; /* Common ACPI table header */
  968. u32 table_revision; /* Must be value '1' */
  969. u64 reserved; /* Reserved, must be zero */
  970. };
  971. /* Values for subtable type in struct acpi_subtable_header */
  972. enum acpi_srat_type {
  973. ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
  974. ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
  975. ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
  976. ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
  977. };
  978. /*
  979. * SRAT Sub-tables, correspond to Type in struct acpi_subtable_header
  980. */
  981. /* 0: Processor Local APIC/SAPIC Affinity */
  982. struct acpi_srat_cpu_affinity {
  983. struct acpi_subtable_header header;
  984. u8 proximity_domain_lo;
  985. u8 apic_id;
  986. u32 flags;
  987. u8 local_sapic_eid;
  988. u8 proximity_domain_hi[3];
  989. u32 reserved; /* Reserved, must be zero */
  990. };
  991. /* 1: Memory Affinity */
  992. struct acpi_srat_mem_affinity {
  993. struct acpi_subtable_header header;
  994. u32 proximity_domain;
  995. u16 reserved; /* Reserved, must be zero */
  996. u64 base_address;
  997. u64 length;
  998. u32 reserved1;
  999. u32 flags;
  1000. u64 reserved2; /* Reserved, must be zero */
  1001. };
  1002. /* Flags */
  1003. #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
  1004. #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
  1005. #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
  1006. /* 2: Processor Local X2_APIC Affinity (07/2008) */
  1007. struct acpi_srat_x2apic_cpu_affinity {
  1008. struct acpi_subtable_header header;
  1009. u16 reserved; /* Reserved, must be zero */
  1010. u32 proximity_domain;
  1011. u32 apic_id;
  1012. u32 flags;
  1013. };
  1014. /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
  1015. #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
  1016. /*******************************************************************************
  1017. *
  1018. * TCPA - Trusted Computing Platform Alliance table
  1019. *
  1020. ******************************************************************************/
  1021. struct acpi_table_tcpa {
  1022. struct acpi_table_header header; /* Common ACPI table header */
  1023. u16 reserved;
  1024. u32 max_log_length; /* Maximum length for the event log area */
  1025. u64 log_address; /* Address of the event log area */
  1026. };
  1027. /*******************************************************************************
  1028. *
  1029. * UEFI - UEFI Boot optimization Table
  1030. *
  1031. ******************************************************************************/
  1032. struct acpi_table_uefi {
  1033. struct acpi_table_header header; /* Common ACPI table header */
  1034. u8 identifier[16]; /* UUID identifier */
  1035. u16 data_offset; /* Offset of remaining data in table */
  1036. u8 data;
  1037. };
  1038. /*******************************************************************************
  1039. *
  1040. * WDAT - Watchdog Action Table
  1041. *
  1042. ******************************************************************************/
  1043. struct acpi_table_wdat {
  1044. struct acpi_table_header header; /* Common ACPI table header */
  1045. u32 header_length; /* Watchdog Header Length */
  1046. u16 pci_segment; /* PCI Segment number */
  1047. u8 pci_bus; /* PCI Bus number */
  1048. u8 pci_device; /* PCI Device number */
  1049. u8 pci_function; /* PCI Function number */
  1050. u8 reserved[3];
  1051. u32 timer_period; /* Period of one timer count (msec) */
  1052. u32 max_count; /* Maximum counter value supported */
  1053. u32 min_count; /* Minimum counter value */
  1054. u8 flags;
  1055. u8 reserved2[3];
  1056. u32 entries; /* Number of watchdog entries that follow */
  1057. };
  1058. /* WDAT Instruction Entries (actions) */
  1059. struct acpi_wdat_entry {
  1060. struct acpi_whea_header whea_header; /* Common header for WHEA tables */
  1061. };
  1062. /* Values for Action field above */
  1063. enum acpi_wdat_actions {
  1064. ACPI_WDAT_RESET = 1,
  1065. ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
  1066. ACPI_WDAT_GET_COUNTDOWN = 5,
  1067. ACPI_WDAT_SET_COUNTDOWN = 6,
  1068. ACPI_WDAT_GET_RUNNING_STATE = 8,
  1069. ACPI_WDAT_SET_RUNNING_STATE = 9,
  1070. ACPI_WDAT_GET_STOPPED_STATE = 10,
  1071. ACPI_WDAT_SET_STOPPED_STATE = 11,
  1072. ACPI_WDAT_GET_REBOOT = 16,
  1073. ACPI_WDAT_SET_REBOOT = 17,
  1074. ACPI_WDAT_GET_SHUTDOWN = 18,
  1075. ACPI_WDAT_SET_SHUTDOWN = 19,
  1076. ACPI_WDAT_GET_STATUS = 32,
  1077. ACPI_WDAT_SET_STATUS = 33,
  1078. ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
  1079. };
  1080. /* Values for Instruction field above */
  1081. enum acpi_wdat_instructions {
  1082. ACPI_WDAT_READ_VALUE = 0,
  1083. ACPI_WDAT_READ_COUNTDOWN = 1,
  1084. ACPI_WDAT_WRITE_VALUE = 2,
  1085. ACPI_WDAT_WRITE_COUNTDOWN = 3,
  1086. ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
  1087. ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
  1088. };
  1089. /*******************************************************************************
  1090. *
  1091. * WDRT - Watchdog Resource Table
  1092. *
  1093. ******************************************************************************/
  1094. struct acpi_table_wdrt {
  1095. struct acpi_table_header header; /* Common ACPI table header */
  1096. u32 header_length; /* Watchdog Header Length */
  1097. u8 pci_segment; /* PCI Segment number */
  1098. u8 pci_bus; /* PCI Bus number */
  1099. u8 pci_device; /* PCI Device number */
  1100. u8 pci_function; /* PCI Function number */
  1101. u32 timer_period; /* Period of one timer count (msec) */
  1102. u32 max_count; /* Maximum counter value supported */
  1103. u32 min_count; /* Minimum counter value */
  1104. u8 flags;
  1105. u8 reserved[3];
  1106. u32 entries; /* Number of watchdog entries that follow */
  1107. };
  1108. /* Flags */
  1109. #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */
  1110. /* Reset to default packing */
  1111. #pragma pack()
  1112. #endif /* __ACTBL1_H__ */