target/arm: Make v7M exception entry stack push check MPU
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 9 Feb 2018 10:40:27 +0000 (10:40 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 9 Feb 2018 10:40:27 +0000 (10:40 +0000)
commitfd592d890ec40e3686760de84044230a8ebb1eb3
tree0d141c2f2dfc6abd836f4dc93a79bb00368e33e2
parent0094ca70e165cfb69882fa2e100d935d45f1c983
target/arm: Make v7M exception entry stack push check MPU

The memory writes done to push registers on the stack
on exception entry in M profile CPUs are supposed to
go via MPU permissions checks, which may cause us to
take a derived exception instead of the original one of
the MPU lookup fails. We were implementing these as
always-succeeds direct writes to physical memory.
Rewrite v7m_push_stack() to do the necessary checks.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1517324542-6607-5-git-send-email-peter.maydell@linaro.org
target/arm/helper.c