qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Sunil V L <sunilvl@ventanamicro.com>, qemu-riscv@nongnu.org
Cc: 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>,
	Andrea Bolognani <abologna@redhat.com>
Subject: Re: [PATCH v4 3/3] docs/system: riscv: Add pflash usage details
Date: Fri, 26 May 2023 11:48:21 +0200	[thread overview]
Message-ID: <6817fb90-fda2-6769-c993-a8307dd841b1@linaro.org> (raw)
In-Reply-To: <20230525164803.17992-4-sunilvl@ventanamicro.com>

On 25/5/23 18:48, Sunil V L wrote:
> pflash devices can be used in virt machine for different
> purposes like for ROM code or S-mode FW payload. Add a
> section in the documentation on how to use pflash devices
> for different purposes.
> 
> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
> ---
>   docs/system/riscv/virt.rst | 29 +++++++++++++++++++++++++++++
>   1 file changed, 29 insertions(+)
> 
> diff --git a/docs/system/riscv/virt.rst b/docs/system/riscv/virt.rst
> index 4b16e41d7f..c3e0b7a9c3 100644
> --- a/docs/system/riscv/virt.rst
> +++ b/docs/system/riscv/virt.rst
> @@ -53,6 +53,35 @@ with the default OpenSBI firmware image as the -bios. It also supports
>   the recommended RISC-V bootflow: U-Boot SPL (M-mode) loads OpenSBI fw_dynamic
>   firmware and U-Boot proper (S-mode), using the standard -bios functionality.
>   
> +Using flash devices
> +-------------------
> +
> +The first flash device (pflash0) can contain either ROM code
> +or S-mode payload firmware code. If the pflash0 contains the
> +ROM code, -bios should be set to none. If -bios is not set to
> +none, pflash0 is assumed to contain S-mode payload code.
> +
> +Firmware images used for pflash should be of size 32 MiB.
> +
> +To boot as ROM code:

If "ROM" ...

> +
> +.. code-block:: bash
> +
> +  $ qemu-system-riscv64 -bios none \
> +     -blockdev node-name=pflash0,driver=file,filename=<rom_code> \

... shouldn't we also enforce 'read-only=on,' ...

> +     -M virt,pflash0=pflash0 \
> +     ... other args ....
> +
> +To boot as read-only S-mode payload:
> +
> +.. code-block:: bash
> +
> +  $ qemu-system-riscv64 \
> +     -blockdev node-name=pflash0,driver=file,read-only=on,filename=<s-mode_fw_code> \

... like in S-mode?

> +     -blockdev node-name=pflash1,driver=file,filename=<s-mode_fw_vars> \
> +     -M virt,pflash0=pflash0,pflash1=pflash1 \
> +     ... other args ....
> +
>   Machine-specific options
>   ------------------------
>   



  reply	other threads:[~2023-05-26  9:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 16:48 [PATCH v4 0/3] hw/riscv/virt: pflash improvements Sunil V L
2023-05-25 16:48 ` [PATCH v4 1/3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none" Sunil V L
2023-05-25 16:48 ` [PATCH v4 2/3] riscv/virt: Support using pflash via -blockdev option Sunil V L
2023-05-26  9:53   ` Philippe Mathieu-Daudé
2023-05-26 10:20     ` Sunil V L
2023-05-25 16:48 ` [PATCH v4 3/3] docs/system: riscv: Add pflash usage details Sunil V L
2023-05-26  9:48   ` Philippe Mathieu-Daudé [this message]
2023-05-25 18:03 ` [PATCH v4 0/3] hw/riscv/virt: pflash improvements Andrea Bolognani
2023-05-26  6:39   ` Andrew Jones
2023-05-26  7:49     ` Andrea Bolognani
2023-05-26  8:19       ` Sunil V L
2023-05-26  8:34       ` Andrew Jones
2023-05-26  8:42         ` Andrea Bolognani
2023-05-26  9:10           ` Andrew Jones
2023-11-20 14:29             ` Andrea Bolognani
2023-11-20 14:36               ` Sunil V L
2024-05-30 11:37                 ` Andrea Bolognani
2024-05-31 13:18                   ` 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=6817fb90-fda2-6769-c993-a8307dd841b1@linaro.org \
    --to=philmd@linaro.org \
    --cc=abologna@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=bin.meng@windriver.com \
    --cc=dbarboza@ventanamicro.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).