qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 2/2] semihosting: add --semihosting-config ar


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3 2/2] semihosting: add --semihosting-config arg sub-argument
Date: Wed, 20 May 2015 09:54:08 +0100

On 20 May 2015 at 09:11, Leon Alrae <address@hidden> wrote:
> On 18/05/2015 17:18, Peter Maydell wrote:
>> You need to say how this interacts with the -kernel/-append option
>> (ie what happens if you specify both).
>
> I don't see any correlation between semihosting options and "-append"
> which is described as "kernel command line". I know that ARM semihosting
> uses it as cmdline, therefore I'd wanted to leave the meaning of
> "-append" option specific to a target semihosting implementation.

I really don't want to introduce arguments which differ in semantics
depending on the target CPU type. At the moment 100% of our CPUs
which have a semihosting API that includes a command line argument
honour -kernel/-append.

> But
> perhaps specifying it globally would be better here, I can add something
> like "If both are specified, -kernel/-append are ignored (-kernel is
> used to load an image, but the path won't be passed to semihosting)" if
> we are happy with that.

Yes, that's the behaviour we want.

>> Also, you haven't actually changed anything so at the moment -arg doesn't do
>> anything.
>
> Yes, but is that an issue in this case? Commit message explains why -arg
> is required and UHI patches are already on the mailing list.

Well, with these patches alone we end up with a documented but broken
option. For reasons of consistency (again) I don't want the new
option in the tree without it being supported by ARM, even if the
MIPS code that uses it goes in.

>> Ideally semihost.h's "get me the command line" function(s) should
>> handle "use -arg if present, fall back to -kernel + -append if not"
>> so the target specific semihosting code doesn't need to care.
>
> Agreed. We could initialize semihosting.argv[0] with -kernel and argv[1]
> with -append string if in semihosting mode and no semihosting args have
> been specified. I'll update it in v4.

I'm tempted to suggest splitting -append on whitespace to initialize
argv[1..n]. ARM will just re-concatenate it, but it seems more
useful for the non-ARM cases.

-- PMM



reply via email to

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