Determining an ARM CPU's architecture
dave.martin at linaro.org
Tue Jul 5 08:50:33 UTC 2011
On Mon, Jul 04, 2011 at 04:10:02PM -0400, Nicolas Pitre wrote:
> On Mon, 4 Jul 2011, Tixy wrote:
> > On Mon, 2011-07-04 at 15:45 -0400, Nicolas Pitre wrote:
> > > On Mon, 4 Jul 2011, Tixy wrote:
> > >
> > > > We've been talking about data-processing instructions but I've also done
> > > > similar for "ldr pc, [...]" as Arnd suggested that we might have single
> > > > kernel binaries that execute on both ARMv4 and v5 hardware.
> > >
> > > Sure, and I think we already do with some configurations. But in that
> > > case nothing should ever use Thumb mode in the kernel.
> > Should an ARMv7 kernel have code running in Thumb mode if it wasn't
> > configured with CONFIG_THUMB2_KERNEL?
> I would say no.
FWIW, I would prefer if the kernel was a properly EABI environment, with
correct interworking -- just from a general cleanliness point of view.
This actually probably not too hard to achieve, but I think people are a bit
scared of it (somewhat justifiably) and the benefits are not huge since all
modules have to be built with a consistent configuration anyway.
The only real benefit is that fossilised binary blob drivers are more likely
to work more smoothly -- that will be hard to sell to the kernel community.
All in all, I suspect this is unlikely to happen.
Note that Thumb kernels do contain very small amounts of ARM code. But
this is only for one or two special cases, and it's probably not worth
trying to support these with kprobes.
More information about the linaro-kernel