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