From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
qemu-devel@nongnu.org
Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com,
bmeng@tinylab.org, liweiwei@iscas.ac.cn,
zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com,
Anup Patel <apatel@ventanamicro.com>
Subject: Re: [PATCH 1/1] hw/riscv/virt.c: add cbom-block-size fdt property
Date: Thu, 2 Mar 2023 08:37:10 +0000 [thread overview]
Message-ID: <cc29c762-16e7-8a72-7ad9-b9fd6535c1c1@codethink.co.uk> (raw)
In-Reply-To: <20230301215902.375217-2-dbarboza@ventanamicro.com>
On 01/03/2023 21:59, Daniel Henrique Barboza wrote:
> From: Anup Patel <apatel@ventanamicro.com>
>
> The cbom-block-size fdt property property is used to inform the OS about
> the blocksize in bytes for the Zicbom cache operations.
>
> Linux documents it in Documentation/devicetree/bindings/riscv/cpus.yaml
> as:
>
> riscv,cbom-block-size:
> $ref: /schemas/types.yaml#/definitions/uint32
> description:
> The blocksize in bytes for the Zicbom cache operations.
>
> Signed-off-by: Anup Patel <apatel@ventanamicro.com>
> ---
> hw/riscv/virt.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
> index 49acb57da4..31b55cc62f 100644
> --- a/hw/riscv/virt.c
> +++ b/hw/riscv/virt.c
> @@ -244,6 +244,12 @@ static void create_fdt_socket_cpus(RISCVVirtState *s, int socket,
> name = riscv_isa_string(cpu_ptr);
> qemu_fdt_setprop_string(ms->fdt, cpu_name, "riscv,isa", name);
> g_free(name);
> +
> + if (cpu_ptr->cfg.ext_icbom) {
> + qemu_fdt_setprop_cell(ms->fdt, cpu_name, "riscv,cbom-block-size",
> + cpu_ptr->cfg.cbom_blocksize);
> + }
> +
> qemu_fdt_setprop_string(ms->fdt, cpu_name, "compatible", "riscv");
> qemu_fdt_setprop_string(ms->fdt, cpu_name, "status", "okay");
> qemu_fdt_setprop_cell(ms->fdt, cpu_name, "reg",
You'll need the same for riscv,cboz-block-size as well.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html
next prev parent reply other threads:[~2023-03-02 9:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 21:59 [PATCH 0/1] hw/riscv/virt.c: add cbom-block-size fdt property Daniel Henrique Barboza
2023-03-01 21:59 ` [PATCH 1/1] " Daniel Henrique Barboza
2023-03-02 8:37 ` Ben Dooks [this message]
2023-03-05 20:39 ` Palmer Dabbelt
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=cc29c762-16e7-8a72-7ad9-b9fd6535c1c1@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=alistair.francis@wdc.com \
--cc=apatel@ventanamicro.com \
--cc=bmeng@tinylab.org \
--cc=dbarboza@ventanamicro.com \
--cc=liweiwei@iscas.ac.cn \
--cc=palmer@rivosinc.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--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).