Subject: Re: NetBSD 1.4N/pmax not bootable on 5000/133
To: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
From: Simon Burge <simonb@netbsd.org>
List: port-pmax
Date: 11/19/1999 13:11:54
Toru Nishimura wrote:

> >> Sorry to disappoint you, but my DS3100 fails to boot with a 1.4O kernel.
> >> A 3100-only kernel fails to compile due to a dangling reference to
> >> tcfb_cnattach in sys/arch/pmax/dev/findcons.c .  Putting #if NTC > 0...#endif
> >> around the offending lines lets it compile.  But either this kernel, or
> >> a GENERIC kernel from the same sources (1999/11/17) fails to detect
> >> kn01bus0 at mainbus0, resulting in a panic from cpu_initclocks.  I also
> >> noted that both 1.4O kernels (custom and generic) called this machine a
> >> 2100, while the release-branch kernel correctly identified it as a 3100.
> >
> > It's clearly helpful to me.  Thank you for pointing the error.  The fix
> > should be easy.
> 
> Ahh, silly me.   In ibus_pmax_match()::ibus/ibus_pmax.c,
> 
>         if (systype != DS_PMAX || systype != DS_MIPSMATE)
>                 return 0;
> 
> There is a premitive error in the case analysis. || should be &&.

I've just "cvs update"d, and still have a problem on my headless 3100.
You haven't included "opt_dec_{3,5}100.h" in ibus_pmax.c, so the code in
ibus_pmax_attach is never called!  I also needed to fix the prototypes
of dec_3100_intr_establish() and dec_3100_intr_disestablish() [**].  I've
just committed this now.

> I will remove findcons.c in near future. 

I'll look at your changes for this soon!

Simon.

[**] - Over time, I'd like to have no extern function declarations
       in any .c files, only in .h files.  This will help make sure that
       prototypes are always correct...  For the interupt functions,
       would pmax/kn01.h, pmax/kn230.h, etc be the right place for
       these declarations?