[PATCH] ARM: zImage: add support for ARMv7-M

Arnd Bergmann arnd at arndb.de
Thu Sep 18 10:38:46 PDT 2014


On Thursday 18 September 2014, Joachim Eastwood wrote:
>   ARM(          mov     pc, r4  )               @ call kernel
> - THUMB(                bx      r4      )               @ entry point is always ARM
> +#ifdef CONFIG_CPU_V7M
> +               add     r4, r4, #1              @ enter in Thumb mode for ARMv7M
> +#endif
> + THUMB(                bx      r4      )               @ entry point is always ARM for non ARMv7M CPUs
>  

I think it would be much nicer to avoid sprinkling #ifdefs here. We already
have the ARM() and THUMB() macros to deal with the two cases we support, which
are booting in ARM mode vs ARMv7-A with THUMB2 mode. We can probably add
another macro like this to deal with the ARMv7-M case that does not have
ARM mode.

	Arnd



More information about the linux-arm-kernel mailing list