Subject: Re: kernel info
To: Ji Bae <jhb8@cornell.edu>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 11/01/1999 22:51:08
In message <4.1.19991102012750.009a5970@postoffice3.mail.cornell.edu>,
Ji Bae writes:

>Ok, here's a first question to throw out.  I'm (trying) to run a NetBSD
>kernel on a MIPS R3000 based simulator.  At a certain point, it seems that
>the kernel jumps to a particular memory location and then just loops
>infinitely.  Examining the simulator PC and the kernel's assembly code, it
>appears to be repeatedly executing this particular line of code:
>
>80118388:       080460e2        j       80118388 <prom_halt+0x8c>
>
>So my question is: what is it doing?  Is it waiting for an interrupt?

This is kernel, not bootblocks?

The kernel is probably calling into the PROM to find out what kind of
DECstation you're running on, so it can set up motherboard init
vectors. See prom_systype().  If the systype isn't recognized, the
kernel will call back into the PROM printf() to try and tell you that:).

There's also some callbacks to ask the PROM which device it's using
for system console, so NetBSD can use the same device.
See pmax/dev/findcons.c.

The sii SCSI driver asks the PROM what scsi-ID it's using
for the host adaptor, so NetBSD can use the same ID.
see prom_scsiid().

Last, most of the interrupt handlers check if the hardware reset
button has been pressed, and if so, call into a PROM reset function.
You only need that if your simulator fakes an interrupt at the
appropriate mips hw interrupt pin :)

If you want to emulate a pmax, you'll have to emulate those callbacks
in the PROM callback vector.  As simon said, the info is the source.