:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / drivers / bus / acpi / resource / rsdump.c
1 /*******************************************************************************
2  *
3  * Module Name: rsdump - Functions do dump out the resource structures.
4  *              $Revision$
5  *
6  ******************************************************************************/
7
8 /*
9  *  Copyright (C) 2000, 2001 R. Byron Moore
10  *
11  *  This program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License as published by
13  *  the Free Software Foundation; either version 2 of the License, or
14  *  (at your option) any later version.
15  *
16  *  This program is distributed in the hope that it will be useful,
17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *  GNU General Public License for more details.
20  *
21  *  You should have received a copy of the GNU General Public License
22  *  along with this program; if not, write to the Free Software
23  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24  */
25
26
27 #include "acpi.h"
28 #include "acresrc.h"
29
30 #define _COMPONENT          ACPI_RESOURCES
31          MODULE_NAME         ("rsdump")
32
33
34 /*******************************************************************************
35  *
36  * FUNCTION:    Acpi_rs_dump_irq
37  *
38  * PARAMETERS:  Data            - pointer to the resource structure to dump.
39  *
40  * RETURN:
41  *
42  * DESCRIPTION: Prints out the various members of the Data structure type.
43  *
44  ******************************************************************************/
45
46 void
47 acpi_rs_dump_irq (
48         RESOURCE_DATA           *data)
49 {
50         IRQ_RESOURCE            *irq_data = (IRQ_RESOURCE*) data;
51         u8                      index = 0;
52
53
54         acpi_os_printf ("\t_iRQ Resource\n");
55
56         acpi_os_printf ("\t\t%s Triggered\n",
57                          LEVEL_SENSITIVE == irq_data->edge_level ?
58                          "Level" : "Edge");
59
60         acpi_os_printf ("\t\t_active %s\n",
61                          ACTIVE_LOW == irq_data->active_high_low ?
62                          "Low" : "High");
63
64         acpi_os_printf ("\t\t%s\n",
65                          SHARED == irq_data->shared_exclusive ?
66                          "Shared" : "Exclusive");
67
68         acpi_os_printf ("\t\t%X Interrupts ( ",
69                          irq_data->number_of_interrupts);
70
71         for (index = 0; index < irq_data->number_of_interrupts; index++) {
72                 acpi_os_printf ("%X ", irq_data->interrupts[index]);
73         }
74
75         acpi_os_printf (")\n");
76         return;
77 }
78
79
80 /*******************************************************************************
81  *
82  * FUNCTION:    Acpi_rs_dump_dma
83  *
84  * PARAMETERS:  Data            - pointer to the resource structure to dump.
85  *
86  * RETURN:
87  *
88  * DESCRIPTION: Prints out the various members of the Data structure type.
89  *
90  ******************************************************************************/
91
92 void
93 acpi_rs_dump_dma (
94         RESOURCE_DATA           *data)
95 {
96         DMA_RESOURCE            *dma_data = (DMA_RESOURCE*) data;
97         u8                      index = 0;
98
99
100         acpi_os_printf ("\t_dMA Resource\n");
101
102         switch (dma_data->type) {
103         case COMPATIBILITY:
104                 acpi_os_printf ("\t\t_compatibility mode\n");
105                 break;
106
107         case TYPE_A:
108                 acpi_os_printf ("\t\t_type A\n");
109                 break;
110
111         case TYPE_B:
112                 acpi_os_printf ("\t\t_type B\n");
113                 break;
114
115         case TYPE_F:
116                 acpi_os_printf ("\t\t_type F\n");
117                 break;
118
119         default:
120                 acpi_os_printf ("\t\t_invalid DMA type\n");
121                 break;
122         }
123
124         acpi_os_printf ("\t\t%sBus Master\n",
125                          BUS_MASTER == dma_data->bus_master ?
126                          "" : "Not a ");
127
128         switch (dma_data->transfer) {
129         case TRANSFER_8:
130                 acpi_os_printf ("\t\t8-bit only transfer\n");
131                 break;
132
133         case TRANSFER_8_16:
134                 acpi_os_printf ("\t\t8 and 16-bit transfer\n");
135                 break;
136
137         case TRANSFER_16:
138                 acpi_os_printf ("\t\t16 bit only transfer\n");
139                 break;
140
141         default:
142                 acpi_os_printf ("\t\t_invalid transfer preference\n");
143                 break;
144         }
145
146         acpi_os_printf ("\t\t_number of Channels: %X ( ",
147                          dma_data->number_of_channels);
148
149         for (index = 0; index < dma_data->number_of_channels; index++) {
150                 acpi_os_printf ("%X ", dma_data->channels[index]);
151         }
152
153         acpi_os_printf (")\n");
154         return;
155 }
156
157
158 /*******************************************************************************
159  *
160  * FUNCTION:    Acpi_rs_dump_start_dependent_functions
161  *
162  * PARAMETERS:  Data            - pointer to the resource structure to dump.
163  *
164  * RETURN:
165  *
166  * DESCRIPTION: Prints out the various members of the Data structure type.
167  *
168  ******************************************************************************/
169
170 void
171 acpi_rs_dump_start_dependent_functions (
172         RESOURCE_DATA               *data)
173 {
174         START_DEPENDENT_FUNCTIONS_RESOURCE *sdf_data =
175                            (START_DEPENDENT_FUNCTIONS_RESOURCE*) data;
176
177
178         acpi_os_printf ("\t_start Dependent Functions Resource\n");
179
180         switch (sdf_data->compatibility_priority) {
181         case GOOD_CONFIGURATION:
182                 acpi_os_printf ("\t\t_good configuration\n");
183                 break;
184
185         case ACCEPTABLE_CONFIGURATION:
186                 acpi_os_printf ("\t\t_acceptable configuration\n");
187                 break;
188
189         case SUB_OPTIMAL_CONFIGURATION:
190                 acpi_os_printf ("\t\t_sub-optimal configuration\n");
191                 break;
192
193         default:
194                 acpi_os_printf ("\t\t_invalid compatibility priority\n");
195                 break;
196         }
197
198         switch(sdf_data->performance_robustness) {
199         case GOOD_CONFIGURATION:
200                 acpi_os_printf ("\t\t_good configuration\n");
201                 break;
202
203         case ACCEPTABLE_CONFIGURATION:
204                 acpi_os_printf ("\t\t_acceptable configuration\n");
205                 break;
206
207         case SUB_OPTIMAL_CONFIGURATION:
208                 acpi_os_printf ("\t\t_sub-optimal configuration\n");
209                 break;
210
211         default:
212                 acpi_os_printf ("\t\t_invalid performance "
213                                   "robustness preference\n");
214                 break;
215         }
216
217         return;
218 }
219
220
221 /*******************************************************************************
222  *
223  * FUNCTION:    Acpi_rs_dump_io
224  *
225  * PARAMETERS:  Data            - pointer to the resource structure to dump.
226  *
227  * RETURN:
228  *
229  * DESCRIPTION: Prints out the various members of the Data structure type.
230  *
231  ******************************************************************************/
232
233 void
234 acpi_rs_dump_io (
235         RESOURCE_DATA       *data)
236 {
237         IO_RESOURCE         *io_data = (IO_RESOURCE*) data;
238
239
240         acpi_os_printf ("\t_io Resource\n");
241
242         acpi_os_printf ("\t\t%d bit decode\n",
243                          DECODE_16 == io_data->io_decode ? 16 : 10);
244
245         acpi_os_printf ("\t\t_range minimum base: %08X\n",
246                          io_data->min_base_address);
247
248         acpi_os_printf ("\t\t_range maximum base: %08X\n",
249                          io_data->max_base_address);
250
251         acpi_os_printf ("\t\t_alignment: %08X\n",
252                          io_data->alignment);
253
254         acpi_os_printf ("\t\t_range Length: %08X\n",
255                          io_data->range_length);
256
257         return;
258 }
259
260
261 /*******************************************************************************
262  *
263  * FUNCTION:    Acpi_rs_dump_fixed_io
264  *
265  * PARAMETERS:  Data            - pointer to the resource structure to dump.
266  *
267  * RETURN:
268  *
269  * DESCRIPTION: Prints out the various members of the Data structure type.
270  *
271  ******************************************************************************/
272
273 void
274 acpi_rs_dump_fixed_io (
275         RESOURCE_DATA           *data)
276 {
277         FIXED_IO_RESOURCE       *fixed_io_data = (FIXED_IO_RESOURCE*) data;
278
279
280         acpi_os_printf ("\t_fixed Io Resource\n");
281         acpi_os_printf ("\t\t_range base address: %08X",
282                          fixed_io_data->base_address);
283
284         acpi_os_printf ("\t\t_range length: %08X",
285                          fixed_io_data->range_length);
286
287         return;
288 }
289
290
291 /*******************************************************************************
292  *
293  * FUNCTION:    Acpi_rs_dump_vendor_specific
294  *
295  * PARAMETERS:  Data            - pointer to the resource structure to dump.
296  *
297  * RETURN:
298  *
299  * DESCRIPTION: Prints out the various members of the Data structure type.
300  *
301  ******************************************************************************/
302
303 void
304 acpi_rs_dump_vendor_specific (
305         RESOURCE_DATA           *data)
306 {
307         VENDOR_RESOURCE         *vendor_data = (VENDOR_RESOURCE*) data;
308         u16                     index = 0;
309
310
311         acpi_os_printf ("\t_vendor Specific Resource\n");
312
313         acpi_os_printf ("\t\t_length: %08X\n", vendor_data->length);
314
315         for (index = 0; index < vendor_data->length; index++) {
316                 acpi_os_printf ("\t\t_byte %X: %08X\n",
317                                  index, vendor_data->reserved[index]);
318         }
319
320         return;
321 }
322
323
324 /*******************************************************************************
325  *
326  * FUNCTION:    Acpi_rs_dump_memory24
327  *
328  * PARAMETERS:  Data            - pointer to the resource structure to dump.
329  *
330  * RETURN:
331  *
332  * DESCRIPTION: Prints out the various members of the Data structure type.
333  *
334  ******************************************************************************/
335
336 void
337 acpi_rs_dump_memory24 (
338         RESOURCE_DATA           *data)
339 {
340         MEMORY24_RESOURCE       *memory24_data = (MEMORY24_RESOURCE*) data;
341
342
343         acpi_os_printf ("\t24-Bit Memory Range Resource\n");
344
345         acpi_os_printf ("\t\t_read%s\n",
346                          READ_WRITE_MEMORY ==
347                          memory24_data->read_write_attribute ?
348                          "/Write" : " only");
349
350         acpi_os_printf ("\t\t_range minimum base: %08X\n",
351                          memory24_data->min_base_address);
352
353         acpi_os_printf ("\t\t_range maximum base: %08X\n",
354                          memory24_data->max_base_address);
355
356         acpi_os_printf ("\t\t_alignment: %08X\n",
357                          memory24_data->alignment);
358
359         acpi_os_printf ("\t\t_range length: %08X\n",
360                          memory24_data->range_length);
361
362         return;
363 }
364
365
366 /*******************************************************************************
367  *
368  * FUNCTION:    Acpi_rs_dump_memory32
369  *
370  * PARAMETERS:  Data            - pointer to the resource structure to dump.
371  *
372  * RETURN:
373  *
374  * DESCRIPTION: Prints out the various members of the Data structure type.
375  *
376  ******************************************************************************/
377
378 void
379 acpi_rs_dump_memory32 (
380         RESOURCE_DATA           *data)
381 {
382         MEMORY32_RESOURCE       *memory32_data = (MEMORY32_RESOURCE*) data;
383
384
385         acpi_os_printf ("\t32-Bit Memory Range Resource\n");
386
387         acpi_os_printf ("\t\t_read%s\n",
388                          READ_WRITE_MEMORY ==
389                          memory32_data->read_write_attribute ?
390                          "/Write" : " only");
391
392         acpi_os_printf ("\t\t_range minimum base: %08X\n",
393                          memory32_data->min_base_address);
394
395         acpi_os_printf ("\t\t_range maximum base: %08X\n",
396                          memory32_data->max_base_address);
397
398         acpi_os_printf ("\t\t_alignment: %08X\n",
399                          memory32_data->alignment);
400
401         acpi_os_printf ("\t\t_range length: %08X\n",
402                          memory32_data->range_length);
403
404         return;
405 }
406
407
408 /*******************************************************************************
409  *
410  * FUNCTION:    Acpi_rs_dump_fixed_memory32
411  *
412  * PARAMETERS:  Data            - pointer to the resource structure to dump.
413  *
414  * RETURN:
415  *
416  * DESCRIPTION: Prints out the various members of the Data structure type.
417  *
418  ******************************************************************************/
419
420 void
421 acpi_rs_dump_fixed_memory32 (
422         RESOURCE_DATA           *data)
423 {
424         FIXED_MEMORY32_RESOURCE *fixed_memory32_data = (FIXED_MEMORY32_RESOURCE*) data;
425
426
427         acpi_os_printf ("\t32-Bit Fixed Location Memory Range Resource\n");
428
429         acpi_os_printf ("\t\t_read%s\n",
430                          READ_WRITE_MEMORY ==
431                          fixed_memory32_data->read_write_attribute ?
432                          "/Write" : " Only");
433
434         acpi_os_printf ("\t\t_range base address: %08X\n",
435                          fixed_memory32_data->range_base_address);
436
437         acpi_os_printf ("\t\t_range length: %08X\n",
438                          fixed_memory32_data->range_length);
439
440         return;
441 }
442
443
444 /*******************************************************************************
445  *
446  * FUNCTION:    Acpi_rs_dump_address16
447  *
448  * PARAMETERS:  Data            - pointer to the resource structure to dump.
449  *
450  * RETURN:
451  *
452  * DESCRIPTION: Prints out the various members of the Data structure type.
453  *
454  ******************************************************************************/
455
456 void
457 acpi_rs_dump_address16 (
458         RESOURCE_DATA           *data)
459 {
460         ADDRESS16_RESOURCE      *address16_data = (ADDRESS16_RESOURCE*) data;
461
462
463         acpi_os_printf ("\t16-Bit Address Space Resource\n");
464         acpi_os_printf ("\t\t_resource Type: ");
465
466         switch (address16_data->resource_type) {
467         case MEMORY_RANGE:
468
469                 acpi_os_printf ("Memory Range\n");
470
471                 switch (address16_data->attribute.memory.cache_attribute) {
472                 case NON_CACHEABLE_MEMORY:
473                         acpi_os_printf ("\t\t_type Specific: "
474                                           "Noncacheable memory\n");
475                         break;
476
477                 case CACHABLE_MEMORY:
478                         acpi_os_printf ("\t\t_type Specific: "
479                                           "Cacheable memory\n");
480                         break;
481
482                 case WRITE_COMBINING_MEMORY:
483                         acpi_os_printf ("\t\t_type Specific: "
484                                           "Write-combining memory\n");
485                         break;
486
487                 case PREFETCHABLE_MEMORY:
488                         acpi_os_printf ("\t\t_type Specific: "
489                                           "Prefetchable memory\n");
490                         break;
491
492                 default:
493                         acpi_os_printf ("\t\t_type Specific: "
494                                           "Invalid cache attribute\n");
495                         break;
496                 }
497
498                 acpi_os_printf ("\t\t_type Specific: Read%s\n",
499                         READ_WRITE_MEMORY ==
500                         address16_data->attribute.memory.read_write_attribute ?
501                         "/Write" : " Only");
502                 break;
503
504         case IO_RANGE:
505
506                 acpi_os_printf ("I/O Range\n");
507
508                 switch (address16_data->attribute.io.range_attribute) {
509                 case NON_ISA_ONLY_RANGES:
510                         acpi_os_printf ("\t\t_type Specific: "
511                                           "Non-ISA Io Addresses\n");
512                         break;
513
514                 case ISA_ONLY_RANGES:
515                         acpi_os_printf ("\t\t_type Specific: "
516                                           "ISA Io Addresses\n");
517                         break;
518
519                 case ENTIRE_RANGE:
520                         acpi_os_printf ("\t\t_type Specific: "
521                                           "ISA and non-ISA Io Addresses\n");
522                         break;
523
524                 default:
525                         acpi_os_printf ("\t\t_type Specific: "
526                                           "Invalid range attribute\n");
527                         break;
528                 }
529                 break;
530
531         case BUS_NUMBER_RANGE:
532
533                 acpi_os_printf ("Bus Number Range\n");
534                 break;
535
536         default:
537
538                 acpi_os_printf ("Invalid resource type. Exiting.\n");
539                 return;
540         }
541
542         acpi_os_printf ("\t\t_resource %s\n",
543                         CONSUMER == address16_data->producer_consumer ?
544                         "Consumer" : "Producer");
545
546         acpi_os_printf ("\t\t%s decode\n",
547                          SUB_DECODE == address16_data->decode ?
548                          "Subtractive" : "Positive");
549
550         acpi_os_printf ("\t\t_min address is %s fixed\n",
551                          ADDRESS_FIXED == address16_data->min_address_fixed ?
552                          "" : "not");
553
554         acpi_os_printf ("\t\t_max address is %s fixed\n",
555                          ADDRESS_FIXED == address16_data->max_address_fixed ?
556                          "" : "not");
557
558         acpi_os_printf ("\t\t_granularity: %08X\n",
559                          address16_data->granularity);
560
561         acpi_os_printf ("\t\t_address range min: %08X\n",
562                          address16_data->min_address_range);
563
564         acpi_os_printf ("\t\t_address range max: %08X\n",
565                          address16_data->max_address_range);
566
567         acpi_os_printf ("\t\t_address translation offset: %08X\n",
568                          address16_data->address_translation_offset);
569
570         acpi_os_printf ("\t\t_address Length: %08X\n",
571                          address16_data->address_length);
572
573         if (0xFF != address16_data->resource_source_index) {
574                 acpi_os_printf ("\t\t_resource Source Index: %X\n",
575                                  address16_data->resource_source_index);
576                 acpi_os_printf ("\t\t_resource Source: %s\n",
577                                  address16_data->resource_source);
578         }
579
580         return;
581 }
582
583
584 /*******************************************************************************
585  *
586  * FUNCTION:    Acpi_rs_dump_address32
587  *
588  * PARAMETERS:  Data            - pointer to the resource structure to dump.
589  *
590  * RETURN:
591  *
592  * DESCRIPTION: Prints out the various members of the Data structure type.
593  *
594  ******************************************************************************/
595
596 void
597 acpi_rs_dump_address32 (
598         RESOURCE_DATA           *data)
599 {
600         ADDRESS32_RESOURCE      *address32_data = (ADDRESS32_RESOURCE*) data;
601
602
603         acpi_os_printf ("\t32-Bit Address Space Resource\n");
604
605         switch (address32_data->resource_type) {
606         case MEMORY_RANGE:
607
608                 acpi_os_printf ("\t\t_resource Type: Memory Range\n");
609
610                 switch (address32_data->attribute.memory.cache_attribute) {
611                 case NON_CACHEABLE_MEMORY:
612                         acpi_os_printf ("\t\t_type Specific: "
613                                           "Noncacheable memory\n");
614                         break;
615
616                 case CACHABLE_MEMORY:
617                         acpi_os_printf ("\t\t_type Specific: "
618                                           "Cacheable memory\n");
619                         break;
620
621                 case WRITE_COMBINING_MEMORY:
622                         acpi_os_printf ("\t\t_type Specific: "
623                                           "Write-combining memory\n");
624                         break;
625
626                 case PREFETCHABLE_MEMORY:
627                         acpi_os_printf ("\t\t_type Specific: "
628                                           "Prefetchable memory\n");
629                         break;
630
631                 default:
632                         acpi_os_printf ("\t\t_type Specific: "
633                                           "Invalid cache attribute\n");
634                         break;
635                 }
636
637                 acpi_os_printf ("\t\t_type Specific: Read%s\n",
638                         READ_WRITE_MEMORY ==
639                         address32_data->attribute.memory.read_write_attribute ?
640                         "/Write" : " Only");
641                 break;
642
643         case IO_RANGE:
644
645                 acpi_os_printf ("\t\t_resource Type: Io Range\n");
646
647                 switch (address32_data->attribute.io.range_attribute) {
648                         case NON_ISA_ONLY_RANGES:
649                                 acpi_os_printf ("\t\t_type Specific: "
650                                                   "Non-ISA Io Addresses\n");
651                                 break;
652
653                         case ISA_ONLY_RANGES:
654                                 acpi_os_printf ("\t\t_type Specific: "
655                                                   "ISA Io Addresses\n");
656                                 break;
657
658                         case ENTIRE_RANGE:
659                                 acpi_os_printf ("\t\t_type Specific: "
660                                                   "ISA and non-ISA Io Addresses\n");
661                                 break;
662
663                         default:
664                                 acpi_os_printf ("\t\t_type Specific: "
665                                                   "Invalid Range attribute");
666                                 break;
667                         }
668                 break;
669
670         case BUS_NUMBER_RANGE:
671
672                 acpi_os_printf ("\t\t_resource Type: Bus Number Range\n");
673                 break;
674
675         default:
676
677                 acpi_os_printf ("\t\t_invalid Resource Type..exiting.\n");
678                 return;
679         }
680
681         acpi_os_printf ("\t\t_resource %s\n",
682                          CONSUMER == address32_data->producer_consumer ?
683                          "Consumer" : "Producer");
684
685         acpi_os_printf ("\t\t%s decode\n",
686                          SUB_DECODE == address32_data->decode ?
687                          "Subtractive" : "Positive");
688
689         acpi_os_printf ("\t\t_min address is %s fixed\n",
690                          ADDRESS_FIXED == address32_data->min_address_fixed ?
691                          "" : "not ");
692
693         acpi_os_printf ("\t\t_max address is %s fixed\n",
694                          ADDRESS_FIXED == address32_data->max_address_fixed ?
695                          "" : "not ");
696
697         acpi_os_printf ("\t\t_granularity: %08X\n",
698                          address32_data->granularity);
699
700         acpi_os_printf ("\t\t_address range min: %08X\n",
701                          address32_data->min_address_range);
702
703         acpi_os_printf ("\t\t_address range max: %08X\n",
704                          address32_data->max_address_range);
705
706         acpi_os_printf ("\t\t_address translation offset: %08X\n",
707                          address32_data->address_translation_offset);
708
709         acpi_os_printf ("\t\t_address Length: %08X\n",
710                          address32_data->address_length);
711
712         if(0xFF != address32_data->resource_source_index) {
713                 acpi_os_printf ("\t\t_resource Source Index: %X\n",
714                                  address32_data->resource_source_index);
715                 acpi_os_printf ("\t\t_resource Source: %s\n",
716                                  address32_data->resource_source);
717         }
718
719         return;
720 }
721
722
723 /*******************************************************************************
724  *
725  * FUNCTION:    Acpi_rs_dump_extended_irq
726  *
727  * PARAMETERS:  Data            - pointer to the resource structure to dump.
728  *
729  * RETURN:
730  *
731  * DESCRIPTION: Prints out the various members of the Data structure type.
732  *
733  ******************************************************************************/
734
735 void
736 acpi_rs_dump_extended_irq (
737         RESOURCE_DATA           *data)
738 {
739         EXTENDED_IRQ_RESOURCE   *ext_irq_data = (EXTENDED_IRQ_RESOURCE*) data;
740         u8                      index = 0;
741
742
743         acpi_os_printf ("\t_extended IRQ Resource\n");
744
745         acpi_os_printf ("\t\t_resource %s\n",
746                          CONSUMER == ext_irq_data->producer_consumer ?
747                          "Consumer" : "Producer");
748
749         acpi_os_printf ("\t\t%s\n",
750                          LEVEL_SENSITIVE == ext_irq_data->edge_level ?
751                          "Level" : "Edge");
752
753         acpi_os_printf ("\t\t_active %s\n",
754                          ACTIVE_LOW == ext_irq_data->active_high_low ?
755                          "low" : "high");
756
757         acpi_os_printf ("\t\t%s\n",
758                          SHARED == ext_irq_data->shared_exclusive ?
759                          "Shared" : "Exclusive");
760
761         acpi_os_printf ("\t\t_interrupts : %X ( ",
762                          ext_irq_data->number_of_interrupts);
763
764         for (index = 0; index < ext_irq_data->number_of_interrupts; index++) {
765                 acpi_os_printf ("%X ", ext_irq_data->interrupts[index]);
766         }
767
768         acpi_os_printf (")\n");
769
770         if(0xFF != ext_irq_data->resource_source_index) {
771                 acpi_os_printf ("\t\t_resource Source Index: %X",
772                                  ext_irq_data->resource_source_index);
773                 acpi_os_printf ("\t\t_resource Source: %s",
774                                  ext_irq_data->resource_source);
775         }
776
777         return;
778 }
779
780
781 /*******************************************************************************
782  *
783  * FUNCTION:    Acpi_rs_dump_resource_list
784  *
785  * PARAMETERS:  Data            - pointer to the resource structure to dump.
786  *
787  * RETURN:
788  *
789  * DESCRIPTION: Dispatches the structure to the correct dump routine.
790  *
791  ******************************************************************************/
792
793 void
794 acpi_rs_dump_resource_list (
795         RESOURCE            *resource)
796 {
797         u8                  count = 0;
798         u8                  done = FALSE;
799
800
801         if (acpi_dbg_level & TRACE_RESOURCES && _COMPONENT & acpi_dbg_layer) {
802                 while (!done) {
803                         acpi_os_printf ("\t_resource structure %x.\n", count++);
804
805                         switch (resource->id) {
806                         case irq:
807                                 acpi_rs_dump_irq (&resource->data);
808                                 break;
809
810                         case dma:
811                                 acpi_rs_dump_dma (&resource->data);
812                                 break;
813
814                         case start_dependent_functions:
815                                 acpi_rs_dump_start_dependent_functions (&resource->data);
816                                 break;
817
818                         case end_dependent_functions:
819                                 acpi_os_printf ("\t_end_dependent_functions Resource\n");
820                                 /* Acpi_rs_dump_end_dependent_functions (Resource->Data);*/
821                                 break;
822
823                         case io:
824                                 acpi_rs_dump_io (&resource->data);
825                                 break;
826
827                         case fixed_io:
828                                 acpi_rs_dump_fixed_io (&resource->data);
829                                 break;
830
831                         case vendor_specific:
832                                 acpi_rs_dump_vendor_specific (&resource->data);
833                                 break;
834
835                         case end_tag:
836                                 /*Rs_dump_end_tag (Resource->Data);*/
837                                 acpi_os_printf ("\t_end_tag Resource\n");
838                                 done = TRUE;
839                                 break;
840
841                         case memory24:
842                                 acpi_rs_dump_memory24 (&resource->data);
843                                 break;
844
845                         case memory32:
846                                 acpi_rs_dump_memory32 (&resource->data);
847                                 break;
848
849                         case fixed_memory32:
850                                 acpi_rs_dump_fixed_memory32 (&resource->data);
851                                 break;
852
853                         case address16:
854                                 acpi_rs_dump_address16 (&resource->data);
855                                 break;
856
857                         case address32:
858                                 acpi_rs_dump_address32 (&resource->data);
859                                 break;
860
861                         case extended_irq:
862                                 acpi_rs_dump_extended_irq (&resource->data);
863                                 break;
864
865                         default:
866                                 acpi_os_printf ("Invalid resource type\n");
867                                 break;
868
869                         }
870
871                         resource = (RESOURCE *) ((NATIVE_UINT) resource +
872                                          (NATIVE_UINT) resource->length);
873                 }
874         }
875
876         return;
877 }
878
879 /*******************************************************************************
880  *
881  * FUNCTION:    Acpi_rs_dump_irq_list
882  *
883  * PARAMETERS:  Data            - pointer to the routing table to dump.
884  *
885  * RETURN:
886  *
887  * DESCRIPTION: Dispatches the structures to the correct dump routine.
888  *
889  ******************************************************************************/
890
891 void
892 acpi_rs_dump_irq_list (
893         u8                  *route_table)
894 {
895         u8                  *buffer = route_table;
896         u8                  count = 0;
897         u8                  done = FALSE;
898         PCI_ROUTING_TABLE   *prt_element;
899
900
901         if (acpi_dbg_level & TRACE_RESOURCES && _COMPONENT & acpi_dbg_layer) {
902                 prt_element = (PCI_ROUTING_TABLE *) buffer;
903
904                 while (!done) {
905                         acpi_os_printf ("\t_pCI IRQ Routing Table structure %X.\n", count++);
906
907                         acpi_os_printf ("\t\t_address: %X\n",
908                                          prt_element->address);
909
910                         acpi_os_printf ("\t\t_pin: %X\n", prt_element->pin);
911
912                         acpi_os_printf ("\t\t_source: %s\n", prt_element->source);
913
914                         acpi_os_printf ("\t\t_source_index: %X\n",
915                                          prt_element->source_index);
916
917                         buffer += prt_element->length;
918
919                         prt_element = (PCI_ROUTING_TABLE *) buffer;
920
921                         if(0 == prt_element->length) {
922                                 done = TRUE;
923                         }
924                 }
925         }
926
927         return;
928 }
929