[coreboot] libpayload: serial output bugfixes
Jordan Crouse
jordan.crouse at amd.com
Sat Aug 9 18:23:33 CEST 2008
On 09/08/08 11:36 +0200, Ulf Jordan wrote:
> Hello!
>
> The attached patch fixes bold attribute and positioning in libpayload
> serial output. Compile tested against r3478 (latest non-broken
> libpayload+coreinfo) and runtime tested with coreinfo+coreboot-v3 in QEMU
> (serial output in xterm).
>
> /ulf
> Bugfixes to serial output functions: vt100 has bold with \e[1m,
> upper left corner is (0,0) in curses, but (1,1) on the vt100.
>
> Signed-off-by: Ulf Jordan <jordan at chalmers.se>
I haven't tested this, but it looks fine.
Acked-by: Jordan Crouse <jordan.crouse at amd.com>
> Index: libpayload/drivers/serial.c
> ===================================================================
> --- libpayload/drivers/serial.c (revision 3478)
> +++ libpayload/drivers/serial.c (arbetskopia)
> @@ -101,7 +101,7 @@
> /* These are thinly veiled vt100 functions used by curses */
>
> #define VT100_CLEAR "\e[H\e[J"
> -#define VT100_SBOLD "\e[7m"
> +#define VT100_SBOLD "\e[1m"
> #define VT100_EBOLD "\e[m"
> #define VT100_CURSOR_ADDR "\e[%d;%dH"
>
> @@ -129,6 +129,6 @@
> void serial_set_cursor(int y, int x)
> {
> char buffer[32];
> - snprintf(buffer, sizeof(buffer), VT100_CURSOR_ADDR, y, x);
> + snprintf(buffer, sizeof(buffer), VT100_CURSOR_ADDR, y + 1, x + 1);
> serial_putcmd(buffer);
> }
> --
> coreboot mailing list
> coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
--
Jordan Crouse
Systems Software Development Engineer
Advanced Micro Devices, Inc.
More information about the coreboot
mailing list