summary refs log tree commit diff stats
path: root/target/arm/psci.c
diff options
context:
space:
mode:
authorStefano Stabellini <sstabellini@kernel.org>2017-10-31 11:50:50 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-10-31 11:50:50 +0000
commit58803318e5a546b2eb0efd7a053ed36b6c29ae6f (patch)
treeef357a57b967e898d4ac94d2a55ed8398d0a7a91 /target/arm/psci.c
parentabf6e752e55b2f5afb48303429dea2db7c3a62de (diff)
downloadfocaccia-qemu-58803318e5a546b2eb0efd7a053ed36b6c29ae6f.tar.gz
focaccia-qemu-58803318e5a546b2eb0efd7a053ed36b6c29ae6f.zip
fix WFI/WFE length in syndrome register
WFI/E are often, but not always, 4 bytes long. When they are, we need to
set ARM_EL_IL_SHIFT in the syndrome register.

Pass the instruction length to HELPER(wfi), use it to decrement pc
appropriately and to pass an is_16bit flag to syn_wfx, which sets
ARM_EL_IL_SHIFT if needed.

Set dc->insn in both arm_tr_translate_insn and thumb_tr_translate_insn.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Message-id: alpine.DEB.2.10.1710241055160.574@sstabellini-ThinkPad-X260
[PMM: move setting of dc->insn for Thumb so it is correct for 32 bit insns]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/psci.c')
-rw-r--r--target/arm/psci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/arm/psci.c b/target/arm/psci.c
index fc34b263d3..eb7b88e926 100644
--- a/target/arm/psci.c
+++ b/target/arm/psci.c
@@ -189,7 +189,7 @@ void arm_handle_psci_call(ARMCPU *cpu)
         } else {
             env->regs[0] = 0;
         }
-        helper_wfi(env);
+        helper_wfi(env, 4);
         break;
     case QEMU_PSCI_0_1_FN_MIGRATE:
     case QEMU_PSCI_0_2_FN_MIGRATE: