aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/vesa
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-13 22:17:03 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-13 22:17:03 -0800
commitc0cda3c772530d0b8c275fb382b2fe9d0efd5536 (patch)
treebd179b234ae0b64c0da884f0e78d1c015ce1f5c3 /com32/lib/sys/vesa
parentbc0516eb0e186087fefc90bca70fb06998ae7a71 (diff)
downloadsyslinux-c0cda3c772530d0b8c275fb382b2fe9d0efd5536.tar.gz
syslinux-c0cda3c772530d0b8c275fb382b2fe9d0efd5536.tar.xz
syslinux-c0cda3c772530d0b8c275fb382b2fe9d0efd5536.zip
Set the window size to 2 GB for linear framebuffer
Set the window size to 2 GB for linear framebuffer, lest the calculation: l = min(bytes, win_size-win_off); ... incorrectly returns zero when win_off == 0.
Diffstat (limited to 'com32/lib/sys/vesa')
-rw-r--r--com32/lib/sys/vesa/screencpy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/com32/lib/sys/vesa/screencpy.c b/com32/lib/sys/vesa/screencpy.c
index ac9b24ea..779fe5df 100644
--- a/com32/lib/sys/vesa/screencpy.c
+++ b/com32/lib/sys/vesa/screencpy.c
@@ -56,8 +56,9 @@ void __vesacon_init_copy_to_screen(void)
/* Linear frame buffer */
wi.win_base = (char *)mi->lfb_ptr;
- wi.win_size = 0; /* 4 GB, i.e. one huge window */
+ wi.win_size = 1 << 31; /* 2 GB, i.e. one huge window */
wi.win_pos = 0; /* Already positioned (only one position...) */
+ wi.win_num = -1; /* Not a window */
} else {
/* Paged frame buffer */
@@ -79,6 +80,9 @@ static void set_window_pos(size_t win_pos)
{
static com32sys_t ireg;
+ if (wi.win_num < 0)
+ return;
+
ireg.eax.w[0] = 0x4F05;
ireg.ebx.b[0] = wi.win_num;
ireg.edx.w[0] = win_pos >> wi.win_gshift;