summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2008-09-26 18:40:06 +0000
committerStefan Reinauer <stepan@openbios.org>2008-09-26 18:40:06 +0000
commitbc9cb27a8e352a42dbfe2a404e8640e8aff47ad3 (patch)
treebbf9b1f5cf85932d640cfa658dbc0d7e0370f16f
parent71c006fe9b1bcc74e1000c7869ec41cf3dc80894 (diff)
downloadcoreboot-bc9cb27a8e352a42dbfe2a404e8640e8aff47ad3.tar.xz
Use a block cursor on VGA console :-)
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
-rw-r--r--payloads/libpayload/drivers/video/vga.c14
1 files changed, 14 insertions, 0 deletions
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;
}