summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}