Fix-up cursor. [rsc] --rw-rw-r-- M 222375 glenda sys 12023 Jan 4 14:43 sys/src/9/pc/vganvidia.c /n/sourcesdump/2006/0104/plan9/sys/src/9/pc/vganvidia.c:184,190 - /n/sourcesdump/2006/0105/plan9/sys/src/9/pc/vganvidia.c:184,199 p = (void*)((uchar*)scr->mmio + Pramin + 0x1E00 * 4); break; default: - p = (void*)((uchar*)scr->vaddr + scr->storage - 96*1024); + /* + * Reset the cursor location, since the kernel may + * have allocated less storage than aux/vga + * expected. + */ + tmp = scr->storage - 96*1024; + p = (void*)((uchar*)scr->vaddr + tmp); + vgaxo(Crtx, 0x30, 0x80|(tmp>>17)); + vgaxo(Crtx, 0x31, (tmp>>11)<<2); + vgaxo(Crtx, 0x2F, tmp>>24); break; }