actbl3.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. /******************************************************************************
  2. *
  3. * Name: actbl3.h - ACPI Table Definitions
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2016, 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 __ACTBL3_H__
  43. #define __ACTBL3_H__
  44. /*******************************************************************************
  45. *
  46. * Additional ACPI Tables (3)
  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. * In general, the tables in this file are fully defined within the ACPI
  52. * specification.
  53. *
  54. ******************************************************************************/
  55. /*
  56. * Values for description table header signatures for tables defined in this
  57. * file. Useful because they make it more difficult to inadvertently type in
  58. * the wrong signature.
  59. */
  60. #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
  61. #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
  62. #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
  63. #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
  64. #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
  65. #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
  66. #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
  67. #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
  68. #define ACPI_SIG_STAO "STAO" /* Status Override table */
  69. #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
  70. #define ACPI_SIG_XENV "XENV" /* Xen Environment table */
  71. #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
  72. #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
  73. /* Reserved table signatures */
  74. #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
  75. #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
  76. /*
  77. * All tables must be byte-packed to match the ACPI specification, since
  78. * the tables are provided by the system BIOS.
  79. */
  80. #pragma pack(1)
  81. /*
  82. * Note: C bitfields are not used for this reason:
  83. *
  84. * "Bitfields are great and easy to read, but unfortunately the C language
  85. * does not specify the layout of bitfields in memory, which means they are
  86. * essentially useless for dealing with packed data in on-disk formats or
  87. * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
  88. * this decision was a design error in C. Ritchie could have picked an order
  89. * and stuck with it." Norman Ramsey.
  90. * See http://stackoverflow.com/a/1053662/41661
  91. */
  92. /*******************************************************************************
  93. *
  94. * BGRT - Boot Graphics Resource Table (ACPI 5.0)
  95. * Version 1
  96. *
  97. ******************************************************************************/
  98. struct acpi_table_bgrt {
  99. struct acpi_table_header header; /* Common ACPI table header */
  100. u16 version;
  101. u8 status;
  102. u8 image_type;
  103. u64 image_address;
  104. u32 image_offset_x;
  105. u32 image_offset_y;
  106. };
  107. /*******************************************************************************
  108. *
  109. * DRTM - Dynamic Root of Trust for Measurement table
  110. * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
  111. * Table version 1
  112. *
  113. ******************************************************************************/
  114. struct acpi_table_drtm {
  115. struct acpi_table_header header; /* Common ACPI table header */
  116. u64 entry_base_address;
  117. u64 entry_length;
  118. u32 entry_address32;
  119. u64 entry_address64;
  120. u64 exit_address;
  121. u64 log_area_address;
  122. u32 log_area_length;
  123. u64 arch_dependent_address;
  124. u32 flags;
  125. };
  126. /* Flag Definitions for above */
  127. #define ACPI_DRTM_ACCESS_ALLOWED (1)
  128. #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
  129. #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
  130. #define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
  131. /* 1) Validated Tables List (64-bit addresses) */
  132. struct acpi_drtm_vtable_list {
  133. u32 validated_table_count;
  134. u64 validated_tables[1];
  135. };
  136. /* 2) Resources List (of Resource Descriptors) */
  137. /* Resource Descriptor */
  138. struct acpi_drtm_resource {
  139. u8 size[7];
  140. u8 type;
  141. u64 address;
  142. };
  143. struct acpi_drtm_resource_list {
  144. u32 resource_count;
  145. struct acpi_drtm_resource resources[1];
  146. };
  147. /* 3) Platform-specific Identifiers List */
  148. struct acpi_drtm_dps_id {
  149. u32 dps_id_length;
  150. u8 dps_id[16];
  151. };
  152. /*******************************************************************************
  153. *
  154. * FPDT - Firmware Performance Data Table (ACPI 5.0)
  155. * Version 1
  156. *
  157. ******************************************************************************/
  158. struct acpi_table_fpdt {
  159. struct acpi_table_header header; /* Common ACPI table header */
  160. };
  161. /* FPDT subtable header (Performance Record Structure) */
  162. struct acpi_fpdt_header {
  163. u16 type;
  164. u8 length;
  165. u8 revision;
  166. };
  167. /* Values for Type field above */
  168. enum acpi_fpdt_type {
  169. ACPI_FPDT_TYPE_BOOT = 0,
  170. ACPI_FPDT_TYPE_S3PERF = 1
  171. };
  172. /*
  173. * FPDT subtables
  174. */
  175. /* 0: Firmware Basic Boot Performance Record */
  176. struct acpi_fpdt_boot_pointer {
  177. struct acpi_fpdt_header header;
  178. u8 reserved[4];
  179. u64 address;
  180. };
  181. /* 1: S3 Performance Table Pointer Record */
  182. struct acpi_fpdt_s3pt_pointer {
  183. struct acpi_fpdt_header header;
  184. u8 reserved[4];
  185. u64 address;
  186. };
  187. /*
  188. * S3PT - S3 Performance Table. This table is pointed to by the
  189. * S3 Pointer Record above.
  190. */
  191. struct acpi_table_s3pt {
  192. u8 signature[4]; /* "S3PT" */
  193. u32 length;
  194. };
  195. /*
  196. * S3PT Subtables (Not part of the actual FPDT)
  197. */
  198. /* Values for Type field in S3PT header */
  199. enum acpi_s3pt_type {
  200. ACPI_S3PT_TYPE_RESUME = 0,
  201. ACPI_S3PT_TYPE_SUSPEND = 1,
  202. ACPI_FPDT_BOOT_PERFORMANCE = 2
  203. };
  204. struct acpi_s3pt_resume {
  205. struct acpi_fpdt_header header;
  206. u32 resume_count;
  207. u64 full_resume;
  208. u64 average_resume;
  209. };
  210. struct acpi_s3pt_suspend {
  211. struct acpi_fpdt_header header;
  212. u64 suspend_start;
  213. u64 suspend_end;
  214. };
  215. /*
  216. * FPDT Boot Performance Record (Not part of the actual FPDT)
  217. */
  218. struct acpi_fpdt_boot {
  219. struct acpi_fpdt_header header;
  220. u8 reserved[4];
  221. u64 reset_end;
  222. u64 load_start;
  223. u64 startup_start;
  224. u64 exit_services_entry;
  225. u64 exit_services_exit;
  226. };
  227. /*******************************************************************************
  228. *
  229. * GTDT - Generic Timer Description Table (ACPI 5.1)
  230. * Version 2
  231. *
  232. ******************************************************************************/
  233. struct acpi_table_gtdt {
  234. struct acpi_table_header header; /* Common ACPI table header */
  235. u64 counter_block_addresss;
  236. u32 reserved;
  237. u32 secure_el1_interrupt;
  238. u32 secure_el1_flags;
  239. u32 non_secure_el1_interrupt;
  240. u32 non_secure_el1_flags;
  241. u32 virtual_timer_interrupt;
  242. u32 virtual_timer_flags;
  243. u32 non_secure_el2_interrupt;
  244. u32 non_secure_el2_flags;
  245. u64 counter_read_block_address;
  246. u32 platform_timer_count;
  247. u32 platform_timer_offset;
  248. };
  249. /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
  250. #define ACPI_GTDT_INTERRUPT_MODE (1)
  251. #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
  252. #define ACPI_GTDT_ALWAYS_ON (1<<2)
  253. /* Common GTDT subtable header */
  254. struct acpi_gtdt_header {
  255. u8 type;
  256. u16 length;
  257. };
  258. /* Values for GTDT subtable type above */
  259. enum acpi_gtdt_type {
  260. ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
  261. ACPI_GTDT_TYPE_WATCHDOG = 1,
  262. ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
  263. };
  264. /* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */
  265. /* 0: Generic Timer Block */
  266. struct acpi_gtdt_timer_block {
  267. struct acpi_gtdt_header header;
  268. u8 reserved;
  269. u64 block_address;
  270. u32 timer_count;
  271. u32 timer_offset;
  272. };
  273. /* Timer Sub-Structure, one per timer */
  274. struct acpi_gtdt_timer_entry {
  275. u8 frame_number;
  276. u8 reserved[3];
  277. u64 base_address;
  278. u64 el0_base_address;
  279. u32 timer_interrupt;
  280. u32 timer_flags;
  281. u32 virtual_timer_interrupt;
  282. u32 virtual_timer_flags;
  283. u32 common_flags;
  284. };
  285. /* Flag Definitions: timer_flags and virtual_timer_flags above */
  286. #define ACPI_GTDT_GT_IRQ_MODE (1)
  287. #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
  288. /* Flag Definitions: common_flags above */
  289. #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
  290. #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
  291. /* 1: SBSA Generic Watchdog Structure */
  292. struct acpi_gtdt_watchdog {
  293. struct acpi_gtdt_header header;
  294. u8 reserved;
  295. u64 refresh_frame_address;
  296. u64 control_frame_address;
  297. u32 timer_interrupt;
  298. u32 timer_flags;
  299. };
  300. /* Flag Definitions: timer_flags above */
  301. #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
  302. #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
  303. #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
  304. /*******************************************************************************
  305. *
  306. * MPST - Memory Power State Table (ACPI 5.0)
  307. * Version 1
  308. *
  309. ******************************************************************************/
  310. #define ACPI_MPST_CHANNEL_INFO \
  311. u8 channel_id; \
  312. u8 reserved1[3]; \
  313. u16 power_node_count; \
  314. u16 reserved2;
  315. /* Main table */
  316. struct acpi_table_mpst {
  317. struct acpi_table_header header; /* Common ACPI table header */
  318. ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
  319. };
  320. /* Memory Platform Communication Channel Info */
  321. struct acpi_mpst_channel {
  322. ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
  323. };
  324. /* Memory Power Node Structure */
  325. struct acpi_mpst_power_node {
  326. u8 flags;
  327. u8 reserved1;
  328. u16 node_id;
  329. u32 length;
  330. u64 range_address;
  331. u64 range_length;
  332. u32 num_power_states;
  333. u32 num_physical_components;
  334. };
  335. /* Values for Flags field above */
  336. #define ACPI_MPST_ENABLED 1
  337. #define ACPI_MPST_POWER_MANAGED 2
  338. #define ACPI_MPST_HOT_PLUG_CAPABLE 4
  339. /* Memory Power State Structure (follows POWER_NODE above) */
  340. struct acpi_mpst_power_state {
  341. u8 power_state;
  342. u8 info_index;
  343. };
  344. /* Physical Component ID Structure (follows POWER_STATE above) */
  345. struct acpi_mpst_component {
  346. u16 component_id;
  347. };
  348. /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
  349. struct acpi_mpst_data_hdr {
  350. u16 characteristics_count;
  351. u16 reserved;
  352. };
  353. struct acpi_mpst_power_data {
  354. u8 structure_id;
  355. u8 flags;
  356. u16 reserved1;
  357. u32 average_power;
  358. u32 power_saving;
  359. u64 exit_latency;
  360. u64 reserved2;
  361. };
  362. /* Values for Flags field above */
  363. #define ACPI_MPST_PRESERVE 1
  364. #define ACPI_MPST_AUTOENTRY 2
  365. #define ACPI_MPST_AUTOEXIT 4
  366. /* Shared Memory Region (not part of an ACPI table) */
  367. struct acpi_mpst_shared {
  368. u32 signature;
  369. u16 pcc_command;
  370. u16 pcc_status;
  371. u32 command_register;
  372. u32 status_register;
  373. u32 power_state_id;
  374. u32 power_node_id;
  375. u64 energy_consumed;
  376. u64 average_power;
  377. };
  378. /*******************************************************************************
  379. *
  380. * PCCT - Platform Communications Channel Table (ACPI 5.0)
  381. * Version 1
  382. *
  383. ******************************************************************************/
  384. struct acpi_table_pcct {
  385. struct acpi_table_header header; /* Common ACPI table header */
  386. u32 flags;
  387. u64 reserved;
  388. };
  389. /* Values for Flags field above */
  390. #define ACPI_PCCT_DOORBELL 1
  391. /* Values for subtable type in struct acpi_subtable_header */
  392. enum acpi_pcct_type {
  393. ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
  394. ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
  395. ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
  396. ACPI_PCCT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
  397. };
  398. /*
  399. * PCCT Subtables, correspond to Type in struct acpi_subtable_header
  400. */
  401. /* 0: Generic Communications Subspace */
  402. struct acpi_pcct_subspace {
  403. struct acpi_subtable_header header;
  404. u8 reserved[6];
  405. u64 base_address;
  406. u64 length;
  407. struct acpi_generic_address doorbell_register;
  408. u64 preserve_mask;
  409. u64 write_mask;
  410. u32 latency;
  411. u32 max_access_rate;
  412. u16 min_turnaround_time;
  413. };
  414. /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
  415. struct acpi_pcct_hw_reduced {
  416. struct acpi_subtable_header header;
  417. u32 doorbell_interrupt;
  418. u8 flags;
  419. u8 reserved;
  420. u64 base_address;
  421. u64 length;
  422. struct acpi_generic_address doorbell_register;
  423. u64 preserve_mask;
  424. u64 write_mask;
  425. u32 latency;
  426. u32 max_access_rate;
  427. u16 min_turnaround_time;
  428. };
  429. /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
  430. struct acpi_pcct_hw_reduced_type2 {
  431. struct acpi_subtable_header header;
  432. u32 doorbell_interrupt;
  433. u8 flags;
  434. u8 reserved;
  435. u64 base_address;
  436. u64 length;
  437. struct acpi_generic_address doorbell_register;
  438. u64 preserve_mask;
  439. u64 write_mask;
  440. u32 latency;
  441. u32 max_access_rate;
  442. u16 min_turnaround_time;
  443. struct acpi_generic_address doorbell_ack_register;
  444. u64 ack_preserve_mask;
  445. u64 ack_write_mask;
  446. };
  447. /* Values for doorbell flags above */
  448. #define ACPI_PCCT_INTERRUPT_POLARITY (1)
  449. #define ACPI_PCCT_INTERRUPT_MODE (1<<1)
  450. /*
  451. * PCC memory structures (not part of the ACPI table)
  452. */
  453. /* Shared Memory Region */
  454. struct acpi_pcct_shared_memory {
  455. u32 signature;
  456. u16 command;
  457. u16 status;
  458. };
  459. /*******************************************************************************
  460. *
  461. * PMTT - Platform Memory Topology Table (ACPI 5.0)
  462. * Version 1
  463. *
  464. ******************************************************************************/
  465. struct acpi_table_pmtt {
  466. struct acpi_table_header header; /* Common ACPI table header */
  467. u32 reserved;
  468. };
  469. /* Common header for PMTT subtables that follow main table */
  470. struct acpi_pmtt_header {
  471. u8 type;
  472. u8 reserved1;
  473. u16 length;
  474. u16 flags;
  475. u16 reserved2;
  476. };
  477. /* Values for Type field above */
  478. #define ACPI_PMTT_TYPE_SOCKET 0
  479. #define ACPI_PMTT_TYPE_CONTROLLER 1
  480. #define ACPI_PMTT_TYPE_DIMM 2
  481. #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
  482. /* Values for Flags field above */
  483. #define ACPI_PMTT_TOP_LEVEL 0x0001
  484. #define ACPI_PMTT_PHYSICAL 0x0002
  485. #define ACPI_PMTT_MEMORY_TYPE 0x000C
  486. /*
  487. * PMTT subtables, correspond to Type in struct acpi_pmtt_header
  488. */
  489. /* 0: Socket Structure */
  490. struct acpi_pmtt_socket {
  491. struct acpi_pmtt_header header;
  492. u16 socket_id;
  493. u16 reserved;
  494. };
  495. /* 1: Memory Controller subtable */
  496. struct acpi_pmtt_controller {
  497. struct acpi_pmtt_header header;
  498. u32 read_latency;
  499. u32 write_latency;
  500. u32 read_bandwidth;
  501. u32 write_bandwidth;
  502. u16 access_width;
  503. u16 alignment;
  504. u16 reserved;
  505. u16 domain_count;
  506. };
  507. /* 1a: Proximity Domain substructure */
  508. struct acpi_pmtt_domain {
  509. u32 proximity_domain;
  510. };
  511. /* 2: Physical Component Identifier (DIMM) */
  512. struct acpi_pmtt_physical_component {
  513. struct acpi_pmtt_header header;
  514. u16 component_id;
  515. u16 reserved;
  516. u32 memory_size;
  517. u32 bios_handle;
  518. };
  519. /*******************************************************************************
  520. *
  521. * RASF - RAS Feature Table (ACPI 5.0)
  522. * Version 1
  523. *
  524. ******************************************************************************/
  525. struct acpi_table_rasf {
  526. struct acpi_table_header header; /* Common ACPI table header */
  527. u8 channel_id[12];
  528. };
  529. /* RASF Platform Communication Channel Shared Memory Region */
  530. struct acpi_rasf_shared_memory {
  531. u32 signature;
  532. u16 command;
  533. u16 status;
  534. u16 version;
  535. u8 capabilities[16];
  536. u8 set_capabilities[16];
  537. u16 num_parameter_blocks;
  538. u32 set_capabilities_status;
  539. };
  540. /* RASF Parameter Block Structure Header */
  541. struct acpi_rasf_parameter_block {
  542. u16 type;
  543. u16 version;
  544. u16 length;
  545. };
  546. /* RASF Parameter Block Structure for PATROL_SCRUB */
  547. struct acpi_rasf_patrol_scrub_parameter {
  548. struct acpi_rasf_parameter_block header;
  549. u16 patrol_scrub_command;
  550. u64 requested_address_range[2];
  551. u64 actual_address_range[2];
  552. u16 flags;
  553. u8 requested_speed;
  554. };
  555. /* Masks for Flags and Speed fields above */
  556. #define ACPI_RASF_SCRUBBER_RUNNING 1
  557. #define ACPI_RASF_SPEED (7<<1)
  558. #define ACPI_RASF_SPEED_SLOW (0<<1)
  559. #define ACPI_RASF_SPEED_MEDIUM (4<<1)
  560. #define ACPI_RASF_SPEED_FAST (7<<1)
  561. /* Channel Commands */
  562. enum acpi_rasf_commands {
  563. ACPI_RASF_EXECUTE_RASF_COMMAND = 1
  564. };
  565. /* Platform RAS Capabilities */
  566. enum acpi_rasf_capabiliities {
  567. ACPI_HW_PATROL_SCRUB_SUPPORTED = 0,
  568. ACPI_SW_PATROL_SCRUB_EXPOSED = 1
  569. };
  570. /* Patrol Scrub Commands */
  571. enum acpi_rasf_patrol_scrub_commands {
  572. ACPI_RASF_GET_PATROL_PARAMETERS = 1,
  573. ACPI_RASF_START_PATROL_SCRUBBER = 2,
  574. ACPI_RASF_STOP_PATROL_SCRUBBER = 3
  575. };
  576. /* Channel Command flags */
  577. #define ACPI_RASF_GENERATE_SCI (1<<15)
  578. /* Status values */
  579. enum acpi_rasf_status {
  580. ACPI_RASF_SUCCESS = 0,
  581. ACPI_RASF_NOT_VALID = 1,
  582. ACPI_RASF_NOT_SUPPORTED = 2,
  583. ACPI_RASF_BUSY = 3,
  584. ACPI_RASF_FAILED = 4,
  585. ACPI_RASF_ABORTED = 5,
  586. ACPI_RASF_INVALID_DATA = 6
  587. };
  588. /* Status flags */
  589. #define ACPI_RASF_COMMAND_COMPLETE (1)
  590. #define ACPI_RASF_SCI_DOORBELL (1<<1)
  591. #define ACPI_RASF_ERROR (1<<2)
  592. #define ACPI_RASF_STATUS (0x1F<<3)
  593. /*******************************************************************************
  594. *
  595. * STAO - Status Override Table (_STA override) - ACPI 6.0
  596. * Version 1
  597. *
  598. * Conforms to "ACPI Specification for Status Override Table"
  599. * 6 January 2015
  600. *
  601. ******************************************************************************/
  602. struct acpi_table_stao {
  603. struct acpi_table_header header; /* Common ACPI table header */
  604. u8 ignore_uart;
  605. };
  606. /*******************************************************************************
  607. *
  608. * WPBT - Windows Platform Environment Table (ACPI 6.0)
  609. * Version 1
  610. *
  611. * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
  612. *
  613. ******************************************************************************/
  614. struct acpi_table_wpbt {
  615. struct acpi_table_header header; /* Common ACPI table header */
  616. u32 handoff_size;
  617. u64 handoff_address;
  618. u8 layout;
  619. u8 type;
  620. u16 arguments_length;
  621. };
  622. /*******************************************************************************
  623. *
  624. * XENV - Xen Environment Table (ACPI 6.0)
  625. * Version 1
  626. *
  627. * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
  628. *
  629. ******************************************************************************/
  630. struct acpi_table_xenv {
  631. struct acpi_table_header header; /* Common ACPI table header */
  632. u64 grant_table_address;
  633. u64 grant_table_size;
  634. u32 event_interrupt;
  635. u8 event_flags;
  636. };
  637. /* Reset to default packing */
  638. #pragma pack()
  639. #endif /* __ACTBL3_H__ */