Use a block cursor on VGA console :-)
authorStefan Reinauer <stepan@coresystems.de>
Fri, 26 Sep 2008 18:40:06 +0000 (18:40 +0000)
committerStefan Reinauer <stepan@openbios.org>
Fri, 26 Sep 2008 18:40:06 +0000 (18:40 +0000)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3607 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

payloads/libpayload/drivers/video/vga.c

index 37acde7637ddd7dd46442dec67ee849f0c8220ec..5858e95c32d279825015a32281b35fce1ce016d4 100644 (file)
@@ -123,8 +123,22 @@ static void vga_putc(u8 row, u8 col, unsigned int c)
        *ptr = (u16) (c & 0xFFFF);
 }
 
+static void vga_init_cursor(void)
+{
+       u8 val;
+
+#define CURSOR_MSL   0x09   /* cursor maximum scan line */
+#define CURSOR_START 0x0A   /* cursor start */
+#define CURSOR_END   0x0B   /* cursor end */
+
+       val = crtc_read(CURSOR_MSL) & 0x1f;
+       crtc_write(0, CURSOR_START);
+       crtc_write(val - 2, CURSOR_END);
+}
+
 static int vga_init(void)
 {
+       vga_init_cursor();
        return 0;
 }