summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/drivers/video/video.c20
-rw-r--r--payloads/libpayload/include/libpayload.h5
2 files changed, 25 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c
index 8448b78e52..78f410be34 100644
--- a/payloads/libpayload/drivers/video/video.c
+++ b/payloads/libpayload/drivers/video/video.c
@@ -141,6 +141,26 @@ void video_console_putchar(unsigned int ch)
video_console_fixup_cursor();
}
+void video_console_get_cursor(unsigned int *x, unsigned int *y, unsigned int *en)
+{
+ *x=0;
+ *y=0;
+ *en=0;
+
+ if (console->get_cursor)
+ console->get_cursor(x, y, en);
+
+ *x = cursorx;
+ *y = cursory;
+}
+
+void video_console_set_cursor(unsigned int x, unsigned int y)
+{
+ cursorx = x;
+ cursory = y;
+ video_console_fixup_cursor();
+}
+
int video_console_init(void)
{
int i;
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index e75d5da5fd..516bcc38ff 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -120,6 +120,11 @@ void video_console_putchar(unsigned int ch);
void video_console_putc(u8 row, u8 col, unsigned int ch);
void video_console_clear(void);
void video_console_cursor_enable(int state);
+void video_console_get_cursor(unsigned int *x, unsigned int *y, unsigned int *en);
+void video_console_set_cursor(unsigned int cursorx, unsigned int cursory);
+
+/* drivers/option.c */
+int get_option(void *dest, char *name);
/* libc/console.c */
void console_init(void);