From: "Andreas Färber" <afaerber@suse.de>
To: Fabien Chouteau <chouteau@adacore.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Alexander Graf" <agraf@suse.de>,
qemu-devel <qemu-devel@nongnu.org>,
"Hervé Poussineau" <hpoussin@reactos.org>,
qemu-ppc@nongnu.org, "Artyom Tarasenko" <atar4qemu@gmail.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] PPC PReP: can run without bios image
Date: Thu, 04 Apr 2013 19:05:31 +0200 [thread overview]
Message-ID: <515DB2DB.30907@suse.de> (raw)
In-Reply-To: <515DA789.1060505@adacore.com>
Am 04.04.2013 18:17, schrieb Fabien Chouteau:
> On 04/04/2013 02:43 PM, Peter Maydell wrote:
>> On 4 April 2013 12:53, Andreas Färber <afaerber@suse.de> wrote:
>>> Alex, isn't ARM running without -bios? Instead of a firmware blob it has
>>> some hardcoded firmware'ish instructions in the loader code.
>>
>> Varies from board to board, but yes, generally we have a trivial
>> bootloader (which on uniprocessor machines doesn't actually run
>> guest code, it just sets registers and memory up to jump to the
>> kernel).
>>
>>> For PReP, Fabien has not stated what his use case actually is (in
>>> particular which hardware?), so it's hard for me to comment on what the
>>> hardware actually does and I thus won't accept random changes just
>>> because they happen to be in Leon3 code. There's nothing conceptually
>>> wrong with loading ELF code so I'm positive we will find a solution to
>>> accommodate all use cases in some way. :)
>>
>> ARM also lets you pass an ELF file to -kernel which it treats
>> as "just pull this blob into RAM and jump to its entrypoint".
>
> That's what we do for almost all the targets we are using at AdaCore
> (leon, leon3, PReP(602), wrSbc8349(e300), wrSbc8548(e500v2),
> lm3s(arm-M3), TMS570(arm-R4F)).
>
>> This is useful for 'bare metal' type test cases (equivalent
>> of dumping a file in over JTAG).
>
> Exactly, maybe I have to explain how we use QEMU here:
>
> The Ada language provides run-time features (tasking, timing services,
> protected objects, etc...). These can be implemented on top of an OS
> (Windows, Linux, Solaris, vxWorks, etc...). There's also the Ravenscar
> profile, which restrict the language to a subset of run-time features
> suitable for embedded and safety-critical tasks.
>
> In that case there's no need for and OS, but the program itself can be a
> simple kernel (scheduling, interrupts, timing services...) running on
> bare metal. The program will also do the initialization of the board, so
> there's no need for bootloader/firmware.
Okay, so that's -bios for PReP at least and my patch adds the missing
ELF support, with fallback to current blob loading.
> We run hundreds of thousands of tests on QEMU each days, on all the
> guest platforms above and on Windows and Linux hosts. These tests are
> very short programs that usually run for less than 2 secs.
>
> In that context having a boot loader that initialize the board and load
> the program from network or disk is not very interesting, it's time
> consuming and it's complicated. Our compiler builds and ELF file, it's
> easier to run it right away.
>
>> The UI is all wrong, though:
>> -kernel should always mean "load a Linux kernel" and we should
>> have some other way (ideally a cross-architecture way) of saying
>> "just load this binary blob and start it". (-bios isn't that
>> because -bios tends to (a) mean different things on different
>> boards and (b) mean 'put this in flash or whatever' rather than
>> 'dump stuff in RAM and go'.)
>>
>
> I think -kernel works fine for all architecture. Linux is not the only
> kernel available ;)
I fear that machines have hardcoded some Linux'ish assumptions of where
things get placed, including -append arguments, and what the state the
hardware is in. ;)
-kernel is supposed to be a fast way of loading a kernel, bypassing the
boot loader the hardware usually has, whereas -bios loads something to
baremetal hardware without changing registers from the hardware reset
defaults.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-04-04 17:05 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 16:40 [Qemu-devel] [PATCH 0/3] PPC PReP: Use ElF kernel on PReP Fabien Chouteau
2013-04-03 16:40 ` [Qemu-devel] [PATCH 1/3] PPC PReP: Load ELF kernel Fabien Chouteau
2013-04-03 16:40 ` [Qemu-devel] [PATCH 2/3] PPC PReP: Use kernel entry to set nip at reset Fabien Chouteau
2013-04-03 16:40 ` [Qemu-devel] [PATCH 3/3] PPC PReP: can run without bios image Fabien Chouteau
2013-04-03 16:59 ` Alexander Graf
2013-04-04 8:37 ` Fabien Chouteau
2013-04-04 9:26 ` Alexander Graf
2013-04-04 16:19 ` Fabien Chouteau
2013-04-04 9:46 ` Artyom Tarasenko
2013-04-04 9:50 ` Alexander Graf
2013-04-04 9:57 ` Artyom Tarasenko
2013-04-04 11:53 ` Andreas Färber
2013-04-04 11:59 ` Alexander Graf
2013-04-05 23:00 ` Scott Wood
2013-04-06 9:01 ` Alexander Graf
2013-04-08 17:52 ` Scott Wood
2013-07-04 8:35 ` Julio Guerra
2013-07-10 9:16 ` Julio Guerra
2013-04-06 9:07 ` Alexander Graf
2013-04-06 11:27 ` Peter Maydell
2013-04-06 11:38 ` Alexander Graf
2013-04-06 13:08 ` Peter Maydell
2013-04-06 20:07 ` [Qemu-devel] [Qemu-ppc] " Edgar E. Iglesias
2013-04-06 20:12 ` Alexander Graf
2013-04-07 0:52 ` Edgar E. Iglesias
2013-04-04 12:43 ` [Qemu-devel] " Peter Maydell
2013-04-04 16:17 ` Fabien Chouteau
2013-04-04 16:20 ` Peter Maydell
2013-04-04 16:26 ` Artyom Tarasenko
2013-04-04 16:30 ` Peter Maydell
2013-04-04 16:34 ` Alexander Graf
2013-04-04 16:41 ` Peter Maydell
2013-04-04 16:51 ` Alexander Graf
2013-04-04 16:52 ` Peter Maydell
2013-04-04 22:32 ` Alexander Graf
2013-04-04 22:35 ` Peter Maydell
2013-04-04 16:46 ` Artyom Tarasenko
2013-04-04 16:51 ` Peter Maydell
2013-04-04 17:08 ` Artyom Tarasenko
2013-04-04 17:22 ` Andreas Färber
2013-04-05 9:19 ` Fabien Chouteau
2013-04-05 9:30 ` Peter Maydell
2013-04-04 17:05 ` Andreas Färber [this message]
2013-04-05 2:32 ` Rob Landley
2013-04-04 11:16 ` Andreas Färber
2013-04-04 16:18 ` Fabien Chouteau
2013-04-03 16:47 ` [Qemu-devel] [PATCH 0/3] PPC PReP: Use ElF kernel on PReP Alexander Graf
2013-04-03 17:32 ` Andreas Färber
2013-04-04 8:17 ` Fabien Chouteau
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=515DB2DB.30907@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=atar4qemu@gmail.com \
--cc=chouteau@adacore.com \
--cc=hpoussin@reactos.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.