blob: 1935dab2ab5164b2bdf09ea1d26235eb0fb8d0f4 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*******************************************************************************
2 *
3 * Module Name: rsdump - Functions to display the resource structures.
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
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
45#include <acpi/acpi.h>
46#include <acpi/acresrc.h>
47
48#define _COMPONENT ACPI_RESOURCES
49 ACPI_MODULE_NAME ("rsdump")
50
Robert Moore44f6c012005-04-18 22:49:35 -040051/* Local prototypes */
52
53static void
54acpi_rs_dump_irq (
55 union acpi_resource_data *data);
56
57static void
58acpi_rs_dump_address16 (
59 union acpi_resource_data *data);
60
61static void
62acpi_rs_dump_address32 (
63 union acpi_resource_data *data);
64
65static void
66acpi_rs_dump_address64 (
67 union acpi_resource_data *data);
68
69static void
70acpi_rs_dump_dma (
71 union acpi_resource_data *data);
72
73static void
74acpi_rs_dump_io (
75 union acpi_resource_data *data);
76
77static void
78acpi_rs_dump_extended_irq (
79 union acpi_resource_data *data);
80
81static void
82acpi_rs_dump_fixed_io (
83 union acpi_resource_data *data);
84
85static void
86acpi_rs_dump_fixed_memory32 (
87 union acpi_resource_data *data);
88
89static void
90acpi_rs_dump_memory24 (
91 union acpi_resource_data *data);
92
93static void
94acpi_rs_dump_memory32 (
95 union acpi_resource_data *data);
96
97static void
98acpi_rs_dump_start_depend_fns (
99 union acpi_resource_data *data);
100
101static void
102acpi_rs_dump_vendor_specific (
103 union acpi_resource_data *data);
104
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105
106#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107/*******************************************************************************
108 *
109 * FUNCTION: acpi_rs_dump_irq
110 *
111 * PARAMETERS: Data - pointer to the resource structure to dump.
112 *
113 * RETURN: None
114 *
115 * DESCRIPTION: Prints out the various members of the Data structure type.
116 *
117 ******************************************************************************/
118
Robert Moore44f6c012005-04-18 22:49:35 -0400119static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120acpi_rs_dump_irq (
121 union acpi_resource_data *data)
122{
123 struct acpi_resource_irq *irq_data = (struct acpi_resource_irq *) data;
124 u8 index = 0;
125
126
127 ACPI_FUNCTION_ENTRY ();
128
129
130 acpi_os_printf ("IRQ Resource\n");
131
132 acpi_os_printf (" %s Triggered\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400133 ACPI_LEVEL_SENSITIVE == irq_data->edge_level ? "Level" : "Edge");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134
135 acpi_os_printf (" Active %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400136 ACPI_ACTIVE_LOW == irq_data->active_high_low ? "Low" : "High");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137
138 acpi_os_printf (" %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400139 ACPI_SHARED == irq_data->shared_exclusive ? "Shared" : "Exclusive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700140
141 acpi_os_printf (" %X Interrupts ( ", irq_data->number_of_interrupts);
142
143 for (index = 0; index < irq_data->number_of_interrupts; index++) {
144 acpi_os_printf ("%X ", irq_data->interrupts[index]);
145 }
146
147 acpi_os_printf (")\n");
148 return;
149}
150
151
152/*******************************************************************************
153 *
154 * FUNCTION: acpi_rs_dump_dma
155 *
156 * PARAMETERS: Data - pointer to the resource structure to dump.
157 *
158 * RETURN: None
159 *
160 * DESCRIPTION: Prints out the various members of the Data structure type.
161 *
162 ******************************************************************************/
163
Robert Moore44f6c012005-04-18 22:49:35 -0400164static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165acpi_rs_dump_dma (
166 union acpi_resource_data *data)
167{
168 struct acpi_resource_dma *dma_data = (struct acpi_resource_dma *) data;
169 u8 index = 0;
170
171
172 ACPI_FUNCTION_ENTRY ();
173
174
175 acpi_os_printf ("DMA Resource\n");
176
177 switch (dma_data->type) {
178 case ACPI_COMPATIBILITY:
179 acpi_os_printf (" Compatibility mode\n");
180 break;
181
182 case ACPI_TYPE_A:
183 acpi_os_printf (" Type A\n");
184 break;
185
186 case ACPI_TYPE_B:
187 acpi_os_printf (" Type B\n");
188 break;
189
190 case ACPI_TYPE_F:
191 acpi_os_printf (" Type F\n");
192 break;
193
194 default:
195 acpi_os_printf (" Invalid DMA type\n");
196 break;
197 }
198
199 acpi_os_printf (" %sBus Master\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400200 ACPI_BUS_MASTER == dma_data->bus_master ? "" : "Not a ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201
202
203 switch (dma_data->transfer) {
204 case ACPI_TRANSFER_8:
205 acpi_os_printf (" 8-bit only transfer\n");
206 break;
207
208 case ACPI_TRANSFER_8_16:
209 acpi_os_printf (" 8 and 16-bit transfer\n");
210 break;
211
212 case ACPI_TRANSFER_16:
213 acpi_os_printf (" 16 bit only transfer\n");
214 break;
215
216 default:
217 acpi_os_printf (" Invalid transfer preference\n");
218 break;
219 }
220
Robert Moore44f6c012005-04-18 22:49:35 -0400221 acpi_os_printf (" Number of Channels: %X ( ",
222 dma_data->number_of_channels);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223
224 for (index = 0; index < dma_data->number_of_channels; index++) {
225 acpi_os_printf ("%X ", dma_data->channels[index]);
226 }
227
228 acpi_os_printf (")\n");
229 return;
230}
231
232
233/*******************************************************************************
234 *
235 * FUNCTION: acpi_rs_dump_start_depend_fns
236 *
237 * PARAMETERS: Data - pointer to the resource structure to dump.
238 *
239 * RETURN: None
240 *
241 * DESCRIPTION: Prints out the various members of the Data structure type.
242 *
243 ******************************************************************************/
244
Robert Moore44f6c012005-04-18 22:49:35 -0400245static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700246acpi_rs_dump_start_depend_fns (
247 union acpi_resource_data *data)
248{
249 struct acpi_resource_start_dpf *sdf_data = (struct acpi_resource_start_dpf *) data;
250
251
252 ACPI_FUNCTION_ENTRY ();
253
254
255 acpi_os_printf ("Start Dependent Functions Resource\n");
256
257 switch (sdf_data->compatibility_priority) {
258 case ACPI_GOOD_CONFIGURATION:
259 acpi_os_printf (" Good configuration\n");
260 break;
261
262 case ACPI_ACCEPTABLE_CONFIGURATION:
263 acpi_os_printf (" Acceptable configuration\n");
264 break;
265
266 case ACPI_SUB_OPTIMAL_CONFIGURATION:
267 acpi_os_printf (" Sub-optimal configuration\n");
268 break;
269
270 default:
271 acpi_os_printf (" Invalid compatibility priority\n");
272 break;
273 }
274
275 switch(sdf_data->performance_robustness) {
276 case ACPI_GOOD_CONFIGURATION:
277 acpi_os_printf (" Good configuration\n");
278 break;
279
280 case ACPI_ACCEPTABLE_CONFIGURATION:
281 acpi_os_printf (" Acceptable configuration\n");
282 break;
283
284 case ACPI_SUB_OPTIMAL_CONFIGURATION:
285 acpi_os_printf (" Sub-optimal configuration\n");
286 break;
287
288 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400289 acpi_os_printf (" Invalid performance robustness preference\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700290 break;
291 }
292
293 return;
294}
295
296
297/*******************************************************************************
298 *
299 * FUNCTION: acpi_rs_dump_io
300 *
301 * PARAMETERS: Data - pointer to the resource structure to dump.
302 *
303 * RETURN: None
304 *
305 * DESCRIPTION: Prints out the various members of the Data structure type.
306 *
307 ******************************************************************************/
308
Robert Moore44f6c012005-04-18 22:49:35 -0400309static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700310acpi_rs_dump_io (
311 union acpi_resource_data *data)
312{
313 struct acpi_resource_io *io_data = (struct acpi_resource_io *) data;
314
315
316 ACPI_FUNCTION_ENTRY ();
317
318
319 acpi_os_printf ("Io Resource\n");
320
321 acpi_os_printf (" %d bit decode\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400322 ACPI_DECODE_16 == io_data->io_decode ? 16 : 10);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700323
Robert Moore44f6c012005-04-18 22:49:35 -0400324 acpi_os_printf (" Range minimum base: %08X\n", io_data->min_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700325
Robert Moore44f6c012005-04-18 22:49:35 -0400326 acpi_os_printf (" Range maximum base: %08X\n", io_data->max_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700327
Robert Moore44f6c012005-04-18 22:49:35 -0400328 acpi_os_printf (" Alignment: %08X\n", io_data->alignment);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700329
Robert Moore44f6c012005-04-18 22:49:35 -0400330 acpi_os_printf (" Range Length: %08X\n", io_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700331
332 return;
333}
334
335
336/*******************************************************************************
337 *
338 * FUNCTION: acpi_rs_dump_fixed_io
339 *
340 * PARAMETERS: Data - pointer to the resource structure to dump.
341 *
342 * RETURN: None
343 *
344 * DESCRIPTION: Prints out the various members of the Data structure type.
345 *
346 ******************************************************************************/
347
Robert Moore44f6c012005-04-18 22:49:35 -0400348static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700349acpi_rs_dump_fixed_io (
350 union acpi_resource_data *data)
351{
352 struct acpi_resource_fixed_io *fixed_io_data = (struct acpi_resource_fixed_io *) data;
353
354
355 ACPI_FUNCTION_ENTRY ();
356
357
358 acpi_os_printf ("Fixed Io Resource\n");
Robert Moore44f6c012005-04-18 22:49:35 -0400359 acpi_os_printf (" Range base address: %08X", fixed_io_data->base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700360
Robert Moore44f6c012005-04-18 22:49:35 -0400361 acpi_os_printf (" Range length: %08X", fixed_io_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700362
363 return;
364}
365
366
367/*******************************************************************************
368 *
369 * FUNCTION: acpi_rs_dump_vendor_specific
370 *
371 * PARAMETERS: Data - pointer to the resource structure to dump.
372 *
373 * RETURN: None
374 *
375 * DESCRIPTION: Prints out the various members of the Data structure type.
376 *
377 ******************************************************************************/
378
Robert Moore44f6c012005-04-18 22:49:35 -0400379static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700380acpi_rs_dump_vendor_specific (
381 union acpi_resource_data *data)
382{
383 struct acpi_resource_vendor *vendor_data = (struct acpi_resource_vendor *) data;
384 u16 index = 0;
385
386
387 ACPI_FUNCTION_ENTRY ();
388
389
390 acpi_os_printf ("Vendor Specific Resource\n");
391
392 acpi_os_printf (" Length: %08X\n", vendor_data->length);
393
394 for (index = 0; index < vendor_data->length; index++) {
395 acpi_os_printf (" Byte %X: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400396 index, vendor_data->reserved[index]);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700397 }
398
399 return;
400}
401
402
403/*******************************************************************************
404 *
405 * FUNCTION: acpi_rs_dump_memory24
406 *
407 * PARAMETERS: Data - pointer to the resource structure to dump.
408 *
409 * RETURN: None
410 *
411 * DESCRIPTION: Prints out the various members of the Data structure type.
412 *
413 ******************************************************************************/
414
Robert Moore44f6c012005-04-18 22:49:35 -0400415static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700416acpi_rs_dump_memory24 (
417 union acpi_resource_data *data)
418{
419 struct acpi_resource_mem24 *memory24_data = (struct acpi_resource_mem24 *) data;
420
421
422 ACPI_FUNCTION_ENTRY ();
423
424
425 acpi_os_printf ("24-Bit Memory Range Resource\n");
426
427 acpi_os_printf (" Read%s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400428 ACPI_READ_WRITE_MEMORY ==
429 memory24_data->read_write_attribute ?
430 "/Write" : " only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431
432 acpi_os_printf (" Range minimum base: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400433 memory24_data->min_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700434
435 acpi_os_printf (" Range maximum base: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400436 memory24_data->max_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700437
Robert Moore44f6c012005-04-18 22:49:35 -0400438 acpi_os_printf (" Alignment: %08X\n", memory24_data->alignment);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439
Robert Moore44f6c012005-04-18 22:49:35 -0400440 acpi_os_printf (" Range length: %08X\n", memory24_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700441
442 return;
443}
444
445
446/*******************************************************************************
447 *
448 * FUNCTION: acpi_rs_dump_memory32
449 *
450 * PARAMETERS: Data - pointer to the resource structure to dump.
451 *
452 * RETURN: None
453 *
454 * DESCRIPTION: Prints out the various members of the Data structure type.
455 *
456 ******************************************************************************/
457
Robert Moore44f6c012005-04-18 22:49:35 -0400458static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700459acpi_rs_dump_memory32 (
460 union acpi_resource_data *data)
461{
462 struct acpi_resource_mem32 *memory32_data = (struct acpi_resource_mem32 *) data;
463
464
465 ACPI_FUNCTION_ENTRY ();
466
467
468 acpi_os_printf ("32-Bit Memory Range Resource\n");
469
470 acpi_os_printf (" Read%s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400471 ACPI_READ_WRITE_MEMORY ==
472 memory32_data->read_write_attribute ?
473 "/Write" : " only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700474
475 acpi_os_printf (" Range minimum base: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400476 memory32_data->min_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700477
478 acpi_os_printf (" Range maximum base: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400479 memory32_data->max_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700480
Robert Moore44f6c012005-04-18 22:49:35 -0400481 acpi_os_printf (" Alignment: %08X\n", memory32_data->alignment);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700482
Robert Moore44f6c012005-04-18 22:49:35 -0400483 acpi_os_printf (" Range length: %08X\n", memory32_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700484
485 return;
486}
487
488
489/*******************************************************************************
490 *
491 * FUNCTION: acpi_rs_dump_fixed_memory32
492 *
493 * PARAMETERS: Data - pointer to the resource structure to dump.
494 *
495 * RETURN:
496 *
497 * DESCRIPTION: Prints out the various members of the Data structure type.
498 *
499 ******************************************************************************/
500
Robert Moore44f6c012005-04-18 22:49:35 -0400501static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502acpi_rs_dump_fixed_memory32 (
503 union acpi_resource_data *data)
504{
Robert Moore44f6c012005-04-18 22:49:35 -0400505 struct acpi_resource_fixed_mem32 *fixed_memory32_data =
506 (struct acpi_resource_fixed_mem32 *) data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700507
508
509 ACPI_FUNCTION_ENTRY ();
510
511
512 acpi_os_printf ("32-Bit Fixed Location Memory Range Resource\n");
513
514 acpi_os_printf (" Read%s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400515 ACPI_READ_WRITE_MEMORY ==
516 fixed_memory32_data->read_write_attribute ? "/Write" : " Only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517
518 acpi_os_printf (" Range base address: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400519 fixed_memory32_data->range_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700520
521 acpi_os_printf (" Range length: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400522 fixed_memory32_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700523
524 return;
525}
526
527
528/*******************************************************************************
529 *
530 * FUNCTION: acpi_rs_dump_address16
531 *
532 * PARAMETERS: Data - pointer to the resource structure to dump.
533 *
534 * RETURN: None
535 *
536 * DESCRIPTION: Prints out the various members of the Data structure type.
537 *
538 ******************************************************************************/
539
Robert Moore44f6c012005-04-18 22:49:35 -0400540static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700541acpi_rs_dump_address16 (
542 union acpi_resource_data *data)
543{
544 struct acpi_resource_address16 *address16_data = (struct acpi_resource_address16 *) data;
545
546
547 ACPI_FUNCTION_ENTRY ();
548
549
550 acpi_os_printf ("16-Bit Address Space Resource\n");
551 acpi_os_printf (" Resource Type: ");
552
553 switch (address16_data->resource_type) {
554 case ACPI_MEMORY_RANGE:
555
556 acpi_os_printf ("Memory Range\n");
557
558 switch (address16_data->attribute.memory.cache_attribute) {
559 case ACPI_NON_CACHEABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400560 acpi_os_printf (" Type Specific: Noncacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700561 break;
562
563 case ACPI_CACHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400564 acpi_os_printf (" Type Specific: Cacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 break;
566
567 case ACPI_WRITE_COMBINING_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400568 acpi_os_printf (" Type Specific: Write-combining memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700569 break;
570
571 case ACPI_PREFETCHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400572 acpi_os_printf (" Type Specific: Prefetchable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700573 break;
574
575 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400576 acpi_os_printf (" Type Specific: Invalid cache attribute\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700577 break;
578 }
579
580 acpi_os_printf (" Type Specific: Read%s\n",
581 ACPI_READ_WRITE_MEMORY ==
Robert Moore44f6c012005-04-18 22:49:35 -0400582 address16_data->attribute.memory.read_write_attribute ?
583 "/Write" : " Only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700584 break;
585
586 case ACPI_IO_RANGE:
587
588 acpi_os_printf ("I/O Range\n");
589
590 switch (address16_data->attribute.io.range_attribute) {
591 case ACPI_NON_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400592 acpi_os_printf (" Type Specific: Non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700593 break;
594
595 case ACPI_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400596 acpi_os_printf (" Type Specific: ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700597 break;
598
599 case ACPI_ENTIRE_RANGE:
Robert Moore44f6c012005-04-18 22:49:35 -0400600 acpi_os_printf (" Type Specific: ISA and non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700601 break;
602
603 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400604 acpi_os_printf (" Type Specific: Invalid range attribute\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700605 break;
606 }
607
608 acpi_os_printf (" Type Specific: %s Translation\n",
609 ACPI_SPARSE_TRANSLATION ==
Robert Moore44f6c012005-04-18 22:49:35 -0400610 address16_data->attribute.io.translation_attribute ?
611 "Sparse" : "Dense");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700612 break;
613
614 case ACPI_BUS_NUMBER_RANGE:
615
616 acpi_os_printf ("Bus Number Range\n");
617 break;
618
619 default:
620
621 acpi_os_printf ("0x%2.2X\n", address16_data->resource_type);
622 break;
623 }
624
625 acpi_os_printf (" Resource %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400626 ACPI_CONSUMER == address16_data->producer_consumer ?
Linus Torvalds1da177e2005-04-16 15:20:36 -0700627 "Consumer" : "Producer");
628
629 acpi_os_printf (" %s decode\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400630 ACPI_SUB_DECODE == address16_data->decode ?
631 "Subtractive" : "Positive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700632
633 acpi_os_printf (" Min address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400634 ACPI_ADDRESS_FIXED == address16_data->min_address_fixed ?
635 "" : "not");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700636
637 acpi_os_printf (" Max address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400638 ACPI_ADDRESS_FIXED == address16_data->max_address_fixed ?
639 "" : "not");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700640
641 acpi_os_printf (" Granularity: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400642 address16_data->granularity);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700643
644 acpi_os_printf (" Address range min: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400645 address16_data->min_address_range);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646
647 acpi_os_printf (" Address range max: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400648 address16_data->max_address_range);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700649
650 acpi_os_printf (" Address translation offset: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400651 address16_data->address_translation_offset);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700652
653 acpi_os_printf (" Address Length: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400654 address16_data->address_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700655
656 if (0xFF != address16_data->resource_source.index) {
657 acpi_os_printf (" Resource Source Index: %X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400658 address16_data->resource_source.index);
659
Linus Torvalds1da177e2005-04-16 15:20:36 -0700660 acpi_os_printf (" Resource Source: %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400661 address16_data->resource_source.string_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 }
663
664 return;
665}
666
667
668/*******************************************************************************
669 *
670 * FUNCTION: acpi_rs_dump_address32
671 *
672 * PARAMETERS: Data - pointer to the resource structure to dump.
673 *
674 * RETURN: None
675 *
676 * DESCRIPTION: Prints out the various members of the Data structure type.
677 *
678 ******************************************************************************/
679
Robert Moore44f6c012005-04-18 22:49:35 -0400680static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700681acpi_rs_dump_address32 (
682 union acpi_resource_data *data)
683{
684 struct acpi_resource_address32 *address32_data = (struct acpi_resource_address32 *) data;
685
686
687 ACPI_FUNCTION_ENTRY ();
688
689
690 acpi_os_printf ("32-Bit Address Space Resource\n");
691
692 switch (address32_data->resource_type) {
693 case ACPI_MEMORY_RANGE:
694
695 acpi_os_printf (" Resource Type: Memory Range\n");
696
697 switch (address32_data->attribute.memory.cache_attribute) {
698 case ACPI_NON_CACHEABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400699 acpi_os_printf (" Type Specific: Noncacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700700 break;
701
702 case ACPI_CACHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400703 acpi_os_printf (" Type Specific: Cacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700704 break;
705
706 case ACPI_WRITE_COMBINING_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400707 acpi_os_printf (" Type Specific: Write-combining memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700708 break;
709
710 case ACPI_PREFETCHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400711 acpi_os_printf (" Type Specific: Prefetchable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700712 break;
713
714 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400715 acpi_os_printf (" Type Specific: Invalid cache attribute\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700716 break;
717 }
718
719 acpi_os_printf (" Type Specific: Read%s\n",
720 ACPI_READ_WRITE_MEMORY ==
Robert Moore44f6c012005-04-18 22:49:35 -0400721 address32_data->attribute.memory.read_write_attribute ?
722 "/Write" : " Only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700723 break;
724
725 case ACPI_IO_RANGE:
726
727 acpi_os_printf (" Resource Type: Io Range\n");
728
729 switch (address32_data->attribute.io.range_attribute) {
730 case ACPI_NON_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400731 acpi_os_printf (" Type Specific: Non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700732 break;
733
734 case ACPI_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400735 acpi_os_printf (" Type Specific: ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736 break;
737
738 case ACPI_ENTIRE_RANGE:
Robert Moore44f6c012005-04-18 22:49:35 -0400739 acpi_os_printf (" Type Specific: ISA and non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700740 break;
741
742 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400743 acpi_os_printf (" Type Specific: Invalid Range attribute");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744 break;
745 }
746
747 acpi_os_printf (" Type Specific: %s Translation\n",
748 ACPI_SPARSE_TRANSLATION ==
Robert Moore44f6c012005-04-18 22:49:35 -0400749 address32_data->attribute.io.translation_attribute ?
750 "Sparse" : "Dense");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700751 break;
752
753 case ACPI_BUS_NUMBER_RANGE:
754
755 acpi_os_printf (" Resource Type: Bus Number Range\n");
756 break;
757
758 default:
759
Robert Moore44f6c012005-04-18 22:49:35 -0400760 acpi_os_printf (" Resource Type: 0x%2.2X\n",
761 address32_data->resource_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700762 break;
763 }
764
765 acpi_os_printf (" Resource %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400766 ACPI_CONSUMER == address32_data->producer_consumer ?
767 "Consumer" : "Producer");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700768
769 acpi_os_printf (" %s decode\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400770 ACPI_SUB_DECODE == address32_data->decode ?
771 "Subtractive" : "Positive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772
773 acpi_os_printf (" Min address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400774 ACPI_ADDRESS_FIXED == address32_data->min_address_fixed ?
775 "" : "not ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700776
777 acpi_os_printf (" Max address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400778 ACPI_ADDRESS_FIXED == address32_data->max_address_fixed ?
779 "" : "not ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700780
781 acpi_os_printf (" Granularity: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400782 address32_data->granularity);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700783
784 acpi_os_printf (" Address range min: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400785 address32_data->min_address_range);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700786
787 acpi_os_printf (" Address range max: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400788 address32_data->max_address_range);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700789
790 acpi_os_printf (" Address translation offset: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400791 address32_data->address_translation_offset);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700792
793 acpi_os_printf (" Address Length: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400794 address32_data->address_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700795
796 if(0xFF != address32_data->resource_source.index) {
797 acpi_os_printf (" Resource Source Index: %X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400798 address32_data->resource_source.index);
799
Linus Torvalds1da177e2005-04-16 15:20:36 -0700800 acpi_os_printf (" Resource Source: %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400801 address32_data->resource_source.string_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 }
803
804 return;
805}
806
807
808/*******************************************************************************
809 *
810 * FUNCTION: acpi_rs_dump_address64
811 *
812 * PARAMETERS: Data - pointer to the resource structure to dump.
813 *
814 * RETURN: None
815 *
816 * DESCRIPTION: Prints out the various members of the Data structure type.
817 *
818 ******************************************************************************/
819
Robert Moore44f6c012005-04-18 22:49:35 -0400820static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700821acpi_rs_dump_address64 (
822 union acpi_resource_data *data)
823{
824 struct acpi_resource_address64 *address64_data = (struct acpi_resource_address64 *) data;
825
826
827 ACPI_FUNCTION_ENTRY ();
828
829
830 acpi_os_printf ("64-Bit Address Space Resource\n");
831
832 switch (address64_data->resource_type) {
833 case ACPI_MEMORY_RANGE:
834
835 acpi_os_printf (" Resource Type: Memory Range\n");
836
837 switch (address64_data->attribute.memory.cache_attribute) {
838 case ACPI_NON_CACHEABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400839 acpi_os_printf (" Type Specific: Noncacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700840 break;
841
842 case ACPI_CACHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400843 acpi_os_printf (" Type Specific: Cacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700844 break;
845
846 case ACPI_WRITE_COMBINING_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400847 acpi_os_printf (" Type Specific: Write-combining memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700848 break;
849
850 case ACPI_PREFETCHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400851 acpi_os_printf (" Type Specific: Prefetchable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700852 break;
853
854 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400855 acpi_os_printf (" Type Specific: Invalid cache attribute\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700856 break;
857 }
858
859 acpi_os_printf (" Type Specific: Read%s\n",
860 ACPI_READ_WRITE_MEMORY ==
Robert Moore44f6c012005-04-18 22:49:35 -0400861 address64_data->attribute.memory.read_write_attribute ?
862 "/Write" : " Only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700863 break;
864
865 case ACPI_IO_RANGE:
866
867 acpi_os_printf (" Resource Type: Io Range\n");
868
869 switch (address64_data->attribute.io.range_attribute) {
870 case ACPI_NON_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400871 acpi_os_printf (" Type Specific: Non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700872 break;
873
874 case ACPI_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400875 acpi_os_printf (" Type Specific: ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700876 break;
877
878 case ACPI_ENTIRE_RANGE:
Robert Moore44f6c012005-04-18 22:49:35 -0400879 acpi_os_printf (" Type Specific: ISA and non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700880 break;
881
882 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400883 acpi_os_printf (" Type Specific: Invalid Range attribute");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700884 break;
885 }
886
887 acpi_os_printf (" Type Specific: %s Translation\n",
888 ACPI_SPARSE_TRANSLATION ==
Robert Moore44f6c012005-04-18 22:49:35 -0400889 address64_data->attribute.io.translation_attribute ?
890 "Sparse" : "Dense");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700891 break;
892
893 case ACPI_BUS_NUMBER_RANGE:
894
895 acpi_os_printf (" Resource Type: Bus Number Range\n");
896 break;
897
898 default:
899
Robert Moore44f6c012005-04-18 22:49:35 -0400900 acpi_os_printf (" Resource Type: 0x%2.2X\n",
901 address64_data->resource_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700902 break;
903 }
904
905 acpi_os_printf (" Resource %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400906 ACPI_CONSUMER == address64_data->producer_consumer ?
907 "Consumer" : "Producer");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700908
909 acpi_os_printf (" %s decode\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400910 ACPI_SUB_DECODE == address64_data->decode ?
911 "Subtractive" : "Positive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700912
913 acpi_os_printf (" Min address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400914 ACPI_ADDRESS_FIXED == address64_data->min_address_fixed ?
915 "" : "not ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916
917 acpi_os_printf (" Max address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400918 ACPI_ADDRESS_FIXED == address64_data->max_address_fixed ?
919 "" : "not ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700920
921 acpi_os_printf (" Granularity: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400922 ACPI_FORMAT_UINT64 (address64_data->granularity));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923
924 acpi_os_printf (" Address range min: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400925 ACPI_FORMAT_UINT64 (address64_data->min_address_range));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700926
927 acpi_os_printf (" Address range max: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400928 ACPI_FORMAT_UINT64 (address64_data->max_address_range));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700929
930 acpi_os_printf (" Address translation offset: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400931 ACPI_FORMAT_UINT64 (address64_data->address_translation_offset));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932
933 acpi_os_printf (" Address Length: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400934 ACPI_FORMAT_UINT64 (address64_data->address_length));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700935
936 acpi_os_printf (" Type Specific Attributes: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400937 ACPI_FORMAT_UINT64 (address64_data->type_specific_attributes));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700938
939 if (0xFF != address64_data->resource_source.index) {
940 acpi_os_printf (" Resource Source Index: %X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400941 address64_data->resource_source.index);
942
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 acpi_os_printf (" Resource Source: %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400944 address64_data->resource_source.string_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700945 }
946
947 return;
948}
949
950
951/*******************************************************************************
952 *
953 * FUNCTION: acpi_rs_dump_extended_irq
954 *
955 * PARAMETERS: Data - pointer to the resource structure to dump.
956 *
957 * RETURN: None
958 *
959 * DESCRIPTION: Prints out the various members of the Data structure type.
960 *
961 ******************************************************************************/
962
Robert Moore44f6c012005-04-18 22:49:35 -0400963static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700964acpi_rs_dump_extended_irq (
965 union acpi_resource_data *data)
966{
967 struct acpi_resource_ext_irq *ext_irq_data = (struct acpi_resource_ext_irq *) data;
968 u8 index = 0;
969
970
971 ACPI_FUNCTION_ENTRY ();
972
973
974 acpi_os_printf ("Extended IRQ Resource\n");
975
976 acpi_os_printf (" Resource %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400977 ACPI_CONSUMER == ext_irq_data->producer_consumer ?
978 "Consumer" : "Producer");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700979
980 acpi_os_printf (" %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400981 ACPI_LEVEL_SENSITIVE == ext_irq_data->edge_level ?
982 "Level" : "Edge");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700983
984 acpi_os_printf (" Active %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400985 ACPI_ACTIVE_LOW == ext_irq_data->active_high_low ?
986 "low" : "high");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700987
988 acpi_os_printf (" %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400989 ACPI_SHARED == ext_irq_data->shared_exclusive ?
990 "Shared" : "Exclusive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700991
Robert Moore44f6c012005-04-18 22:49:35 -0400992 acpi_os_printf (" Interrupts : %X ( ", ext_irq_data->number_of_interrupts);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700993
994 for (index = 0; index < ext_irq_data->number_of_interrupts; index++) {
995 acpi_os_printf ("%X ", ext_irq_data->interrupts[index]);
996 }
997
998 acpi_os_printf (")\n");
999
1000 if(0xFF != ext_irq_data->resource_source.index) {
1001 acpi_os_printf (" Resource Source Index: %X",
Robert Moore44f6c012005-04-18 22:49:35 -04001002 ext_irq_data->resource_source.index);
1003
Linus Torvalds1da177e2005-04-16 15:20:36 -07001004 acpi_os_printf (" Resource Source: %s",
Robert Moore44f6c012005-04-18 22:49:35 -04001005 ext_irq_data->resource_source.string_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 }
1007
1008 return;
1009}
1010
1011
1012/*******************************************************************************
1013 *
1014 * FUNCTION: acpi_rs_dump_resource_list
1015 *
Robert Moore44f6c012005-04-18 22:49:35 -04001016 * PARAMETERS: Resource - pointer to the resource structure to dump.
Linus Torvalds1da177e2005-04-16 15:20:36 -07001017 *
1018 * RETURN: None
1019 *
1020 * DESCRIPTION: Dispatches the structure to the correct dump routine.
1021 *
1022 ******************************************************************************/
1023
1024void
1025acpi_rs_dump_resource_list (
1026 struct acpi_resource *resource)
1027{
1028 u8 count = 0;
1029 u8 done = FALSE;
1030
1031
1032 ACPI_FUNCTION_ENTRY ();
1033
1034
1035 if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1036 while (!done) {
1037 acpi_os_printf ("Resource structure %X.\n", count++);
1038
1039 switch (resource->id) {
1040 case ACPI_RSTYPE_IRQ:
1041 acpi_rs_dump_irq (&resource->data);
1042 break;
1043
1044 case ACPI_RSTYPE_DMA:
1045 acpi_rs_dump_dma (&resource->data);
1046 break;
1047
1048 case ACPI_RSTYPE_START_DPF:
1049 acpi_rs_dump_start_depend_fns (&resource->data);
1050 break;
1051
1052 case ACPI_RSTYPE_END_DPF:
1053 acpi_os_printf ("end_dependent_functions Resource\n");
1054 /* acpi_rs_dump_end_dependent_functions (Resource->Data);*/
1055 break;
1056
1057 case ACPI_RSTYPE_IO:
1058 acpi_rs_dump_io (&resource->data);
1059 break;
1060
1061 case ACPI_RSTYPE_FIXED_IO:
1062 acpi_rs_dump_fixed_io (&resource->data);
1063 break;
1064
1065 case ACPI_RSTYPE_VENDOR:
1066 acpi_rs_dump_vendor_specific (&resource->data);
1067 break;
1068
1069 case ACPI_RSTYPE_END_TAG:
1070 /*rs_dump_end_tag (Resource->Data);*/
1071 acpi_os_printf ("end_tag Resource\n");
1072 done = TRUE;
1073 break;
1074
1075 case ACPI_RSTYPE_MEM24:
1076 acpi_rs_dump_memory24 (&resource->data);
1077 break;
1078
1079 case ACPI_RSTYPE_MEM32:
1080 acpi_rs_dump_memory32 (&resource->data);
1081 break;
1082
1083 case ACPI_RSTYPE_FIXED_MEM32:
1084 acpi_rs_dump_fixed_memory32 (&resource->data);
1085 break;
1086
1087 case ACPI_RSTYPE_ADDRESS16:
1088 acpi_rs_dump_address16 (&resource->data);
1089 break;
1090
1091 case ACPI_RSTYPE_ADDRESS32:
1092 acpi_rs_dump_address32 (&resource->data);
1093 break;
1094
1095 case ACPI_RSTYPE_ADDRESS64:
1096 acpi_rs_dump_address64 (&resource->data);
1097 break;
1098
1099 case ACPI_RSTYPE_EXT_IRQ:
1100 acpi_rs_dump_extended_irq (&resource->data);
1101 break;
1102
1103 default:
1104 acpi_os_printf ("Invalid resource type\n");
1105 break;
1106
1107 }
1108
1109 resource = ACPI_PTR_ADD (struct acpi_resource, resource, resource->length);
1110 }
1111 }
1112
1113 return;
1114}
1115
1116/*******************************************************************************
1117 *
1118 * FUNCTION: acpi_rs_dump_irq_list
1119 *
Robert Moore44f6c012005-04-18 22:49:35 -04001120 * PARAMETERS: route_table - pointer to the routing table to dump.
Linus Torvalds1da177e2005-04-16 15:20:36 -07001121 *
1122 * RETURN: None
1123 *
1124 * DESCRIPTION: Dispatches the structures to the correct dump routine.
1125 *
1126 ******************************************************************************/
1127
1128void
1129acpi_rs_dump_irq_list (
1130 u8 *route_table)
1131{
1132 u8 *buffer = route_table;
1133 u8 count = 0;
1134 u8 done = FALSE;
1135 struct acpi_pci_routing_table *prt_element;
1136
1137
1138 ACPI_FUNCTION_ENTRY ();
1139
1140
1141 if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1142 prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
1143
1144 while (!done) {
1145 acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
1146
1147 acpi_os_printf (" Address: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -04001148 ACPI_FORMAT_UINT64 (prt_element->address));
Linus Torvalds1da177e2005-04-16 15:20:36 -07001149
1150 acpi_os_printf (" Pin: %X\n", prt_element->pin);
1151
1152 acpi_os_printf (" Source: %s\n", prt_element->source);
1153
Robert Moore44f6c012005-04-18 22:49:35 -04001154 acpi_os_printf (" source_index: %X\n", prt_element->source_index);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155
1156 buffer += prt_element->length;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001157 prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
Robert Moore44f6c012005-04-18 22:49:35 -04001158 if (0 == prt_element->length) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159 done = TRUE;
1160 }
1161 }
1162 }
1163
1164 return;
1165}
1166
1167#endif
1168