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