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.
/* 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 */
{
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;