rsdump.c revision 67754
1/*******************************************************************************
2 *
3 * Module Name: rsdump - Functions do dump out the resource structures.
4 *              $Revision: 11 $
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, Intel Corp.  All rights
13 * reserved.
14 *
15 * 2. License
16 *
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights.  You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
20 * property rights.
21 *
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
28 *
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code.  No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
37 *
38 * The above copyright and patent license is granted only if the following
39 * conditions are met:
40 *
41 * 3. Conditions
42 *
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision.  In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change.  Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee.  Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
54 *
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution.  In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
65 * make.
66 *
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
71 * distribution.
72 *
73 * 3.4. Intel retains all right, title, and interest in and to the Original
74 * Intel Code.
75 *
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
80 *
81 * 4. Disclaimer and Export Compliance
82 *
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89 * PARTICULAR PURPOSE.
90 *
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98 * LIMITED REMEDY.
99 *
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government.  In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
114 *
115 *****************************************************************************/
116
117
118#define __RSDUMP_C__
119
120#include "acpi.h"
121
122#define _COMPONENT          RESOURCE_MANAGER
123        MODULE_NAME         ("rsdump")
124
125
126/*******************************************************************************
127 *
128 * FUNCTION:    AcpiRsDumpIrq
129 *
130 * PARAMETERS:  Data            - pointer to the resource structure to dump.
131 *
132 * RETURN:
133 *
134 * DESCRIPTION: Prints out the various members of the Data structure type.
135 *
136 ******************************************************************************/
137
138void
139AcpiRsDumpIrq (
140    RESOURCE_DATA           *Data)
141{
142    IRQ_RESOURCE            *IrqData = (IRQ_RESOURCE*) Data;
143    UINT8                   Index = 0;
144
145
146    AcpiOsPrintf ("\tIRQ Resource\n");
147
148    AcpiOsPrintf ("\t\t%s Triggered\n",
149                LEVEL_SENSITIVE == IrqData->EdgeLevel ?
150                "Level" : "Edge");
151
152    AcpiOsPrintf ("\t\tActive %s\n",
153                ACTIVE_LOW == IrqData->ActiveHighLow ?
154                "Low" : "High");
155
156    AcpiOsPrintf ("\t\t%s\n",
157                SHARED == IrqData->SharedExclusive ?
158                "Shared" : "Exclusive");
159
160    AcpiOsPrintf ("\t\t%d Interrupts ( ",
161                IrqData->NumberOfInterrupts);
162
163    for (Index = 0; Index < IrqData->NumberOfInterrupts; Index++)
164    {
165        AcpiOsPrintf ("%d ", IrqData->Interrupts[Index]);
166    }
167
168    AcpiOsPrintf (")\n");
169    return;
170}
171
172
173/*******************************************************************************
174 *
175 * FUNCTION:    AcpiRsDumpDma
176 *
177 * PARAMETERS:  Data            - pointer to the resource structure to dump.
178 *
179 * RETURN:
180 *
181 * DESCRIPTION: Prints out the various members of the Data structure type.
182 *
183 ******************************************************************************/
184
185void
186AcpiRsDumpDma (
187    RESOURCE_DATA           *Data)
188{
189    DMA_RESOURCE            *DmaData = (DMA_RESOURCE*) Data;
190    UINT8                   Index = 0;
191
192
193    AcpiOsPrintf ("\tDMA Resource\n");
194
195    switch (DmaData->Type)
196    {
197    case COMPATIBILITY:
198        AcpiOsPrintf ("\t\tCompatibility mode\n");
199        break;
200
201    case TYPE_A:
202        AcpiOsPrintf ("\t\tType A\n");
203        break;
204
205    case TYPE_B:
206        AcpiOsPrintf ("\t\tType B\n");
207        break;
208
209    case TYPE_F:
210        AcpiOsPrintf ("\t\tType F\n");
211        break;
212
213    default:
214        AcpiOsPrintf ("\t\tInvalid DMA type\n");
215        break;
216    }
217
218    AcpiOsPrintf ("\t\t%sBus Master\n",
219                BUS_MASTER == DmaData->BusMaster ?
220                "" : "Not a ");
221
222    switch (DmaData->Transfer)
223    {
224    case TRANSFER_8:
225        AcpiOsPrintf ("\t\t8-bit only transfer\n");
226        break;
227
228    case TRANSFER_8_16:
229        AcpiOsPrintf ("\t\t8 and 16-bit transfer\n");
230        break;
231
232    case TRANSFER_16:
233        AcpiOsPrintf ("\t\t16 bit only transfer\n");
234        break;
235
236    default:
237        AcpiOsPrintf ("\t\tInvalid transfer preference\n");
238        break;
239    }
240
241    AcpiOsPrintf ("\t\tNumber of Channels: %d ( ",
242                DmaData->NumberOfChannels);
243
244    for (Index = 0; Index < DmaData->NumberOfChannels; Index++)
245    {
246        AcpiOsPrintf ("%d ", DmaData->Channels[Index]);
247    }
248
249    AcpiOsPrintf (")\n");
250    return;
251}
252
253
254/*******************************************************************************
255 *
256 * FUNCTION:    AcpiRsDumpStartDependentFunctions
257 *
258 * PARAMETERS:  Data            - pointer to the resource structure to dump.
259 *
260 * RETURN:
261 *
262 * DESCRIPTION: Prints out the various members of the Data structure type.
263 *
264 ******************************************************************************/
265
266void
267AcpiRsDumpStartDependentFunctions (
268    RESOURCE_DATA               *Data)
269{
270    START_DEPENDENT_FUNCTIONS_RESOURCE *SdfData =
271                        (START_DEPENDENT_FUNCTIONS_RESOURCE*) Data;
272
273
274    AcpiOsPrintf ("\tStart Dependent Functions Resource\n");
275
276    switch (SdfData->CompatibilityPriority)
277    {
278    case GOOD_CONFIGURATION:
279        AcpiOsPrintf ("\t\tGood configuration\n");
280        break;
281
282    case ACCEPTABLE_CONFIGURATION:
283        AcpiOsPrintf ("\t\tAcceptable configuration\n");
284        break;
285
286    case SUB_OPTIMAL_CONFIGURATION:
287        AcpiOsPrintf ("\t\tSub-optimal configuration\n");
288        break;
289
290    default:
291        AcpiOsPrintf ("\t\tInvalid compatibility priority\n");
292        break;
293    }
294
295    switch(SdfData->PerformanceRobustness)
296    {
297    case GOOD_CONFIGURATION:
298        AcpiOsPrintf ("\t\tGood configuration\n");
299        break;
300
301    case ACCEPTABLE_CONFIGURATION:
302        AcpiOsPrintf ("\t\tAcceptable configuration\n");
303        break;
304
305    case SUB_OPTIMAL_CONFIGURATION:
306        AcpiOsPrintf ("\t\tSub-optimal configuration\n");
307        break;
308
309    default:
310        AcpiOsPrintf ("\t\tInvalid performance "
311                        "robustness preference\n");
312        break;
313    }
314
315    return;
316}
317
318
319/*******************************************************************************
320 *
321 * FUNCTION:    AcpiRsDumpIo
322 *
323 * PARAMETERS:  Data            - pointer to the resource structure to dump.
324 *
325 * RETURN:
326 *
327 * DESCRIPTION: Prints out the various members of the Data structure type.
328 *
329 ******************************************************************************/
330
331void
332AcpiRsDumpIo (
333    RESOURCE_DATA       *Data)
334{
335    IO_RESOURCE         *IoData = (IO_RESOURCE*) Data;
336
337
338    AcpiOsPrintf ("\tIo Resource\n");
339
340    AcpiOsPrintf ("\t\t%d bit decode\n",
341                DECODE_16 == IoData->IoDecode ? 16 : 10);
342
343    AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
344                IoData->MinBaseAddress);
345
346    AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
347                IoData->MaxBaseAddress);
348
349    AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
350                IoData->Alignment);
351
352    AcpiOsPrintf ("\t\tRange Length: 0x%08x\n",
353                IoData->RangeLength);
354
355    return;
356}
357
358
359/*******************************************************************************
360 *
361 * FUNCTION:    AcpiRsDumpFixedIo
362 *
363 * PARAMETERS:  Data            - pointer to the resource structure to dump.
364 *
365 * RETURN:
366 *
367 * DESCRIPTION: Prints out the various members of the Data structure type.
368 *
369 ******************************************************************************/
370
371void
372AcpiRsDumpFixedIo (
373    RESOURCE_DATA           *Data)
374{
375    FIXED_IO_RESOURCE       *FixedIoData = (FIXED_IO_RESOURCE*) Data;
376
377
378    AcpiOsPrintf ("\tFixed Io Resource\n");
379    AcpiOsPrintf ("\t\tRange base address: 0x%08x",
380                FixedIoData->BaseAddress);
381
382    AcpiOsPrintf ("\t\tRange length: 0x%08x",
383                FixedIoData->RangeLength);
384
385    return;
386}
387
388
389/*******************************************************************************
390 *
391 * FUNCTION:    AcpiRsDumpVendorSpecific
392 *
393 * PARAMETERS:  Data            - pointer to the resource structure to dump.
394 *
395 * RETURN:
396 *
397 * DESCRIPTION: Prints out the various members of the Data structure type.
398 *
399 ******************************************************************************/
400
401void
402AcpiRsDumpVendorSpecific (
403    RESOURCE_DATA           *Data)
404{
405    VENDOR_RESOURCE         *VendorData = (VENDOR_RESOURCE*) Data;
406    UINT16                  Index = 0;
407
408
409    AcpiOsPrintf ("\tVendor Specific Resource\n");
410
411    AcpiOsPrintf ("\t\tLength: 0x%08x\n", VendorData->Length);
412
413    for (Index = 0; Index < VendorData->Length; Index++)
414    {
415        AcpiOsPrintf ("\t\tByte %d: 0x%08x\n",
416                    Index, VendorData->Reserved[Index]);
417    }
418
419    return;
420}
421
422
423/*******************************************************************************
424 *
425 * FUNCTION:    AcpiRsDumpMemory24
426 *
427 * PARAMETERS:  Data            - pointer to the resource structure to dump.
428 *
429 * RETURN:
430 *
431 * DESCRIPTION: Prints out the various members of the Data structure type.
432 *
433 ******************************************************************************/
434
435void
436AcpiRsDumpMemory24 (
437    RESOURCE_DATA           *Data)
438{
439    MEMORY24_RESOURCE       *Memory24Data = (MEMORY24_RESOURCE*) Data;
440
441
442    AcpiOsPrintf ("\t24-Bit Memory Range Resource\n");
443
444    AcpiOsPrintf ("\t\tRead%s\n",
445                READ_WRITE_MEMORY ==
446                Memory24Data->ReadWriteAttribute ?
447                "/Write" : " only");
448
449    AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
450                Memory24Data->MinBaseAddress);
451
452    AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
453                Memory24Data->MaxBaseAddress);
454
455    AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
456                Memory24Data->Alignment);
457
458    AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
459                Memory24Data->RangeLength);
460
461    return;
462}
463
464
465/*******************************************************************************
466 *
467 * FUNCTION:    AcpiRsDumpMemory32
468 *
469 * PARAMETERS:  Data            - pointer to the resource structure to dump.
470 *
471 * RETURN:
472 *
473 * DESCRIPTION: Prints out the various members of the Data structure type.
474 *
475 ******************************************************************************/
476
477void
478AcpiRsDumpMemory32 (
479    RESOURCE_DATA           *Data)
480{
481    MEMORY32_RESOURCE       *Memory32Data = (MEMORY32_RESOURCE*) Data;
482
483
484    AcpiOsPrintf ("\t32-Bit Memory Range Resource\n");
485
486    AcpiOsPrintf ("\t\tRead%s\n",
487                READ_WRITE_MEMORY ==
488                Memory32Data->ReadWriteAttribute ?
489                "/Write" : " only");
490
491    AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
492                Memory32Data->MinBaseAddress);
493
494    AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
495                Memory32Data->MaxBaseAddress);
496
497    AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
498                Memory32Data->Alignment);
499
500    AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
501                Memory32Data->RangeLength);
502
503    return;
504}
505
506
507/*******************************************************************************
508 *
509 * FUNCTION:    AcpiRsDumpFixedMemory32
510 *
511 * PARAMETERS:  Data            - pointer to the resource structure to dump.
512 *
513 * RETURN:
514 *
515 * DESCRIPTION: Prints out the various members of the Data structure type.
516 *
517 ******************************************************************************/
518
519void
520AcpiRsDumpFixedMemory32 (
521    RESOURCE_DATA           *Data)
522{
523    FIXED_MEMORY32_RESOURCE *FixedMemory32Data = (FIXED_MEMORY32_RESOURCE*) Data;
524
525
526    AcpiOsPrintf ("\t32-Bit Fixed Location Memory Range Resource\n");
527
528    AcpiOsPrintf ("\t\tRead%s\n",
529                READ_WRITE_MEMORY ==
530                FixedMemory32Data->ReadWriteAttribute ?
531                "/Write" : " Only");
532
533    AcpiOsPrintf ("\t\tRange base address: 0x%08x\n",
534                FixedMemory32Data->RangeBaseAddress);
535
536    AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
537                FixedMemory32Data->RangeLength);
538
539    return;
540}
541
542
543/*******************************************************************************
544 *
545 * FUNCTION:    AcpiRsDumpAddress16
546 *
547 * PARAMETERS:  Data            - pointer to the resource structure to dump.
548 *
549 * RETURN:
550 *
551 * DESCRIPTION: Prints out the various members of the Data structure type.
552 *
553 ******************************************************************************/
554
555void
556AcpiRsDumpAddress16 (
557    RESOURCE_DATA           *Data)
558{
559    ADDRESS16_RESOURCE      *Address16Data = (ADDRESS16_RESOURCE*) Data;
560
561
562    AcpiOsPrintf ("\t16-Bit Address Space Resource\n");
563    AcpiOsPrintf ("\t\tResource Type: ");
564
565    switch (Address16Data->ResourceType)
566    {
567    case MEMORY_RANGE:
568
569        AcpiOsPrintf ("Memory Range\n");
570
571        switch (Address16Data->Attribute.Memory.CacheAttribute)
572        {
573        case NON_CACHEABLE_MEMORY:
574            AcpiOsPrintf ("\t\tType Specific: "
575                            "Noncacheable memory\n");
576            break;
577
578        case CACHABLE_MEMORY:
579            AcpiOsPrintf ("\t\tType Specific: "
580                            "Cacheable memory\n");
581            break;
582
583        case WRITE_COMBINING_MEMORY:
584            AcpiOsPrintf ("\t\tType Specific: "
585                            "Write-combining memory\n");
586            break;
587
588        case PREFETCHABLE_MEMORY:
589            AcpiOsPrintf ("\t\tType Specific: "
590                            "Prefetchable memory\n");
591            break;
592
593        default:
594            AcpiOsPrintf ("\t\tType Specific: "
595                            "Invalid cache attribute\n");
596            break;
597        }
598
599        AcpiOsPrintf ("\t\tType Specific: Read%s\n",
600            READ_WRITE_MEMORY ==
601            Address16Data->Attribute.Memory.ReadWriteAttribute ?
602            "/Write" : " Only");
603        break;
604
605    case IO_RANGE:
606
607        AcpiOsPrintf ("I/O Range\n");
608
609        switch (Address16Data->Attribute.Io.RangeAttribute)
610        {
611        case NON_ISA_ONLY_RANGES:
612            AcpiOsPrintf ("\t\tType Specific: "
613                            "Non-ISA Io Addresses\n");
614            break;
615
616        case ISA_ONLY_RANGES:
617            AcpiOsPrintf ("\t\tType Specific: "
618                            "ISA Io Addresses\n");
619            break;
620
621        case ENTIRE_RANGE:
622            AcpiOsPrintf ("\t\tType Specific: "
623                            "ISA and non-ISA Io Addresses\n");
624            break;
625
626        default:
627            AcpiOsPrintf ("\t\tType Specific: "
628                            "Invalid range attribute\n");
629            break;
630        }
631        break;
632
633    case BUS_NUMBER_RANGE:
634
635        AcpiOsPrintf ("Bus Number Range\n");
636        break;
637
638    default:
639
640        AcpiOsPrintf ("Invalid resource type. Exiting.\n");
641        return;
642    }
643
644    AcpiOsPrintf ("\t\tResource %s\n",
645            CONSUMER == Address16Data->ProducerConsumer ?
646            "Consumer" : "Producer");
647
648    AcpiOsPrintf ("\t\t%s decode\n",
649                SUB_DECODE == Address16Data->Decode ?
650                "Subtractive" : "Positive");
651
652    AcpiOsPrintf ("\t\tMin address is %s fixed\n",
653                ADDRESS_FIXED == Address16Data->MinAddressFixed ?
654                "" : "not");
655
656    AcpiOsPrintf ("\t\tMax address is %s fixed\n",
657                ADDRESS_FIXED == Address16Data->MaxAddressFixed ?
658                "" : "not");
659
660    AcpiOsPrintf ("\t\tGranularity: 0x%08x\n",
661                Address16Data->Granularity);
662
663    AcpiOsPrintf ("\t\tAddress range min: 0x%08x\n",
664                Address16Data->MinAddressRange);
665
666    AcpiOsPrintf ("\t\tAddress range max: 0x%08x\n",
667                Address16Data->MaxAddressRange);
668
669    AcpiOsPrintf ("\t\tAddress translation offset: 0x%08x\n",
670                Address16Data->AddressTranslationOffset);
671
672    AcpiOsPrintf ("\t\tAddress Length: 0x%08x\n",
673                Address16Data->AddressLength);
674
675    if (0xFF != Address16Data->ResourceSourceIndex)
676    {
677        AcpiOsPrintf ("\t\tResource Source Index: %d\n",
678                    Address16Data->ResourceSourceIndex);
679        AcpiOsPrintf ("\t\tResource Source: %s\n",
680                    Address16Data->ResourceSource);
681    }
682
683    return;
684}
685
686
687/*******************************************************************************
688 *
689 * FUNCTION:    AcpiRsDumpAddress32
690 *
691 * PARAMETERS:  Data            - pointer to the resource structure to dump.
692 *
693 * RETURN:
694 *
695 * DESCRIPTION: Prints out the various members of the Data structure type.
696 *
697 ******************************************************************************/
698
699void
700AcpiRsDumpAddress32 (
701    RESOURCE_DATA           *Data)
702{
703    ADDRESS32_RESOURCE      *Address32Data = (ADDRESS32_RESOURCE*) Data;
704
705
706    AcpiOsPrintf ("\t32-Bit Address Space Resource\n");
707
708    switch (Address32Data->ResourceType)
709    {
710    case MEMORY_RANGE:
711
712        AcpiOsPrintf ("\t\tResource Type: Memory Range\n");
713
714        switch (Address32Data->Attribute.Memory.CacheAttribute)
715        {
716        case NON_CACHEABLE_MEMORY:
717            AcpiOsPrintf ("\t\tType Specific: "
718                            "Noncacheable memory\n");
719            break;
720
721        case CACHABLE_MEMORY:
722            AcpiOsPrintf ("\t\tType Specific: "
723                            "Cacheable memory\n");
724            break;
725
726        case WRITE_COMBINING_MEMORY:
727            AcpiOsPrintf ("\t\tType Specific: "
728                            "Write-combining memory\n");
729            break;
730
731        case PREFETCHABLE_MEMORY:
732            AcpiOsPrintf ("\t\tType Specific: "
733                            "Prefetchable memory\n");
734            break;
735
736        default:
737            AcpiOsPrintf ("\t\tType Specific: "
738                            "Invalid cache attribute\n");
739            break;
740        }
741
742        AcpiOsPrintf ("\t\tType Specific: Read%s\n",
743            READ_WRITE_MEMORY ==
744            Address32Data->Attribute.Memory.ReadWriteAttribute ?
745            "/Write" : " Only");
746        break;
747
748    case IO_RANGE:
749
750        AcpiOsPrintf ("\t\tResource Type: Io Range\n");
751
752        switch (Address32Data->Attribute.Io.RangeAttribute)
753            {
754            case NON_ISA_ONLY_RANGES:
755                AcpiOsPrintf ("\t\tType Specific: "
756                                "Non-ISA Io Addresses\n");
757                break;
758
759            case ISA_ONLY_RANGES:
760                AcpiOsPrintf ("\t\tType Specific: "
761                                "ISA Io Addresses\n");
762                break;
763
764            case ENTIRE_RANGE:
765                AcpiOsPrintf ("\t\tType Specific: "
766                                "ISA and non-ISA Io Addresses\n");
767                break;
768
769            default:
770                AcpiOsPrintf ("\t\tType Specific: "
771                                "Invalid Range attribute");
772                break;
773            }
774        break;
775
776    case BUS_NUMBER_RANGE:
777
778        AcpiOsPrintf ("\t\tResource Type: Bus Number Range\n");
779        break;
780
781    default:
782
783        AcpiOsPrintf ("\t\tInvalid Resource Type..exiting.\n");
784        return;
785    }
786
787    AcpiOsPrintf ("\t\tResource %s\n",
788                CONSUMER == Address32Data->ProducerConsumer ?
789                "Consumer" : "Producer");
790
791    AcpiOsPrintf ("\t\t%s decode\n",
792                SUB_DECODE == Address32Data->Decode ?
793                "Subtractive" : "Positive");
794
795    AcpiOsPrintf ("\t\tMin address is %s fixed\n",
796                ADDRESS_FIXED == Address32Data->MinAddressFixed ?
797                "" : "not ");
798
799    AcpiOsPrintf ("\t\tMax address is %s fixed\n",
800                ADDRESS_FIXED == Address32Data->MaxAddressFixed ?
801                "" : "not ");
802
803    AcpiOsPrintf ("\t\tGranularity: 0x%08x\n",
804                Address32Data->Granularity);
805
806    AcpiOsPrintf ("\t\tAddress range min: 0x%08x\n",
807                Address32Data->MinAddressRange);
808
809    AcpiOsPrintf ("\t\tAddress range max: 0x%08x\n",
810                Address32Data->MaxAddressRange);
811
812    AcpiOsPrintf ("\t\tAddress translation offset: 0x%08x\n",
813                Address32Data->AddressTranslationOffset);
814
815    AcpiOsPrintf ("\t\tAddress Length: 0x%08x\n",
816                Address32Data->AddressLength);
817
818    if(0xFF != Address32Data->ResourceSourceIndex)
819    {
820        AcpiOsPrintf ("\t\tResource Source Index: %d\n",
821                    Address32Data->ResourceSourceIndex);
822        AcpiOsPrintf ("\t\tResource Source: %s\n",
823                    Address32Data->ResourceSource);
824    }
825
826    return;
827}
828
829
830/*******************************************************************************
831 *
832 * FUNCTION:    AcpiRsDumpExtendedIrq
833 *
834 * PARAMETERS:  Data            - pointer to the resource structure to dump.
835 *
836 * RETURN:
837 *
838 * DESCRIPTION: Prints out the various members of the Data structure type.
839 *
840 ******************************************************************************/
841
842void
843AcpiRsDumpExtendedIrq (
844    RESOURCE_DATA           *Data)
845{
846    EXTENDED_IRQ_RESOURCE   *ExtIrqData = (EXTENDED_IRQ_RESOURCE*) Data;
847    UINT8                   Index = 0;
848
849
850    AcpiOsPrintf ("\tExtended IRQ Resource\n");
851
852    AcpiOsPrintf ("\t\tResource %s\n",
853                CONSUMER == ExtIrqData->ProducerConsumer ?
854                "Consumer" : "Producer");
855
856    AcpiOsPrintf ("\t\t%s\n",
857                LEVEL_SENSITIVE == ExtIrqData->EdgeLevel ?
858                "Level" : "Edge");
859
860    AcpiOsPrintf ("\t\tActive %s\n",
861                ACTIVE_LOW == ExtIrqData->ActiveHighLow ?
862                "low" : "high");
863
864    AcpiOsPrintf ("\t\t%s\n",
865                SHARED == ExtIrqData->SharedExclusive ?
866                "Shared" : "Exclusive");
867
868    AcpiOsPrintf ("\t\tInterrupts : %d ( ",
869                ExtIrqData->NumberOfInterrupts);
870
871    for (Index = 0; Index < ExtIrqData->NumberOfInterrupts; Index++)
872    {
873        AcpiOsPrintf ("%d ", ExtIrqData->Interrupts[Index]);
874    }
875
876    AcpiOsPrintf (")\n");
877
878    if(0xFF != ExtIrqData->ResourceSourceIndex)
879    {
880        AcpiOsPrintf ("\t\tResource Source Index: %d",
881                    ExtIrqData->ResourceSourceIndex);
882        AcpiOsPrintf ("\t\tResource Source: %s",
883                    ExtIrqData->ResourceSource);
884    }
885
886    return;
887}
888
889
890/*******************************************************************************
891 *
892 * FUNCTION:    AcpiRsDumpResourceList
893 *
894 * PARAMETERS:  Data            - pointer to the resource structure to dump.
895 *
896 * RETURN:
897 *
898 * DESCRIPTION: Dispatches the structure to the correct dump routine.
899 *
900 ******************************************************************************/
901
902void
903AcpiRsDumpResourceList (
904    RESOURCE            *Resource)
905{
906    UINT8               Count = 0;
907    BOOLEAN             Done = FALSE;
908
909
910    if (AcpiDbgLevel & TRACE_RESOURCES && _COMPONENT & AcpiDbgLayer)
911    {
912        while (!Done)
913        {
914            AcpiOsPrintf ("\tResource structure %x.\n", Count++);
915
916            switch (Resource->Id)
917            {
918            case Irq:
919                AcpiRsDumpIrq (&Resource->Data);
920                break;
921
922            case Dma:
923                AcpiRsDumpDma (&Resource->Data);
924                break;
925
926            case StartDependentFunctions:
927                AcpiRsDumpStartDependentFunctions (&Resource->Data);
928                break;
929
930            case EndDependentFunctions:
931                AcpiOsPrintf ("\tEndDependentFunctions Resource\n");
932                /* AcpiRsDumpEndDependentFunctions (Resource->Data);*/
933                break;
934
935            case Io:
936                AcpiRsDumpIo (&Resource->Data);
937                break;
938
939            case FixedIo:
940                AcpiRsDumpFixedIo (&Resource->Data);
941                break;
942
943            case VendorSpecific:
944                AcpiRsDumpVendorSpecific (&Resource->Data);
945                break;
946
947            case EndTag:
948                /*RsDumpEndTag (Resource->Data);*/
949                AcpiOsPrintf ("\tEndTag Resource\n");
950                Done = TRUE;
951                break;
952
953            case Memory24:
954                AcpiRsDumpMemory24 (&Resource->Data);
955                break;
956
957            case Memory32:
958                AcpiRsDumpMemory32 (&Resource->Data);
959                break;
960
961            case FixedMemory32:
962                AcpiRsDumpFixedMemory32 (&Resource->Data);
963                break;
964
965            case Address16:
966                AcpiRsDumpAddress16 (&Resource->Data);
967                break;
968
969            case Address32:
970                AcpiRsDumpAddress32 (&Resource->Data);
971                break;
972
973            case ExtendedIrq:
974                AcpiRsDumpExtendedIrq (&Resource->Data);
975                break;
976
977            default:
978                AcpiOsPrintf ("Invalid resource type\n");
979                break;
980
981            }
982
983            Resource = (RESOURCE *) ((NATIVE_UINT) Resource +
984                        (NATIVE_UINT) Resource->Length);
985        }
986    }
987
988    return;
989}
990
991/*******************************************************************************
992 *
993 * FUNCTION:    AcpiRsDumpIrqList
994 *
995 * PARAMETERS:  Data            - pointer to the routing table to dump.
996 *
997 * RETURN:
998 *
999 * DESCRIPTION: Dispatches the structures to the correct dump routine.
1000 *
1001 ******************************************************************************/
1002
1003void
1004AcpiRsDumpIrqList (
1005    UINT8               *RouteTable)
1006{
1007    UINT8               *Buffer = RouteTable;
1008    UINT8               Count = 0;
1009    BOOLEAN             Done = FALSE;
1010    PCI_ROUTING_TABLE   *PrtElement;
1011
1012
1013    if (AcpiDbgLevel & TRACE_RESOURCES && _COMPONENT & AcpiDbgLayer)
1014    {
1015        PrtElement = (PCI_ROUTING_TABLE *)Buffer;
1016
1017        while (!Done)
1018        {
1019            AcpiOsPrintf ("\tPCI IRQ Routing Table structure %x.\n", Count++);
1020
1021            AcpiOsPrintf ("\t\tAddress: 0x%x\n",
1022                        PrtElement->Data.Address);
1023
1024            AcpiOsPrintf ("\t\tPin: 0x%x\n", PrtElement->Data.Pin);
1025
1026            AcpiOsPrintf ("\t\tSource: %s\n", PrtElement->Data.Source);
1027
1028            AcpiOsPrintf ("\t\tSourceIndex: 0x%x\n",
1029                        PrtElement->Data.SourceIndex);
1030
1031            Buffer += PrtElement->Length;
1032
1033            PrtElement = (PCI_ROUTING_TABLE *)Buffer;
1034
1035            if(0 == PrtElement->Length)
1036            {
1037                Done = TRUE;
1038            }
1039        }
1040    }
1041
1042    return;
1043}
1044
1045