From: H. Peter Anvin Date: Thu, 14 Feb 2008 06:17:03 +0000 (-0800) Subject: Set the window size to 2 GB for linear framebuffer X-Git-Tag: syslinux-3.62-pre6~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0cda3c772530d0b8c275fb382b2fe9d0efd5536;p=profile%2Fivi%2Fsyslinux.git 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. --- diff --git a/com32/lib/sys/vesa/screencpy.c b/com32/lib/sys/vesa/screencpy.c index ac9b24e..779fe5d 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;