[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] target/riscv/tcg: set 'mmu' with 'satp' in cpu_set_profi
From: |
Alistair Francis |
Subject: |
Re: [PATCH 1/6] target/riscv/tcg: set 'mmu' with 'satp' in cpu_set_profile() |
Date: |
Tue, 30 Jan 2024 10:57:52 +1000 |
On Fri, Jan 26, 2024 at 5:54 AM Daniel Henrique Barboza
<dbarboza@ventanamicro.com> wrote:
>
> Recent changes in options handling removed the 'mmu' default the bare
> CPUs had, meaning that we must enable 'mmu' by hand when using the
> rva22s64 profile CPU.
>
> Given that this profile is setting a satp mode, it already implies that
> we need a 'mmu'. Enable the 'mmu' in this case.
>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/riscv/tcg/tcg-cpu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c
> index da437975b4..88f92d1c7d 100644
> --- a/target/riscv/tcg/tcg-cpu.c
> +++ b/target/riscv/tcg/tcg-cpu.c
> @@ -1107,6 +1107,7 @@ static void cpu_set_profile(Object *obj, Visitor *v,
> const char *name,
>
> #ifndef CONFIG_USER_ONLY
> if (profile->satp_mode != RISCV_PROFILE_ATTR_UNUSED) {
> + object_property_set_bool(obj, "mmu", true, NULL);
> const char *satp_prop = satp_mode_str(profile->satp_mode,
> riscv_cpu_is_32bit(cpu));
> object_property_set_bool(obj, satp_prop, profile->enabled, NULL);
> --
> 2.43.0
>
>
- [PATCH 0/6] riscv: named features riscv,isa, 'svade' rework, Daniel Henrique Barboza, 2024/01/25
- [PATCH 1/6] target/riscv/tcg: set 'mmu' with 'satp' in cpu_set_profile(), Daniel Henrique Barboza, 2024/01/25
- Re: [PATCH 1/6] target/riscv/tcg: set 'mmu' with 'satp' in cpu_set_profile(),
Alistair Francis <=
- [PATCH 2/6] target/riscv: add riscv,isa to named features, Daniel Henrique Barboza, 2024/01/25
- [PATCH 3/6] target/riscv: add remaining named features, Daniel Henrique Barboza, 2024/01/25
- [PATCH 4/6] target/riscv: Reset henvcfg to zero, Daniel Henrique Barboza, 2024/01/25
- [PATCH 5/6] target/riscv: Gate hardware A/D PTE bit updating, Daniel Henrique Barboza, 2024/01/25
- [PATCH 6/6] target/riscv: Promote svade to a normal extension, Daniel Henrique Barboza, 2024/01/25