qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Add -semihosting-config ....cmdline=string.


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] Add -semihosting-config ....cmdline=string.
Date: Thu, 20 Nov 2014 13:31:48 +0000

On 19 November 2014 22:05, Liviu Ionescu <address@hidden> wrote:
> A new sub-option was added to -semihosting-config to define the entire
> semihosting command line (cmdline=string).
>
> This string is passed down to armv7m.c; if not defined, for
> compatibility reasons, the -kernel -append values are used.
>
> The armv7m_init() and stellaris_init() interfaces were streamlined,
> to use the MachineState structure instead of separate strings.
>
> The semihosting_cmdline was added to the structures MachineState and
> arm_boot_info.

I think you can avoid having to plumb the command line
string into the MachineState and arm_boot_info structures,
because you can just have the semihosting code look the
option up by name:

     QemuOpts *opts =
qemu_opts_find(qemu_find_opts("semihosting-config"), NULL);
     cmdline = qemu_opt_get(opts, "cmdline");
     if (cmdline) {
         ...
     } else {
         fall back to constructing from kernel/append args;
     }

That will also automatically make the command line option
work for A profile CPUs as well.

thanks
-- PMM



reply via email to

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