On 09/22/2017 10:59 AM, Peter Maydell wrote: > On exception return for v8M, the SPSEL bit in the EXC_RETURN magic > value should be restored to the SPSEL bit in the CONTROL register > banked specified by the EXC_RETURN.ES bit. > > Add write_v7m_control_spsel_for_secstate() which behaves like > write_v7m_control_spsel() but allows the caller to specify which > CONTROL bank to use, reimplement write_v7m_control_spsel() in > terms of it, and use it in exception return. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > target/arm/helper.c | 40 +++++++++++++++++++++++++++------------- > 1 file changed, 27 insertions(+), 13 deletions(-)
Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~