Subject: Re: VGA Cursor weirdness on i386
To: Rick Byers <rb-netbsd@BigScaryChildren.net>
From: Onno van der Linden <o.vd.linden@quicknet.nl>
List: current-users
Date: 08/05/2001 22:24:42
On Sun, Aug 05, 2001 at 03:54:45PM -0400, Rick Byers wrote:
> Hi,
> 
> When I updated my source and rebuilt my kernel yesterday, my cursor
> started behaving differently (on i386).  Instead of a two line underscore
> style, it was bigger (4 lines I think).  When booting, the cursor changes
> from the default hardware cursor immediatly after loading the kernel (it
> is normal in the boot loader).  I do not use "options
> PCDISPLAY_SOFTCURSOR".

It was introduced with a commit to /sys/dev/ic/pcdisplay_subr.c

>   Revision 1.17 / (download) - annotate - [select for diffs] , Thu Jul 5
>   16:45:23 2001 UTC (2 weeks, 5 days ago) by thorpej
>   Branch: MAIN 
>   Changes since 1.16: +8 -1 lines
>   Diff to previous 1.16 (colored)
>If using the hardware cursor, make sure the cursor shape is initialized,
>otherwise we won't be able to see anything if the system firmware has
>either not initialized it, or initialized it to "invlisible".

Normally the cursor is initialized by most BIOS's to a smaller size.
By setting curstart to 0xe instead of 0xb things are back to "normal".

Here's a combined diff from kern/13117 (another slightly annoying cursor
bug) and kern/13573.
http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=13117
http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=13573

Onno

--- /tmp/pcdisplay_subr.c	Tue Jul 24 21:19:44 2001
+++ /sys/dev/ic/pcdisplay_subr.c	Tue Jul 24 21:21:05 2001
@@ -70,7 +70,7 @@
 	 * Firmware might not have initialized the cursor shape.  Make
 	 * sure there's something we can see.
 	 */
-	pcdisplay_6845_write(scr->hdl, curstart, 0x0b);
+	pcdisplay_6845_write(scr->hdl, curstart, 0x0e);
 	pcdisplay_6845_write(scr->hdl, curend, 0x10);
 #endif
 	scr->cursoron = 1;
@@ -122,7 +122,7 @@
 
 	if (scr->active) {
 		if (!on)
-			pos = 0x1010;
+			pos = 0x3fff;
 		else
 			pos = scr->dispoffset / 2
 				+ row * scr->type->ncols + col;