Subject: Re: Misc HWDIRECT fixes
To: None <port-mac68k@NetBSD.ORG>
From: Benoit MARTEL <magus@cs.mcgill.ca>
List: port-mac68k
Date: 01/29/1998 01:46:14
Hi, I sent this to John Wittkoski earlier today and copied the list but I 
had mistyped the list name (as port-mac-68k, duh!) so here it is anyway...

On Friday jan 23 you wrote:

>One another note, someone recently mentioned that their machine hangs
>during ADBReInit if they are moving the mouse. I am pretty sure that   
>this does not happen with the HWDIRECT code on the IIsi and Cuda ADB   
>hardware, and was able to test it directly yesterday on the new II code
>and it boots even if I bang on the keyboard and am moving the mouse. So
>if you notice this boot time problem, please send me some details.

I had posted in December about hangs/crash during boot of HWDIRECT 
kernels. I have played around a bit and I can now give a more precise 
account of the problems.

Sorry for the very long post. I am starting to suspect there are several
problems occuring here.

I run 1.3 on a IIvx. It's a fresh install and I am able to boot without
problems with both GENERIC65 and GENERICSBC56 (although I always use the 
sbc one because my disk/machine has always preferred sbc).

I have tried HWDIRECT.394 and got different results:


1) with NO mouse movement at all during boot

The adb lines are:

adb: using IIsi series hardware support
adb: cleanup: (lenght=0x1):  0xff
adb: ADBReInit complete
adb: extended keyboard (ISO layout) at 2
adb: 100 dpi mouse at 3

The cleanup line is always there but has different data in it. Sometimes 
there are two such "cleanup" lines.
Then the boot goes along fine until almost the end and hangs after the 
lines:

boot device: sd0
root on sd0a dumps on sd0b

I can hit the switch and get a trace. Things seem to be going on because 
I have to wait a few seconds before I hit the switch otherwise I dont always 
get the same trace. Here is the trace after waiting:

_Debugger
_nmihand
_lev7intr
_mi_switch
_tsleep
_scsipi_execute_xs
_scsi_scsipi_cmd
_scsipi_prevent
_sdopen
_sdsize
_cpu_dumpconf
_main
_main

After getting the trace, it freezes.
I really dont know if this is directly related to HWDIRECT at all.
What source date is HWDIRECT.394 based on?
All I know is that it works fine with GENERIC56. I haven't found a newer
kernel and I haven't dowloaded the source to roll my own yet.



2) If I move the mouse during adb initialisation

When I move the mouse during adb init, I get over half a screen of
"adb: cleanup" lines with lots of stuff in them but it seems to go fine
otherwise. It still hangs the same way towards the end of the boot.

Actually, you know what? I just got the same hang but this time I got a
_live_ debugger after getting the trace. So if someone wants more info,
I can run debugger commands and send the output. Even "reboot" worked.



3) If I move the mouse during serial init

This is the interesting case. I move the mouse just after the probes
of my (empty) cdrom, just before the serial init lines and I get a crash.
Here is the relevant output:

probe(ncrscsi0:3:7): illegal request, data = 00 00 00 00 24 00 00 00 00 00
zsc0 at obio chip typtrap: type 0x1, code 0xa24d, v 0x48e7ffff
kernel: Address error trap
pid = 0, pc = 000E85BC, ps = 2104, sfc = 1, dfc = 1
Registers:
  [Register dump]
Kernel stack (001839C0):
  [kernel stack dump]

And then drops into debugger with:

panic: Address error
db> vm_fault(bla bla ba) -> 1
  type 8, code [mmu,,ssw]: 402a24d
trap: type 0x8, code 0x402a24d, v 0xffff7002
kernel: MMU fault trap

Repeated a few times.



I have tried several times and I always get the 3 behaviors I just 
described. The only thing that has changed was that I did not always get a 
"live" debugger.

I know that there is pr#2568 about hanging problems when moving the 
mouse during boot but I think it's been inactive for a while.

I also had an email from Bob Nestor telling me that he had problems with
his powerbook hanging when he moved the mouse but that a fix had been 
found in his case.

That's all I know about the whole story. Sorry again for the long post but
I wanted to be precise since it seems quite complex.

Let me know if I can help in any way.
In the meantime, I will revert to using GENERICSBC56.

Later,
Ben

-----------------------------------------------------------------
"Because user errors often produce unpredictable results, the user
should try to avoid them."

IBM MVS/XA System Programming Library.