qemu-arm
[Top][All Lists]
Advanced

[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 15:49:59 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

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



reply via email to

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