From: Alistair Francis <alistair23@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "open list:RISC-V" <qemu-riscv@nongnu.org>,
Sagar Karandikar <sagark@eecs.berkeley.edu>,
onathan@fintelia.io,
Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
Palmer Dabbelt <palmer@sifive.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Alistair Francis <Alistair.Francis@wdc.com>
Subject: Re: [Qemu-devel] RISC-V: Include ROM in QEMU
Date: Wed, 19 Jun 2019 07:27:34 -0700 [thread overview]
Message-ID: <CAKmqyKNBkDXsQ9y73LkmbFV4eRQkMH_BugKuzHHoL0n3+ioKmg@mail.gmail.com> (raw)
In-Reply-To: <CAKmqyKMgNrGchEa0D+FsbmoOfs259awtge20EaNb=Bv1JtP6vA@mail.gmail.com>
On Tue, Jun 18, 2019 at 3:17 PM Alistair Francis <alistair23@gmail.com> wrote:
>
> On Mon, Jun 10, 2019 at 11:30 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > On Fri, Jun 07, 2019 at 05:03:42PM -0700, Palmer Dabbelt wrote:
> > > On Thu, 06 Jun 2019 16:22:47 PDT (-0700), alistair23@gmail.com wrote:
> > > > Hello,
> > > >
> > > > As a test of the waters, how would the QEMU community feel about
> > > > including the RISC-V OpenSBI project as a ROM submodule?
> > > >
> > > > The idea would be to have OpenSBI (similar to ATF for ARM and a BIOS
> > > > for x86) included by default to simplify the QEMU RISC-V boot process
> > > > for users. This would remove the requirement for users/developers to
> > > > build a RISC-V firmware. The goal here is to allow people to just
> > > > download and run their kernel as easily as they currently do for x86.
> > > >
> > > > We would make sure that it can be disabled! That is users/developers
> > > > can use their own (or none) if they want to. The idea here is just to
> > > > simplify the boot process, not lock anyone out.
> > >
> > > I like it. My only question is about the mechanics of doing so: are we just
> > > going to assume there's a cross compiler in PATH? I guess that's less of a
> > > usability headache than needing a complier and a firmware.
> >
> > Usual way to add firmware:
> >
> > (1) Add a submodule below roms/
> > (2) Add rules to build the firmware to roms/Makefile. Firmware
> > maintainers can use them, and they also document the build process.
> > A normal qemu build will not automatically build the firmware
> > though.
> > (3) Place a pre-built binary in pc-bios/
> >
> > There is some cross compiler detection logic in roms/Makefile which you
> > can use.
>
> Thanks for the info. I have it all working now, just running a few
> more tests. I will send my patches out today or tomorrow.
We hit the problem in RISC-V now that including a firmware by default
will break all existing users as they are already passing the firmware
in via -kernel.
I don't suppose any other architecture ever had this problem and has a
nice fix? At the moment the only fix I can think of is only include
the default firmware if the user specifies "-bios default". Then
hopefully once everyone is doing that we can make it the default and
not break anything. I can't see a sane way to automatically extract
the information from the kernel binary to be smart about the default.
Alistair
>
> Alistair
>
> >
> > cheers,
> > Gerd
> >
next prev parent reply other threads:[~2019-06-19 14:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 23:22 [Qemu-devel] RISC-V: Include ROM in QEMU Alistair Francis
2019-06-08 0:03 ` Palmer Dabbelt
2019-06-11 6:30 ` Gerd Hoffmann
2019-06-18 22:17 ` Alistair Francis
2019-06-19 14:27 ` Alistair Francis [this message]
2019-06-18 22:17 ` 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=CAKmqyKNBkDXsQ9y73LkmbFV4eRQkMH_BugKuzHHoL0n3+ioKmg@mail.gmail.com \
--to=alistair23@gmail.com \
--cc=Alistair.Francis@wdc.com \
--cc=kbastian@mail.uni-paderborn.de \
--cc=kraxel@redhat.com \
--cc=onathan@fintelia.io \
--cc=palmer@sifive.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=sagark@eecs.berkeley.edu \
/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).