target-arm: Fix resetting issues on ARMv7-M CPUs
commit6e3cf5df01bfa192ca162716670cf368ba1338dd
authorMartin Galvan <martin.galvan@tallertechnologies.com>
Fri, 12 Sep 2014 13:06:48 +0000 (12 14:06 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 12 Sep 2014 13:06:48 +0000 (12 14:06 +0100)
treed00b89e76394bb949da2963a8dc7f811b47d8683
parentbfb27e6042e80fca90dc250657b420a73c1c42be
target-arm: Fix resetting issues on ARMv7-M CPUs

When calling qemu_system_reset after startup on a Cortex-M
CPU, the initial values of PC, MSP and the Thumb bit weren't being set
correctly if the vector table was in ROM. In particular, since Thumb was 0, a
Usage Fault would arise immediately after trying to execute any instruction
on a Cortex-M.

Signed-off-by: Martin Galvan <martin.galvan@tallertechnologies.com>
Message-id: CAOKbPbaLt-LJsAKkQdOE0cs9Xx4OWrUfpDhATXPSdtuNw2xu_A@mail.gmail.com
[PMM: removed an incorrect comment]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/cpu.c