From: Guenter Roeck <linux@roeck-us.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-arm] Booting Cortex-M3 Linux kernels in qemu
Date: Fri, 15 Jun 2018 15:49:59 -0700 [thread overview]
Message-ID: <20180615224959.GA3257@roeck-us.net> (raw)
In-Reply-To: <20180615181331.GA29302@roeck-us.net>
On Fri, Jun 15, 2018 at 11:13:31AM -0700, Guenter Roeck wrote:
> Hi Peter,
>
> On Fri, Jun 15, 2018 at 02:54:33PM +0100, Peter Maydell wrote:
> >
> > Note that for M profile QEMU, the thing you pass to -kernel
> > must be be either (a) a raw image file which starts with a
> > vector table and is intended to be loaded at address zero,
> > or (b) be an ELF file which we will load at whatever address
> > it asks, but which must include a vector table at address
> > zero, because we don't honour the ELF entrypoint address
> > but instead always load the initial SP and PC from the
> > vector table.
> >
> That was useful.
>
> After hacking qemu to accept the ELF start address and to set
> initial_msp to 0 (a whopping 6-line patch), I get a bit further.
> The boot now hangs because the devicetree blob is not recognized.
> Does qemu load and pass the provided dtb file ? I didn't
> immediately find any code doing it for armv7m/an385.
>
So, I didn't find anything because it is not there. I was able to pass
the fdt in some hackish way. This is the end of the resulting log (with
-d exec):
Trace 0: 0x7fffcf797400 [00000000/210d2440/0x11280001] mps2_early_write
Trace 0: 0x7fffcf7975c0 [00000000/210d170a/0x11280001] uart_console_write
Linking TBs 0x7fffcf7975c0 [210d170a] index 0 -> 0x7fffcf797940 [210d171a]
Trace 0: 0x7fffcf797940 [00000000/210d171a/0x11280001] uart_console_write
Linking TBs 0x7fffcf797940 [210d171a] index 0 -> 0x7fffcf797ac0 [210d1728]
Trace 0: 0x7fffcf797ac0 [00000000/210d1728/0x11280001] uart_console_write
Trace 0: 0x7fffcf797c00 [00000000/210d2424/0x11280001] mps2_early_putchar
Linking TBs 0x7fffcf797c00 [210d2424] index 1 -> 0x7fffcf797e00 [210d2432]
Trace 0: 0x7fffcf797e00 [00000000/210d2432/0x11280001] mps2_early_putchar
Trace 0: 0x7fffcf797fc0 [00000000/210d1730/0x11280001] uart_console_write
Linking TBs 0x7fffcf797fc0 [210d1730] index 0 -> 0x7fffcf798080 [210d1714]
Trace 0: 0x7fffcf798080 [00000000/210d1714/0x11280001] uart_console_write
Linking TBs 0x7fffcf798080 [210d1714] index 0 -> 0x7fffcf797940 [210d171a]
Trace 0: 0x7fffcf797940 [00000000/210d171a/0x11280001] uart_console_write
Chain 0: 0x7fffcf797c00 [00000000/210d2424/0x11280001] mps2_early_putchar
Linking TBs 0x7fffcf797c00 [210d2424] index 0 -> 0x7fffcf7981c0 [210d243e]
Trace 0: 0x7fffcf7981c0 [00000000/210d243e/0x11280001] mps2_early_putchar
Linking TBs 0x7fffcf7981c0 [210d243e] index 0 -> 0x7fffcf797c00 [210d2424]
Trace 0: 0x7fffcf797c00 [00000000/210d2424/0x11280001] mps2_early_putchar
At this point it is stuck. I'll try to find out why.
Guenter
next prev parent reply other threads:[~2018-06-15 22:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 21:54 [Qemu-arm] Booting Cortex-M3 Linux kernels in qemu Guenter Roeck
2018-06-15 9:16 ` Peter Maydell
2018-06-15 13:30 ` Guenter Roeck
2018-06-15 13:54 ` Peter Maydell
2018-06-15 18:13 ` Guenter Roeck
2018-06-15 22:49 ` Guenter Roeck [this message]
2018-06-16 11:13 ` Peter Maydell
2018-06-16 15:08 ` Guenter Roeck
2018-06-16 18:08 ` Peter Maydell
2018-06-16 18:53 ` Guenter Roeck
2018-06-19 12:41 ` Peter Maydell
2018-06-19 17:43 ` Guenter Roeck
2018-06-20 8:52 ` Peter Maydell
2018-06-20 22:54 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180615224959.GA3257@roeck-us.net \
--to=linux@roeck-us.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.