Subject: Risc Express Server How to continue... also apples to Riscstation 2000
To: None <RossAlexander@Home.com>
From: bob meader <bob@cci.net>
List: port-arc
Date: 08/10/2000 10:53:48
I looked at your results again and I think I know what the problem is...

I think the real time clock address is wrong for Risc Express..
Now how to test and maybe fix...

1. Rename /sbin/init (the init program shared by NFS server) to
something
else...
2. Try booting again see what happens...What should happen is the kernel

should search for 'init' at three different locations,printing a message

each time it fails and finally print a 'panic message' informing it
could find it.   If instead nothing different happens but
you do get the message about mounting root on such
and such on NFS server only then the clock code is probably
wrong.
3.If a step 2 above you now suspect possible wrong clock code
then to 'fix-it' you need to change it in sys/arch/arc/arc/clock_mc.c..
However the gotch is YOU NEVER SHOULD HAVE GOTTEN
THIS FAR!!.  The reason I claim this is the way the 'arc' port
configures for different models is a function in 'arcbios.c'
reads the 'machine type' from the arc firmware and sets
a global variable 'cputype' to one of the values defined
in 'arctype.h'. The currently defined types in
Netbsd-current are :
#define ACER_PICA_61  0x01 /* Acer Labs Pica 61 */
#define MAGNUM   0x02 /* Mips MAGNUM R4000 */
#define NEC_R94   0x03 /* NEC RISCstation 2200 EISA */
#define NEC_RAx94  0x04 /* NEC RISCstation 2200 PCI */
#define NEC_RD94  0x05 /* NEC RISCstation 2250 */
#define NEC_R96   0x06 /* NEC RISCserver 2200 */
#define DESKSTATION_RPC44 0x07 /* Deskstation xxx */
#define DESKSTATION_TYNE 0x08 /* Deskstation xxx */
#define NKK_AQUARIUS  0x09 /* NKK R4{67}00 PC */
#define SNI_RM200  0x0a /* Siemens Nixdorf RM200 */
#define ALGOR_CLASS  0x20 /* Algorithmics Class */
#define ALGOR_P4032  0x21 /* ALGORITHMICS P-4032 */
#define ALGOR_P5064  0x22 /* ALGORITHMICS P-5064 */

If you closely you see Risc Express server in NOT LISTED!
What's happening is the cpu-type is being reported as
some other type already listed above BUT the Express
varies somewhat from the type.
4. Run arcdiag (preferred) or Winnt diagnostics to find
out what 'you got'.
5. Due a cvs checkout of current syssrc.
6. Build cross-compiler tools.
7. Based on what you find in step 4 put some printf statements
around the clock read code in clock_mc.c...I believe you'll
find it hangs there...(If not put some printf in 'kernel main' to
find where it stops...) If you find it does in fact hang in
clock read code this is where some 'guess' work comes into
play... try some different routines already in the file hopefully
one is ok... This is how I got the RiscServer 2200 to go!
If none of the listed one works you'll have to look at
the arc firmware disassembly using its 'mini-debugger' to
find it.
8.If you happen to past step 7 ok (so you now have a 'shell'
prompt) submit what you find out the port-arc@netbsd.org
along with an 'arcdiag output' so a more correct test
can be devised in arcbios.c to properly set a 'new type'
suggested value would be NEC_R96e.

Good luck and happy programming it can be done!