add functions to query cursor position to video layer
authorStefan Reinauer <stepan@coresystems.de>
Tue, 19 Aug 2008 17:44:49 +0000 (17:44 +0000)
committerStefan Reinauer <stepan@openbios.org>
Tue, 19 Aug 2008 17:44:49 +0000 (17:44 +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@3520 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

payloads/libpayload/drivers/video/video.c
payloads/libpayload/include/libpayload.h

index 8448b78e52e6396546c809103e6e54757aba7971..78f410be347588bfd458154b8d8974ce90cb35e1 100644 (file)
@@ -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;
index e75d5da5fdcc3e4c9b28647b583f835ea0a68b88..516bcc38ffc48dfb8fad5686d17e3a442447a0a0 100644 (file)
@@ -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);