On Sun, May 5, 2019 at 8:34 AM Peter Maydell <peter.mayd...@linaro.org> wrote: > > On Sat, 4 May 2019 at 06:26, Alistair Francis <alistai...@gmail.com> wrote: > > Ah, it seems like -device loader doesn't work, it looks like not > > setting the thumb register causes this core dump: > > > > qemu: fatal: Lockup: can't escalate 3 to HardFault (current priority -1) > > > > R00=20000000 R01=00000574 R02=200015d0 R03=200015d0 > > R04=00000000 R05=00000000 R06=00000000 R07=00000000 > > R08=00000000 R09=00000000 R10=00000000 R11=00000000 > > R12=00000000 R13=ffffffe0 R14=fffffff9 R15=0800cba4 > > Is the ELF file incorrectly setting the entry point address to not > be a Thumb one (ie low bit set), or is the loader device not honouring > that? (I thought that we'd fixed the latter of those recently...)
It looks like all the reset logic is correct in terms of these lines in arm_cpu_reset(): env->regs[13] = initial_msp & 0xFFFFFFFC; env->regs[15] = initial_pc & ~1; env->thumb = initial_pc & 1; The problem is that vecbase is 0, as cpu->init_svtor is 0. cpu->init_svtor is set via QOM properties in armv7m_realize() based on the armv7m property "init-svtor". So hopefully I should be able to just set the property "init-svtor" for the armv7m object. I'll test that out and see how it goes. Alistair > > thanks > -- PMM