void acpi_ns_print_pathname(u32 num_segments, char *pathname) { acpi_native_uint i; ACPI_FUNCTION_NAME(ns_print_pathname); if (!(acpi_dbg_level & ACPI_LV_NAMES) || !(acpi_dbg_layer & ACPI_NAMESPACE)) { return; } /* Print the entire name */ ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "[")); while (num_segments) { for (i = 0; i < 4; i++) { ACPI_IS_PRINT(pathname[i]) ? acpi_os_printf("%c", pathname[i]) : acpi_os_printf("?"); } pathname += ACPI_NAME_SIZE; num_segments--; if (num_segments) { acpi_os_printf("."); } } acpi_os_printf("]\n"); }
static void acpi_tb_fix_string(char *string, acpi_size length) { while (length && *string) { if (!ACPI_IS_PRINT(*string)) { *string = '?'; } string++; length--; } }
static void AcpiTbFixString ( char *String, ACPI_SIZE Length) { while (Length && *String) { if (!ACPI_IS_PRINT (*String)) { *String = '?'; } String++; Length--; } }
void AcpiNsPrintPathname ( UINT32 NumSegments, char *Pathname) { UINT32 i; ACPI_FUNCTION_NAME (NsPrintPathname); /* Check if debug output enabled */ if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_NAMES, ACPI_NAMESPACE)) { return; } /* Print the entire name */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[")); while (NumSegments) { for (i = 0; i < 4; i++) { ACPI_IS_PRINT (Pathname[i]) ? AcpiOsPrintf ("%c", Pathname[i]) : AcpiOsPrintf ("?"); } Pathname += ACPI_NAME_SIZE; NumSegments--; if (NumSegments) { AcpiOsPrintf ("."); } } AcpiOsPrintf ("]\n"); }
void AcpiNsPrintPathname ( UINT32 NumSegments, char *Pathname) { ACPI_NATIVE_UINT i; ACPI_FUNCTION_NAME (NsPrintPathname); if (!(AcpiDbgLevel & ACPI_LV_NAMES) || !(AcpiDbgLayer & ACPI_NAMESPACE)) { return; } /* Print the entire name */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[")); while (NumSegments) { for (i = 0; i < 4; i++) { ACPI_IS_PRINT (Pathname[i]) ? AcpiOsPrintf ("%c", Pathname[i]) : AcpiOsPrintf ("?"); } Pathname += ACPI_NAME_SIZE; NumSegments--; if (NumSegments) { AcpiOsPrintf ("."); } } AcpiOsPrintf ("]\n"); }
void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) { u32 i = 0; u32 j; u32 temp32; u8 buf_char; if (!buffer) { acpi_os_printf("Null Buffer Pointer in DumpBuffer!\n"); return; } if ((count < 4) || (count & 0x01)) { display = DB_BYTE_DISPLAY; } /* Nasty little dump buffer routine! */ while (i < count) { /* Print current offset */ acpi_os_printf("%6.4X: ", i); /* Print 16 hex chars */ for (j = 0; j < 16;) { if (i + j >= count) { /* Dump fill spaces */ acpi_os_printf("%*s", ((display * 2) + 1), " "); j += display; continue; } switch (display) { case DB_BYTE_DISPLAY: default: /* Default is BYTE display */ acpi_os_printf("%02X ", buffer[(acpi_size) i + j]); break; case DB_WORD_DISPLAY: ACPI_MOVE_16_TO_32(&temp32, &buffer[(acpi_size) i + j]); acpi_os_printf("%04X ", temp32); break; case DB_DWORD_DISPLAY: ACPI_MOVE_32_TO_32(&temp32, &buffer[(acpi_size) i + j]); acpi_os_printf("%08X ", temp32); break; case DB_QWORD_DISPLAY: ACPI_MOVE_32_TO_32(&temp32, &buffer[(acpi_size) i + j]); acpi_os_printf("%08X", temp32); ACPI_MOVE_32_TO_32(&temp32, &buffer[(acpi_size) i + j + 4]); acpi_os_printf("%08X ", temp32); break; } j += display; } /* * Print the ASCII equivalent characters but watch out for the bad * unprintable ones (printable chars are 0x20 through 0x7E) */ acpi_os_printf(" "); for (j = 0; j < 16; j++) { if (i + j >= count) { acpi_os_printf("\n"); return; } buf_char = buffer[(acpi_size) i + j]; if (ACPI_IS_PRINT(buf_char)) { acpi_os_printf("%c", buf_char); } else { acpi_os_printf("."); } } /* Done with that line. */ acpi_os_printf("\n"); i += 16; } return; }
void acpi_ut_print_string(char *string, u16 max_length) { u32 i; if (!string) { acpi_os_printf("<\"NULL STRING PTR\">"); return; } acpi_os_printf("\""); for (i = 0; (i < max_length) && string[i]; i++) { /* Escape sequences */ switch (string[i]) { case 0x07: acpi_os_printf("\\a"); /* BELL */ break; case 0x08: acpi_os_printf("\\b"); /* BACKSPACE */ break; case 0x0C: acpi_os_printf("\\f"); /* FORMFEED */ break; case 0x0A: acpi_os_printf("\\n"); /* LINEFEED */ break; case 0x0D: acpi_os_printf("\\r"); /* CARRIAGE RETURN */ break; case 0x09: acpi_os_printf("\\t"); /* HORIZONTAL TAB */ break; case 0x0B: acpi_os_printf("\\v"); /* VERTICAL TAB */ break; case '\'': /* Single Quote */ case '\"': /* Double Quote */ case '\\': /* Backslash */ acpi_os_printf("\\%c", (int)string[i]); break; default: /* Check for printable character or hex escape */ if (ACPI_IS_PRINT(string[i])) { /* This is a normal character */ acpi_os_printf("%c", (int)string[i]); } else { /* All others will be Hex escapes */ acpi_os_printf("\\x%2.2X", (s32) string[i]); } break; } } acpi_os_printf("\""); if (i == max_length && string[i]) { acpi_os_printf("..."); } }
static void DtDumpBuffer ( UINT32 FileId, UINT8 *Buffer, UINT32 Offset, UINT32 Length) { UINT32 i; UINT32 j; UINT8 BufChar; FlPrintFile (FileId, "Output: [%3.3Xh %4.4d %3d] ", Offset, Offset, Length); i = 0; while (i < Length) { if (i >= 16) { FlPrintFile (FileId, "%24s", ""); } /* Print 16 hex chars */ for (j = 0; j < 16;) { if (i + j >= Length) { /* Dump fill spaces */ FlPrintFile (FileId, " "); j++; continue; } FlPrintFile (FileId, "%02X ", Buffer[i+j]); j++; } FlPrintFile (FileId, " "); for (j = 0; j < 16; j++) { if (i + j >= Length) { FlPrintFile (FileId, "\n\n"); return; } BufChar = Buffer[(ACPI_SIZE) i + j]; if (ACPI_IS_PRINT (BufChar)) { FlPrintFile (FileId, "%c", BufChar); } else { FlPrintFile (FileId, "."); } } /* Done with that line. */ FlPrintFile (FileId, "\n"); i += 16; } FlPrintFile (FileId, "\n\n"); }
void AcpiUtDumpBuffer2 ( UINT8 *Buffer, UINT32 Count, UINT32 Display) { ACPI_NATIVE_UINT i = 0; ACPI_NATIVE_UINT j; UINT32 Temp32; UINT8 BufChar; if ((Count < 4) || (Count & 0x01)) { Display = DB_BYTE_DISPLAY; } /* Nasty little dump buffer routine! */ while (i < Count) { /* Print current offset */ AcpiOsPrintf ("%6.4X: ", (UINT32) i); /* Print 16 hex chars */ for (j = 0; j < 16;) { if (i + j >= Count) { /* Dump fill spaces */ AcpiOsPrintf ("%*s", ((Display * 2) + 1), " "); j += (ACPI_NATIVE_UINT) Display; continue; } switch (Display) { case DB_BYTE_DISPLAY: default: /* Default is BYTE display */ AcpiOsPrintf ("%02X ", Buffer[i + j]); break; case DB_WORD_DISPLAY: ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[i + j]); AcpiOsPrintf ("%04X ", Temp32); break; case DB_DWORD_DISPLAY: ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j]); AcpiOsPrintf ("%08X ", Temp32); break; case DB_QWORD_DISPLAY: ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j]); AcpiOsPrintf ("%08X", Temp32); ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j + 4]); AcpiOsPrintf ("%08X ", Temp32); break; } j += (ACPI_NATIVE_UINT) Display; } /* * Print the ASCII equivalent characters but watch out for the bad * unprintable ones (printable chars are 0x20 through 0x7E) */ AcpiOsPrintf (" "); for (j = 0; j < 16; j++) { if (i + j >= Count) { AcpiOsPrintf ("\n"); return; } BufChar = Buffer[i + j]; if (ACPI_IS_PRINT (BufChar)) { AcpiOsPrintf ("%c", BufChar); } else { AcpiOsPrintf ("."); } } /* Done with that line. */ AcpiOsPrintf ("\n"); i += 16; } return; }
void AcpiUtPrintString ( char *String, UINT16 MaxLength) { UINT32 i; if (!String) { AcpiOsPrintf ("<\"NULL STRING PTR\">"); return; } AcpiOsPrintf ("\""); for (i = 0; (i < MaxLength) && String[i]; i++) { /* Escape sequences */ switch (String[i]) { case 0x07: AcpiOsPrintf ("\\a"); /* BELL */ break; case 0x08: AcpiOsPrintf ("\\b"); /* BACKSPACE */ break; case 0x0C: AcpiOsPrintf ("\\f"); /* FORMFEED */ break; case 0x0A: AcpiOsPrintf ("\\n"); /* LINEFEED */ break; case 0x0D: AcpiOsPrintf ("\\r"); /* CARRIAGE RETURN*/ break; case 0x09: AcpiOsPrintf ("\\t"); /* HORIZONTAL TAB */ break; case 0x0B: AcpiOsPrintf ("\\v"); /* VERTICAL TAB */ break; case '\'': /* Single Quote */ case '\"': /* Double Quote */ case '\\': /* Backslash */ AcpiOsPrintf ("\\%c", (int) String[i]); break; default: /* Check for printable character or hex escape */ if (ACPI_IS_PRINT (String[i])) { /* This is a normal character */ AcpiOsPrintf ("%c", (int) String[i]); } else { /* All others will be Hex escapes */ AcpiOsPrintf ("\\x%2.2X", (INT32) String[i]); } break; } } AcpiOsPrintf ("\""); if (i == MaxLength && String[i]) { AcpiOsPrintf ("..."); } }
void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id) { acpi_native_uint i = 0; acpi_native_uint j; u32 temp32; u8 buf_char; /* Only dump the buffer if tracing is enabled */ if (!((ACPI_LV_TABLES & acpi_dbg_level) && (component_id & acpi_dbg_layer))) { return; } if ((count < 4) || (count & 0x01)) { display = DB_BYTE_DISPLAY; } /* Nasty little dump buffer routine! */ while (i < count) { /* Print current offset */ acpi_os_printf("%6.4X: ", (u32) i); /* Print 16 hex chars */ for (j = 0; j < 16;) { if (i + j >= count) { /* Dump fill spaces */ acpi_os_printf("%*s", ((display * 2) + 1), " "); j += (acpi_native_uint) display; continue; } switch (display) { default: /* Default is BYTE display */ acpi_os_printf("%02X ", buffer[i + j]); break; case DB_WORD_DISPLAY: ACPI_MOVE_16_TO_32(&temp32, &buffer[i + j]); acpi_os_printf("%04X ", temp32); break; case DB_DWORD_DISPLAY: ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]); acpi_os_printf("%08X ", temp32); break; case DB_QWORD_DISPLAY: ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]); acpi_os_printf("%08X", temp32); ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j + 4]); acpi_os_printf("%08X ", temp32); break; } j += (acpi_native_uint) display; } /* * Print the ASCII equivalent characters but watch out for the bad * unprintable ones (printable chars are 0x20 through 0x7E) */ acpi_os_printf(" "); for (j = 0; j < 16; j++) { if (i + j >= count) { acpi_os_printf("\n"); return; } buf_char = buffer[i + j]; if (ACPI_IS_PRINT(buf_char)) { acpi_os_printf("%c", buf_char); } else { acpi_os_printf("."); } } /* Done with that line. */ acpi_os_printf("\n"); i += 16; } return; }
void AcpiUtDumpBuffer ( UINT8 *Buffer, UINT32 Count, UINT32 Display, UINT32 BaseOffset) { UINT32 i = 0; UINT32 j; UINT32 Temp32; UINT8 BufChar; if (!Buffer) { AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n"); return; } if ((Count < 4) || (Count & 0x01)) { Display = DB_BYTE_DISPLAY; } /* Nasty little dump buffer routine! */ while (i < Count) { /* Print current offset */ AcpiOsPrintf ("%6.4X: ", (BaseOffset + i)); /* Print 16 hex chars */ for (j = 0; j < 16;) { if (i + j >= Count) { /* Dump fill spaces */ AcpiOsPrintf ("%*s", ((Display * 2) + 1), " "); j += Display; continue; } switch (Display) { case DB_BYTE_DISPLAY: default: /* Default is BYTE display */ AcpiOsPrintf ("%02X ", Buffer[(ACPI_SIZE) i + j]); break; case DB_WORD_DISPLAY: ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]); AcpiOsPrintf ("%04X ", Temp32); break; case DB_DWORD_DISPLAY: ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]); AcpiOsPrintf ("%08X ", Temp32); break; case DB_QWORD_DISPLAY: ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]); AcpiOsPrintf ("%08X", Temp32); ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j + 4]); AcpiOsPrintf ("%08X ", Temp32); break; } j += Display; } /* * Print the ASCII equivalent characters but watch out for the bad * unprintable ones (printable chars are 0x20 through 0x7E) */ AcpiOsPrintf (" "); for (j = 0; j < 16; j++) { if (i + j >= Count) { AcpiOsPrintf ("\n"); return; } /* * Add comment characters so rest of line is ignored when * compiled */ if (j == 0) { AcpiOsPrintf ("// "); } BufChar = Buffer[(ACPI_SIZE) i + j]; if (ACPI_IS_PRINT (BufChar)) { AcpiOsPrintf ("%c", BufChar); } else { AcpiOsPrintf ("."); } } /* Done with that line. */ AcpiOsPrintf ("\n"); i += 16; } return; }