qemu-discuss
[Top][All Lists]
Advanced

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

Re: How to run different firmware in a machine with 2 cpu?


From: Peter Maydell
Subject: Re: How to run different firmware in a machine with 2 cpu?
Date: Fri, 7 Apr 2023 16:21:49 +0100

On Fri, 7 Apr 2023 at 11:41, Huang Canming <huangcmzzk@gmail.com> wrote:
>
> hi, members.
>
> I'm trying to model a custom machine which has 2 cpus. Each cpu has its own 
> ram/rom.
>
> for now, I have create a different MemoryRegion for the 2 cpu.
>
> I want that the 2 cpu could run differnt firmware, so I use
>
> armv7m_load_kernel(ARM_CPU(cpu1),machine->firmware,0,0x10000)
> armv7m_load_kernel(ARM_CPU(cpu2),machine->kernel_filename,0,0x10000)

You should only call armv7m_load_kernel() once, even if there
is more than one CPU in the system.

If you want to do something more complex than "just load
one file", then look at the "generic loader", which will
allow you to specifically say "load this ELF file into
the address space as seen by this particular CPU".
https://www.qemu.org/docs/master/system/generic-loader.html

> ./qemu-system-arm -M mymachine -smp cpus=2 -kernel test1.elf -test2.elf 
> -serial stdio -serial tcp::5678,server=on,wait=off

This command line doesn't make sense and I'm surprised it
didn't generate an error, because "-test2.elf" isn't a valid option.

thanks
-- PMM



reply via email to

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