Subject: Re: NetBSD/hpcarm snap code
To: Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk>
From: Chris G. Demetriou <cgd@sibyte.com>
List: tech-kern
Date: 02/16/2001 14:21:11
rearnsha@buzzard.freeserve.co.uk (Richard Earnshaw) writes:
> 	arch/arm/arm2	<- contains e.g. the ARM2 pmap module
> 	arch/arm/arm6	<- contains e.g. the ARM6 pmap module,
> 			   cache routines, TLB routines, etc.
> 	arch/arm/arm7	<- contains all the ARM7-specific goo.
> 	arch/arm/arm8	<- contains all the ARM8-specific goo.
> 	arch/arm/sa110	<- contains e.g. the SA110 cache routines,
> 			   TLB routines, etc.
> 
> Seems basically sound, except...
> 
> A RiscPC can be fitted with any of arm6,7/SA110 (or even a few had arm8)  
> 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.

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



cgd