target/riscv: Align the data type of reset vector address
PATCH v2 1/1 target/riscv: Align the data type of reset vector address
Signed-off-by Dylan Jhong <[email protected]>
Signed-off-by Ruinland ChuanTzu Tsai <[email protected]>
--- target/riscv/cpu.c | 2 +- target/riscv/cpu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
target/riscv/cpu.c +1 -1
@@ -137,7 +137,7 @@ static void set_feature(CPURISCVState *env, int feature) env->features |= (1ULL << feature); } -static void set_resetvec (CPURISCVState *env,int resetvec) +static void set_resetvec (CPURISCVState *env,target_ulong resetvec) {#ifndef CONFIG_USER_ONLY env->resetvec = resetvec;
target/riscv/cpu.h +1 -1
@@ -303,7 +303,7 @@ struct RISCVCPU {uint16_t elen;bool mmu;bool pmp; -uint64_t resetvec; +target_ulong resetvec; } cfg; };
Signature · 1 line
2.17.1
Hi All,
Please ignore this patch.
There is a compile error while building 32bit qemu.
The error occurs in ./target/riscv/cpu.c:557
"DEFINE_PROP_UINT64("resetvec", RISCVCPU, cfg.resetvec, DEFAULT_RSTVEC)"
It should be written differently according to 32bit or 64bit machine.
I'll send patch v3 to fix this issue.
Sorry for my mistake.
Regards,
Dylan
Quoted 36 lines · Dylan Dai-Rong Jhong(鍾岱融)
Signed-off-by Dylan Jhong <[email protected]>Signed-off-by Ruinland ChuanTzu Tsai <[email protected]>--- target/riscv/cpu.c | 2 +- target/riscv/cpu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)target/riscv/cpu.c +1
-1@@ -137,7 +137,7 @@ static void set_feature(CPURISCVState *env, int feature) env->features |= (1ULL << feature); } -static void set_resetvec (CPURISCVState *env,int resetvec) +static void set_resetvec (CPURISCVState *env,target_ulong resetvec) {#ifndef CONFIG_USER_ONLY env->resetvec = resetvec;target/riscv/cpu.h +1
-1@@ -303,7 +303,7 @@ struct RISCVCPU {uint16_t elen;bool mmu;bool pmp; -uint64_t resetvec; +target_ulong resetvec; } cfg; };Signature · 1 line
2.17.1