qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Clément Chigot" <chigot@adacore.com>
Cc: Bin Meng <bmeng.cn@gmail.com>, qemu-devel@nongnu.org
Subject: Re: Question about loading bare metal firmware
Date: Tue, 13 Sep 2022 15:35:14 +0100	[thread overview]
Message-ID: <87o7vjz6da.fsf@linaro.org> (raw)
In-Reply-To: <CAJ307Ej5stZr6fPsLROFBkmtg=uzkG50yVVY6=Ru6LTLQzae5A@mail.gmail.com>


Clément Chigot <chigot@adacore.com> writes:

> Hi all,
>
> I'm wondering if there is an official way to load bare metal software
> within qemu emulations.
> I've seen a lot of people (including us) using -kernel. However, the
> doc seems to imply that the generic loader would be a better approach
> (cf [1]). I know that the compatibility with older Qemus is one of the
> reasons why -kernel is still highly used. I've also seen that the
> reset vector can be initialized automatically by -kernel unlike with
> the generic loader (this is the case with RiscV AFAICT).
> But is there any kind of official recommendation on that topic ?

The recommendation is in the document you linked. For bare metal use the
generic loader and make sure you put the blob in the right place so the
architectural reset vector will jump to it.

> I'm asking that because a recent change in RiscV Polarfire Soc is
> forcing -dtb to be passed along -kernel. But in case of bare board
> software, -dtb isn't needed (at least in our use case).
> I've a patch that allows "-dtb" to be missing with "-kernel" only if
> "-bios none" is provided. But I'm not sure if this is the right way to
> say "it's a bare board software".
>
> @Bin Meng you're the one that added this -kernel support in PolarFire
> Soc. Thus, is my approach looking good for you or do you have a better
> one in mind ?
>
> [1] https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-8
>
> Thanks,
> Clément


-- 
Alex Bennée


  parent reply	other threads:[~2022-09-13 14:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13  9:38 Question about loading bare metal firmware Clément Chigot
2022-09-13 12:37 ` Peter Maydell
2022-09-13 13:53 ` Bin Meng
2022-09-13 14:35 ` Alex Bennée [this message]
2022-09-13 14:53   ` Clément Chigot
2022-09-14 11:20     ` Alistair Francis

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=87o7vjz6da.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=bmeng.cn@gmail.com \
    --cc=chigot@adacore.com \
    --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).