The attached patch makes the serial output function serial_putchar() 8 bit clean. The motivation for this is that the low level driver should not modify the data in unexpected ways. Furthermore translate_special_chars() is removed, since that functionality is now provided by the ACS machinery in tinycurses.

Compile and runtime tested with coreinfo+libpayload+coreboot-v3 under QEMU.

/ulf
Make the serial output driver 8 bit clean. Remove translate_special_chars(),
since it has been superseeded by the ACS code in tinycurses.

Signed-off-by: Ulf Jordan <[EMAIL PROTECTED]>

Index: libpayload/drivers/serial.c
===================================================================
--- libpayload/drivers/serial.c.orig    2008-09-03 22:38:45.000000000 +0200
+++ libpayload/drivers/serial.c 2008-09-03 22:39:02.000000000 +0200
@@ -37,25 +37,6 @@
 #define DIVISOR (115200 / CONFIG_SERIAL_BAUD_RATE)
 #endif
 
-/* This is a hack - we convert the drawing characters to ASCII */
-
-static unsigned char translate_special_chars(unsigned char c)
-{
-       switch(c) {
-       case 196:
-               return '-';
-       case 179:
-               return '|';
-       case 218:
-       case 191:
-       case 192:
-       case 217:
-               return '+';
-       default:
-               return ' ';
-       }
-}
-
 void serial_init(void)
 {
 #ifdef CONFIG_SERIAL_SET_SPEED
@@ -82,9 +63,6 @@
 
 void serial_putchar(unsigned char c)
 {
-       if (c > 127)
-               c = translate_special_chars(c);
-
        while ((inb(IOBASE + 0x05) & 0x20) == 0) ;
        outb(c, IOBASE);
 }
--
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to