Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * |
| 3 | * Module Name: rsdumpinfo - Tables used to display resource descriptors. |
| 4 | * |
| 5 | ******************************************************************************/ |
| 6 | |
| 7 | /* |
David E. Box | 82a8094 | 2015-02-05 15:20:45 +0800 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 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 | |
Lv Zheng | 3334861 | 2014-02-08 09:42:46 +0800 | [diff] [blame] | 51 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 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}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 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), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 193 | "Translation Offset", NULL}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 194 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.address_length), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 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}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 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), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 210 | "Translation Offset", NULL}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 211 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.address_length), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 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}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 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), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 227 | "Translation Offset", NULL}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 228 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.address_length), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 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}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 237 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.granularity), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 238 | "Granularity", NULL}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 239 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.minimum), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 240 | "Address Minimum", NULL}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 241 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.maximum), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 242 | "Address Maximum", NULL}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 243 | {ACPI_RSD_UINT64, |
| 244 | ACPI_RSD_OFFSET(ext_address64.address.translation_offset), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 245 | "Translation Offset", NULL}, |
Lv Zheng | a45de93 | 2015-01-26 16:58:56 +0800 | [diff] [blame] | 246 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.address_length), |
Bob Moore | 42f8fb7 | 2013-01-11 13:08:51 +0100 | [diff] [blame] | 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_fixed_dma[4] = { |
| 318 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma), |
| 319 | "FixedDma", NULL}, |
| 320 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.request_lines), |
| 321 | "RequestLines", NULL}, |
| 322 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.channels), "Channels", |
| 323 | NULL}, |
| 324 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_dma.width), "TransferWidth", |
| 325 | acpi_gbl_dts_decode}, |
| 326 | }; |
| 327 | |
| 328 | #define ACPI_RS_DUMP_COMMON_SERIAL_BUS \ |
| 329 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.revision_id), "RevisionId", NULL}, \ |
| 330 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \ |
| 331 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \ |
| 332 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \ |
| 333 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \ |
| 334 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \ |
| 335 | {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \ |
| 336 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \ |
| 337 | {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL}, |
| 338 | |
| 339 | struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[10] = { |
| 340 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus), |
| 341 | "Common Serial Bus", NULL}, |
| 342 | ACPI_RS_DUMP_COMMON_SERIAL_BUS |
| 343 | }; |
| 344 | |
| 345 | struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13] = { |
| 346 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus), |
| 347 | "I2C Serial Bus", NULL}, |
| 348 | ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, |
| 349 | ACPI_RSD_OFFSET(i2c_serial_bus. |
| 350 | access_mode), |
| 351 | "AccessMode", acpi_gbl_am_decode}, |
| 352 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(i2c_serial_bus.connection_speed), |
| 353 | "ConnectionSpeed", NULL}, |
| 354 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(i2c_serial_bus.slave_address), |
| 355 | "SlaveAddress", NULL}, |
| 356 | }; |
| 357 | |
| 358 | struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17] = { |
| 359 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_spi_serial_bus), |
| 360 | "Spi Serial Bus", NULL}, |
| 361 | ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, |
| 362 | ACPI_RSD_OFFSET(spi_serial_bus. |
| 363 | wire_mode), "WireMode", |
| 364 | acpi_gbl_wm_decode}, |
| 365 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(spi_serial_bus.device_polarity), |
| 366 | "DevicePolarity", acpi_gbl_dp_decode}, |
| 367 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.data_bit_length), |
| 368 | "DataBitLength", NULL}, |
| 369 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_phase), |
| 370 | "ClockPhase", acpi_gbl_cph_decode}, |
| 371 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_polarity), |
| 372 | "ClockPolarity", acpi_gbl_cpo_decode}, |
| 373 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(spi_serial_bus.device_selection), |
| 374 | "DeviceSelection", NULL}, |
| 375 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(spi_serial_bus.connection_speed), |
| 376 | "ConnectionSpeed", NULL}, |
| 377 | }; |
| 378 | |
| 379 | struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[19] = { |
| 380 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_uart_serial_bus), |
| 381 | "Uart Serial Bus", NULL}, |
| 382 | ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG, |
| 383 | ACPI_RSD_OFFSET(uart_serial_bus. |
| 384 | flow_control), |
| 385 | "FlowControl", acpi_gbl_fc_decode}, |
| 386 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.stop_bits), |
| 387 | "StopBits", acpi_gbl_sb_decode}, |
| 388 | {ACPI_RSD_3BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.data_bits), |
| 389 | "DataBits", acpi_gbl_bpb_decode}, |
| 390 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.endian), "Endian", |
| 391 | acpi_gbl_ed_decode}, |
| 392 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.parity), "Parity", |
| 393 | acpi_gbl_pt_decode}, |
| 394 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.lines_enabled), |
| 395 | "LinesEnabled", NULL}, |
| 396 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.rx_fifo_size), |
| 397 | "RxFifoSize", NULL}, |
| 398 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.tx_fifo_size), |
| 399 | "TxFifoSize", NULL}, |
| 400 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(uart_serial_bus.default_baud_rate), |
| 401 | "ConnectionSpeed", NULL}, |
| 402 | }; |
| 403 | |
| 404 | /* |
| 405 | * Tables used for common address descriptor flag fields |
| 406 | */ |
| 407 | struct acpi_rsdump_info acpi_rs_dump_general_flags[5] = { |
| 408 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_general_flags), NULL, |
| 409 | NULL}, |
| 410 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.producer_consumer), |
| 411 | "Consumer/Producer", acpi_gbl_consume_decode}, |
| 412 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.decode), "Address Decode", |
| 413 | acpi_gbl_dec_decode}, |
| 414 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.min_address_fixed), |
| 415 | "Min Relocatability", acpi_gbl_min_decode}, |
| 416 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.max_address_fixed), |
| 417 | "Max Relocatability", acpi_gbl_max_decode} |
| 418 | }; |
| 419 | |
| 420 | struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = { |
| 421 | {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags), |
| 422 | "Resource Type", (void *)"Memory Range"}, |
| 423 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect), |
| 424 | "Write Protect", acpi_gbl_rw_decode}, |
| 425 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching), |
| 426 | "Caching", acpi_gbl_mem_decode}, |
| 427 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.range_type), |
| 428 | "Range Type", acpi_gbl_mtp_decode}, |
| 429 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.translation), |
| 430 | "Translation", acpi_gbl_ttp_decode} |
| 431 | }; |
| 432 | |
| 433 | struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = { |
| 434 | {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags), |
| 435 | "Resource Type", (void *)"I/O Range"}, |
| 436 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type), |
| 437 | "Range Type", acpi_gbl_rng_decode}, |
| 438 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation), |
| 439 | "Translation", acpi_gbl_ttp_decode}, |
| 440 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation_type), |
| 441 | "Translation Type", acpi_gbl_trs_decode} |
| 442 | }; |
| 443 | |
| 444 | /* |
| 445 | * Table used to dump _PRT contents |
| 446 | */ |
| 447 | struct acpi_rsdump_info acpi_rs_dump_prt[5] = { |
| 448 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_prt), NULL, NULL}, |
| 449 | {ACPI_RSD_UINT64, ACPI_PRT_OFFSET(address), "Address", NULL}, |
| 450 | {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(pin), "Pin", NULL}, |
| 451 | {ACPI_RSD_STRING, ACPI_PRT_OFFSET(source[0]), "Source", NULL}, |
| 452 | {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(source_index), "Source Index", NULL} |
| 453 | }; |
| 454 | |
| 455 | #endif |