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