Skip to contentSkip to conversation

target/riscv: Align the data type of reset vector address

PATCH In review Dylan Jhong 3 participants 3 messages Mar 29, 2021 – Mar 30, 2021 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 target/riscv: Align the data type of reset vector address

Use target_ulong to instead of uint64_t on reset vector address to adapt on both 32/64 machine.

---
 target/riscv/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/riscv/cpu.c +1 -1
index 7d6ed80f6b..4ac901245a 100644
@@ -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;
Signature · 1 line
2.17.1
Reviewed-by on v5 1/1
#2 lore raw
In reply to Dylan Jhong
Quoted 6 lines · Dylan Jhong

Use target_ulong to instead of uint64_t on reset vector address to adapt on both 32/64 machine.

Alistair

Quoted 21 lines
---
 target/riscv/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/riscv/cpu.c +1 -2
index 7d6ed80f6b..4ac901245a 100644
@@ -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;
--

2.17.1