Subject: Re: SGI Indy full-screen console mode
To: Michal Wirski <hippo@sdf.lonestar.org>
From: Malte Dehling <mdehling@math.ruhr-uni-bochum.de>
List: port-sgimips
Date: 12/27/2004 13:31:48
Hi,

On Sun, Dec 26, 2004 at 03:26:20PM +0000, Michal Wirski wrote:
> I am running NetBSD 2.0 on an SGI Indy 4600K.
> I run it in full-screen console mode through a normal monitor 
> and keyboard.
> Everything works fine except for the orange square cursor.
> 
> When I am presented with a shell, or login prompt, or when working in Vi,
> the cursor behavour is the same and problematic.
> 
> When I type a letter at the shell prompt, the letter  that was just typed 
> is hidden by the cursor, to see that letter I have to type in a new letter.

I have the same thing happening on a SGI Indy R4600 aswell.

> 
> I tried both vt100 and vt220 terminal emulation. I dont know if the problem 
> is with wscons, gettytab or tty.

AFAIK this is a problem with the netbsd kernel, namely, the newport driver.

I think the following lines of src/sys/arch/sgimips/gio/newport.c are the
problem:
---
691            /* Work around bug in some board revisions */
692            if (dc->dc_boardrev < 6)
693                    x_offset = 21;
694            else if (dc->dc_vc2rev == 0) 
695                    x_offset = 29;
696            else
697                    x_offset = 31;
---

On my board (

# dmesg | grep newport
newport0 at gio0 slot 2 addr 0x1f000000: SGI NG1 (board revision 2, cmap revision 5, xmap revision 5, vc2 revision 0), depth 8
wsdisplay0 at newport0 kbdmux 1: console (1280x1024, vt100 emulation)

) x_offset = 29 ist correct, most of the time...
Sometimes the cursor is at the correct location, even when using a GENERIC
kernel.

> 
> Is anyone having the same problem?

Me ;)

It might be helpfull if you could send the ouput of your `dmesg' command (or
atleast the newport lines). The newport lines contain your board other revision
numbers which may help to fix the above code (I assume the code is wrong, as I
never had this problem with Linux.)

Until then you could just try out which of the x_offset settings is correct for you and compile your own kernel with it.

-- 
Malte Dehling

Mail:		mdehling [at] math.ruhr-uni-bochum.de
Website:	http://mdehling.ath.cx/mdehling/
PGP:		2586 A3BF B438 E68E 2B85  C4EA C5A7 AD96 C865 03D2