[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension
From: |
Andrew Jones |
Subject: |
Re: [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension |
Date: |
Wed, 13 Mar 2024 10:54:41 +0100 |
On Wed, Mar 13, 2024 at 11:39:30AM +0530, Himanshu Chauhan wrote:
> This patch adds "sdtrig" in the ISA string when sdtrig extension is enabled.
> The sdtrig extension may or may not be implemented in a system. Therefore, the
> -cpu rv64,sdtrig=<true/false>
> option can be used to dynamically turn sdtrig extension on or off.
>
> Since, the sdtrig ISA extension is a superset of debug specification, disable
> the debug property when sdtrig is enabled. A warning is printed when this is
> done.
>
> By default, the sdtrig extension is disabled and debug property enabled as
> usual.
>
> Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
> ---
> target/riscv/cpu.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index 2602aae9f5..ab057a0926 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -175,6 +175,7 @@ const RISCVIsaExtData isa_edata_arr[] = {
> ISA_EXT_DATA_ENTRY(zvkt, PRIV_VERSION_1_12_0, ext_zvkt),
> ISA_EXT_DATA_ENTRY(zhinx, PRIV_VERSION_1_12_0, ext_zhinx),
> ISA_EXT_DATA_ENTRY(zhinxmin, PRIV_VERSION_1_12_0, ext_zhinxmin),
> + ISA_EXT_DATA_ENTRY(sdtrig, PRIV_VERSION_1_12_0, ext_sdtrig),
> ISA_EXT_DATA_ENTRY(smaia, PRIV_VERSION_1_12_0, ext_smaia),
> ISA_EXT_DATA_ENTRY(smepmp, PRIV_VERSION_1_12_0, ext_smepmp),
> ISA_EXT_DATA_ENTRY(smstateen, PRIV_VERSION_1_12_0, ext_smstateen),
> @@ -1008,6 +1009,12 @@ static void riscv_cpu_reset_hold(Object *obj)
> set_default_nan_mode(1, &env->fp_status);
>
> #ifndef CONFIG_USER_ONLY
> + if (cpu->cfg.debug && cpu->cfg.ext_sdtrig) {
> + warn_report("Disabling debug property since sdtrig ISA extension "
> + "is enabled");
> + cpu->cfg.debug = 0;
If sdtrig is a superset of debug, then why do we need to disable debug?
Thanks,
drew
> + }
> +
> if (cpu->cfg.debug || cpu->cfg.ext_sdtrig) {
> riscv_trigger_reset_hold(env);
> }
> @@ -1480,6 +1487,7 @@ const RISCVCPUMultiExtConfig riscv_cpu_extensions[] = {
> MULTI_EXT_CFG_BOOL("zvfhmin", ext_zvfhmin, false),
> MULTI_EXT_CFG_BOOL("sstc", ext_sstc, true),
>
> + MULTI_EXT_CFG_BOOL("sdtrig", ext_sdtrig, false),
> MULTI_EXT_CFG_BOOL("smaia", ext_smaia, false),
> MULTI_EXT_CFG_BOOL("smepmp", ext_smepmp, false),
> MULTI_EXT_CFG_BOOL("smstateen", ext_smstateen, false),
> --
> 2.34.1
>
>
- [PATCH v4 0/3] Introduce sdtrig ISA extension, Himanshu Chauhan, 2024/03/13
- [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension, Himanshu Chauhan, 2024/03/13
- Re: [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension,
Andrew Jones <=
- Re: [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension, Himanshu Chauhan, 2024/03/13
- Re: [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension, Andrew Jones, 2024/03/13
- Re: [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension, Himanshu Chauhan, 2024/03/13
- Re: [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension, Andrew Jones, 2024/03/13
- Re: [PATCH v4 2/3] target/riscv: Expose sdtrig ISA extension, Himanshu Chauhan, 2024/03/13
[PATCH v4 3/3] target/riscv: Enable sdtrig for Ventana's Veyron CPUs, Himanshu Chauhan, 2024/03/13
[PATCH v4 1/3] target/riscv: Enable mcontrol6 triggers only when sdtrig is selected, Himanshu Chauhan, 2024/03/13