qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Liviu Ionescu <ilg@livius.net>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [RFC] extensions to the -m memory option
Date: Mon, 01 Jun 2015 10:53:04 +0200	[thread overview]
Message-ID: <556C1D70.5000304@redhat.com> (raw)
In-Reply-To: <789EE1D0-A6B3-4F50-92A8-E8EF453634BA@livius.net>



On 01/06/2015 10:30, Liviu Ionescu wrote:
> if -kernel is present, the memory content is loaded from the external image (which is not at all a kernel, as the confusing option implies).

In this case, you should use -pflash, not -kernel; it should be a binary
file, not ELF.  -pflash does not have a confusing option
name. :)

> if -kernel is not used, but -gdb is used, memory content is loaded by the gdb client, as for any debug session using a jtag/swd.

This can simply be the case where -pflash is not specified.  The flash
is then initialized with zeros.  This is the case where you need to
specify the size.

Assuming this is usually driven from an external program, I honestly do
not find file.size=128K,file=null-co://,snapshot=on too bad, but I
understand how you see that differently.

>> are the writes supposed to stick around from one QEMU invocation to the next?
> 
> that would be useful for testing bootloaders, but it is not yet implemented.

-pflash would give you this for free.

Paolo

> 1 - as target for debug sessions, replacing a physical board connected
> via jtag/swd; the 'flash' is written on each debug session, via gdb
> client commands, passed to qemu in gdb server mode. the 'GNU ARM Eclipse
> QEMU' plug-in does just that, behaving exactly like the J-Link plug-in
> or the OpenOCD plug-in. this is generally an interactive session, under
> user control.
> 
> the desired integration with GNU ARM Eclipse requires the QEMU
> emulation of Cortex-M devices to fully support the CMSIS startup code
> (generally setting the PLL clocks), and one GPIO port for blinking a
> LED. this will provide a convenient test environment for the projects
> generated by the GNU ARM Eclipse C/C++ wizards, which generate simple
> 'blinky' projects. for a nice feedback, the emulator should display a
> picture of the board, and the LED to turn on and off as a square
> saturated colour area in the actual LED location.
> 
> 2 - as a convenient platform for running unit tests; in this case the
> .elf is loaded via -kernel, full semihosting is enabled, and argv[] are
> passed to the application; the result of the test is an exit code and an
> .xml with details about each test case. this is generally a scripted
> session, running under a continuous integration server, like
> Hudson/Jenkins, and requires a convenient way to pass semihosting
> arguments to the application. (the current implementation using the
> '-semihosting-config arg=' syntax is NOT designed with this kind of ease
> of use in mind, it is too complicated, it requires a wrapper to pack the
> arguments, and encourages inconsistent use for arm/mips targets).
> 
> 3 - as you noticed, there are other use cases, like testing
> bootloaders, but they are less frequent.

  reply	other threads:[~2015-06-01  8:53 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 22:11 [Qemu-devel] [RFC] extensions to the -m memory option Liviu Ionescu
2015-05-29  9:11 ` Igor Mammedov
2015-05-29 19:22   ` Liviu Ionescu
2015-05-29 19:32     ` Peter Maydell
2015-05-29 20:26       ` Liviu Ionescu
2015-05-29 21:40         ` Peter Maydell
2015-05-29 21:49           ` Liviu Ionescu
2015-05-30  9:39             ` Peter Crosthwaite
2015-05-31 14:05               ` Liviu Ionescu
2015-05-31 18:45                 ` Peter Crosthwaite
2015-05-31 20:59                   ` Liviu Ionescu
2015-05-31 22:10                     ` Peter Crosthwaite
2015-05-31 22:24                       ` Liviu Ionescu
2015-05-31 22:27                         ` Peter Crosthwaite
2015-05-31 22:36                           ` Liviu Ionescu
2015-05-31 22:59                       ` Liviu Ionescu
2015-05-31 23:44                         ` Peter Crosthwaite
2015-06-01  0:14                           ` Liviu Ionescu
2015-06-01  2:26                             ` Peter Crosthwaite
2015-06-01  7:08                               ` Liviu Ionescu
2015-06-01 20:36                             ` Liviu Ionescu
2015-06-03 12:31                               ` Liviu Ionescu
2015-06-03 17:48                                 ` Peter Crosthwaite
2015-06-08  7:12                                   ` Markus Armbruster
2015-06-02 10:15                         ` Liviu Ionescu
2015-06-02 10:32                           ` Peter Crosthwaite
2015-06-02 10:42                             ` Peter Maydell
2015-06-02 11:01                               ` Liviu Ionescu
2015-06-02 20:23                                 ` Peter Crosthwaite
2015-06-01  7:19                 ` Paolo Bonzini
2015-06-01  8:30                   ` Liviu Ionescu
2015-06-01  8:53                     ` Paolo Bonzini [this message]
2015-06-01  9:16                       ` Peter Crosthwaite
2015-06-01  9:21                         ` Peter Maydell
2015-06-01  9:45                         ` Liviu Ionescu
2015-06-01  9:23                       ` Liviu Ionescu
2015-06-01  9:41                         ` Paolo Bonzini
2015-05-29 11:08 ` Paolo Bonzini
2015-05-29 19:27   ` Liviu Ionescu
2015-05-29 19:33     ` Paolo Bonzini
2015-05-29 20:13       ` Liviu Ionescu
2015-05-29 20:15         ` Paolo Bonzini
2015-05-29 20:38           ` Liviu Ionescu
2015-05-30  9:55   ` Peter Crosthwaite
2015-05-30 10:32     ` Paolo Bonzini
2015-05-30 20:20       ` Peter Crosthwaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556C1D70.5000304@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=ilg@livius.net \
    --cc=imammedo@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).