1 /******************************************************************************* 2 * 3 * Module Name: rsdumpinfo - Tables used to display resource descriptors. 4 * 5 ******************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2014, Intel Corp. 9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions, and the following disclaimer, 16 * without modification. 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18 * substantially similar to the "NO WARRANTY" disclaimer below 19 * ("Disclaimer") and any redistribution must be conditioned upon 20 * including a substantially similar Disclaimer requirement for further 21 * binary redistribution. 22 * 3. Neither the names of the above-listed copyright holders nor the names 23 * of any contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * Alternatively, this software may be distributed under the terms of the 27 * GNU General Public License ("GPL") version 2 as published by the Free 28 * Software Foundation. 29 * 30 * NO WARRANTY 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 * POSSIBILITY OF SUCH DAMAGES. 42 */ 43 44 #include <acpi/acpi.h> 45 #include "accommon.h" 46 #include "acresrc.h" 47 48 #define _COMPONENT ACPI_RESOURCES 49 ACPI_MODULE_NAME("rsdumpinfo") 50 51 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) 52 #define ACPI_RSD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_resource_data,f) 53 #define ACPI_PRT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_pci_routing_table,f) 54 #define ACPI_RSD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_rsdump_info)) 55 /******************************************************************************* 56 * 57 * Resource Descriptor info tables 58 * 59 * Note: The first table entry must be a Title or Literal and must contain 60 * the table length (number of table entries) 61 * 62 ******************************************************************************/ 63 struct acpi_rsdump_info acpi_rs_dump_irq[7] = { 64 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_irq), "IRQ", NULL}, 65 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.descriptor_length), 66 "Descriptor Length", NULL}, 67 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.triggering), "Triggering", 68 acpi_gbl_he_decode}, 69 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.polarity), "Polarity", 70 acpi_gbl_ll_decode}, 71 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(irq.sharable), "Sharing", 72 acpi_gbl_shr_decode}, 73 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.interrupt_count), 74 "Interrupt Count", NULL}, 75 {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(irq.interrupts[0]), 76 "Interrupt List", NULL} 77 }; 78 79 struct acpi_rsdump_info acpi_rs_dump_dma[6] = { 80 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_dma), "DMA", NULL}, 81 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.type), "Speed", 82 acpi_gbl_typ_decode}, 83 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(dma.bus_master), "Mastering", 84 acpi_gbl_bm_decode}, 85 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.transfer), "Transfer Type", 86 acpi_gbl_siz_decode}, 87 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(dma.channel_count), "Channel Count", 88 NULL}, 89 {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(dma.channels[0]), "Channel List", 90 NULL} 91 }; 92 93 struct acpi_rsdump_info acpi_rs_dump_start_dpf[4] = { 94 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_start_dpf), 95 "Start-Dependent-Functions", NULL}, 96 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(start_dpf.descriptor_length), 97 "Descriptor Length", NULL}, 98 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.compatibility_priority), 99 "Compatibility Priority", acpi_gbl_config_decode}, 100 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.performance_robustness), 101 "Performance/Robustness", acpi_gbl_config_decode} 102 }; 103 104 struct acpi_rsdump_info acpi_rs_dump_end_dpf[1] = { 105 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_dpf), 106 "End-Dependent-Functions", NULL} 107 }; 108 109 struct acpi_rsdump_info acpi_rs_dump_io[6] = { 110 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io), "I/O", NULL}, 111 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(io.io_decode), "Address Decoding", 112 acpi_gbl_io_decode}, 113 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.minimum), "Address Minimum", NULL}, 114 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.maximum), "Address Maximum", NULL}, 115 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.alignment), "Alignment", NULL}, 116 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.address_length), "Address Length", 117 NULL} 118 }; 119 120 struct acpi_rsdump_info acpi_rs_dump_fixed_io[3] = { 121 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_io), 122 "Fixed I/O", NULL}, 123 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_io.address), "Address", NULL}, 124 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_io.address_length), 125 "Address Length", NULL} 126 }; 127 128 struct acpi_rsdump_info acpi_rs_dump_vendor[3] = { 129 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_vendor), 130 "Vendor Specific", NULL}, 131 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(vendor.byte_length), "Length", NULL}, 132 {ACPI_RSD_LONGLIST, ACPI_RSD_OFFSET(vendor.byte_data[0]), "Vendor Data", 133 NULL} 134 }; 135 136 struct acpi_rsdump_info acpi_rs_dump_end_tag[1] = { 137 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_tag), "EndTag", 138 NULL} 139 }; 140 141 struct acpi_rsdump_info acpi_rs_dump_memory24[6] = { 142 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory24), 143 "24-Bit Memory Range", NULL}, 144 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory24.write_protect), 145 "Write Protect", acpi_gbl_rw_decode}, 146 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.minimum), "Address Minimum", 147 NULL}, 148 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.maximum), "Address Maximum", 149 NULL}, 150 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.alignment), "Alignment", 151 NULL}, 152 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.address_length), 153 "Address Length", NULL} 154 }; 155 156 struct acpi_rsdump_info acpi_rs_dump_memory32[6] = { 157 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory32), 158 "32-Bit Memory Range", NULL}, 159 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory32.write_protect), 160 "Write Protect", acpi_gbl_rw_decode}, 161 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.minimum), "Address Minimum", 162 NULL}, 163 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.maximum), "Address Maximum", 164 NULL}, 165 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.alignment), "Alignment", 166 NULL}, 167 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.address_length), 168 "Address Length", NULL} 169 }; 170 171 struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[4] = { 172 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_memory32), 173 "32-Bit Fixed Memory Range", NULL}, 174 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(fixed_memory32.write_protect), 175 "Write Protect", acpi_gbl_rw_decode}, 176 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address), "Address", 177 NULL}, 178 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address_length), 179 "Address Length", NULL} 180 }; 181 182 struct acpi_rsdump_info acpi_rs_dump_address16[8] = { 183 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address16), 184 "16-Bit WORD Address Space", NULL}, 185 {ACPI_RSD_ADDRESS, 0, NULL, NULL}, 186 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.granularity), "Granularity", 187 NULL}, 188 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.minimum), "Address Minimum", 189 NULL}, 190 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.maximum), "Address Maximum", 191 NULL}, 192 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.translation_offset), 193 "Translation Offset", NULL}, 194 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address_length), 195 "Address Length", NULL}, 196 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address16.resource_source), NULL, NULL} 197 }; 198 199 struct acpi_rsdump_info acpi_rs_dump_address32[8] = { 200 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address32), 201 "32-Bit DWORD Address Space", NULL}, 202 {ACPI_RSD_ADDRESS, 0, NULL, NULL}, 203 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.granularity), "Granularity", 204 NULL}, 205 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.minimum), "Address Minimum", 206 NULL}, 207 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.maximum), "Address Maximum", 208 NULL}, 209 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.translation_offset), 210 "Translation Offset", NULL}, 211 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address_length), 212 "Address Length", NULL}, 213 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address32.resource_source), NULL, NULL} 214 }; 215 216 struct acpi_rsdump_info acpi_rs_dump_address64[8] = { 217 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address64), 218 "64-Bit QWORD Address Space", NULL}, 219 {ACPI_RSD_ADDRESS, 0, NULL, NULL}, 220 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.granularity), "Granularity", 221 NULL}, 222 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.minimum), "Address Minimum", 223 NULL}, 224 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.maximum), "Address Maximum", 225 NULL}, 226 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.translation_offset), 227 "Translation Offset", NULL}, 228 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address_length), 229 "Address Length", NULL}, 230 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address64.resource_source), NULL, NULL} 231 }; 232 233 struct acpi_rsdump_info acpi_rs_dump_ext_address64[8] = { 234 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_address64), 235 "64-Bit Extended Address Space", NULL}, 236 {ACPI_RSD_ADDRESS, 0, NULL, NULL}, 237 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.granularity), 238 "Granularity", NULL}, 239 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.minimum), 240 "Address Minimum", NULL}, 241 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.maximum), 242 "Address Maximum", NULL}, 243 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.translation_offset), 244 "Translation Offset", NULL}, 245 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address_length), 246 "Address Length", NULL}, 247 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.type_specific), 248 "Type-Specific Attribute", NULL} 249 }; 250 251 struct acpi_rsdump_info acpi_rs_dump_ext_irq[8] = { 252 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_irq), 253 "Extended IRQ", NULL}, 254 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.producer_consumer), 255 "Type", acpi_gbl_consume_decode}, 256 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.triggering), 257 "Triggering", acpi_gbl_he_decode}, 258 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.polarity), "Polarity", 259 acpi_gbl_ll_decode}, 260 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(extended_irq.sharable), "Sharing", 261 acpi_gbl_shr_decode}, 262 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(extended_irq.resource_source), NULL, 263 NULL}, 264 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(extended_irq.interrupt_count), 265 "Interrupt Count", NULL}, 266 {ACPI_RSD_DWORDLIST, ACPI_RSD_OFFSET(extended_irq.interrupts[0]), 267 "Interrupt List", NULL} 268 }; 269 270 struct acpi_rsdump_info acpi_rs_dump_generic_reg[6] = { 271 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_generic_reg), 272 "Generic Register", NULL}, 273 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.space_id), "Space ID", 274 NULL}, 275 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_width), "Bit Width", 276 NULL}, 277 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_offset), "Bit Offset", 278 NULL}, 279 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.access_size), 280 "Access Size", NULL}, 281 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(generic_reg.address), "Address", NULL} 282 }; 283 284 struct acpi_rsdump_info acpi_rs_dump_gpio[16] = { 285 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_gpio), "GPIO", NULL}, 286 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.revision_id), "RevisionId", NULL}, 287 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.connection_type), 288 "ConnectionType", acpi_gbl_ct_decode}, 289 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.producer_consumer), 290 "ProducerConsumer", acpi_gbl_consume_decode}, 291 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.pin_config), "PinConfig", 292 acpi_gbl_ppc_decode}, 293 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.sharable), "Sharing", 294 acpi_gbl_shr_decode}, 295 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.io_restriction), 296 "IoRestriction", acpi_gbl_ior_decode}, 297 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.triggering), "Triggering", 298 acpi_gbl_he_decode}, 299 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.polarity), "Polarity", 300 acpi_gbl_ll_decode}, 301 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.drive_strength), "DriveStrength", 302 NULL}, 303 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.debounce_timeout), 304 "DebounceTimeout", NULL}, 305 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(gpio.resource_source), 306 "ResourceSource", NULL}, 307 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.pin_table_length), 308 "PinTableLength", NULL}, 309 {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(gpio.pin_table), "PinTable", NULL}, 310 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.vendor_length), "VendorLength", 311 NULL}, 312 {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(gpio.vendor_data), "VendorData", 313 NULL}, 314 }; 315 316 struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = { 317 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma), 318 "FixedDma", NULL}, 319 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.request_lines), 320 "RequestLines", NULL}, 321 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.channels), "Channels", 322 NULL}, 323 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_dma.width), "TransferWidth", 324 acpi_gbl_dts_decode}, 325 }; 326 327 #define ACPI_RS_DUMP_COMMON_SERIAL_BUS \ 328 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.revision_id), "RevisionId", NULL}, \ 329 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \ 330 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \ 331 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \ 332 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \ 333 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \ 334 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \ 335 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \ 336 {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL}, 337 338 struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[10] = { 339 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus), 340 "Common Serial Bus", NULL}, 341 ACPI_RS_DUMP_COMMON_SERIAL_BUS 342 }; 343 344 struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13] = { 345 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus), 346 "I2C Serial Bus", NULL}, 347 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, 348 ACPI_RSD_OFFSET(i2c_serial_bus. 349 access_mode), 350 "AccessMode", acpi_gbl_am_decode}, 351 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(i2c_serial_bus.connection_speed), 352 "ConnectionSpeed", NULL}, 353 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(i2c_serial_bus.slave_address), 354 "SlaveAddress", NULL}, 355 }; 356 357 struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17] = { 358 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_spi_serial_bus), 359 "Spi Serial Bus", NULL}, 360 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, 361 ACPI_RSD_OFFSET(spi_serial_bus. 362 wire_mode), "WireMode", 363 acpi_gbl_wm_decode}, 364 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(spi_serial_bus.device_polarity), 365 "DevicePolarity", acpi_gbl_dp_decode}, 366 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.data_bit_length), 367 "DataBitLength", NULL}, 368 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_phase), 369 "ClockPhase", acpi_gbl_cph_decode}, 370 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_polarity), 371 "ClockPolarity", acpi_gbl_cpo_decode}, 372 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(spi_serial_bus.device_selection), 373 "DeviceSelection", NULL}, 374 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(spi_serial_bus.connection_speed), 375 "ConnectionSpeed", NULL}, 376 }; 377 378 struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[19] = { 379 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_uart_serial_bus), 380 "Uart Serial Bus", NULL}, 381 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG, 382 ACPI_RSD_OFFSET(uart_serial_bus. 383 flow_control), 384 "FlowControl", acpi_gbl_fc_decode}, 385 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.stop_bits), 386 "StopBits", acpi_gbl_sb_decode}, 387 {ACPI_RSD_3BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.data_bits), 388 "DataBits", acpi_gbl_bpb_decode}, 389 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.endian), "Endian", 390 acpi_gbl_ed_decode}, 391 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.parity), "Parity", 392 acpi_gbl_pt_decode}, 393 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.lines_enabled), 394 "LinesEnabled", NULL}, 395 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.rx_fifo_size), 396 "RxFifoSize", NULL}, 397 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.tx_fifo_size), 398 "TxFifoSize", NULL}, 399 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(uart_serial_bus.default_baud_rate), 400 "ConnectionSpeed", NULL}, 401 }; 402 403 /* 404 * Tables used for common address descriptor flag fields 405 */ 406 struct acpi_rsdump_info acpi_rs_dump_general_flags[5] = { 407 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_general_flags), NULL, 408 NULL}, 409 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.producer_consumer), 410 "Consumer/Producer", acpi_gbl_consume_decode}, 411 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.decode), "Address Decode", 412 acpi_gbl_dec_decode}, 413 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.min_address_fixed), 414 "Min Relocatability", acpi_gbl_min_decode}, 415 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.max_address_fixed), 416 "Max Relocatability", acpi_gbl_max_decode} 417 }; 418 419 struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = { 420 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags), 421 "Resource Type", (void *)"Memory Range"}, 422 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect), 423 "Write Protect", acpi_gbl_rw_decode}, 424 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching), 425 "Caching", acpi_gbl_mem_decode}, 426 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.range_type), 427 "Range Type", acpi_gbl_mtp_decode}, 428 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.translation), 429 "Translation", acpi_gbl_ttp_decode} 430 }; 431 432 struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = { 433 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags), 434 "Resource Type", (void *)"I/O Range"}, 435 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type), 436 "Range Type", acpi_gbl_rng_decode}, 437 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation), 438 "Translation", acpi_gbl_ttp_decode}, 439 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation_type), 440 "Translation Type", acpi_gbl_trs_decode} 441 }; 442 443 /* 444 * Table used to dump _PRT contents 445 */ 446 struct acpi_rsdump_info acpi_rs_dump_prt[5] = { 447 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_prt), NULL, NULL}, 448 {ACPI_RSD_UINT64, ACPI_PRT_OFFSET(address), "Address", NULL}, 449 {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(pin), "Pin", NULL}, 450 {ACPI_RSD_STRING, ACPI_PRT_OFFSET(source[0]), "Source", NULL}, 451 {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(source_index), "Source Index", NULL} 452 }; 453 454 #endif 455