1 /******************************************************************************* 2 * 3 * Module Name: rsdumpinfo - Tables used to display resource descriptors. 4 * 5 ******************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2017, 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.address.granularity), 187 "Granularity", NULL}, 188 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.minimum), 189 "Address Minimum", NULL}, 190 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.maximum), 191 "Address Maximum", NULL}, 192 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.translation_offset), 193 "Translation Offset", NULL}, 194 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.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.address.granularity), 204 "Granularity", NULL}, 205 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.minimum), 206 "Address Minimum", NULL}, 207 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.maximum), 208 "Address Maximum", NULL}, 209 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.translation_offset), 210 "Translation Offset", NULL}, 211 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.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.address.granularity), 221 "Granularity", NULL}, 222 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.minimum), 223 "Address Minimum", NULL}, 224 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.maximum), 225 "Address Maximum", NULL}, 226 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.translation_offset), 227 "Translation Offset", NULL}, 228 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.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.address.granularity), 238 "Granularity", NULL}, 239 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.minimum), 240 "Address Minimum", NULL}, 241 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.maximum), 242 "Address Maximum", NULL}, 243 {ACPI_RSD_UINT64, 244 ACPI_RSD_OFFSET(ext_address64.address.translation_offset), 245 "Translation Offset", NULL}, 246 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.address_length), 247 "Address Length", NULL}, 248 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.type_specific), 249 "Type-Specific Attribute", NULL} 250 }; 251 252 struct acpi_rsdump_info acpi_rs_dump_ext_irq[8] = { 253 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_irq), 254 "Extended IRQ", NULL}, 255 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.producer_consumer), 256 "Type", acpi_gbl_consume_decode}, 257 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.triggering), 258 "Triggering", acpi_gbl_he_decode}, 259 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.polarity), "Polarity", 260 acpi_gbl_ll_decode}, 261 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(extended_irq.sharable), "Sharing", 262 acpi_gbl_shr_decode}, 263 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(extended_irq.resource_source), NULL, 264 NULL}, 265 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(extended_irq.interrupt_count), 266 "Interrupt Count", NULL}, 267 {ACPI_RSD_DWORDLIST, ACPI_RSD_OFFSET(extended_irq.interrupts[0]), 268 "Interrupt List", NULL} 269 }; 270 271 struct acpi_rsdump_info acpi_rs_dump_generic_reg[6] = { 272 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_generic_reg), 273 "Generic Register", NULL}, 274 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.space_id), "Space ID", 275 NULL}, 276 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_width), "Bit Width", 277 NULL}, 278 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_offset), "Bit Offset", 279 NULL}, 280 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.access_size), 281 "Access Size", NULL}, 282 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(generic_reg.address), "Address", NULL} 283 }; 284 285 struct acpi_rsdump_info acpi_rs_dump_gpio[16] = { 286 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_gpio), "GPIO", NULL}, 287 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.revision_id), "RevisionId", NULL}, 288 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.connection_type), 289 "ConnectionType", acpi_gbl_ct_decode}, 290 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.producer_consumer), 291 "ProducerConsumer", acpi_gbl_consume_decode}, 292 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.pin_config), "PinConfig", 293 acpi_gbl_ppc_decode}, 294 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.sharable), "Sharing", 295 acpi_gbl_shr_decode}, 296 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.io_restriction), 297 "IoRestriction", acpi_gbl_ior_decode}, 298 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.triggering), "Triggering", 299 acpi_gbl_he_decode}, 300 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.polarity), "Polarity", 301 acpi_gbl_ll_decode}, 302 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.drive_strength), "DriveStrength", 303 NULL}, 304 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.debounce_timeout), 305 "DebounceTimeout", NULL}, 306 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(gpio.resource_source), 307 "ResourceSource", NULL}, 308 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.pin_table_length), 309 "PinTableLength", NULL}, 310 {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(gpio.pin_table), "PinTable", NULL}, 311 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.vendor_length), "VendorLength", 312 NULL}, 313 {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(gpio.vendor_data), "VendorData", 314 NULL}, 315 }; 316 317 struct acpi_rsdump_info acpi_rs_dump_pin_function[10] = { 318 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_function), 319 "PinFunction", NULL}, 320 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_function.revision_id), 321 "RevisionId", NULL}, 322 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_function.pin_config), "PinConfig", 323 acpi_gbl_ppc_decode}, 324 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_function.sharable), "Sharing", 325 acpi_gbl_shr_decode}, 326 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_function.function_number), 327 "FunctionNumber", NULL}, 328 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(pin_function.resource_source), 329 "ResourceSource", NULL}, 330 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_function.pin_table_length), 331 "PinTableLength", NULL}, 332 {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(pin_function.pin_table), "PinTable", 333 NULL}, 334 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_function.vendor_length), 335 "VendorLength", NULL}, 336 {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(pin_function.vendor_data), 337 "VendorData", NULL}, 338 }; 339 340 struct acpi_rsdump_info acpi_rs_dump_pin_config[11] = { 341 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_config), 342 "PinConfig", NULL}, 343 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_config.revision_id), "RevisionId", 344 NULL}, 345 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_config.producer_consumer), 346 "ProducerConsumer", acpi_gbl_consume_decode}, 347 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_config.sharable), "Sharing", 348 acpi_gbl_shr_decode}, 349 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_config.pin_config_type), 350 "PinConfigType", NULL}, 351 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(pin_config.pin_config_value), 352 "PinConfigValue", NULL}, 353 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(pin_config.resource_source), 354 "ResourceSource", NULL}, 355 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_config.pin_table_length), 356 "PinTableLength", NULL}, 357 {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(pin_config.pin_table), "PinTable", 358 NULL}, 359 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_config.vendor_length), 360 "VendorLength", NULL}, 361 {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(pin_config.vendor_data), 362 "VendorData", NULL}, 363 }; 364 365 struct acpi_rsdump_info acpi_rs_dump_pin_group[8] = { 366 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_group), 367 "PinGroup", NULL}, 368 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_group.revision_id), "RevisionId", 369 NULL}, 370 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group.producer_consumer), 371 "ProducerConsumer", acpi_gbl_consume_decode}, 372 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_group.pin_table_length), 373 "PinTableLength", NULL}, 374 {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(pin_group.pin_table), "PinTable", 375 NULL}, 376 {ACPI_RSD_LABEL, ACPI_RSD_OFFSET(pin_group.resource_label), 377 "ResourceLabel", NULL}, 378 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_group.vendor_length), 379 "VendorLength", NULL}, 380 {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(pin_group.vendor_data), 381 "VendorData", NULL}, 382 }; 383 384 struct acpi_rsdump_info acpi_rs_dump_pin_group_function[9] = { 385 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_group_function), 386 "PinGroupFunction", NULL}, 387 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_group_function.revision_id), 388 "RevisionId", NULL}, 389 {ACPI_RSD_1BITFLAG, 390 ACPI_RSD_OFFSET(pin_group_function.producer_consumer), 391 "ProducerConsumer", acpi_gbl_consume_decode}, 392 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_function.sharable), 393 "Sharing", acpi_gbl_shr_decode}, 394 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_group_function.function_number), 395 "FunctionNumber", NULL}, 396 {ACPI_RSD_SOURCE_LABEL, 397 ACPI_RSD_OFFSET(pin_group_function.resource_source_label), 398 "ResourceSourceLabel", NULL}, 399 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(pin_group_function.resource_source), 400 "ResourceSource", NULL}, 401 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_group_function.vendor_length), 402 "VendorLength", NULL}, 403 {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(pin_group_function.vendor_data), 404 "VendorData", NULL}, 405 }; 406 407 struct acpi_rsdump_info acpi_rs_dump_pin_group_config[10] = { 408 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_group_config), 409 "PinGroupConfig", NULL}, 410 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_group_config.revision_id), 411 "RevisionId", NULL}, 412 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_config.producer_consumer), 413 "ProducerConsumer", acpi_gbl_consume_decode}, 414 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(pin_group_config.sharable), 415 "Sharing", acpi_gbl_shr_decode}, 416 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(pin_group_config.pin_config_type), 417 "PinConfigType", NULL}, 418 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(pin_group_config.pin_config_value), 419 "PinConfigValue", NULL}, 420 {ACPI_RSD_SOURCE_LABEL, 421 ACPI_RSD_OFFSET(pin_group_config.resource_source_label), 422 "ResourceSourceLabel", NULL}, 423 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(pin_group_config.resource_source), 424 "ResourceSource", NULL}, 425 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(pin_group_config.vendor_length), 426 "VendorLength", NULL}, 427 {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(pin_group_config.vendor_data), 428 "VendorData", NULL}, 429 }; 430 431 struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = { 432 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma), 433 "FixedDma", NULL}, 434 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.request_lines), 435 "RequestLines", NULL}, 436 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.channels), "Channels", 437 NULL}, 438 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_dma.width), "TransferWidth", 439 acpi_gbl_dts_decode}, 440 }; 441 442 #define ACPI_RS_DUMP_COMMON_SERIAL_BUS \ 443 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.revision_id), "RevisionId", NULL}, \ 444 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \ 445 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \ 446 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \ 447 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.connection_sharing),"ConnectionSharing", acpi_gbl_shr_decode}, \ 448 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \ 449 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \ 450 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \ 451 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \ 452 {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL}, 453 454 struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[11] = { 455 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus), 456 "Common Serial Bus", NULL}, 457 ACPI_RS_DUMP_COMMON_SERIAL_BUS 458 }; 459 460 struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[14] = { 461 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus), 462 "I2C Serial Bus", NULL}, 463 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, 464 ACPI_RSD_OFFSET(i2c_serial_bus. 465 access_mode), 466 "AccessMode", acpi_gbl_am_decode}, 467 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(i2c_serial_bus.connection_speed), 468 "ConnectionSpeed", NULL}, 469 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(i2c_serial_bus.slave_address), 470 "SlaveAddress", NULL}, 471 }; 472 473 struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[18] = { 474 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_spi_serial_bus), 475 "Spi Serial Bus", NULL}, 476 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, 477 ACPI_RSD_OFFSET(spi_serial_bus. 478 wire_mode), "WireMode", 479 acpi_gbl_wm_decode}, 480 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(spi_serial_bus.device_polarity), 481 "DevicePolarity", acpi_gbl_dp_decode}, 482 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.data_bit_length), 483 "DataBitLength", NULL}, 484 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_phase), 485 "ClockPhase", acpi_gbl_cph_decode}, 486 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_polarity), 487 "ClockPolarity", acpi_gbl_cpo_decode}, 488 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(spi_serial_bus.device_selection), 489 "DeviceSelection", NULL}, 490 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(spi_serial_bus.connection_speed), 491 "ConnectionSpeed", NULL}, 492 }; 493 494 struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[20] = { 495 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_uart_serial_bus), 496 "Uart Serial Bus", NULL}, 497 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG, 498 ACPI_RSD_OFFSET(uart_serial_bus. 499 flow_control), 500 "FlowControl", acpi_gbl_fc_decode}, 501 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.stop_bits), 502 "StopBits", acpi_gbl_sb_decode}, 503 {ACPI_RSD_3BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.data_bits), 504 "DataBits", acpi_gbl_bpb_decode}, 505 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.endian), "Endian", 506 acpi_gbl_ed_decode}, 507 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.parity), "Parity", 508 acpi_gbl_pt_decode}, 509 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.lines_enabled), 510 "LinesEnabled", NULL}, 511 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.rx_fifo_size), 512 "RxFifoSize", NULL}, 513 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.tx_fifo_size), 514 "TxFifoSize", NULL}, 515 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(uart_serial_bus.default_baud_rate), 516 "ConnectionSpeed", NULL}, 517 }; 518 519 /* 520 * Tables used for common address descriptor flag fields 521 */ 522 struct acpi_rsdump_info acpi_rs_dump_general_flags[5] = { 523 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_general_flags), NULL, 524 NULL}, 525 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.producer_consumer), 526 "Consumer/Producer", acpi_gbl_consume_decode}, 527 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.decode), "Address Decode", 528 acpi_gbl_dec_decode}, 529 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.min_address_fixed), 530 "Min Relocatability", acpi_gbl_min_decode}, 531 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.max_address_fixed), 532 "Max Relocatability", acpi_gbl_max_decode} 533 }; 534 535 struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = { 536 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags), 537 "Resource Type", (void *)"Memory Range"}, 538 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect), 539 "Write Protect", acpi_gbl_rw_decode}, 540 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching), 541 "Caching", acpi_gbl_mem_decode}, 542 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.range_type), 543 "Range Type", acpi_gbl_mtp_decode}, 544 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.translation), 545 "Translation", acpi_gbl_ttp_decode} 546 }; 547 548 struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = { 549 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags), 550 "Resource Type", (void *)"I/O Range"}, 551 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type), 552 "Range Type", acpi_gbl_rng_decode}, 553 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation), 554 "Translation", acpi_gbl_ttp_decode}, 555 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation_type), 556 "Translation Type", acpi_gbl_trs_decode} 557 }; 558 559 /* 560 * Table used to dump _PRT contents 561 */ 562 struct acpi_rsdump_info acpi_rs_dump_prt[5] = { 563 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_prt), NULL, NULL}, 564 {ACPI_RSD_UINT64, ACPI_PRT_OFFSET(address), "Address", NULL}, 565 {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(pin), "Pin", NULL}, 566 {ACPI_RSD_STRING, ACPI_PRT_OFFSET(source[0]), "Source", NULL}, 567 {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(source_index), "Source Index", NULL} 568 }; 569 570 #endif 571