qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 0/2] semihosting: clean up and add --semihost


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v5 0/2] semihosting: clean up and add --semihosting-config arg
Date: Sat, 20 Jun 2015 20:49:32 +0100

On 20 June 2015 at 19:04, Liviu Ionescu <address@hidden> wrote:
>
>> On 19 Jun 2015, at 00:43, Peter Maydell <address@hidden> wrote:
>>
>> On 18 June 2015 at 17:00, Leon Alrae <address@hidden> wrote:
>>> Just a rebase of v4 as there were changes in qemu_opt_foreach API.
>>>
>>> Regards,
>>> Leon
>>
>> Thanks; applied to target-arm.next.
>
> I merged target-arm.next to my branch and I'm not sure the current approach 
> is very correct.
>
>     if (semihosting_enabled() && !semihosting_get_argc() && kernel_filename) {
>         /* fall back to the -kernel/-append */
>         semihosting_arg_fallback(kernel_filename, kernel_cmdline);
>     }
>
> this code in vl.c automatically falls back to -kernel/-append, which, for 
> Cortex-M might be a problem.
>
> without defining semihosting arguments, an example run for my case would look 
> like:
>
> GNU ARM Eclipse 64-bits QEMU v2.3.50 (qemu-system-gnuarmeclipse).
> Board: 'STM32-H103' (Olimex Header Board for STM32F103RBT6).
> Device: 'STM32F103RB' (Cortex-M3, MPU), Flash: 128 KB, RAM: 20 KB.
> Image: '/Users/ilg/My Files/MacBookPro Projects/GNU ARM Eclipse/Eclipse 
> Workspaces/qemu-images-44-osx/f1-h103-blink-sh-shd/Debug/f1-h103-blink-sh-shd.elf'.
> Command line: '/Users/ilg/My Files/MacBookPro Projects/GNU ARM 
> Eclipse/Eclipse 
> Workspaces/qemu-images-44-osx/f1-h103-blink-sh-shd/Debug/f1-h103-blink-sh-shd.elf'
>  (145 bytes).
> Load  10016 bytes at 0x08000000-0x0800271F.
> Load    132 bytes at 0x08002720-0x080027A3.
> Load    704 bytes at 0x20000084-0x20000343.
>
> as you can see, it tries to use the kernel name as command line, which 
> exceeds the application small buffer size.

It only does that if you didn't specify the arguments the new
way (at least that is the intention). We need to maintain the
old behaviour for back compatibility.

-- PMM



reply via email to

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