Subject: Re: NetBSD/hpcarm snap code
To: Richard Earnshaw <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 02/16/2001 14:21:11
email@example.com (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...