* Intel ACPI 20030228 distribution with local DragonFly changes.
[dragonfly.git] / sys / contrib / dev / acpica / utdebug.c
1 /******************************************************************************
2  *
3  * Module Name: utdebug - Debug print routines
4  *              $Revision: 108 $
5  *
6  *****************************************************************************/
7
8 /******************************************************************************
9  *
10  * 1. Copyright Notice
11  *
12  * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
13  * All rights 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 /* $DragonFly: src/sys/contrib/dev/acpica/Attic/utdebug.c,v 1.1 2003/09/24 03:32:16 drhodus Exp $                                                               */
117
118 #define __UTDEBUG_C__
119
120 #include "acpi.h"
121
122 #define _COMPONENT          ACPI_UTILITIES
123         ACPI_MODULE_NAME    ("utdebug")
124
125
126 #ifdef ACPI_DEBUG_OUTPUT
127
128 static UINT32   AcpiGbl_PrevThreadId = 0xFFFFFFFF;
129 static char     *AcpiGbl_FnEntryStr = "----Entry";
130 static char     *AcpiGbl_FnExitStr  = "----Exit-";
131
132
133 /*****************************************************************************
134  *
135  * FUNCTION:    AcpiUtInitStackPtrTrace
136  *
137  * PARAMETERS:  None
138  *
139  * RETURN:      None
140  *
141  * DESCRIPTION: Save the current stack pointer
142  *
143  ****************************************************************************/
144
145 void
146 AcpiUtInitStackPtrTrace (
147     void)
148 {
149     UINT32              CurrentSp;
150
151
152     AcpiGbl_EntryStackPointer = ACPI_PTR_DIFF (&CurrentSp, NULL);
153 }
154
155
156 /*****************************************************************************
157  *
158  * FUNCTION:    AcpiUtTrackStackPtr
159  *
160  * PARAMETERS:  None
161  *
162  * RETURN:      None
163  *
164  * DESCRIPTION: Save the current stack pointer
165  *
166  ****************************************************************************/
167
168 void
169 AcpiUtTrackStackPtr (
170     void)
171 {
172     ACPI_SIZE           CurrentSp;
173
174
175     CurrentSp = ACPI_PTR_DIFF (&CurrentSp, NULL);
176
177     if (CurrentSp < AcpiGbl_LowestStackPointer)
178     {
179         AcpiGbl_LowestStackPointer = CurrentSp;
180     }
181
182     if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting)
183     {
184         AcpiGbl_DeepestNesting = AcpiGbl_NestingLevel;
185     }
186 }
187
188
189 /*****************************************************************************
190  *
191  * FUNCTION:    AcpiUtDebugPrint
192  *
193  * PARAMETERS:  DebugLevel          - Requested debug print level
194  *              ProcName            - Caller's procedure name
195  *              ModuleName          - Caller's module name (for error output)
196  *              LineNumber          - Caller's line number (for error output)
197  *              ComponentId         - Caller's component ID (for error output)
198  *
199  *              Format              - Printf format field
200  *              ...                 - Optional printf arguments
201  *
202  * RETURN:      None
203  *
204  * DESCRIPTION: Print error message with prefix consisting of the module name,
205  *              line number, and component ID.
206  *
207  ****************************************************************************/
208
209 void  ACPI_INTERNAL_VAR_XFACE
210 AcpiUtDebugPrint (
211     UINT32                  RequestedDebugLevel,
212     UINT32                  LineNumber,
213     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
214     char                    *Format,
215     ...)
216 {
217     UINT32                  ThreadId;
218     va_list                 args;
219
220
221     /*
222      * Stay silent if the debug level or component ID is disabled
223      */
224     if (!(RequestedDebugLevel & AcpiDbgLevel) ||
225         !(DbgInfo->ComponentId & AcpiDbgLayer))
226     {
227         return;
228     }
229
230     /*
231      * Thread tracking and context switch notification
232      */
233     ThreadId = AcpiOsGetThreadId ();
234
235     if (ThreadId != AcpiGbl_PrevThreadId)
236     {
237         if (ACPI_LV_THREADS & AcpiDbgLevel)
238         {
239             AcpiOsPrintf ("\n**** Context Switch from TID %X to TID %X ****\n\n",
240                 AcpiGbl_PrevThreadId, ThreadId);
241         }
242
243         AcpiGbl_PrevThreadId = ThreadId;
244     }
245
246     /*
247      * Display the module name, current line number, thread ID (if requested),
248      * current procedure nesting level, and the current procedure name
249      */
250     AcpiOsPrintf ("%8s-%04ld ", DbgInfo->ModuleName, LineNumber);
251
252     if (ACPI_LV_THREADS & AcpiDbgLevel)
253     {
254         AcpiOsPrintf ("[%04lX] ", ThreadId);
255     }
256
257     AcpiOsPrintf ("[%02ld] %-22.22s: ", AcpiGbl_NestingLevel, DbgInfo->ProcName);
258
259     va_start (args, Format);
260     AcpiOsVprintf (Format, args);
261 }
262
263
264 /*****************************************************************************
265  *
266  * FUNCTION:    AcpiUtDebugPrintRaw
267  *
268  * PARAMETERS:  RequestedDebugLevel - Requested debug print level
269  *              LineNumber          - Caller's line number
270  *              DbgInfo             - Contains:
271  *                  ProcName            - Caller's procedure name
272  *                  ModuleName          - Caller's module name
273  *                  ComponentId         - Caller's component ID
274  *              Format              - Printf format field
275  *              ...                 - Optional printf arguments
276  *
277  * RETURN:      None
278  *
279  * DESCRIPTION: Print message with no headers.  Has same interface as
280  *              DebugPrint so that the same macros can be used.
281  *
282  ****************************************************************************/
283
284 void  ACPI_INTERNAL_VAR_XFACE
285 AcpiUtDebugPrintRaw (
286     UINT32                  RequestedDebugLevel,
287     UINT32                  LineNumber,
288     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
289     char                    *Format,
290     ...)
291 {
292     va_list                 args;
293
294
295     if (!(RequestedDebugLevel & AcpiDbgLevel) ||
296         !(DbgInfo->ComponentId & AcpiDbgLayer))
297     {
298         return;
299     }
300
301     va_start (args, Format);
302     AcpiOsVprintf (Format, args);
303 }
304
305
306 /*****************************************************************************
307  *
308  * FUNCTION:    AcpiUtTrace
309  *
310  * PARAMETERS:  LineNumber          - Caller's line number
311  *              DbgInfo             - Contains:
312  *                  ProcName            - Caller's procedure name
313  *                  ModuleName          - Caller's module name
314  *                  ComponentId         - Caller's component ID
315  *
316  * RETURN:      None
317  *
318  * DESCRIPTION: Function entry trace.  Prints only if TRACE_FUNCTIONS bit is
319  *              set in DebugLevel
320  *
321  ****************************************************************************/
322
323 void
324 AcpiUtTrace (
325     UINT32                  LineNumber,
326     ACPI_DEBUG_PRINT_INFO   *DbgInfo)
327 {
328
329     AcpiGbl_NestingLevel++;
330     AcpiUtTrackStackPtr ();
331
332     AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
333             "%s\n", AcpiGbl_FnEntryStr);
334 }
335
336
337 /*****************************************************************************
338  *
339  * FUNCTION:    AcpiUtTracePtr
340  *
341  * PARAMETERS:  LineNumber          - Caller's line number
342  *              DbgInfo             - Contains:
343  *                  ProcName            - Caller's procedure name
344  *                  ModuleName          - Caller's module name
345  *                  ComponentId         - Caller's component ID
346  *              Pointer             - Pointer to display
347  *
348  * RETURN:      None
349  *
350  * DESCRIPTION: Function entry trace.  Prints only if TRACE_FUNCTIONS bit is
351  *              set in DebugLevel
352  *
353  ****************************************************************************/
354
355 void
356 AcpiUtTracePtr (
357     UINT32                  LineNumber,
358     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
359     void                    *Pointer)
360 {
361     AcpiGbl_NestingLevel++;
362     AcpiUtTrackStackPtr ();
363
364     AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
365             "%s %p\n", AcpiGbl_FnEntryStr, Pointer);
366 }
367
368
369 /*****************************************************************************
370  *
371  * FUNCTION:    AcpiUtTraceStr
372  *
373  * PARAMETERS:  LineNumber          - Caller's line number
374  *              DbgInfo             - Contains:
375  *                  ProcName            - Caller's procedure name
376  *                  ModuleName          - Caller's module name
377  *                  ComponentId         - Caller's component ID
378  *              String              - Additional string to display
379  *
380  * RETURN:      None
381  *
382  * DESCRIPTION: Function entry trace.  Prints only if TRACE_FUNCTIONS bit is
383  *              set in DebugLevel
384  *
385  ****************************************************************************/
386
387 void
388 AcpiUtTraceStr (
389     UINT32                  LineNumber,
390     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
391     char                    *String)
392 {
393
394     AcpiGbl_NestingLevel++;
395     AcpiUtTrackStackPtr ();
396
397     AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
398             "%s %s\n", AcpiGbl_FnEntryStr, String);
399 }
400
401
402 /*****************************************************************************
403  *
404  * FUNCTION:    AcpiUtTraceU32
405  *
406  * PARAMETERS:  LineNumber          - Caller's line number
407  *              DbgInfo             - Contains:
408  *                  ProcName            - Caller's procedure name
409  *                  ModuleName          - Caller's module name
410  *                  ComponentId         - Caller's component ID
411  *              Integer             - Integer to display
412  *
413  * RETURN:      None
414  *
415  * DESCRIPTION: Function entry trace.  Prints only if TRACE_FUNCTIONS bit is
416  *              set in DebugLevel
417  *
418  ****************************************************************************/
419
420 void
421 AcpiUtTraceU32 (
422     UINT32                  LineNumber,
423     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
424     UINT32                  Integer)
425 {
426
427     AcpiGbl_NestingLevel++;
428     AcpiUtTrackStackPtr ();
429
430     AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
431             "%s %08X\n", AcpiGbl_FnEntryStr, Integer);
432 }
433
434
435 /*****************************************************************************
436  *
437  * FUNCTION:    AcpiUtExit
438  *
439  * PARAMETERS:  LineNumber          - Caller's line number
440  *              DbgInfo             - Contains:
441  *                  ProcName            - Caller's procedure name
442  *                  ModuleName          - Caller's module name
443  *                  ComponentId         - Caller's component ID
444  *
445  * RETURN:      None
446  *
447  * DESCRIPTION: Function exit trace.  Prints only if TRACE_FUNCTIONS bit is
448  *              set in DebugLevel
449  *
450  ****************************************************************************/
451
452 void
453 AcpiUtExit (
454     UINT32                  LineNumber,
455     ACPI_DEBUG_PRINT_INFO   *DbgInfo)
456 {
457
458     AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
459             "%s\n", AcpiGbl_FnExitStr);
460
461     AcpiGbl_NestingLevel--;
462 }
463
464
465 /*****************************************************************************
466  *
467  * FUNCTION:    AcpiUtStatusExit
468  *
469  * PARAMETERS:  LineNumber          - Caller's line number
470  *              DbgInfo             - Contains:
471  *                  ProcName            - Caller's procedure name
472  *                  ModuleName          - Caller's module name
473  *                  ComponentId         - Caller's component ID
474  *              Status              - Exit status code
475  *
476  * RETURN:      None
477  *
478  * DESCRIPTION: Function exit trace.  Prints only if TRACE_FUNCTIONS bit is
479  *              set in DebugLevel.  Prints exit status also.
480  *
481  ****************************************************************************/
482
483 void
484 AcpiUtStatusExit (
485     UINT32                  LineNumber,
486     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
487     ACPI_STATUS             Status)
488 {
489
490     if (ACPI_SUCCESS (Status))
491     {
492         AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
493                 "%s %s\n", AcpiGbl_FnExitStr,
494                 AcpiFormatException (Status));
495     }
496     else
497     {
498         AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
499                 "%s ****Exception****: %s\n", AcpiGbl_FnExitStr,
500                 AcpiFormatException (Status));
501     }
502
503     AcpiGbl_NestingLevel--;
504 }
505
506
507 /*****************************************************************************
508  *
509  * FUNCTION:    AcpiUtValueExit
510  *
511  * PARAMETERS:  LineNumber          - Caller's line number
512  *              DbgInfo             - Contains:
513  *                  ProcName            - Caller's procedure name
514  *                  ModuleName          - Caller's module name
515  *                  ComponentId         - Caller's component ID
516  *              Value               - Value to be printed with exit msg
517  *
518  * RETURN:      None
519  *
520  * DESCRIPTION: Function exit trace.  Prints only if TRACE_FUNCTIONS bit is
521  *              set in DebugLevel.  Prints exit value also.
522  *
523  ****************************************************************************/
524
525 void
526 AcpiUtValueExit (
527     UINT32                  LineNumber,
528     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
529     ACPI_INTEGER            Value)
530 {
531
532     AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
533             "%s %8.8X%8.8X\n", AcpiGbl_FnExitStr,
534             ACPI_HIDWORD (Value), ACPI_LODWORD (Value));
535
536     AcpiGbl_NestingLevel--;
537 }
538
539
540 /*****************************************************************************
541  *
542  * FUNCTION:    AcpiUtPtrExit
543  *
544  * PARAMETERS:  LineNumber          - Caller's line number
545  *              DbgInfo             - Contains:
546  *                  ProcName            - Caller's procedure name
547  *                  ModuleName          - Caller's module name
548  *                  ComponentId         - Caller's component ID
549  *              Value               - Value to be printed with exit msg
550  *
551  * RETURN:      None
552  *
553  * DESCRIPTION: Function exit trace.  Prints only if TRACE_FUNCTIONS bit is
554  *              set in DebugLevel.  Prints exit value also.
555  *
556  ****************************************************************************/
557
558 void
559 AcpiUtPtrExit (
560     UINT32                  LineNumber,
561     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
562     UINT8                   *Ptr)
563 {
564
565     AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
566             "%s %p\n", AcpiGbl_FnExitStr, Ptr);
567
568     AcpiGbl_NestingLevel--;
569 }
570
571 #endif
572
573
574 /*****************************************************************************
575  *
576  * FUNCTION:    AcpiUtDumpBuffer
577  *
578  * PARAMETERS:  Buffer              - Buffer to dump
579  *              Count               - Amount to dump, in bytes
580  *              Display             - BYTE, WORD, DWORD, or QWORD display
581  *              ComponentID         - Caller's component ID
582  *
583  * RETURN:      None
584  *
585  * DESCRIPTION: Generic dump buffer in both hex and ascii.
586  *
587  ****************************************************************************/
588
589 void
590 AcpiUtDumpBuffer (
591     UINT8                   *Buffer,
592     UINT32                  Count,
593     UINT32                  Display,
594     UINT32                  ComponentId)
595 {
596     ACPI_NATIVE_UINT        i = 0;
597     ACPI_NATIVE_UINT        j;
598     UINT32                  Temp32;
599     UINT8                   BufChar;
600
601
602     /* Only dump the buffer if tracing is enabled */
603
604     if (!((ACPI_LV_TABLES & AcpiDbgLevel) &&
605         (ComponentId & AcpiDbgLayer)))
606     {
607         return;
608     }
609
610     if ((Count < 4) || (Count & 0x01))
611     {
612         Display = DB_BYTE_DISPLAY;
613     }
614
615     AcpiOsPrintf ("\nOffset   Value\n");
616
617     /*
618      * Nasty little dump buffer routine!
619      */
620     while (i < Count)
621     {
622         /* Print current offset */
623
624         AcpiOsPrintf ("%05X    ", (UINT32) i);
625
626         /* Print 16 hex chars */
627
628         for (j = 0; j < 16;)
629         {
630             if (i + j >= Count)
631             {
632                 AcpiOsPrintf ("\n");
633                 return;
634             }
635
636             /* Make sure that the INT8 doesn't get sign-extended! */
637
638             switch (Display)
639             {
640             /* Default is BYTE display */
641
642             default:
643
644                 AcpiOsPrintf ("%02X ",
645                         *((UINT8 *) &Buffer[i + j]));
646                 j += 1;
647                 break;
648
649
650             case DB_WORD_DISPLAY:
651
652                 ACPI_MOVE_UNALIGNED16_TO_32 (&Temp32,
653                                              &Buffer[i + j]);
654                 AcpiOsPrintf ("%04X ", Temp32);
655                 j += 2;
656                 break;
657
658
659             case DB_DWORD_DISPLAY:
660
661                 ACPI_MOVE_UNALIGNED32_TO_32 (&Temp32,
662                                              &Buffer[i + j]);
663                 AcpiOsPrintf ("%08X ", Temp32);
664                 j += 4;
665                 break;
666
667
668             case DB_QWORD_DISPLAY:
669
670                 ACPI_MOVE_UNALIGNED32_TO_32 (&Temp32,
671                                              &Buffer[i + j]);
672                 AcpiOsPrintf ("%08X", Temp32);
673
674                 ACPI_MOVE_UNALIGNED32_TO_32 (&Temp32,
675                                              &Buffer[i + j + 4]);
676                 AcpiOsPrintf ("%08X ", Temp32);
677                 j += 8;
678                 break;
679             }
680         }
681
682         /*
683          * Print the ASCII equivalent characters
684          * But watch out for the bad unprintable ones...
685          */
686         for (j = 0; j < 16; j++)
687         {
688             if (i + j >= Count)
689             {
690                 AcpiOsPrintf ("\n");
691                 return;
692             }
693
694             BufChar = Buffer[i + j];
695             if ((BufChar > 0x1F && BufChar < 0x2E) ||
696                 (BufChar > 0x2F && BufChar < 0x61) ||
697                 (BufChar > 0x60 && BufChar < 0x7F))
698             {
699                 AcpiOsPrintf ("%c", BufChar);
700             }
701             else
702             {
703                 AcpiOsPrintf (".");
704             }
705         }
706
707         /* Done with that line. */
708
709         AcpiOsPrintf ("\n");
710         i += 16;
711     }
712
713     return;
714 }
715