[U-Boot] [PATCH 2/6] common/cmd_boot: keep ARM v7M in thumb mode during do_go_exec()
Tom Rini
trini at konsulko.com
Thu Apr 16 17:02:05 CEST 2015
On Thu, Apr 16, 2015 at 03:53:56PM +0200, Albert ARIBAUD wrote:
> Hello Matt,
>
> On Tue, 14 Apr 2015 14:07:18 -0400, Matt Porter <mporter at konsulko.com>
> wrote:
> > On ARM v7M, the processor will return to ARM mode when executing
> > a blx instruction with bit 0 of the address == 0. Always set it
> > to 1 to stay in thumb mode.
>
> This should be done for all targets which build with Thumb instruction
> set, not only ARMv7M, should it not?
No, because it's not a problem on CPUs where we can do Thumb or
non-Thumb instructions, only on CPUs where we can _only_ do Thumb
instructions (or the special subset of "other" instructions the core
allows). On ARM v7M trying to do the blx in ARM mode isn't allowed and
causes an abort (or some other exception, I forget which) to happen upon
execution.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150416/e9bcbfbb/attachment.sig>
More information about the U-Boot
mailing list