From bc9cb27a8e352a42dbfe2a404e8640e8aff47ad3 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 26 Sep 2008 18:40:06 +0000 Subject: [PATCH] Use a block cursor on VGA console :-) Signed-off-by: Stefan Reinauer Acked-by: Jordan Crouse git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3607 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- payloads/libpayload/drivers/video/vga.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/payloads/libpayload/drivers/video/vga.c b/payloads/libpayload/drivers/video/vga.c index 37acde7637..5858e95c32 100644 --- a/payloads/libpayload/drivers/video/vga.c +++ b/payloads/libpayload/drivers/video/vga.c @@ -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; }