rsdumpinfo.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. /*******************************************************************************
  2. *
  3. * Module Name: rsdumpinfo - Tables used to display resource descriptors.
  4. *
  5. ******************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2015, 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. #include <acpi/acpi.h>
  43. #include "accommon.h"
  44. #include "acresrc.h"
  45. #define _COMPONENT ACPI_RESOURCES
  46. ACPI_MODULE_NAME("rsdumpinfo")
  47. #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
  48. #define ACPI_RSD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_resource_data,f)
  49. #define ACPI_PRT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_pci_routing_table,f)
  50. #define ACPI_RSD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_rsdump_info))
  51. /*******************************************************************************
  52. *
  53. * Resource Descriptor info tables
  54. *
  55. * Note: The first table entry must be a Title or Literal and must contain
  56. * the table length (number of table entries)
  57. *
  58. ******************************************************************************/
  59. struct acpi_rsdump_info acpi_rs_dump_irq[7] = {
  60. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_irq), "IRQ", NULL},
  61. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.descriptor_length),
  62. "Descriptor Length", NULL},
  63. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.triggering), "Triggering",
  64. acpi_gbl_he_decode},
  65. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.polarity), "Polarity",
  66. acpi_gbl_ll_decode},
  67. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(irq.sharable), "Sharing",
  68. acpi_gbl_shr_decode},
  69. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.interrupt_count),
  70. "Interrupt Count", NULL},
  71. {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(irq.interrupts[0]),
  72. "Interrupt List", NULL}
  73. };
  74. struct acpi_rsdump_info acpi_rs_dump_dma[6] = {
  75. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_dma), "DMA", NULL},
  76. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.type), "Speed",
  77. acpi_gbl_typ_decode},
  78. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(dma.bus_master), "Mastering",
  79. acpi_gbl_bm_decode},
  80. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.transfer), "Transfer Type",
  81. acpi_gbl_siz_decode},
  82. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(dma.channel_count), "Channel Count",
  83. NULL},
  84. {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(dma.channels[0]), "Channel List",
  85. NULL}
  86. };
  87. struct acpi_rsdump_info acpi_rs_dump_start_dpf[4] = {
  88. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_start_dpf),
  89. "Start-Dependent-Functions", NULL},
  90. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(start_dpf.descriptor_length),
  91. "Descriptor Length", NULL},
  92. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.compatibility_priority),
  93. "Compatibility Priority", acpi_gbl_config_decode},
  94. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.performance_robustness),
  95. "Performance/Robustness", acpi_gbl_config_decode}
  96. };
  97. struct acpi_rsdump_info acpi_rs_dump_end_dpf[1] = {
  98. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_dpf),
  99. "End-Dependent-Functions", NULL}
  100. };
  101. struct acpi_rsdump_info acpi_rs_dump_io[6] = {
  102. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io), "I/O", NULL},
  103. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(io.io_decode), "Address Decoding",
  104. acpi_gbl_io_decode},
  105. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.minimum), "Address Minimum", NULL},
  106. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.maximum), "Address Maximum", NULL},
  107. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.alignment), "Alignment", NULL},
  108. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.address_length), "Address Length",
  109. NULL}
  110. };
  111. struct acpi_rsdump_info acpi_rs_dump_fixed_io[3] = {
  112. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_io),
  113. "Fixed I/O", NULL},
  114. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_io.address), "Address", NULL},
  115. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_io.address_length),
  116. "Address Length", NULL}
  117. };
  118. struct acpi_rsdump_info acpi_rs_dump_vendor[3] = {
  119. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_vendor),
  120. "Vendor Specific", NULL},
  121. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(vendor.byte_length), "Length", NULL},
  122. {ACPI_RSD_LONGLIST, ACPI_RSD_OFFSET(vendor.byte_data[0]), "Vendor Data",
  123. NULL}
  124. };
  125. struct acpi_rsdump_info acpi_rs_dump_end_tag[1] = {
  126. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_tag), "EndTag",
  127. NULL}
  128. };
  129. struct acpi_rsdump_info acpi_rs_dump_memory24[6] = {
  130. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory24),
  131. "24-Bit Memory Range", NULL},
  132. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory24.write_protect),
  133. "Write Protect", acpi_gbl_rw_decode},
  134. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.minimum), "Address Minimum",
  135. NULL},
  136. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.maximum), "Address Maximum",
  137. NULL},
  138. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.alignment), "Alignment",
  139. NULL},
  140. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.address_length),
  141. "Address Length", NULL}
  142. };
  143. struct acpi_rsdump_info acpi_rs_dump_memory32[6] = {
  144. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory32),
  145. "32-Bit Memory Range", NULL},
  146. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory32.write_protect),
  147. "Write Protect", acpi_gbl_rw_decode},
  148. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.minimum), "Address Minimum",
  149. NULL},
  150. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.maximum), "Address Maximum",
  151. NULL},
  152. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.alignment), "Alignment",
  153. NULL},
  154. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.address_length),
  155. "Address Length", NULL}
  156. };
  157. struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[4] = {
  158. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_memory32),
  159. "32-Bit Fixed Memory Range", NULL},
  160. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(fixed_memory32.write_protect),
  161. "Write Protect", acpi_gbl_rw_decode},
  162. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address), "Address",
  163. NULL},
  164. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address_length),
  165. "Address Length", NULL}
  166. };
  167. struct acpi_rsdump_info acpi_rs_dump_address16[8] = {
  168. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address16),
  169. "16-Bit WORD Address Space", NULL},
  170. {ACPI_RSD_ADDRESS, 0, NULL, NULL},
  171. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.granularity),
  172. "Granularity", NULL},
  173. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.minimum),
  174. "Address Minimum", NULL},
  175. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.maximum),
  176. "Address Maximum", NULL},
  177. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.translation_offset),
  178. "Translation Offset", NULL},
  179. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.address_length),
  180. "Address Length", NULL},
  181. {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address16.resource_source), NULL, NULL}
  182. };
  183. struct acpi_rsdump_info acpi_rs_dump_address32[8] = {
  184. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address32),
  185. "32-Bit DWORD Address Space", NULL},
  186. {ACPI_RSD_ADDRESS, 0, NULL, NULL},
  187. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.granularity),
  188. "Granularity", NULL},
  189. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.minimum),
  190. "Address Minimum", NULL},
  191. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.maximum),
  192. "Address Maximum", NULL},
  193. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.translation_offset),
  194. "Translation Offset", NULL},
  195. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.address_length),
  196. "Address Length", NULL},
  197. {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address32.resource_source), NULL, NULL}
  198. };
  199. struct acpi_rsdump_info acpi_rs_dump_address64[8] = {
  200. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address64),
  201. "64-Bit QWORD Address Space", NULL},
  202. {ACPI_RSD_ADDRESS, 0, NULL, NULL},
  203. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.granularity),
  204. "Granularity", NULL},
  205. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.minimum),
  206. "Address Minimum", NULL},
  207. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.maximum),
  208. "Address Maximum", NULL},
  209. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.translation_offset),
  210. "Translation Offset", NULL},
  211. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.address_length),
  212. "Address Length", NULL},
  213. {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address64.resource_source), NULL, NULL}
  214. };
  215. struct acpi_rsdump_info acpi_rs_dump_ext_address64[8] = {
  216. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_address64),
  217. "64-Bit Extended Address Space", NULL},
  218. {ACPI_RSD_ADDRESS, 0, NULL, NULL},
  219. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.granularity),
  220. "Granularity", NULL},
  221. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.minimum),
  222. "Address Minimum", NULL},
  223. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.maximum),
  224. "Address Maximum", NULL},
  225. {ACPI_RSD_UINT64,
  226. ACPI_RSD_OFFSET(ext_address64.address.translation_offset),
  227. "Translation Offset", NULL},
  228. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.address_length),
  229. "Address Length", NULL},
  230. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.type_specific),
  231. "Type-Specific Attribute", NULL}
  232. };
  233. struct acpi_rsdump_info acpi_rs_dump_ext_irq[8] = {
  234. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_irq),
  235. "Extended IRQ", NULL},
  236. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.producer_consumer),
  237. "Type", acpi_gbl_consume_decode},
  238. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.triggering),
  239. "Triggering", acpi_gbl_he_decode},
  240. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.polarity), "Polarity",
  241. acpi_gbl_ll_decode},
  242. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(extended_irq.sharable), "Sharing",
  243. acpi_gbl_shr_decode},
  244. {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(extended_irq.resource_source), NULL,
  245. NULL},
  246. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(extended_irq.interrupt_count),
  247. "Interrupt Count", NULL},
  248. {ACPI_RSD_DWORDLIST, ACPI_RSD_OFFSET(extended_irq.interrupts[0]),
  249. "Interrupt List", NULL}
  250. };
  251. struct acpi_rsdump_info acpi_rs_dump_generic_reg[6] = {
  252. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_generic_reg),
  253. "Generic Register", NULL},
  254. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.space_id), "Space ID",
  255. NULL},
  256. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_width), "Bit Width",
  257. NULL},
  258. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_offset), "Bit Offset",
  259. NULL},
  260. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.access_size),
  261. "Access Size", NULL},
  262. {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(generic_reg.address), "Address", NULL}
  263. };
  264. struct acpi_rsdump_info acpi_rs_dump_gpio[16] = {
  265. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_gpio), "GPIO", NULL},
  266. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.revision_id), "RevisionId", NULL},
  267. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.connection_type),
  268. "ConnectionType", acpi_gbl_ct_decode},
  269. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.producer_consumer),
  270. "ProducerConsumer", acpi_gbl_consume_decode},
  271. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.pin_config), "PinConfig",
  272. acpi_gbl_ppc_decode},
  273. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.sharable), "Sharing",
  274. acpi_gbl_shr_decode},
  275. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.io_restriction),
  276. "IoRestriction", acpi_gbl_ior_decode},
  277. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.triggering), "Triggering",
  278. acpi_gbl_he_decode},
  279. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.polarity), "Polarity",
  280. acpi_gbl_ll_decode},
  281. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.drive_strength), "DriveStrength",
  282. NULL},
  283. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.debounce_timeout),
  284. "DebounceTimeout", NULL},
  285. {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(gpio.resource_source),
  286. "ResourceSource", NULL},
  287. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.pin_table_length),
  288. "PinTableLength", NULL},
  289. {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(gpio.pin_table), "PinTable", NULL},
  290. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.vendor_length), "VendorLength",
  291. NULL},
  292. {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(gpio.vendor_data), "VendorData",
  293. NULL},
  294. };
  295. struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = {
  296. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma),
  297. "FixedDma", NULL},
  298. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.request_lines),
  299. "RequestLines", NULL},
  300. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.channels), "Channels",
  301. NULL},
  302. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_dma.width), "TransferWidth",
  303. acpi_gbl_dts_decode},
  304. };
  305. #define ACPI_RS_DUMP_COMMON_SERIAL_BUS \
  306. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.revision_id), "RevisionId", NULL}, \
  307. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \
  308. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \
  309. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \
  310. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \
  311. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \
  312. {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \
  313. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \
  314. {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL},
  315. struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[10] = {
  316. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus),
  317. "Common Serial Bus", NULL},
  318. ACPI_RS_DUMP_COMMON_SERIAL_BUS
  319. };
  320. struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13] = {
  321. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus),
  322. "I2C Serial Bus", NULL},
  323. ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG,
  324. ACPI_RSD_OFFSET(i2c_serial_bus.
  325. access_mode),
  326. "AccessMode", acpi_gbl_am_decode},
  327. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(i2c_serial_bus.connection_speed),
  328. "ConnectionSpeed", NULL},
  329. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(i2c_serial_bus.slave_address),
  330. "SlaveAddress", NULL},
  331. };
  332. struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17] = {
  333. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_spi_serial_bus),
  334. "Spi Serial Bus", NULL},
  335. ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG,
  336. ACPI_RSD_OFFSET(spi_serial_bus.
  337. wire_mode), "WireMode",
  338. acpi_gbl_wm_decode},
  339. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(spi_serial_bus.device_polarity),
  340. "DevicePolarity", acpi_gbl_dp_decode},
  341. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.data_bit_length),
  342. "DataBitLength", NULL},
  343. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_phase),
  344. "ClockPhase", acpi_gbl_cph_decode},
  345. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_polarity),
  346. "ClockPolarity", acpi_gbl_cpo_decode},
  347. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(spi_serial_bus.device_selection),
  348. "DeviceSelection", NULL},
  349. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(spi_serial_bus.connection_speed),
  350. "ConnectionSpeed", NULL},
  351. };
  352. struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[19] = {
  353. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_uart_serial_bus),
  354. "Uart Serial Bus", NULL},
  355. ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG,
  356. ACPI_RSD_OFFSET(uart_serial_bus.
  357. flow_control),
  358. "FlowControl", acpi_gbl_fc_decode},
  359. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.stop_bits),
  360. "StopBits", acpi_gbl_sb_decode},
  361. {ACPI_RSD_3BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.data_bits),
  362. "DataBits", acpi_gbl_bpb_decode},
  363. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.endian), "Endian",
  364. acpi_gbl_ed_decode},
  365. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.parity), "Parity",
  366. acpi_gbl_pt_decode},
  367. {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.lines_enabled),
  368. "LinesEnabled", NULL},
  369. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.rx_fifo_size),
  370. "RxFifoSize", NULL},
  371. {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.tx_fifo_size),
  372. "TxFifoSize", NULL},
  373. {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(uart_serial_bus.default_baud_rate),
  374. "ConnectionSpeed", NULL},
  375. };
  376. /*
  377. * Tables used for common address descriptor flag fields
  378. */
  379. struct acpi_rsdump_info acpi_rs_dump_general_flags[5] = {
  380. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_general_flags), NULL,
  381. NULL},
  382. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.producer_consumer),
  383. "Consumer/Producer", acpi_gbl_consume_decode},
  384. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.decode), "Address Decode",
  385. acpi_gbl_dec_decode},
  386. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.min_address_fixed),
  387. "Min Relocatability", acpi_gbl_min_decode},
  388. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.max_address_fixed),
  389. "Max Relocatability", acpi_gbl_max_decode}
  390. };
  391. struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = {
  392. {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags),
  393. "Resource Type", (void *)"Memory Range"},
  394. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect),
  395. "Write Protect", acpi_gbl_rw_decode},
  396. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching),
  397. "Caching", acpi_gbl_mem_decode},
  398. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.range_type),
  399. "Range Type", acpi_gbl_mtp_decode},
  400. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.translation),
  401. "Translation", acpi_gbl_ttp_decode}
  402. };
  403. struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = {
  404. {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags),
  405. "Resource Type", (void *)"I/O Range"},
  406. {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type),
  407. "Range Type", acpi_gbl_rng_decode},
  408. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation),
  409. "Translation", acpi_gbl_ttp_decode},
  410. {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation_type),
  411. "Translation Type", acpi_gbl_trs_decode}
  412. };
  413. /*
  414. * Table used to dump _PRT contents
  415. */
  416. struct acpi_rsdump_info acpi_rs_dump_prt[5] = {
  417. {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_prt), NULL, NULL},
  418. {ACPI_RSD_UINT64, ACPI_PRT_OFFSET(address), "Address", NULL},
  419. {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(pin), "Pin", NULL},
  420. {ACPI_RSD_STRING, ACPI_PRT_OFFSET(source[0]), "Source", NULL},
  421. {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(source_index), "Source Index", NULL}
  422. };
  423. #endif