[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] Booting Cortex-M3 Linux kernels in qemu

From: Guenter Roeck
Subject: Re: [Qemu-arm] Booting Cortex-M3 Linux kernels in qemu
Date: Fri, 15 Jun 2018 06:30:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Hi Peter,

On 06/15/2018 02:16 AM, Peter Maydell wrote:
On 14 June 2018 at 22:54, Guenter Roeck <address@hidden> wrote:
qemu supports a number of boards with Cortex-M3 CPU. One board supported
by both qemu and Linux is an385.

As part of my kernel testing effort, it would be great to be able to boot
a non-MMU kernel. However, nothing I tried works.

Is it possible to boot a Cortex-M3 Linux kernel with qemu ? If yes, does
anyone happen to know how to do it ?

I've never tried to boot Linux, only a few RTOS-ish things.
mps2-an385 is probably a reasonably good choice to start with.
Note that it is missing quite a lot of devices, so you might
need to configure Linux not to try to use them (and also
let us know which ones would be useful for us to implement...)
If you pass QEMU the command line -d unimp option it should log
accesses to ranges and devices we don't implement, which may
throw up some useful hints.

Also for M-profile I'd suggest always trying with the most
recent QEMU if you aren't already, since we've been working
actively on it recently.

I tried various versions, but usually I am on the latest version
or even mainline (in this case it is v2.12).

Anyway, my problem is much more basic than device support. Whatever I try,
I always get

qemu: fatal: Lockup: can't escalate 3 to HardFault (current priority -1)

R00=00000000 R01=00000000 R02=00000000 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=ffffffe0 R14=fffffff9 R15=00000000
XPSR=40000003 -Z-- A handler
FPSCR: 00000000

even when I use a toolchain specifically built for Cortex-M3 and thumb2,
and no matter which image I try to load. Presumably that means that it
tries to execute or jump to a non-thumb2 instruction, but that doesn't
really help me. Any idea, or should I just give up ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]