[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit |
Date: |
Wed, 21 Feb 2018 15:09:41 +0000 |
On 21 February 2018 at 14:25, Rd Cheung <address@hidden> wrote:
> Yes, this looks like misusing ARM mode instead of Thumb mode to me.
> I just checked the local variable xpsr in function do_v7m_exception_exit()
> by adding a qemu_log_mask line at the end of the function. I turn on log by
> -d in_asm,guest_errors. And the xpsr = 0x1000000, which has its bit 24 set
> to 1.
> And bit 24 is the indicator of Thumb state according to ARM info center. So
> it
> should be correct, or am I getting something wrong?
Odd. In that case what should happen is that the call to
xpsr_write() should cause env->thumb to be set, which is
the QEMU internal state that tracks whether we are in Arm
or Thumb mode.
I would recommend adding also int,exec,cpu,unimp to your tracing
options. That will allow you to confirm exactly what the CPU
state on return from the exception is, because it will print
a register state dump to the log. (the 'cpu' and 'exec' logs
do slow down the emulation a lot, but hopefully this bug
happens early in execution.)
thanks
-- PMM
- [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit, Rd Cheung, 2018/02/20
- Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit, Peter Maydell, 2018/02/21
- Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit, Rd Cheung, 2018/02/21
- Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit,
Peter Maydell <=
- Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit, Rd Cheung, 2018/02/21
- Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit, Peter Maydell, 2018/02/22
- Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit, Rd Cheung, 2018/02/22
- Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit, Peter Maydell, 2018/02/22
- Re: [Qemu-arm] ARM cortex-m3 instruction fetch misbehaves during do_v7m_exception_exit, Rd Cheung, 2018/02/22