qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Coldfire 5282 Support


From: William Mahoney
Subject: Re: [Qemu-discuss] Coldfire 5282 Support
Date: Tue, 12 Sep 2017 19:05:29 +0000

OK a bit of an update and another question or two. First, you’re right, “it 
just plain works”. What I’d like to verify today is that I am “doing the right 
thing” is all. 

1) I made a copy of qemu/hw/m68k/mcf5208.c as mcf5282.c and I - for now - 
changed all 5208 to 5282 inside the source. Threw in some fprintfs while I was 
at it.

2) Added mcf5282.o to the Makefile.objs that is in that directory.

3) Went into emu/target/m68k/cpu.c and duplicated (with a name change) the init 
function for the 5208, then added the 5282 (currently named “m5282-bill”) to 
the list of m68k_cpus. Took a bit of grepping. 

Now I can do 'qemu-system-m68k -cpu m5282-bill -bios /tmp/mybios’ and it stops 
(gdb) at the init function in my 5282 with everything set and ready to rock and 
roll.

So after all this description, just a simple question. Is this “how you are 
supposed to do it”, in general? There’s no master list of dependencies I needed 
to update, or a Makefile I need to change, or… ? As long as I do another 
configure to let it know the dependencies, that’s pretty much it, right? Just 
wanting to do it the correct way for future use.

Thanks!

Bill



> On Sep 9, 2017, at 7:30 AM, Peter Maydell <address@hidden> wrote:
> 
> On 8 September 2017 at 21:32, William Mahoney <address@hidden> wrote:
>> "digic_load_rom()" knows the filename via an extern “bios_name” which is at 
>> “include/sysemu/sysemu.h” but really lives in “vl.c”. It is set based on 
>> “machine_ops” that comes from “qemu_get_machine_opts()” which in turn comes 
>> from “emu_find_opts_singleton()” which is in "util/qemu-config.c”…
>> 
>> Shortcut time. Presumably there is a way to specify some command line 
>> switch, described as “-bios”, and have the filename end up at 
>> “digit_load_rom()”. But I don’t see the direct path, or a header with all 
>> the options listed for the specific machine, or… Can you walk me through how 
>> a “-bios” command line switch is actually supposed to appear (it doesn’t on 
>> qemu-system-arm)?
> 
> This should all just work and you don't need to care about
> the details of our command line parsing. (Feel free to dig
> into it if you want to, but generally QEMU is big enough
> that you'll make more progress if you take on trust the
> parts of the code that you don't immediately need to deal
> with. Nobody completely understands the entire system.
> In this case what happens is that in vl.c we handle the
> -bios option via the QEMU_option_bios: case in the option
> processing switch by setting the value of the "firmware"
> option in the "machine" options set, and then later on we
> pull it back out again to set the bios_name global.)
> 
> As an ARM example, hw/arm/vexpress.c reads bios_name to
> get the filename that the user specified with -bios (if any).
> 
> thanks
> -- PMM


reply via email to

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