[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 7/8] target/riscv: Add any32 and max32 CPU for RV64 QEMU
From: |
Andrew Jones |
Subject: |
Re: [PATCH v6 7/8] target/riscv: Add any32 and max32 CPU for RV64 QEMU |
Date: |
Wed, 24 Jul 2024 10:01:18 -0500 |
On Sat, Jul 20, 2024 at 07:11:48AM GMT, LIU Zhiwei wrote:
> We may need 32-bit max or 32-bit any CPU for RV64 QEMU. Thus we add
> these two CPUs for RV64 QEMU.
>
> The reason we don't expose them to RV32 QEMU is that we already have
> max or any cpu with the same configuration. Another reason is that
> we want to follow the RISC-V custom where addw instruction doesn't
> exist in RV32 CPU.
>
> Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
> Suggested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> ---
> target/riscv/cpu-qom.h | 2 ++
> target/riscv/cpu.c | 13 ++++++++-----
> 2 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/target/riscv/cpu-qom.h b/target/riscv/cpu-qom.h
> index 3670cfe6d9..9f91743b78 100644
> --- a/target/riscv/cpu-qom.h
> +++ b/target/riscv/cpu-qom.h
> @@ -31,6 +31,8 @@
>
> #define TYPE_RISCV_CPU_ANY RISCV_CPU_TYPE_NAME("any")
> #define TYPE_RISCV_CPU_MAX RISCV_CPU_TYPE_NAME("max")
> +#define TYPE_RISCV_CPU_ANY32 RISCV_CPU_TYPE_NAME("any32")
'any' is on its way out[1], so we probably shouldn't bother adding any32
at all with this series
[1] 20240724130717.95629-1-philmd@linaro.org/">https://lore.kernel.org/all/20240724130717.95629-1-philmd@linaro.org/
Thanks,
drew
- [PATCH v6 0/8] target/riscv: Expose RV32 cpu to RV64 QEMU, LIU Zhiwei, 2024/07/19
- [PATCH v6 1/8] target/riscv: Add fw_dynamic_info32 for booting RV32 OpenSBI, LIU Zhiwei, 2024/07/19
- [PATCH v6 2/8] target/riscv: Adjust PMP size for no-MMU RV64 QEMU running RV32, LIU Zhiwei, 2024/07/19
- [PATCH v6 3/8] target/riscv: Correct SXL return value for RV32 in RV64 QEMU, LIU Zhiwei, 2024/07/19
- [PATCH v6 4/8] target/riscv: Detect sxl to set bit width for RV32 in RV64, LIU Zhiwei, 2024/07/19
- [PATCH v6 5/8] target/riscv: Correct mcause/scause bit width for RV32 in RV64 QEMU, LIU Zhiwei, 2024/07/19
- [PATCH v6 6/8] target/riscv: Enable RV32 CPU support in RV64 QEMU, LIU Zhiwei, 2024/07/19
- [PATCH v6 7/8] target/riscv: Add any32 and max32 CPU for RV64 QEMU, LIU Zhiwei, 2024/07/19
- [PATCH v6 8/8] tests/avocado: Boot Linux for RV32 cpu on RV64 QEMU, LIU Zhiwei, 2024/07/19
- Re: [PATCH v6 0/8] target/riscv: Expose RV32 cpu to RV64 QEMU, Alistair Francis, 2024/07/23