Subject: Re: CVS commit: syssrc/sys/arch/cobalt/cobalt
To: None <cgd@sibyte.com, nisimura@itc.aist-nara.ac.jp>
From: Matt Thomas <matt@3am-software.com>
List: port-mips
Date: 06/27/2001 08:09:12
At 08:03 AM 6/27/2001 -0700, cgd@sibyte.com wrote:
>nisimura@itc.aist-nara.ac.jp writes:
> > Maintaining cpu_identify() routine in mips/mips_machdep.c is rather,
> > really indeed, pain.  Port-specific cpu_attach() is intended to
> > pretty-print CPU characteristics which should be known by
> > port-maintainers as prerequisites.
>
>"There should be a architecture-level function for the purpose, and
>indeed there is, but it's a bit annoying.  So we're going to use local
>code instead, and put less-annoying but very similar hunks of code in
>N places." ?!?!?!?
>
>Lose.
>
>If cpu_identify() is broken (and oh, it is 8-), _FIX IT_, and make it
>more usable.  don't scatter CPU identification code elsewhere, even if
>it's reasonable to do so.
>
>at most, port-dependent code should do something like run
>cpu_indentify() then sanity-check its output.

While I wouldn't the arm method is perfect, it seems to work pretty well.

Have MIPS_xxx defines for each CPU type and make each port put them in
config and/or std files for the possible cpus they support.
--
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message