diff options
author | Alistair Francis | 2022-09-14 12:11:08 +0200 |
---|---|---|
committer | Alistair Francis | 2022-09-26 23:04:38 +0200 |
commit | a06fded82e9edc471dbbe4321f856040b996b54c (patch) | |
tree | 7bfc7407b6c958835093722a10b017f632355d77 /include/hw/riscv/opentitan.h | |
parent | hw/riscv: opentitan: Fixup resetvec (diff) | |
download | qemu-a06fded82e9edc471dbbe4321f856040b996b54c.tar.gz qemu-a06fded82e9edc471dbbe4321f856040b996b54c.tar.xz qemu-a06fded82e9edc471dbbe4321f856040b996b54c.zip |
hw/riscv: opentitan: Expose the resetvec as a SoC property
On the OpenTitan hardware the resetvec is fixed at the start of ROM. In
QEMU we don't run the ROM code and instead just jump to the next stage.
This means we need to be a little more flexible about what the resetvec
is.
This patch allows us to set the resetvec from the command line with
something like this:
-global driver=riscv.lowrisc.ibex.soc,property=resetvec,value=0x20000400
This way as the next stage changes we can update the resetvec.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220914101108.82571-4-alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include/hw/riscv/opentitan.h')
-rw-r--r-- | include/hw/riscv/opentitan.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/riscv/opentitan.h b/include/hw/riscv/opentitan.h index 26d960f288..6665cd5794 100644 --- a/include/hw/riscv/opentitan.h +++ b/include/hw/riscv/opentitan.h @@ -46,6 +46,8 @@ struct LowRISCIbexSoCState { IbexTimerState timer; IbexSPIHostState spi_host[OPENTITAN_NUM_SPI_HOSTS]; + uint32_t resetvec; + MemoryRegion flash_mem; MemoryRegion rom; MemoryRegion flash_alias; |