Subject: Re: NetBSD/hpcarm snap code
To: Richard Earnshaw <>
From: Jason R Thorpe <>
List: tech-kern
Date: 02/16/2001 14:15:25
On Fri, Feb 16, 2001 at 09:54:08PM +0000, Richard Earnshaw wrote:

 > 	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?

If you can determine it at run-time, then a function switch would work
fine.  You can select based on the CPU ID instruction.  This is obviously
done now on the RiscPC.

Note division of code into sane modules doesn't mean you can't include
several of them.

        -- Jason R. Thorpe <>