qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Bolognani <abologna@redhat.com>
To: Alistair Francis <alistair23@gmail.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>,
	 Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
	qemu-devel@nongnu.org, Palmer Dabbelt <palmer@dabbelt.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	 Bin Meng <bin.meng@windriver.com>,
	Weiwei Li <liweiwei@iscas.ac.cn>,
	 Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
	Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
	qemu-riscv@nongnu.org
Subject: Re: [PATCH v2] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"
Date: Wed, 17 May 2023 01:45:20 -0700	[thread overview]
Message-ID: <CABJz62OyYei7DtukTGsKA8oaRBewUR4nwZxx_8ONc0fKkZDuPQ@mail.gmail.com> (raw)
In-Reply-To: <CAKmqyKMDf3F67=_Dq8oFOGG3Ft9hszfB6J2-U9DmSSvK0YKkMg@mail.gmail.com>

On Wed, May 17, 2023 at 02:57:12PM +1000, Alistair Francis wrote:
> On Mon, May 8, 2023 at 9:45 PM Andrea Bolognani <abologna@redhat.com> wrote:
> > > > Taking a step back, what is even the use case for having M-mode code
> > > > in pflash0? If you want to use an M-mode firmware, can't you just use
> > > > -bios instead? In other words, can we change the behavior so that
> > > > pflash being present always mean loading S-mode firmware off it?
>
> It was originally added to support Oreboot (the Rust version of
> Coreboot). The idea was that Oreboot (ROM) would be in flash and then
> go from there.
>
> It also applies to other ROM code that a user might want to test that
> runs before OpenSBI.

Is there a reason why these would have to be loaded into pflash
instead of being passed to -bios? From a quick look at the
documentation for oreboot[1], it looks like they're doing the latter.

Either way, assuming that there's a genuine reason why pflash must be
used, I think the behavior implemented in v1 (pflash0 is M-mode when
-bios none is used, S-mode otherwise) maps very well conceptually,
and results in behavior matching that of other architectures out of
the box. That's good enough for me :) I was just wondering whether we
could keep things even simpler.


[1] https://github.com/oreboot/oreboot/blob/main/src/mainboard/emulation/qemu-riscv/QEMU.md
-- 
Andrea Bolognani / Red Hat / Virtualization



  parent reply	other threads:[~2023-05-17  8:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 10:25 [PATCH v2] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none" Sunil V L
2023-05-08  4:22 ` Sunil V L
2023-05-08  5:37 ` Heinrich Schuchardt
2023-05-08  6:07   ` Sunil V L
2023-05-08 10:00     ` Andrea Bolognani
2023-05-08 11:23       ` Sunil V L
2023-05-08 11:44         ` Andrea Bolognani
2023-05-17  4:57           ` Alistair Francis
2023-05-17  5:09             ` Sunil V L
2023-05-17  8:45             ` Andrea Bolognani [this message]
2023-05-18  4:53               ` Alistair Francis
2023-05-19 15:58                 ` Andrea Bolognani
2023-05-17  5:01           ` Sunil V L
2023-05-17 12:47       ` Philippe Mathieu-Daudé
2023-05-18  4:55         ` Alistair Francis
2023-05-18  6:03           ` Sunil V L
2023-05-19 16:34             ` Philippe Mathieu-Daudé
2023-05-19 16:40               ` Philippe Mathieu-Daudé
2023-05-23  9:58                 ` Andrea Bolognani
2023-05-18 15:34         ` Andrea Bolognani
2023-05-19 16:11 ` Andrea Bolognani
2023-05-19 16:14   ` Sunil V L

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=CABJz62OyYei7DtukTGsKA8oaRBewUR4nwZxx_8ONc0fKkZDuPQ@mail.gmail.com \
    --to=abologna@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=bin.meng@windriver.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=liweiwei@iscas.ac.cn \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=sunilvl@ventanamicro.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    /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).