summary refs log tree commit diff stats
path: root/scripts/modules
diff options
context:
space:
mode:
authorMichael Weiser <michael.weiser@gmx.de>2018-01-11 13:25:33 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-01-11 13:25:33 +0000
commit0785557f8811133bd69be02aeccf018d47a26373 (patch)
tree0e458d7e440f91b904e88796bdf8c0c089699ced /scripts/modules
parentbfe69cc867dfef4b8af348f1f7e36b2727283c4c (diff)
downloadfocaccia-qemu-0785557f8811133bd69be02aeccf018d47a26373.tar.gz
focaccia-qemu-0785557f8811133bd69be02aeccf018d47a26373.zip
target/arm: Fix stlxp for aarch64_be
ldxp loads two consecutive doublewords from memory regardless of CPU
endianness. On store, stlxp currently assumes to work with a 128bit
value and consequently switches order in big-endian mode. With this
change it packs the doublewords in reverse order in anticipation of the
128bit big-endian store operation interposing them so they end up in
memory in the right order. This makes it work for both MTTCG and !MTTCG.
It effectively implements the ARM ARM STLXP operation pseudo-code:

data = if BigEndian() then el1:el2 else el2:el1;

With this change an aarch64_be Linux 4.14.4 kernel succeeds to boot up
in system emulation mode.

Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/modules')
0 files changed, 0 insertions, 0 deletions