Subject: Re: NetBSD/hpcarm snap code
To: Chris G. Demetriou <>
From: Richard Earnshaw <>
List: tech-kern
Date: 02/16/2001 22:28:36
> > A RiscPC can be fitted with any of arm6,7/SA110 (or even a few had 
> > How would one build a kernel that could select at boot time the 
> > appropriate CPU?
> in general, the right thing to do is, if you can support multiple CPU
> types, use a set of structures containing pointers to functions, and
> select the right one at boot time.

Indeed, it's the way it's currently done (if not as cleanly).  I'd thought 
Jason was intending to remove this.  I'm quite happy that I'd just 
misunderstood what he was suggesting.

> There are plenty of optimizations to this, certainly...

Sure, the trick is to allow optimizaitons when a kernel is only compiled 
for one CPU type.