hw/riscv: opentitan: Expose the resetvec as a SoC property
commita06fded82e9edc471dbbe4321f856040b996b54c
authorAlistair Francis <alistair.francis@wdc.com>
Wed, 14 Sep 2022 10:11:08 +0000 (14 12:11 +0200)
committerAlistair Francis <alistair@alistair23.me>
Mon, 26 Sep 2022 21:04:38 +0000 (27 07:04 +1000)
tree7bfc7407b6c958835093722a10b017f632355d77
parentd057aaece7665d49e81ef8d8204b095351253f21
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>
hw/riscv/opentitan.c
include/hw/riscv/opentitan.h