[PATCH] ARM: let CPUs not being able to run in ARM mode enter in THUMB mode
Jonathan Austin
jonathan.austin at arm.com
Fri Jan 11 10:34:39 EST 2013
Hi Uwe,
On 11/01/13 11:39, Uwe Kleine-König wrote:
> Some ARM cores are not capable to run in ARM mode (e.g. Cortex-M3). So
> obviously these cannot enter the kernel in ARM mode. Make an exception
> for them and let them enter in THUMB mode.
Clearly something like this is necessary, but it isn't something I'd
like for people to start using *unless* they have a THUMB only CPU (for
example, to work around dodgy boot-loaders, etc)
Seeing as there are no THUMB-only CPUs with an MMU, I think we could
safely constrain this change to:
a) depend on !MMU
b) only touch head-nommu.S
Does that cause any issue for what you're doing.
[...]
> diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
> index 3fd629d..bc3150c 100644
> --- a/arch/arm/mm/Kconfig
> +++ b/arch/arm/mm/Kconfig
> @@ -1,5 +1,11 @@
> comment "Processor Type"
>
> +# Select this if your CPU doesn't support the 32 bit ARM instructions.
> +config THUMBONLY_CPU
> + bool
> + select THUMB2_KERNEL
> + select ARM_THUMB
> +
> # Select CPU types depending on the architecture selected. This selects
> # which CPUs we support in the kernel image, and the compiler instruction
> # optimiser behaviour.
Also, a couple of minor questions about this:
- What's the rationale for the placement within the file - it looks a
bit curious up the top there.
- Given the fact that we don't want people using this except in very
specific circumstances, should we write a little bit of help for the option?
Jonny
More information about the linux-arm-kernel
mailing list