import of ftp.dlink.com/GPL/DSMG-600_reB/ppclinux.tar.gz
[linux-2.4.21-pre4.git] / drivers / acpi / resources / rsdump.c
1 /*******************************************************************************
2  *
3  * Module Name: rsdump - Functions to display the resource structures.
4  *              $Revision: 1.1.1.1 $
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 #ifdef ACPI_DEBUG
35
36 /*******************************************************************************
37  *
38  * FUNCTION:    Acpi_rs_dump_irq
39  *
40  * PARAMETERS:  Data            - pointer to the resource structure to dump.
41  *
42  * RETURN:      None
43  *
44  * DESCRIPTION: Prints out the various members of the Data structure type.
45  *
46  ******************************************************************************/
47
48 void
49 acpi_rs_dump_irq (
50         acpi_resource_data      *data)
51 {
52         acpi_resource_irq       *irq_data = (acpi_resource_irq *) data;
53         u8                      index = 0;
54
55
56         FUNCTION_ENTRY ();
57
58
59         acpi_os_printf ("IRQ Resource\n");
60
61         acpi_os_printf ("  %s Triggered\n",
62                          LEVEL_SENSITIVE == irq_data->edge_level ? "Level" : "Edge");
63
64         acpi_os_printf ("  Active %s\n",
65                          ACTIVE_LOW == irq_data->active_high_low ? "Low" : "High");
66
67         acpi_os_printf ("  %s\n",
68                          SHARED == irq_data->shared_exclusive ? "Shared" : "Exclusive");
69
70         acpi_os_printf ("  %X Interrupts ( ", irq_data->number_of_interrupts);
71
72         for (index = 0; index < irq_data->number_of_interrupts; index++) {
73                 acpi_os_printf ("%X ", irq_data->interrupts[index]);
74         }
75
76         acpi_os_printf (")\n");
77         return;
78 }
79
80
81 /*******************************************************************************
82  *
83  * FUNCTION:    Acpi_rs_dump_dma
84  *
85  * PARAMETERS:  Data            - pointer to the resource structure to dump.
86  *
87  * RETURN:      None
88  *
89  * DESCRIPTION: Prints out the various members of the Data structure type.
90  *
91  ******************************************************************************/
92
93 void
94 acpi_rs_dump_dma (
95         acpi_resource_data      *data)
96 {
97         acpi_resource_dma       *dma_data = (acpi_resource_dma *) data;
98         u8                      index = 0;
99
100
101         FUNCTION_ENTRY ();
102
103
104         acpi_os_printf ("DMA Resource\n");
105
106         switch (dma_data->type) {
107         case COMPATIBILITY:
108                 acpi_os_printf ("  Compatibility mode\n");
109                 break;
110
111         case TYPE_A:
112                 acpi_os_printf ("  Type A\n");
113                 break;
114
115         case TYPE_B:
116                 acpi_os_printf ("  Type B\n");
117                 break;
118
119         case TYPE_F:
120                 acpi_os_printf ("  Type F\n");
121                 break;
122
123         default:
124                 acpi_os_printf ("  Invalid DMA type\n");
125                 break;
126         }
127
128         acpi_os_printf ("  %sBus Master\n",
129                          BUS_MASTER == dma_data->bus_master ? "" : "Not a ");
130
131
132         switch (dma_data->transfer) {
133         case TRANSFER_8:
134                 acpi_os_printf ("  8-bit only transfer\n");
135                 break;
136
137         case TRANSFER_8_16:
138                 acpi_os_printf ("  8 and 16-bit transfer\n");
139                 break;
140
141         case TRANSFER_16:
142                 acpi_os_printf ("  16 bit only transfer\n");
143                 break;
144
145         default:
146                 acpi_os_printf ("  Invalid transfer preference\n");
147                 break;
148         }
149
150         acpi_os_printf ("  Number of Channels: %X ( ", dma_data->number_of_channels);
151
152         for (index = 0; index < dma_data->number_of_channels; index++) {
153                 acpi_os_printf ("%X ", dma_data->channels[index]);
154         }
155
156         acpi_os_printf (")\n");
157         return;
158 }
159
160
161 /*******************************************************************************
162  *
163  * FUNCTION:    Acpi_rs_dump_start_dependent_functions
164  *
165  * PARAMETERS:  Data            - pointer to the resource structure to dump.
166  *
167  * RETURN:      None
168  *
169  * DESCRIPTION: Prints out the various members of the Data structure type.
170  *
171  ******************************************************************************/
172
173 void
174 acpi_rs_dump_start_dependent_functions (
175         acpi_resource_data          *data)
176 {
177         acpi_resource_start_dpf     *sdf_data = (acpi_resource_start_dpf *) data;
178
179
180         FUNCTION_ENTRY ();
181
182
183         acpi_os_printf ("Start Dependent Functions Resource\n");
184
185         switch (sdf_data->compatibility_priority) {
186         case GOOD_CONFIGURATION:
187                 acpi_os_printf ("  Good configuration\n");
188                 break;
189
190         case ACCEPTABLE_CONFIGURATION:
191                 acpi_os_printf ("  Acceptable configuration\n");
192                 break;
193
194         case SUB_OPTIMAL_CONFIGURATION:
195                 acpi_os_printf ("  Sub-optimal configuration\n");
196                 break;
197
198         default:
199                 acpi_os_printf ("  Invalid compatibility priority\n");
200                 break;
201         }
202
203         switch(sdf_data->performance_robustness) {
204         case GOOD_CONFIGURATION:
205                 acpi_os_printf ("  Good configuration\n");
206                 break;
207
208         case ACCEPTABLE_CONFIGURATION:
209                 acpi_os_printf ("  Acceptable configuration\n");
210                 break;
211
212         case SUB_OPTIMAL_CONFIGURATION:
213                 acpi_os_printf ("  Sub-optimal configuration\n");
214                 break;
215
216         default:
217                 acpi_os_printf ("  Invalid performance "
218                                   "robustness preference\n");
219                 break;
220         }
221
222         return;
223 }
224
225
226 /*******************************************************************************
227  *
228  * FUNCTION:    Acpi_rs_dump_io
229  *
230  * PARAMETERS:  Data            - pointer to the resource structure to dump.
231  *
232  * RETURN:      None
233  *
234  * DESCRIPTION: Prints out the various members of the Data structure type.
235  *
236  ******************************************************************************/
237
238 void
239 acpi_rs_dump_io (
240         acpi_resource_data      *data)
241 {
242         acpi_resource_io        *io_data = (acpi_resource_io *) data;
243
244
245         FUNCTION_ENTRY ();
246
247
248         acpi_os_printf ("Io Resource\n");
249
250         acpi_os_printf ("  %d bit decode\n",
251                          DECODE_16 == io_data->io_decode ? 16 : 10);
252
253         acpi_os_printf ("  Range minimum base: %08X\n",
254                          io_data->min_base_address);
255
256         acpi_os_printf ("  Range maximum base: %08X\n",
257                          io_data->max_base_address);
258
259         acpi_os_printf ("  Alignment: %08X\n",
260                          io_data->alignment);
261
262         acpi_os_printf ("  Range Length: %08X\n",
263                          io_data->range_length);
264
265         return;
266 }
267
268
269 /*******************************************************************************
270  *
271  * FUNCTION:    Acpi_rs_dump_fixed_io
272  *
273  * PARAMETERS:  Data            - pointer to the resource structure to dump.
274  *
275  * RETURN:      None
276  *
277  * DESCRIPTION: Prints out the various members of the Data structure type.
278  *
279  ******************************************************************************/
280
281 void
282 acpi_rs_dump_fixed_io (
283         acpi_resource_data      *data)
284 {
285         acpi_resource_fixed_io  *fixed_io_data = (acpi_resource_fixed_io *) data;
286
287
288         FUNCTION_ENTRY ();
289
290
291         acpi_os_printf ("Fixed Io Resource\n");
292         acpi_os_printf ("  Range base address: %08X",
293                          fixed_io_data->base_address);
294
295         acpi_os_printf ("  Range length: %08X",
296                          fixed_io_data->range_length);
297
298         return;
299 }
300
301
302 /*******************************************************************************
303  *
304  * FUNCTION:    Acpi_rs_dump_vendor_specific
305  *
306  * PARAMETERS:  Data            - pointer to the resource structure to dump.
307  *
308  * RETURN:      None
309  *
310  * DESCRIPTION: Prints out the various members of the Data structure type.
311  *
312  ******************************************************************************/
313
314 void
315 acpi_rs_dump_vendor_specific (
316         acpi_resource_data      *data)
317 {
318         acpi_resource_vendor    *vendor_data = (acpi_resource_vendor *) data;
319         u16                     index = 0;
320
321
322         FUNCTION_ENTRY ();
323
324
325         acpi_os_printf ("Vendor Specific Resource\n");
326
327         acpi_os_printf ("  Length: %08X\n", vendor_data->length);
328
329         for (index = 0; index < vendor_data->length; index++) {
330                 acpi_os_printf ("  Byte %X: %08X\n",
331                                  index, vendor_data->reserved[index]);
332         }
333
334         return;
335 }
336
337
338 /*******************************************************************************
339  *
340  * FUNCTION:    Acpi_rs_dump_memory24
341  *
342  * PARAMETERS:  Data            - pointer to the resource structure to dump.
343  *
344  * RETURN:      None
345  *
346  * DESCRIPTION: Prints out the various members of the Data structure type.
347  *
348  ******************************************************************************/
349
350 void
351 acpi_rs_dump_memory24 (
352         acpi_resource_data      *data)
353 {
354         acpi_resource_mem24     *memory24_data = (acpi_resource_mem24 *) data;
355
356
357         FUNCTION_ENTRY ();
358
359
360         acpi_os_printf ("24-Bit Memory Range Resource\n");
361
362         acpi_os_printf ("  Read%s\n",
363                          READ_WRITE_MEMORY ==
364                          memory24_data->read_write_attribute ?
365                          "/Write" : " only");
366
367         acpi_os_printf ("  Range minimum base: %08X\n",
368                          memory24_data->min_base_address);
369
370         acpi_os_printf ("  Range maximum base: %08X\n",
371                          memory24_data->max_base_address);
372
373         acpi_os_printf ("  Alignment: %08X\n",
374                          memory24_data->alignment);
375
376         acpi_os_printf ("  Range length: %08X\n",
377                          memory24_data->range_length);
378
379         return;
380 }
381
382
383 /*******************************************************************************
384  *
385  * FUNCTION:    Acpi_rs_dump_memory32
386  *
387  * PARAMETERS:  Data            - pointer to the resource structure to dump.
388  *
389  * RETURN:      None
390  *
391  * DESCRIPTION: Prints out the various members of the Data structure type.
392  *
393  ******************************************************************************/
394
395 void
396 acpi_rs_dump_memory32 (
397         acpi_resource_data      *data)
398 {
399         acpi_resource_mem32     *memory32_data = (acpi_resource_mem32 *) data;
400
401
402         FUNCTION_ENTRY ();
403
404
405         acpi_os_printf ("32-Bit Memory Range Resource\n");
406
407         acpi_os_printf ("  Read%s\n",
408                          READ_WRITE_MEMORY ==
409                          memory32_data->read_write_attribute ?
410                          "/Write" : " only");
411
412         acpi_os_printf ("  Range minimum base: %08X\n",
413                          memory32_data->min_base_address);
414
415         acpi_os_printf ("  Range maximum base: %08X\n",
416                          memory32_data->max_base_address);
417
418         acpi_os_printf ("  Alignment: %08X\n",
419                          memory32_data->alignment);
420
421         acpi_os_printf ("  Range length: %08X\n",
422                          memory32_data->range_length);
423
424         return;
425 }
426
427
428 /*******************************************************************************
429  *
430  * FUNCTION:    Acpi_rs_dump_fixed_memory32
431  *
432  * PARAMETERS:  Data            - pointer to the resource structure to dump.
433  *
434  * RETURN:
435  *
436  * DESCRIPTION: Prints out the various members of the Data structure type.
437  *
438  ******************************************************************************/
439
440 void
441 acpi_rs_dump_fixed_memory32 (
442         acpi_resource_data          *data)
443 {
444         acpi_resource_fixed_mem32   *fixed_memory32_data = (acpi_resource_fixed_mem32 *) data;
445
446
447         FUNCTION_ENTRY ();
448
449
450         acpi_os_printf ("32-Bit Fixed Location Memory Range Resource\n");
451
452         acpi_os_printf ("  Read%s\n",
453                          READ_WRITE_MEMORY ==
454                          fixed_memory32_data->read_write_attribute ?
455                          "/Write" : " Only");
456
457         acpi_os_printf ("  Range base address: %08X\n",
458                          fixed_memory32_data->range_base_address);
459
460         acpi_os_printf ("  Range length: %08X\n",
461                          fixed_memory32_data->range_length);
462
463         return;
464 }
465
466
467 /*******************************************************************************
468  *
469  * FUNCTION:    Acpi_rs_dump_address16
470  *
471  * PARAMETERS:  Data            - pointer to the resource structure to dump.
472  *
473  * RETURN:      None
474  *
475  * DESCRIPTION: Prints out the various members of the Data structure type.
476  *
477  ******************************************************************************/
478
479 void
480 acpi_rs_dump_address16 (
481         acpi_resource_data      *data)
482 {
483         acpi_resource_address16 *address16_data = (acpi_resource_address16 *) data;
484
485
486         FUNCTION_ENTRY ();
487
488
489         acpi_os_printf ("16-Bit Address Space Resource\n");
490         acpi_os_printf ("  Resource Type: ");
491
492         switch (address16_data->resource_type) {
493         case MEMORY_RANGE:
494
495                 acpi_os_printf ("Memory Range\n");
496
497                 switch (address16_data->attribute.memory.cache_attribute) {
498                 case NON_CACHEABLE_MEMORY:
499                         acpi_os_printf ("  Type Specific: "
500                                           "Noncacheable memory\n");
501                         break;
502
503                 case CACHABLE_MEMORY:
504                         acpi_os_printf ("  Type Specific: "
505                                           "Cacheable memory\n");
506                         break;
507
508                 case WRITE_COMBINING_MEMORY:
509                         acpi_os_printf ("  Type Specific: "
510                                           "Write-combining memory\n");
511                         break;
512
513                 case PREFETCHABLE_MEMORY:
514                         acpi_os_printf ("  Type Specific: "
515                                           "Prefetchable memory\n");
516                         break;
517
518                 default:
519                         acpi_os_printf ("  Type Specific: "
520                                           "Invalid cache attribute\n");
521                         break;
522                 }
523
524                 acpi_os_printf ("  Type Specific: Read%s\n",
525                         READ_WRITE_MEMORY ==
526                         address16_data->attribute.memory.read_write_attribute ?
527                         "/Write" : " Only");
528                 break;
529
530         case IO_RANGE:
531
532                 acpi_os_printf ("I/O Range\n");
533
534                 switch (address16_data->attribute.io.range_attribute) {
535                 case NON_ISA_ONLY_RANGES:
536                         acpi_os_printf ("  Type Specific: "
537                                           "Non-ISA Io Addresses\n");
538                         break;
539
540                 case ISA_ONLY_RANGES:
541                         acpi_os_printf ("  Type Specific: "
542                                           "ISA Io Addresses\n");
543                         break;
544
545                 case ENTIRE_RANGE:
546                         acpi_os_printf ("  Type Specific: "
547                                           "ISA and non-ISA Io Addresses\n");
548                         break;
549
550                 default:
551                         acpi_os_printf ("  Type Specific: "
552                                           "Invalid range attribute\n");
553                         break;
554                 }
555                 break;
556
557         case BUS_NUMBER_RANGE:
558
559                 acpi_os_printf ("Bus Number Range\n");
560                 break;
561
562         default:
563
564                 acpi_os_printf ("Invalid resource type. Exiting.\n");
565                 return;
566         }
567
568         acpi_os_printf ("  Resource %s\n",
569                         CONSUMER == address16_data->producer_consumer ?
570                         "Consumer" : "Producer");
571
572         acpi_os_printf ("  %s decode\n",
573                          SUB_DECODE == address16_data->decode ?
574                          "Subtractive" : "Positive");
575
576         acpi_os_printf ("  Min address is %s fixed\n",
577                          ADDRESS_FIXED == address16_data->min_address_fixed ?
578                          "" : "not");
579
580         acpi_os_printf ("  Max address is %s fixed\n",
581                          ADDRESS_FIXED == address16_data->max_address_fixed ?
582                          "" : "not");
583
584         acpi_os_printf ("  Granularity: %08X\n",
585                          address16_data->granularity);
586
587         acpi_os_printf ("  Address range min: %08X\n",
588                          address16_data->min_address_range);
589
590         acpi_os_printf ("  Address range max: %08X\n",
591                          address16_data->max_address_range);
592
593         acpi_os_printf ("  Address translation offset: %08X\n",
594                          address16_data->address_translation_offset);
595
596         acpi_os_printf ("  Address Length: %08X\n",
597                          address16_data->address_length);
598
599         if (0xFF != address16_data->resource_source.index) {
600                 acpi_os_printf ("  Resource Source Index: %X\n",
601                                  address16_data->resource_source.index);
602                 acpi_os_printf ("  Resource Source: %s\n",
603                                  address16_data->resource_source.string_ptr);
604         }
605
606         return;
607 }
608
609
610 /*******************************************************************************
611  *
612  * FUNCTION:    Acpi_rs_dump_address32
613  *
614  * PARAMETERS:  Data            - pointer to the resource structure to dump.
615  *
616  * RETURN:      None
617  *
618  * DESCRIPTION: Prints out the various members of the Data structure type.
619  *
620  ******************************************************************************/
621
622 void
623 acpi_rs_dump_address32 (
624         acpi_resource_data      *data)
625 {
626         acpi_resource_address32 *address32_data = (acpi_resource_address32 *) data;
627
628
629         FUNCTION_ENTRY ();
630
631
632         acpi_os_printf ("32-Bit Address Space Resource\n");
633
634         switch (address32_data->resource_type) {
635         case MEMORY_RANGE:
636
637                 acpi_os_printf ("  Resource Type: Memory Range\n");
638
639                 switch (address32_data->attribute.memory.cache_attribute) {
640                 case NON_CACHEABLE_MEMORY:
641                         acpi_os_printf ("  Type Specific: "
642                                           "Noncacheable memory\n");
643                         break;
644
645                 case CACHABLE_MEMORY:
646                         acpi_os_printf ("  Type Specific: "
647                                           "Cacheable memory\n");
648                         break;
649
650                 case WRITE_COMBINING_MEMORY:
651                         acpi_os_printf ("  Type Specific: "
652                                           "Write-combining memory\n");
653                         break;
654
655                 case PREFETCHABLE_MEMORY:
656                         acpi_os_printf ("  Type Specific: "
657                                           "Prefetchable memory\n");
658                         break;
659
660                 default:
661                         acpi_os_printf ("  Type Specific: "
662                                           "Invalid cache attribute\n");
663                         break;
664                 }
665
666                 acpi_os_printf ("  Type Specific: Read%s\n",
667                         READ_WRITE_MEMORY ==
668                         address32_data->attribute.memory.read_write_attribute ?
669                         "/Write" : " Only");
670                 break;
671
672         case IO_RANGE:
673
674                 acpi_os_printf ("  Resource Type: Io Range\n");
675
676                 switch (address32_data->attribute.io.range_attribute) {
677                         case NON_ISA_ONLY_RANGES:
678                                 acpi_os_printf ("  Type Specific: "
679                                                   "Non-ISA Io Addresses\n");
680                                 break;
681
682                         case ISA_ONLY_RANGES:
683                                 acpi_os_printf ("  Type Specific: "
684                                                   "ISA Io Addresses\n");
685                                 break;
686
687                         case ENTIRE_RANGE:
688                                 acpi_os_printf ("  Type Specific: "
689                                                   "ISA and non-ISA Io Addresses\n");
690                                 break;
691
692                         default:
693                                 acpi_os_printf ("  Type Specific: "
694                                                   "Invalid Range attribute");
695                                 break;
696                         }
697                 break;
698
699         case BUS_NUMBER_RANGE:
700
701                 acpi_os_printf ("  Resource Type: Bus Number Range\n");
702                 break;
703
704         default:
705
706                 acpi_os_printf ("  Invalid Resource Type..exiting.\n");
707                 return;
708         }
709
710         acpi_os_printf ("  Resource %s\n",
711                          CONSUMER == address32_data->producer_consumer ?
712                          "Consumer" : "Producer");
713
714         acpi_os_printf ("  %s decode\n",
715                          SUB_DECODE == address32_data->decode ?
716                          "Subtractive" : "Positive");
717
718         acpi_os_printf ("  Min address is %s fixed\n",
719                          ADDRESS_FIXED == address32_data->min_address_fixed ?
720                          "" : "not ");
721
722         acpi_os_printf ("  Max address is %s fixed\n",
723                          ADDRESS_FIXED == address32_data->max_address_fixed ?
724                          "" : "not ");
725
726         acpi_os_printf ("  Granularity: %08X\n",
727                          address32_data->granularity);
728
729         acpi_os_printf ("  Address range min: %08X\n",
730                          address32_data->min_address_range);
731
732         acpi_os_printf ("  Address range max: %08X\n",
733                          address32_data->max_address_range);
734
735         acpi_os_printf ("  Address translation offset: %08X\n",
736                          address32_data->address_translation_offset);
737
738         acpi_os_printf ("  Address Length: %08X\n",
739                          address32_data->address_length);
740
741         if(0xFF != address32_data->resource_source.index) {
742                 acpi_os_printf ("  Resource Source Index: %X\n",
743                                  address32_data->resource_source.index);
744                 acpi_os_printf ("  Resource Source: %s\n",
745                                  address32_data->resource_source.string_ptr);
746         }
747
748         return;
749 }
750
751
752 /*******************************************************************************
753  *
754  * FUNCTION:    Acpi_rs_dump_address64
755  *
756  * PARAMETERS:  Data            - pointer to the resource structure to dump.
757  *
758  * RETURN:      None
759  *
760  * DESCRIPTION: Prints out the various members of the Data structure type.
761  *
762  ******************************************************************************/
763
764 void
765 acpi_rs_dump_address64 (
766         acpi_resource_data      *data)
767 {
768         acpi_resource_address64 *address64_data = (acpi_resource_address64 *) data;
769
770
771         FUNCTION_ENTRY ();
772
773
774         acpi_os_printf ("64-Bit Address Space Resource\n");
775
776         switch (address64_data->resource_type) {
777         case MEMORY_RANGE:
778
779                 acpi_os_printf ("  Resource Type: Memory Range\n");
780
781                 switch (address64_data->attribute.memory.cache_attribute) {
782                 case NON_CACHEABLE_MEMORY:
783                         acpi_os_printf ("  Type Specific: "
784                                           "Noncacheable memory\n");
785                         break;
786
787                 case CACHABLE_MEMORY:
788                         acpi_os_printf ("  Type Specific: "
789                                           "Cacheable memory\n");
790                         break;
791
792                 case WRITE_COMBINING_MEMORY:
793                         acpi_os_printf ("  Type Specific: "
794                                           "Write-combining memory\n");
795                         break;
796
797                 case PREFETCHABLE_MEMORY:
798                         acpi_os_printf ("  Type Specific: "
799                                           "Prefetchable memory\n");
800                         break;
801
802                 default:
803                         acpi_os_printf ("  Type Specific: "
804                                           "Invalid cache attribute\n");
805                         break;
806                 }
807
808                 acpi_os_printf ("  Type Specific: Read%s\n",
809                         READ_WRITE_MEMORY ==
810                         address64_data->attribute.memory.read_write_attribute ?
811                         "/Write" : " Only");
812                 break;
813
814         case IO_RANGE:
815
816                 acpi_os_printf ("  Resource Type: Io Range\n");
817
818                 switch (address64_data->attribute.io.range_attribute) {
819                         case NON_ISA_ONLY_RANGES:
820                                 acpi_os_printf ("  Type Specific: "
821                                                   "Non-ISA Io Addresses\n");
822                                 break;
823
824                         case ISA_ONLY_RANGES:
825                                 acpi_os_printf ("  Type Specific: "
826                                                   "ISA Io Addresses\n");
827                                 break;
828
829                         case ENTIRE_RANGE:
830                                 acpi_os_printf ("  Type Specific: "
831                                                   "ISA and non-ISA Io Addresses\n");
832                                 break;
833
834                         default:
835                                 acpi_os_printf ("  Type Specific: "
836                                                   "Invalid Range attribute");
837                                 break;
838                         }
839                 break;
840
841         case BUS_NUMBER_RANGE:
842
843                 acpi_os_printf ("  Resource Type: Bus Number Range\n");
844                 break;
845
846         default:
847
848                 acpi_os_printf ("  Invalid Resource Type..exiting.\n");
849                 return;
850         }
851
852         acpi_os_printf ("  Resource %s\n",
853                          CONSUMER == address64_data->producer_consumer ?
854                          "Consumer" : "Producer");
855
856         acpi_os_printf ("  %s decode\n",
857                          SUB_DECODE == address64_data->decode ?
858                          "Subtractive" : "Positive");
859
860         acpi_os_printf ("  Min address is %s fixed\n",
861                          ADDRESS_FIXED == address64_data->min_address_fixed ?
862                          "" : "not ");
863
864         acpi_os_printf ("  Max address is %s fixed\n",
865                          ADDRESS_FIXED == address64_data->max_address_fixed ?
866                          "" : "not ");
867
868         acpi_os_printf ("  Granularity: %16X\n",
869                          address64_data->granularity);
870
871         acpi_os_printf ("  Address range min: %16X\n",
872                          address64_data->min_address_range);
873
874         acpi_os_printf ("  Address range max: %16X\n",
875                          address64_data->max_address_range);
876
877         acpi_os_printf ("  Address translation offset: %16X\n",
878                          address64_data->address_translation_offset);
879
880         acpi_os_printf ("  Address Length: %16X\n",
881                          address64_data->address_length);
882
883         if(0xFF != address64_data->resource_source.index) {
884                 acpi_os_printf ("  Resource Source Index: %X\n",
885                                  address64_data->resource_source.index);
886                 acpi_os_printf ("  Resource Source: %s\n",
887                                  address64_data->resource_source.string_ptr);
888         }
889
890         return;
891 }
892
893
894 /*******************************************************************************
895  *
896  * FUNCTION:    Acpi_rs_dump_extended_irq
897  *
898  * PARAMETERS:  Data            - pointer to the resource structure to dump.
899  *
900  * RETURN:      None
901  *
902  * DESCRIPTION: Prints out the various members of the Data structure type.
903  *
904  ******************************************************************************/
905
906 void
907 acpi_rs_dump_extended_irq (
908         acpi_resource_data      *data)
909 {
910         acpi_resource_ext_irq   *ext_irq_data = (acpi_resource_ext_irq *) data;
911         u8                      index = 0;
912
913
914         FUNCTION_ENTRY ();
915
916
917         acpi_os_printf ("Extended IRQ Resource\n");
918
919         acpi_os_printf ("  Resource %s\n",
920                          CONSUMER == ext_irq_data->producer_consumer ?
921                          "Consumer" : "Producer");
922
923         acpi_os_printf ("  %s\n",
924                          LEVEL_SENSITIVE == ext_irq_data->edge_level ?
925                          "Level" : "Edge");
926
927         acpi_os_printf ("  Active %s\n",
928                          ACTIVE_LOW == ext_irq_data->active_high_low ?
929                          "low" : "high");
930
931         acpi_os_printf ("  %s\n",
932                          SHARED == ext_irq_data->shared_exclusive ?
933                          "Shared" : "Exclusive");
934
935         acpi_os_printf ("  Interrupts : %X ( ",
936                          ext_irq_data->number_of_interrupts);
937
938         for (index = 0; index < ext_irq_data->number_of_interrupts; index++) {
939                 acpi_os_printf ("%X ", ext_irq_data->interrupts[index]);
940         }
941
942         acpi_os_printf (")\n");
943
944         if(0xFF != ext_irq_data->resource_source.index) {
945                 acpi_os_printf ("  Resource Source Index: %X",
946                                  ext_irq_data->resource_source.index);
947                 acpi_os_printf ("  Resource Source: %s",
948                                  ext_irq_data->resource_source.string_ptr);
949         }
950
951         return;
952 }
953
954
955 /*******************************************************************************
956  *
957  * FUNCTION:    Acpi_rs_dump_resource_list
958  *
959  * PARAMETERS:  Data            - pointer to the resource structure to dump.
960  *
961  * RETURN:      None
962  *
963  * DESCRIPTION: Dispatches the structure to the correct dump routine.
964  *
965  ******************************************************************************/
966
967 void
968 acpi_rs_dump_resource_list (
969         acpi_resource       *resource)
970 {
971         u8                  count = 0;
972         u8                  done = FALSE;
973
974
975         FUNCTION_ENTRY ();
976
977
978         if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
979                 while (!done) {
980                         acpi_os_printf ("Resource structure %x.\n", count++);
981
982                         switch (resource->id) {
983                         case ACPI_RSTYPE_IRQ:
984                                 acpi_rs_dump_irq (&resource->data);
985                                 break;
986
987                         case ACPI_RSTYPE_DMA:
988                                 acpi_rs_dump_dma (&resource->data);
989                                 break;
990
991                         case ACPI_RSTYPE_START_DPF:
992                                 acpi_rs_dump_start_dependent_functions (&resource->data);
993                                 break;
994
995                         case ACPI_RSTYPE_END_DPF:
996                                 acpi_os_printf ("End_dependent_functions Resource\n");
997                                 /* Acpi_rs_dump_end_dependent_functions (Resource->Data);*/
998                                 break;
999
1000                         case ACPI_RSTYPE_IO:
1001                                 acpi_rs_dump_io (&resource->data);
1002                                 break;
1003
1004                         case ACPI_RSTYPE_FIXED_IO:
1005                                 acpi_rs_dump_fixed_io (&resource->data);
1006                                 break;
1007
1008                         case ACPI_RSTYPE_VENDOR:
1009                                 acpi_rs_dump_vendor_specific (&resource->data);
1010                                 break;
1011
1012                         case ACPI_RSTYPE_END_TAG:
1013                                 /*Rs_dump_end_tag (Resource->Data);*/
1014                                 acpi_os_printf ("End_tag Resource\n");
1015                                 done = TRUE;
1016                                 break;
1017
1018                         case ACPI_RSTYPE_MEM24:
1019                                 acpi_rs_dump_memory24 (&resource->data);
1020                                 break;
1021
1022                         case ACPI_RSTYPE_MEM32:
1023                                 acpi_rs_dump_memory32 (&resource->data);
1024                                 break;
1025
1026                         case ACPI_RSTYPE_FIXED_MEM32:
1027                                 acpi_rs_dump_fixed_memory32 (&resource->data);
1028                                 break;
1029
1030                         case ACPI_RSTYPE_ADDRESS16:
1031                                 acpi_rs_dump_address16 (&resource->data);
1032                                 break;
1033
1034                         case ACPI_RSTYPE_ADDRESS32:
1035                                 acpi_rs_dump_address32 (&resource->data);
1036                                 break;
1037
1038                         case ACPI_RSTYPE_ADDRESS64:
1039                                 acpi_rs_dump_address64 (&resource->data);
1040                                 break;
1041
1042                         case ACPI_RSTYPE_EXT_IRQ:
1043                                 acpi_rs_dump_extended_irq (&resource->data);
1044                                 break;
1045
1046                         default:
1047                                 acpi_os_printf ("Invalid resource type\n");
1048                                 break;
1049
1050                         }
1051
1052                         resource = POINTER_ADD (acpi_resource, resource, resource->length);
1053                 }
1054         }
1055
1056         return;
1057 }
1058
1059 /*******************************************************************************
1060  *
1061  * FUNCTION:    Acpi_rs_dump_irq_list
1062  *
1063  * PARAMETERS:  Data            - pointer to the routing table to dump.
1064  *
1065  * RETURN:      None
1066  *
1067  * DESCRIPTION: Dispatches the structures to the correct dump routine.
1068  *
1069  ******************************************************************************/
1070
1071 void
1072 acpi_rs_dump_irq_list (
1073         u8                  *route_table)
1074 {
1075         u8                  *buffer = route_table;
1076         u8                  count = 0;
1077         u8                  done = FALSE;
1078         pci_routing_table   *prt_element;
1079
1080
1081         FUNCTION_ENTRY ();
1082
1083
1084         if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1085                 prt_element = (pci_routing_table *) buffer;
1086
1087                 while (!done) {
1088                         acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
1089
1090                         acpi_os_printf ("  Address: %X\n",
1091                                          prt_element->address);
1092
1093                         acpi_os_printf ("  Pin: %X\n", prt_element->pin);
1094
1095                         acpi_os_printf ("  Source: %s\n", prt_element->source);
1096
1097                         acpi_os_printf ("  Source_index: %X\n",
1098                                          prt_element->source_index);
1099
1100                         buffer += prt_element->length;
1101
1102                         prt_element = (pci_routing_table *) buffer;
1103
1104                         if(0 == prt_element->length) {
1105                                 done = TRUE;
1106                         }
1107                 }
1108         }
1109
1110         return;
1111 }
1112
1113 #endif
1114