diff -Nru linux-2.6.12-rc5.orig/arch/ppc64/kernel/pSeries_setup.c linux-2.6.12-rc5/arch/ppc64/kernel/pSeries_setup.c --- linux-2.6.12-rc5.orig/arch/ppc64/kernel/pSeries_setup.c 2005-06-01 20:33:46.000000000 -0500 +++ linux-2.6.12-rc5/arch/ppc64/kernel/pSeries_setup.c 2005-06-02 22:15:40.000000000 -0500 @@ -387,21 +387,33 @@ int width, *p; char *os; static int display_character, set_indicator; - static int max_width; + static int display_width, display_lines, *row_width, form_feed; static DEFINE_SPINLOCK(progress_lock); + static int current_line; static int pending_newline = 0; /* did last write end with unprinted newline? */ if (!rtas.base) return; - if (max_width == 0) { - if ((root = find_path_device("/rtas")) && - (p = (unsigned int *)get_property(root, - "ibm,display-line-length", - NULL))) - max_width = *p; - else - max_width = 0x10; + if (display_width == 0) { + display_width = 0x10; + if ((root = find_path_device("/rtas"))) { + if ((p = (unsigned int *)get_property(root, + "ibm,display-line-length", + NULL))) + display_width = *p; + if ((p = (unsigned int *)get_property(root, + "ibm,form-feed", + NULL))) + form_feed = *p; + if ((p = (unsigned int *)get_property(root, + "ibm,display-number-of-lines", + NULL))) + display_lines = *p; + row_width = (unsigned int *)get_property(root, + "ibm,display-truncation-length", + NULL); + } display_character = rtas_token("display-character"); set_indicator = rtas_token("set-indicator"); } @@ -420,31 +432,39 @@ * it would just clear the bottom line of output. Print it now * instead. * - * If no newline is pending, print a CR to start output at the - * beginning of the line. + * If no newline is pending and form feed is supported, clear the + * display with a form feed; otherwise, print a CR to start output + * at the beginning of the line. */ if (pending_newline) { rtas_call(display_character, 1, 1, NULL, '\r'); rtas_call(display_character, 1, 1, NULL, '\n'); pending_newline = 0; } else { - rtas_call(display_character, 1, 1, NULL, '\r'); + current_line = 0; + if (form_feed) + rtas_call(display_character, 1, 1, NULL, + (char)form_feed); + else + rtas_call(display_character, 1, 1, NULL, '\r'); } - width = max_width; + if (row_width) + width = row_width[current_line]; + else + width = display_width; os = s; while (*os) { if (*os == '\n' || *os == '\r') { - /* Blank to end of line. */ - while (width-- > 0) - rtas_call(display_character, 1, 1, NULL, ' '); - /* If newline is the last character, save it * until next call to avoid bumping up the * display output. */ if (*os == '\n' && !os[1]) { pending_newline = 1; + current_line++; + if (current_line > display_lines-1) + current_line = display_lines-1; spin_unlock(&progress_lock); return; } @@ -461,7 +481,10 @@ rtas_call(display_character, 1, 1, NULL, *os); } - width = max_width; + if (row_width) + width = row_width[current_line]; + else + width = display_width; } else { width--; rtas_call(display_character, 1, 1, NULL, *os); @@ -475,10 +498,6 @@ os++; } - /* Blank to end of line. */ - while (width-- > 0) - rtas_call(display_character, 1, 1, NULL, ' '); - spin_unlock(&progress_lock); } diff -Nru linux-2.6.12-rc5.orig/arch/ppc64/kernel/setup.c linux-2.6.12-rc5/arch/ppc64/kernel/setup.c --- linux-2.6.12-rc5.orig/arch/ppc64/kernel/setup.c 2005-06-01 20:33:46.000000000 -0500 +++ linux-2.6.12-rc5/arch/ppc64/kernel/setup.c 2005-06-02 22:26:38.000000000 -0500 @@ -1083,11 +1083,11 @@ static void ppc64_do_msg(unsigned int src, const char *msg) { if (ppc_md.progress) { - char buf[32]; + char buf[128]; - sprintf(buf, "%08x \n", src); + sprintf(buf, "%08X\n", src); ppc_md.progress(buf, 0); - sprintf(buf, "%-16s", msg); + snprintf(buf, 128, "%s", msg); ppc_md.progress(buf, 0); } }