diff options
author | Jonathan A. Kollasch <jakllsch@kollasch.net> | 2008-03-22 15:27:26 +0000 |
---|---|---|
committer | Jordan Crouse <jordan.crouse@amd.com> | 2008-03-22 15:27:26 +0000 |
commit | b0e3f39a39431f6448f4985a10379a580cf4c13c (patch) | |
tree | 5e446ea57d2259b5d00721c19e20363d914a5a63 /payloads/libpayload/drivers | |
parent | 661e380a75ebc4fa355dc647ed06bd0a2d100b1c (diff) |
Make cursor positioning work by using both halves of the
VGA cursor position register.
Have vga_scroll_up() and vga_clear_line() present row/column
arguments to the VIDEO() macro in the right order.
Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
-This line, and those below, will be ignored--
M libpayload/drivers/vga.c
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3186 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r-- | payloads/libpayload/drivers/vga.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/payloads/libpayload/drivers/vga.c b/payloads/libpayload/drivers/vga.c index 1c1315935c..db1cda170b 100644 --- a/payloads/libpayload/drivers/vga.c +++ b/payloads/libpayload/drivers/vga.c @@ -64,7 +64,7 @@ static void vga_get_cursor_pos(void) unsigned int addr; addr = ((unsigned int)crtc_read(0x0E)) << 8; - addr += crtc_read(0x0E); + addr += crtc_read(0x0F); cursorx = addr % WIDTH; cursory = addr / WIDTH; @@ -93,7 +93,7 @@ static void vga_fixup_cursor(void) addr = cursorx + (WIDTH * cursory); crtc_write(addr >> 8, 0x0E); - crtc_write(addr, 0x0E); + crtc_write(addr, 0x0F); } void vga_cursor_enable(int state) @@ -115,7 +115,7 @@ void vga_cursor_enable(int state) void vga_clear_line(uint8_t row, uint8_t ch, uint8_t attr) { int col; - uint16_t *ptr = VIDEO(0, row); + uint16_t *ptr = VIDEO(row, 0); for (col = 0; col < WIDTH; col++) ptr[col] = ((attr & 0xFF) << 8) | (ch & 0xFF); @@ -123,7 +123,7 @@ void vga_clear_line(uint8_t row, uint8_t ch, uint8_t attr) static void vga_scroll_up(void) { - uint16_t *src = VIDEO(0, 1); + uint16_t *src = VIDEO(1, 0); uint16_t *dst = VIDEO(0, 0); int i; |