1 /*******************************************************************************
2  *
3  * Module Name: rsdump - AML debugger support for resource structures.
4  *
5  ******************************************************************************/
6 
7 /******************************************************************************
8  *
9  * 1. Copyright Notice
10  *
11  * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
12  * All rights reserved.
13  *
14  * 2. License
15  *
16  * 2.1. This is your license from Intel Corp. under its intellectual property
17  * rights. You may have additional license terms from the party that provided
18  * you this software, covering your right to use that party's intellectual
19  * property rights.
20  *
21  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22  * copy of the source code appearing in this file ("Covered Code") an
23  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24  * base code distributed originally by Intel ("Original Intel Code") to copy,
25  * make derivatives, distribute, use and display any portion of the Covered
26  * Code in any form, with the right to sublicense such rights; and
27  *
28  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29  * license (with the right to sublicense), under only those claims of Intel
30  * patents that are infringed by the Original Intel Code, to make, use, sell,
31  * offer to sell, and import the Covered Code and derivative works thereof
32  * solely to the minimum extent necessary to exercise the above copyright
33  * license, and in no event shall the patent license extend to any additions
34  * to or modifications of the Original Intel Code. No other license or right
35  * is granted directly or by implication, estoppel or otherwise;
36  *
37  * The above copyright and patent license is granted only if the following
38  * conditions are met:
39  *
40  * 3. Conditions
41  *
42  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43  * Redistribution of source code of any substantial portion of the Covered
44  * Code or modification with rights to further distribute source must include
45  * the above Copyright Notice, the above License, this list of Conditions,
46  * and the following Disclaimer and Export Compliance provision. In addition,
47  * Licensee must cause all Covered Code to which Licensee contributes to
48  * contain a file documenting the changes Licensee made to create that Covered
49  * Code and the date of any change. Licensee must include in that file the
50  * documentation of any changes made by any predecessor Licensee. Licensee
51  * must include a prominent statement that the modification is derived,
52  * directly or indirectly, from Original Intel Code.
53  *
54  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55  * Redistribution of source code of any substantial portion of the Covered
56  * Code or modification without rights to further distribute source must
57  * include the following Disclaimer and Export Compliance provision in the
58  * documentation and/or other materials provided with distribution. In
59  * addition, Licensee may not authorize further sublicense of source of any
60  * portion of the Covered Code, and must include terms to the effect that the
61  * license from Licensee to its licensee is limited to the intellectual
62  * property embodied in the software Licensee provides to its licensee, and
63  * not to intellectual property embodied in modifications its licensee may
64  * make.
65  *
66  * 3.3. Redistribution of Executable. Redistribution in executable form of any
67  * substantial portion of the Covered Code or modification must reproduce the
68  * above Copyright Notice, and the following Disclaimer and Export Compliance
69  * provision in the documentation and/or other materials provided with the
70  * distribution.
71  *
72  * 3.4. Intel retains all right, title, and interest in and to the Original
73  * Intel Code.
74  *
75  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76  * Intel shall be used in advertising or otherwise to promote the sale, use or
77  * other dealings in products derived from or relating to the Covered Code
78  * without prior written authorization from Intel.
79  *
80  * 4. Disclaimer and Export Compliance
81  *
82  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88  * PARTICULAR PURPOSE.
89  *
90  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97  * LIMITED REMEDY.
98  *
99  * 4.3. Licensee shall not export, either directly or indirectly, any of this
100  * software or system incorporating such software without first obtaining any
101  * required license or other approval from the U. S. Department of Commerce or
102  * any other agency or department of the United States Government. In the
103  * event Licensee exports any such software from the United States or
104  * re-exports any such software from a foreign destination, Licensee shall
105  * ensure that the distribution and export/re-export of the software is in
106  * compliance with all laws, regulations, orders, or other restrictions of the
107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108  * any of its subsidiaries will export/re-export any technical data, process,
109  * software, or service, directly or indirectly, to any country for which the
110  * United States government or any agency thereof requires an export license,
111  * other governmental approval, or letter of assurance, without first obtaining
112  * such license, approval or letter.
113  *
114  *****************************************************************************
115  *
116  * Alternatively, you may choose to be licensed under the terms of the
117  * following license:
118  *
119  * Redistribution and use in source and binary forms, with or without
120  * modification, are permitted provided that the following conditions
121  * are met:
122  * 1. Redistributions of source code must retain the above copyright
123  *    notice, this list of conditions, and the following disclaimer,
124  *    without modification.
125  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126  *    substantially similar to the "NO WARRANTY" disclaimer below
127  *    ("Disclaimer") and any redistribution must be conditioned upon
128  *    including a substantially similar Disclaimer requirement for further
129  *    binary redistribution.
130  * 3. Neither the names of the above-listed copyright holders nor the names
131  *    of any contributors may be used to endorse or promote products derived
132  *    from this software without specific prior written permission.
133  *
134  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
145  *
146  * Alternatively, you may choose to be licensed under the terms of the
147  * GNU General Public License ("GPL") version 2 as published by the Free
148  * Software Foundation.
149  *
150  *****************************************************************************/
151 
152 #include <contrib/dev/acpica/include/acpi.h>
153 #include <contrib/dev/acpica/include/accommon.h>
154 #include <contrib/dev/acpica/include/acresrc.h>
155 
156 #define _COMPONENT          ACPI_RESOURCES
157         ACPI_MODULE_NAME    ("rsdump")
158 
159 /*
160  * All functions in this module are used by the AML Debugger only
161  */
162 
163 /* Local prototypes */
164 
165 static void
166 AcpiRsOutString (
167     const char              *Title,
168     const char              *Value);
169 
170 static void
171 AcpiRsOutInteger8 (
172     const char              *Title,
173     UINT8                   Value);
174 
175 static void
176 AcpiRsOutInteger16 (
177     const char              *Title,
178     UINT16                  Value);
179 
180 static void
181 AcpiRsOutInteger32 (
182     const char              *Title,
183     UINT32                  Value);
184 
185 static void
186 AcpiRsOutInteger64 (
187     const char              *Title,
188     UINT64                  Value);
189 
190 static void
191 AcpiRsOutTitle (
192     const char              *Title);
193 
194 static void
195 AcpiRsDumpByteList (
196     UINT16                  Length,
197     UINT8                   *Data);
198 
199 static void
200 AcpiRsDumpWordList (
201     UINT16                  Length,
202     UINT16                  *Data);
203 
204 static void
205 AcpiRsDumpDwordList (
206     UINT8                   Length,
207     UINT32                  *Data);
208 
209 static void
210 AcpiRsDumpShortByteList (
211     UINT8                   Length,
212     UINT8                   *Data);
213 
214 static void
215 AcpiRsDumpResourceSource (
216     ACPI_RESOURCE_SOURCE    *ResourceSource);
217 
218 static void
219 AcpiRsDumpAddressCommon (
220     ACPI_RESOURCE_DATA      *Resource);
221 
222 static void
223 AcpiRsDumpDescriptor (
224     void                    *Resource,
225     ACPI_RSDUMP_INFO        *Table);
226 
227 
228 /*******************************************************************************
229  *
230  * FUNCTION:    AcpiRsDumpResourceList
231  *
232  * PARAMETERS:  ResourceList        - Pointer to a resource descriptor list
233  *
234  * RETURN:      None
235  *
236  * DESCRIPTION: Dispatches the structure to the correct dump routine.
237  *
238  ******************************************************************************/
239 
240 void
241 AcpiRsDumpResourceList (
242     ACPI_RESOURCE           *ResourceList)
243 {
244     UINT32                  Count = 0;
245     UINT32                  Type;
246 
247 
248     ACPI_FUNCTION_ENTRY ();
249 
250 
251     /* Check if debug output enabled */
252 
253     if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
254     {
255         return;
256     }
257 
258     /* Walk list and dump all resource descriptors (END_TAG terminates) */
259 
260     do
261     {
262         AcpiOsPrintf ("\n[%02X] ", Count);
263         Count++;
264 
265         /* Validate Type before dispatch */
266 
267         Type = ResourceList->Type;
268         if (Type > ACPI_RESOURCE_TYPE_MAX)
269         {
270             AcpiOsPrintf (
271                 "Invalid descriptor type (%X) in resource list\n",
272                 ResourceList->Type);
273             return;
274         }
275 
276         /* Sanity check the length. It must not be zero, or we loop forever */
277 
278         if (!ResourceList->Length)
279         {
280             AcpiOsPrintf (
281                 "Invalid zero length descriptor in resource list\n");
282             return;
283         }
284 
285         /* Dump the resource descriptor */
286 
287         if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
288         {
289             AcpiRsDumpDescriptor (&ResourceList->Data,
290                 AcpiGbl_DumpSerialBusDispatch[
291                     ResourceList->Data.CommonSerialBus.Type]);
292         }
293         else
294         {
295             AcpiRsDumpDescriptor (&ResourceList->Data,
296                 AcpiGbl_DumpResourceDispatch[Type]);
297         }
298 
299         /* Point to the next resource structure */
300 
301         ResourceList = ACPI_NEXT_RESOURCE (ResourceList);
302 
303         /* Exit when END_TAG descriptor is reached */
304 
305     } while (Type != ACPI_RESOURCE_TYPE_END_TAG);
306 }
307 
308 
309 /*******************************************************************************
310  *
311  * FUNCTION:    AcpiRsDumpIrqList
312  *
313  * PARAMETERS:  RouteTable      - Pointer to the routing table to dump.
314  *
315  * RETURN:      None
316  *
317  * DESCRIPTION: Print IRQ routing table
318  *
319  ******************************************************************************/
320 
321 void
322 AcpiRsDumpIrqList (
323     UINT8                   *RouteTable)
324 {
325     ACPI_PCI_ROUTING_TABLE  *PrtElement;
326     UINT8                   Count;
327 
328 
329     ACPI_FUNCTION_ENTRY ();
330 
331 
332     /* Check if debug output enabled */
333 
334     if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
335     {
336         return;
337     }
338 
339     PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
340 
341     /* Dump all table elements, Exit on zero length element */
342 
343     for (Count = 0; PrtElement->Length; Count++)
344     {
345         AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
346         AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
347 
348         PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
349             PrtElement, PrtElement->Length);
350     }
351 }
352 
353 
354 /*******************************************************************************
355  *
356  * FUNCTION:    AcpiRsDumpDescriptor
357  *
358  * PARAMETERS:  Resource            - Buffer containing the resource
359  *              Table               - Table entry to decode the resource
360  *
361  * RETURN:      None
362  *
363  * DESCRIPTION: Dump a resource descriptor based on a dump table entry.
364  *
365  ******************************************************************************/
366 
367 static void
368 AcpiRsDumpDescriptor (
369     void                    *Resource,
370     ACPI_RSDUMP_INFO        *Table)
371 {
372     UINT8                   *Target = NULL;
373     UINT8                   *PreviousTarget;
374     const char              *Name;
375     UINT8                   Count;
376 
377 
378     /* First table entry must contain the table length (# of table entries) */
379 
380     Count = Table->Offset;
381 
382     while (Count)
383     {
384         PreviousTarget = Target;
385         Target = ACPI_ADD_PTR (UINT8, Resource, Table->Offset);
386         Name = Table->Name;
387 
388         switch (Table->Opcode)
389         {
390         case ACPI_RSD_TITLE:
391             /*
392              * Optional resource title
393              */
394             if (Table->Name)
395             {
396                 AcpiOsPrintf ("%s Resource\n", Name);
397             }
398             break;
399 
400         /* Strings */
401 
402         case ACPI_RSD_LITERAL:
403 
404             AcpiRsOutString (Name, ACPI_CAST_PTR (char, Table->Pointer));
405             break;
406 
407         case ACPI_RSD_STRING:
408 
409             AcpiRsOutString (Name, ACPI_CAST_PTR (char, Target));
410             break;
411 
412         /* Data items, 8/16/32/64 bit */
413 
414         case ACPI_RSD_UINT8:
415 
416             if (Table->Pointer)
417             {
418                 AcpiRsOutString (Name, Table->Pointer [*Target]);
419             }
420             else
421             {
422                 AcpiRsOutInteger8 (Name, ACPI_GET8 (Target));
423             }
424             break;
425 
426         case ACPI_RSD_UINT16:
427 
428             AcpiRsOutInteger16 (Name, ACPI_GET16 (Target));
429             break;
430 
431         case ACPI_RSD_UINT32:
432 
433             AcpiRsOutInteger32 (Name, ACPI_GET32 (Target));
434             break;
435 
436         case ACPI_RSD_UINT64:
437 
438             AcpiRsOutInteger64 (Name, ACPI_GET64 (Target));
439             break;
440 
441         /* Flags: 1-bit and 2-bit flags supported */
442 
443         case ACPI_RSD_1BITFLAG:
444 
445             AcpiRsOutString (Name, Table->Pointer [*Target & 0x01]);
446             break;
447 
448         case ACPI_RSD_2BITFLAG:
449 
450             AcpiRsOutString (Name, Table->Pointer [*Target & 0x03]);
451             break;
452 
453         case ACPI_RSD_3BITFLAG:
454 
455             AcpiRsOutString (Name, Table->Pointer [*Target & 0x07]);
456             break;
457 
458         case ACPI_RSD_SHORTLIST:
459             /*
460              * Short byte list (single line output) for DMA and IRQ resources
461              * Note: The list length is obtained from the previous table entry
462              */
463             if (PreviousTarget)
464             {
465                 AcpiRsOutTitle (Name);
466                 AcpiRsDumpShortByteList (*PreviousTarget, Target);
467             }
468             break;
469 
470         case ACPI_RSD_SHORTLISTX:
471             /*
472              * Short byte list (single line output) for GPIO vendor data
473              * Note: The list length is obtained from the previous table entry
474              */
475             if (PreviousTarget)
476             {
477                 AcpiRsOutTitle (Name);
478                 AcpiRsDumpShortByteList (*PreviousTarget,
479                     *(ACPI_CAST_INDIRECT_PTR (UINT8, Target)));
480             }
481             break;
482 
483         case ACPI_RSD_LONGLIST:
484             /*
485              * Long byte list for Vendor resource data
486              * Note: The list length is obtained from the previous table entry
487              */
488             if (PreviousTarget)
489             {
490                 AcpiRsDumpByteList (ACPI_GET16 (PreviousTarget), Target);
491             }
492             break;
493 
494         case ACPI_RSD_DWORDLIST:
495             /*
496              * Dword list for Extended Interrupt resources
497              * Note: The list length is obtained from the previous table entry
498              */
499             if (PreviousTarget)
500             {
501                 AcpiRsDumpDwordList (*PreviousTarget,
502                     ACPI_CAST_PTR (UINT32, Target));
503             }
504             break;
505 
506         case ACPI_RSD_WORDLIST:
507             /*
508              * Word list for GPIO Pin Table
509              * Note: The list length is obtained from the previous table entry
510              */
511             if (PreviousTarget)
512             {
513                 AcpiRsDumpWordList (*PreviousTarget,
514                     *(ACPI_CAST_INDIRECT_PTR (UINT16, Target)));
515             }
516             break;
517 
518         case ACPI_RSD_ADDRESS:
519             /*
520              * Common flags for all Address resources
521              */
522             AcpiRsDumpAddressCommon (ACPI_CAST_PTR (
523                 ACPI_RESOURCE_DATA, Target));
524             break;
525 
526         case ACPI_RSD_SOURCE:
527             /*
528              * Optional ResourceSource for Address resources
529              */
530             AcpiRsDumpResourceSource (ACPI_CAST_PTR (
531                 ACPI_RESOURCE_SOURCE, Target));
532             break;
533 
534         default:
535 
536             AcpiOsPrintf ("**** Invalid table opcode [%X] ****\n",
537                 Table->Opcode);
538             return;
539         }
540 
541         Table++;
542         Count--;
543     }
544 }
545 
546 
547 /*******************************************************************************
548  *
549  * FUNCTION:    AcpiRsDumpResourceSource
550  *
551  * PARAMETERS:  ResourceSource      - Pointer to a Resource Source struct
552  *
553  * RETURN:      None
554  *
555  * DESCRIPTION: Common routine for dumping the optional ResourceSource and the
556  *              corresponding ResourceSourceIndex.
557  *
558  ******************************************************************************/
559 
560 static void
561 AcpiRsDumpResourceSource (
562     ACPI_RESOURCE_SOURCE    *ResourceSource)
563 {
564     ACPI_FUNCTION_ENTRY ();
565 
566 
567     if (ResourceSource->Index == 0xFF)
568     {
569         return;
570     }
571 
572     AcpiRsOutInteger8 ("Resource Source Index",
573         ResourceSource->Index);
574 
575     AcpiRsOutString ("Resource Source",
576         ResourceSource->StringPtr ?
577             ResourceSource->StringPtr : "[Not Specified]");
578 }
579 
580 
581 /*******************************************************************************
582  *
583  * FUNCTION:    AcpiRsDumpAddressCommon
584  *
585  * PARAMETERS:  Resource        - Pointer to an internal resource descriptor
586  *
587  * RETURN:      None
588  *
589  * DESCRIPTION: Dump the fields that are common to all Address resource
590  *              descriptors
591  *
592  ******************************************************************************/
593 
594 static void
595 AcpiRsDumpAddressCommon (
596     ACPI_RESOURCE_DATA      *Resource)
597 {
598     ACPI_FUNCTION_ENTRY ();
599 
600 
601    /* Decode the type-specific flags */
602 
603     switch (Resource->Address.ResourceType)
604     {
605     case ACPI_MEMORY_RANGE:
606 
607         AcpiRsDumpDescriptor (Resource, AcpiRsDumpMemoryFlags);
608         break;
609 
610     case ACPI_IO_RANGE:
611 
612         AcpiRsDumpDescriptor (Resource, AcpiRsDumpIoFlags);
613         break;
614 
615     case ACPI_BUS_NUMBER_RANGE:
616 
617         AcpiRsOutString ("Resource Type", "Bus Number Range");
618         break;
619 
620     default:
621 
622         AcpiRsOutInteger8 ("Resource Type",
623             (UINT8) Resource->Address.ResourceType);
624         break;
625     }
626 
627     /* Decode the general flags */
628 
629     AcpiRsDumpDescriptor (Resource, AcpiRsDumpGeneralFlags);
630 }
631 
632 
633 /*******************************************************************************
634  *
635  * FUNCTION:    AcpiRsOut*
636  *
637  * PARAMETERS:  Title       - Name of the resource field
638  *              Value       - Value of the resource field
639  *
640  * RETURN:      None
641  *
642  * DESCRIPTION: Miscellaneous helper functions to consistently format the
643  *              output of the resource dump routines
644  *
645  ******************************************************************************/
646 
647 static void
648 AcpiRsOutString (
649     const char              *Title,
650     const char              *Value)
651 {
652 
653     AcpiOsPrintf ("%27s : %s", Title, Value);
654     if (!*Value)
655     {
656         AcpiOsPrintf ("[NULL NAMESTRING]");
657     }
658     AcpiOsPrintf ("\n");
659 }
660 
661 static void
662 AcpiRsOutInteger8 (
663     const char              *Title,
664     UINT8                   Value)
665 {
666     AcpiOsPrintf ("%27s : %2.2X\n", Title, Value);
667 }
668 
669 static void
670 AcpiRsOutInteger16 (
671     const char              *Title,
672     UINT16                  Value)
673 {
674 
675     AcpiOsPrintf ("%27s : %4.4X\n", Title, Value);
676 }
677 
678 static void
679 AcpiRsOutInteger32 (
680     const char              *Title,
681     UINT32                  Value)
682 {
683 
684     AcpiOsPrintf ("%27s : %8.8X\n", Title, Value);
685 }
686 
687 static void
688 AcpiRsOutInteger64 (
689     const char              *Title,
690     UINT64                  Value)
691 {
692 
693     AcpiOsPrintf ("%27s : %8.8X%8.8X\n", Title,
694         ACPI_FORMAT_UINT64 (Value));
695 }
696 
697 static void
698 AcpiRsOutTitle (
699     const char              *Title)
700 {
701 
702     AcpiOsPrintf ("%27s : ", Title);
703 }
704 
705 
706 /*******************************************************************************
707  *
708  * FUNCTION:    AcpiRsDump*List
709  *
710  * PARAMETERS:  Length      - Number of elements in the list
711  *              Data        - Start of the list
712  *
713  * RETURN:      None
714  *
715  * DESCRIPTION: Miscellaneous functions to dump lists of raw data
716  *
717  ******************************************************************************/
718 
719 static void
720 AcpiRsDumpByteList (
721     UINT16                  Length,
722     UINT8                   *Data)
723 {
724     UINT8                   i;
725 
726 
727     for (i = 0; i < Length; i++)
728     {
729         AcpiOsPrintf ("%25s%2.2X : %2.2X\n", "Byte", i, Data[i]);
730     }
731 }
732 
733 static void
734 AcpiRsDumpShortByteList (
735     UINT8                   Length,
736     UINT8                   *Data)
737 {
738     UINT8                   i;
739 
740 
741     for (i = 0; i < Length; i++)
742     {
743         AcpiOsPrintf ("%X ", Data[i]);
744     }
745 
746     AcpiOsPrintf ("\n");
747 }
748 
749 static void
750 AcpiRsDumpDwordList (
751     UINT8                   Length,
752     UINT32                  *Data)
753 {
754     UINT8                   i;
755 
756 
757     for (i = 0; i < Length; i++)
758     {
759         AcpiOsPrintf ("%25s%2.2X : %8.8X\n", "Dword", i, Data[i]);
760     }
761 }
762 
763 static void
764 AcpiRsDumpWordList (
765     UINT16                  Length,
766     UINT16                  *Data)
767 {
768     UINT16                  i;
769 
770 
771     for (i = 0; i < Length; i++)
772     {
773         AcpiOsPrintf ("%25s%2.2X : %4.4X\n", "Word", i, Data[i]);
774     }
775 }
776