Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Keyboard lockup with NetBSD5



Alexander Coers wrote:

> something you did to this kernel made the bug nearly disappear :-)
> I needed to type a lot and at very high speed to trigger this bug
> again.

Hmm. Perhaps the additional delay from the debugging output is causing that?
I could make a kernel with a much bigger delay, but that can't be the
solution.

There is already a 2000(!) microseconds handshake delay in the kbd interrupt
handler. The AmigaOS keyboard.device uses 85 - and seems to work.


> Here is the kernel output:
> [...]
> Oct 27 20:15:51 a1200 /netbsd: kbd sdr=00 (inverted=ff),  rotated=ff

0xff? The keyboard would never send that.


> IMHO the keyboard sends one "garbage" character (0x00), followed by a  
> resync (0xf9) indicating a false character.

Indeed. That's interesting. The keyboard will do that when it didn't receive
the expected handshaking pulse. Maybe there is a handshaking problem? And
those 2000us look quite suspiscous to me.


> After that the keyboard repeats the last good character followed by a  
> buffer full indication (0xfa).

Maybe the buffer overflows because of the out-of-sync situation?

Another problem is that the handler is not prepared to deal with any special
codes from the keyboard, except "reset warning" (0x78).


> The keyboard of the ECS machines should have a puffer of 10  
> characters, but I don't know about the A1200.

Don't know either. My hardware reference manual is from the OCS era.


> But where does the 0x00 come from?

Good question. Random SDR contents, although the keyboard didn't transmit
anything? But there must have been a CIA-A SP-interrupt.


What puzzles me is that I didn't find any code to setup the CIA-A timer A.
The timer has to run in continuous mode for keyboard handshaking. Or is it
still running, because AmigaOS initialized it before booting the kernel?

I will think about that over this week, and will do some experiments with
modified timing, handshaking and special-code handling.

Until then, I'm open to any ideas.

-- 
    _  Frank Wille (frank%phoenix.owl.de@localhost)
 _ //  http://sun.hasenbraten.de/~frank/
 \X/   Phx @ #AmigaGer



Home | Main Index | Thread Index | Old Index