From: Rob Herring <rob.herr...@linaro.org> Several platforms make smc calls for things such as PL310 cache setup. In these cases, making smc a nop rather than an illegal instruction is sufficient for qemu to work.
Signed-off-by: Rob Herring <rob.herr...@linaro.org> --- target-arm/translate.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index e701c0f..ab4cd56 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -7518,16 +7518,18 @@ static void disas_arm_insn(CPUARMState * env, DisasContext *s) store_reg(s, rd, tmp); break; case 7: - /* SMC instruction (op1 == 3) - and undefined instructions (op1 == 0 || op1 == 2) - will trap */ - if (op1 != 1) { - goto illegal_op; + if (op1 == 3) { + ARCH(6K); + /* nop */ + break; + } else if (op1 == 1) { + /* bkpt */ + ARCH(5); + gen_exception_insn(s, 4, EXCP_BKPT); + break; } - /* bkpt */ - ARCH(5); - gen_exception_insn(s, 4, EXCP_BKPT); - break; + /* Undefined instructions will trap */ + goto illegal_op; case 0x8: /* signed multiply */ case 0xa: case 0xc: -- 1.8.3.2