diff options
author | Michael Davidsaver <mdavidsaver@gmail.com> | 2017-01-27 15:20:21 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-01-27 15:20:21 +0000 |
commit | abc24d86cc0364f402e438fae3acb14289b40734 (patch) | |
tree | 911dbdb831c2f2b1da74b3900f7665bf02fd8f71 /tests | |
parent | afb3141c660f3dca38227901c5c62cef7af86647 (diff) | |
download | qemu-abc24d86cc0364f402e438fae3acb14289b40734.zip qemu-abc24d86cc0364f402e438fae3acb14289b40734.tar.gz qemu-abc24d86cc0364f402e438fae3acb14289b40734.tar.bz2 |
armv7m: Fix reads of CONTROL register bit 1
The v7m CONTROL register bit 1 is SPSEL, which indicates
the stack being used. We were storing this information
not in v7m.control but in the separate v7m.other_sp
structure field. Unfortunately, the code handling reads
of the CONTROL register didn't take account of this, and
so if SPSEL was updated by an exception entry or exit then
a subsequent guest read of CONTROL would get the wrong value.
Using a separate structure field doesn't really gain us
anything in efficiency, so drop this unnecessary complexity
in favour of simply storing all the bits in v7m.control.
This is a migration compatibility break for M profile
CPUs only.
Signed-off-by: Michael Davidsaver <mdavidsaver@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1484937883-1068-6-git-send-email-peter.maydell@linaro.org
[PMM: rewrote commit message;
use deposit32(); use FIELD to define constants for
masking and shifting of CONTROL register fields
]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions