hw/riscv: Setting address of vector reset is improved
PATCH 1/1 hw/riscv: Setting address of vector reset is improved
Previously address is set by default value 0x1000 which is hardcoded in target/riscv/cpu_bits.h
If add to new RISC-V Machine in which ROM area is based on 0x1000 address than there is problem of running simulation
Signed-off-by Maksim Perov <[email protected]>
--- hw/riscv/boot.c | 4 ++++ 1 file changed, 4 insertions(+)
hw/riscv/boot.c +4 -0
@@ -327,6 +327,10 @@ void riscv_setup_rom_reset_vec(MachineState *machine, RISCVHartArrayState *hartsriscv_rom_copy_firmware_info (machine, rom_base, rom_size,sizeof (reset_vec), kernel_entry); +/* change reset vector address */ +for (i =0 ; i < harts->num_harts; i++) { + harts->harts[i].env.resetvec = rom_base; + }return ; }
Signature · 1 line
2.17.1