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 "acpi.h"
153 #include "accommon.h"
154 #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 #if defined(ACPI_DEBUGGER)
163 
164 /* Local prototypes */
165 
166 static void
167 AcpiRsOutString (
168     const char              *Title,
169     const char              *Value);
170 
171 static void
172 AcpiRsOutInteger8 (
173     const char              *Title,
174     UINT8                   Value);
175 
176 static void
177 AcpiRsOutInteger16 (
178     const char              *Title,
179     UINT16                  Value);
180 
181 static void
182 AcpiRsOutInteger32 (
183     const char              *Title,
184     UINT32                  Value);
185 
186 static void
187 AcpiRsOutInteger64 (
188     const char              *Title,
189     UINT64                  Value);
190 
191 static void
192 AcpiRsOutTitle (
193     const char              *Title);
194 
195 static void
196 AcpiRsDumpByteList (
197     UINT16                  Length,
198     UINT8                   *Data);
199 
200 static void
201 AcpiRsDumpWordList (
202     UINT16                  Length,
203     UINT16                  *Data);
204 
205 static void
206 AcpiRsDumpDwordList (
207     UINT8                   Length,
208     UINT32                  *Data);
209 
210 static void
211 AcpiRsDumpShortByteList (
212     UINT8                   Length,
213     UINT8                   *Data);
214 
215 static void
216 AcpiRsDumpResourceSource (
217     ACPI_RESOURCE_SOURCE    *ResourceSource);
218 
219 static void
220 AcpiRsDumpAddressCommon (
221     ACPI_RESOURCE_DATA      *Resource);
222 
223 static void
224 AcpiRsDumpDescriptor (
225     void                    *Resource,
226     ACPI_RSDUMP_INFO        *Table);
227 
228 
229 /*******************************************************************************
230  *
231  * FUNCTION:    AcpiRsDumpResourceList
232  *
233  * PARAMETERS:  ResourceList        - Pointer to a resource descriptor list
234  *
235  * RETURN:      None
236  *
237  * DESCRIPTION: Dispatches the structure to the correct dump routine.
238  *
239  ******************************************************************************/
240 
241 void
242 AcpiRsDumpResourceList (
243     ACPI_RESOURCE           *ResourceList)
244 {
245     UINT32                  Count = 0;
246     UINT32                  Type;
247 
248 
249     ACPI_FUNCTION_ENTRY ();
250 
251 
252     /* Check if debug output enabled */
253 
254     if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
255     {
256         return;
257     }
258 
259     /* Walk list and dump all resource descriptors (END_TAG terminates) */
260 
261     do
262     {
263         AcpiOsPrintf ("\n[%02X] ", Count);
264         Count++;
265 
266         /* Validate Type before dispatch */
267 
268         Type = ResourceList->Type;
269         if (Type > ACPI_RESOURCE_TYPE_MAX)
270         {
271             AcpiOsPrintf (
272                 "Invalid descriptor type (%X) in resource list\n",
273                 ResourceList->Type);
274             return;
275         }
276 
277         /* Sanity check the length. It must not be zero, or we loop forever */
278 
279         if (!ResourceList->Length)
280         {
281             AcpiOsPrintf (
282                 "Invalid zero length descriptor in resource list\n");
283             return;
284         }
285 
286         /* Dump the resource descriptor */
287 
288         if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
289         {
290             AcpiRsDumpDescriptor (&ResourceList->Data,
291                 AcpiGbl_DumpSerialBusDispatch[
292                     ResourceList->Data.CommonSerialBus.Type]);
293         }
294         else
295         {
296             AcpiRsDumpDescriptor (&ResourceList->Data,
297                 AcpiGbl_DumpResourceDispatch[Type]);
298         }
299 
300         /* Point to the next resource structure */
301 
302         ResourceList = ACPI_NEXT_RESOURCE (ResourceList);
303 
304         /* Exit when END_TAG descriptor is reached */
305 
306     } while (Type != ACPI_RESOURCE_TYPE_END_TAG);
307 }
308 
309 
310 /*******************************************************************************
311  *
312  * FUNCTION:    AcpiRsDumpIrqList
313  *
314  * PARAMETERS:  RouteTable      - Pointer to the routing table to dump.
315  *
316  * RETURN:      None
317  *
318  * DESCRIPTION: Print IRQ routing table
319  *
320  ******************************************************************************/
321 
322 void
323 AcpiRsDumpIrqList (
324     UINT8                   *RouteTable)
325 {
326     ACPI_PCI_ROUTING_TABLE  *PrtElement;
327     UINT8                   Count;
328 
329 
330     ACPI_FUNCTION_ENTRY ();
331 
332 
333     /* Check if debug output enabled */
334 
335     if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
336     {
337         return;
338     }
339 
340     PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
341 
342     /* Dump all table elements, Exit on zero length element */
343 
344     for (Count = 0; PrtElement->Length; Count++)
345     {
346         AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
347         AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
348 
349         PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
350             PrtElement, PrtElement->Length);
351     }
352 }
353 
354 
355 /*******************************************************************************
356  *
357  * FUNCTION:    AcpiRsDumpDescriptor
358  *
359  * PARAMETERS:  Resource            - Buffer containing the resource
360  *              Table               - Table entry to decode the resource
361  *
362  * RETURN:      None
363  *
364  * DESCRIPTION: Dump a resource descriptor based on a dump table entry.
365  *
366  ******************************************************************************/
367 
368 static void
369 AcpiRsDumpDescriptor (
370     void                    *Resource,
371     ACPI_RSDUMP_INFO        *Table)
372 {
373     UINT8                   *Target = NULL;
374     UINT8                   *PreviousTarget;
375     const char              *Name;
376     UINT8                   Count;
377 
378 
379     /* First table entry must contain the table length (# of table entries) */
380 
381     Count = Table->Offset;
382 
383     while (Count)
384     {
385         PreviousTarget = Target;
386         Target = ACPI_ADD_PTR (UINT8, Resource, Table->Offset);
387         Name = Table->Name;
388 
389         switch (Table->Opcode)
390         {
391         case ACPI_RSD_TITLE:
392             /*
393              * Optional resource title
394              */
395             if (Table->Name)
396             {
397                 AcpiOsPrintf ("%s Resource\n", Name);
398             }
399             break;
400 
401         /* Strings */
402 
403         case ACPI_RSD_LITERAL:
404 
405             AcpiRsOutString (Name, ACPI_CAST_PTR (char, Table->Pointer));
406             break;
407 
408         case ACPI_RSD_STRING:
409 
410             AcpiRsOutString (Name, ACPI_CAST_PTR (char, Target));
411             break;
412 
413         /* Data items, 8/16/32/64 bit */
414 
415         case ACPI_RSD_UINT8:
416 
417             if (Table->Pointer)
418             {
419                 AcpiRsOutString (Name, Table->Pointer [*Target]);
420             }
421             else
422             {
423                 AcpiRsOutInteger8 (Name, ACPI_GET8 (Target));
424             }
425             break;
426 
427         case ACPI_RSD_UINT16:
428 
429             AcpiRsOutInteger16 (Name, ACPI_GET16 (Target));
430             break;
431 
432         case ACPI_RSD_UINT32:
433 
434             AcpiRsOutInteger32 (Name, ACPI_GET32 (Target));
435             break;
436 
437         case ACPI_RSD_UINT64:
438 
439             AcpiRsOutInteger64 (Name, ACPI_GET64 (Target));
440             break;
441 
442         /* Flags: 1-bit and 2-bit flags supported */
443 
444         case ACPI_RSD_1BITFLAG:
445 
446             AcpiRsOutString (Name, Table->Pointer [*Target & 0x01]);
447             break;
448 
449         case ACPI_RSD_2BITFLAG:
450 
451             AcpiRsOutString (Name, Table->Pointer [*Target & 0x03]);
452             break;
453 
454         case ACPI_RSD_3BITFLAG:
455 
456             AcpiRsOutString (Name, Table->Pointer [*Target & 0x07]);
457             break;
458 
459         case ACPI_RSD_SHORTLIST:
460             /*
461              * Short byte list (single line output) for DMA and IRQ resources
462              * Note: The list length is obtained from the previous table entry
463              */
464             if (PreviousTarget)
465             {
466                 AcpiRsOutTitle (Name);
467                 AcpiRsDumpShortByteList (*PreviousTarget, Target);
468             }
469             break;
470 
471         case ACPI_RSD_SHORTLISTX:
472             /*
473              * Short byte list (single line output) for GPIO vendor data
474              * Note: The list length is obtained from the previous table entry
475              */
476             if (PreviousTarget)
477             {
478                 AcpiRsOutTitle (Name);
479                 AcpiRsDumpShortByteList (*PreviousTarget,
480                     *(ACPI_CAST_INDIRECT_PTR (UINT8, Target)));
481             }
482             break;
483 
484         case ACPI_RSD_LONGLIST:
485             /*
486              * Long byte list for Vendor resource data
487              * Note: The list length is obtained from the previous table entry
488              */
489             if (PreviousTarget)
490             {
491                 AcpiRsDumpByteList (ACPI_GET16 (PreviousTarget), Target);
492             }
493             break;
494 
495         case ACPI_RSD_DWORDLIST:
496             /*
497              * Dword list for Extended Interrupt resources
498              * Note: The list length is obtained from the previous table entry
499              */
500             if (PreviousTarget)
501             {
502                 AcpiRsDumpDwordList (*PreviousTarget,
503                     ACPI_CAST_PTR (UINT32, Target));
504             }
505             break;
506 
507         case ACPI_RSD_WORDLIST:
508             /*
509              * Word list for GPIO Pin Table
510              * Note: The list length is obtained from the previous table entry
511              */
512             if (PreviousTarget)
513             {
514                 AcpiRsDumpWordList (*PreviousTarget,
515                     *(ACPI_CAST_INDIRECT_PTR (UINT16, Target)));
516             }
517             break;
518 
519         case ACPI_RSD_ADDRESS:
520             /*
521              * Common flags for all Address resources
522              */
523             AcpiRsDumpAddressCommon (ACPI_CAST_PTR (
524                 ACPI_RESOURCE_DATA, Target));
525             break;
526 
527         case ACPI_RSD_SOURCE:
528             /*
529              * Optional ResourceSource for Address resources
530              */
531             AcpiRsDumpResourceSource (ACPI_CAST_PTR (
532                 ACPI_RESOURCE_SOURCE, Target));
533             break;
534 
535         default:
536 
537             AcpiOsPrintf ("**** Invalid table opcode [%X] ****\n",
538                 Table->Opcode);
539             return;
540         }
541 
542         Table++;
543         Count--;
544     }
545 }
546 
547 
548 /*******************************************************************************
549  *
550  * FUNCTION:    AcpiRsDumpResourceSource
551  *
552  * PARAMETERS:  ResourceSource      - Pointer to a Resource Source struct
553  *
554  * RETURN:      None
555  *
556  * DESCRIPTION: Common routine for dumping the optional ResourceSource and the
557  *              corresponding ResourceSourceIndex.
558  *
559  ******************************************************************************/
560 
561 static void
562 AcpiRsDumpResourceSource (
563     ACPI_RESOURCE_SOURCE    *ResourceSource)
564 {
565     ACPI_FUNCTION_ENTRY ();
566 
567 
568     if (ResourceSource->Index == 0xFF)
569     {
570         return;
571     }
572 
573     AcpiRsOutInteger8 ("Resource Source Index",
574         ResourceSource->Index);
575 
576     AcpiRsOutString ("Resource Source",
577         ResourceSource->StringPtr ?
578             ResourceSource->StringPtr : "[Not Specified]");
579 }
580 
581 
582 /*******************************************************************************
583  *
584  * FUNCTION:    AcpiRsDumpAddressCommon
585  *
586  * PARAMETERS:  Resource        - Pointer to an internal resource descriptor
587  *
588  * RETURN:      None
589  *
590  * DESCRIPTION: Dump the fields that are common to all Address resource
591  *              descriptors
592  *
593  ******************************************************************************/
594 
595 static void
596 AcpiRsDumpAddressCommon (
597     ACPI_RESOURCE_DATA      *Resource)
598 {
599     ACPI_FUNCTION_ENTRY ();
600 
601 
602    /* Decode the type-specific flags */
603 
604     switch (Resource->Address.ResourceType)
605     {
606     case ACPI_MEMORY_RANGE:
607 
608         AcpiRsDumpDescriptor (Resource, AcpiRsDumpMemoryFlags);
609         break;
610 
611     case ACPI_IO_RANGE:
612 
613         AcpiRsDumpDescriptor (Resource, AcpiRsDumpIoFlags);
614         break;
615 
616     case ACPI_BUS_NUMBER_RANGE:
617 
618         AcpiRsOutString ("Resource Type", "Bus Number Range");
619         break;
620 
621     default:
622 
623         AcpiRsOutInteger8 ("Resource Type",
624             (UINT8) Resource->Address.ResourceType);
625         break;
626     }
627 
628     /* Decode the general flags */
629 
630     AcpiRsDumpDescriptor (Resource, AcpiRsDumpGeneralFlags);
631 }
632 
633 
634 /*******************************************************************************
635  *
636  * FUNCTION:    AcpiRsOut*
637  *
638  * PARAMETERS:  Title       - Name of the resource field
639  *              Value       - Value of the resource field
640  *
641  * RETURN:      None
642  *
643  * DESCRIPTION: Miscellaneous helper functions to consistently format the
644  *              output of the resource dump routines
645  *
646  ******************************************************************************/
647 
648 static void
649 AcpiRsOutString (
650     const char              *Title,
651     const char              *Value)
652 {
653 
654     AcpiOsPrintf ("%27s : %s", Title, Value);
655     if (!*Value)
656     {
657         AcpiOsPrintf ("[NULL NAMESTRING]");
658     }
659     AcpiOsPrintf ("\n");
660 }
661 
662 static void
663 AcpiRsOutInteger8 (
664     const char              *Title,
665     UINT8                   Value)
666 {
667     AcpiOsPrintf ("%27s : %2.2X\n", Title, Value);
668 }
669 
670 static void
671 AcpiRsOutInteger16 (
672     const char              *Title,
673     UINT16                  Value)
674 {
675 
676     AcpiOsPrintf ("%27s : %4.4X\n", Title, Value);
677 }
678 
679 static void
680 AcpiRsOutInteger32 (
681     const char              *Title,
682     UINT32                  Value)
683 {
684 
685     AcpiOsPrintf ("%27s : %8.8X\n", Title, Value);
686 }
687 
688 static void
689 AcpiRsOutInteger64 (
690     const char              *Title,
691     UINT64                  Value)
692 {
693 
694     AcpiOsPrintf ("%27s : %8.8X%8.8X\n", Title,
695         ACPI_FORMAT_UINT64 (Value));
696 }
697 
698 static void
699 AcpiRsOutTitle (
700     const char              *Title)
701 {
702 
703     AcpiOsPrintf ("%27s : ", Title);
704 }
705 
706 
707 /*******************************************************************************
708  *
709  * FUNCTION:    AcpiRsDump*List
710  *
711  * PARAMETERS:  Length      - Number of elements in the list
712  *              Data        - Start of the list
713  *
714  * RETURN:      None
715  *
716  * DESCRIPTION: Miscellaneous functions to dump lists of raw data
717  *
718  ******************************************************************************/
719 
720 static void
721 AcpiRsDumpByteList (
722     UINT16                  Length,
723     UINT8                   *Data)
724 {
725     UINT8                   i;
726 
727 
728     for (i = 0; i < Length; i++)
729     {
730         AcpiOsPrintf ("%25s%2.2X : %2.2X\n", "Byte", i, Data[i]);
731     }
732 }
733 
734 static void
735 AcpiRsDumpShortByteList (
736     UINT8                   Length,
737     UINT8                   *Data)
738 {
739     UINT8                   i;
740 
741 
742     for (i = 0; i < Length; i++)
743     {
744         AcpiOsPrintf ("%X ", Data[i]);
745     }
746 
747     AcpiOsPrintf ("\n");
748 }
749 
750 static void
751 AcpiRsDumpDwordList (
752     UINT8                   Length,
753     UINT32                  *Data)
754 {
755     UINT8                   i;
756 
757 
758     for (i = 0; i < Length; i++)
759     {
760         AcpiOsPrintf ("%25s%2.2X : %8.8X\n", "Dword", i, Data[i]);
761     }
762 }
763 
764 static void
765 AcpiRsDumpWordList (
766     UINT16                  Length,
767     UINT16                  *Data)
768 {
769     UINT16                  i;
770 
771 
772     for (i = 0; i < Length; i++)
773     {
774         AcpiOsPrintf ("%25s%2.2X : %4.4X\n", "Word", i, Data[i]);
775     }
776 }
777 
778 #endif
779