[PATCH v1 0/2] Add OpenTitan lifecycle controller

Wilfred Mallawa posted 2 patches 1 year, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220928050827.319293-1-wilfred.mallawa@opensource.wdc.com
Maintainers: Alistair Francis <Alistair.Francis@wdc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Bin Meng <bin.meng@windriver.com>
hw/misc/ibex_lc_ctrl.c         | 287 +++++++++++++++++++++++++++++++++
hw/misc/meson.build            |   3 +
hw/misc/trace-events           |   5 +
hw/riscv/opentitan.c           |  10 +-
include/hw/misc/ibex_lc_ctrl.h | 121 ++++++++++++++
include/hw/riscv/opentitan.h   |   2 +
6 files changed, 426 insertions(+), 2 deletions(-)
create mode 100644 hw/misc/ibex_lc_ctrl.c
create mode 100644 include/hw/misc/ibex_lc_ctrl.h
[PATCH v1 0/2] Add OpenTitan lifecycle controller
Posted by Wilfred Mallawa 1 year, 7 months ago
From: Wilfred Mallawa <wilfred.mallawa@wdc.com>

This series of patches:
        - Add OpenTitan lifecycle controller with basic functionality
        - Connects it to OpenTitan

Currently in OpenTitan, we skip the `boot_rom` since is has become more
complex and we do not have all the support in QEMU to use it. One of the
missing pieces to getting the `boot_rom` working is the lifecycle
controller. There's a particular `magic_value` that is kept in the
`LC_STATE` register which is checked by the `boot_rom`.

With this basic implementation of the device, we can get past the
lifecycle controller in the `boot_rom` check stage. Testing was done
using TockOS (running QEMU with `-d in_asm`) to see how far in the boot
rom we get.

End goal is to add support to all device models in QEMU that are
required by the OpenTitan `boot_rom` such that we can use it as the
`bios`.

Wilfred Mallawa (2):
  hw/misc: add ibex lifecycle controller
  riscv/opentitan: connect lifecycle controller

 hw/misc/ibex_lc_ctrl.c         | 287 +++++++++++++++++++++++++++++++++
 hw/misc/meson.build            |   3 +
 hw/misc/trace-events           |   5 +
 hw/riscv/opentitan.c           |  10 +-
 include/hw/misc/ibex_lc_ctrl.h | 121 ++++++++++++++
 include/hw/riscv/opentitan.h   |   2 +
 6 files changed, 426 insertions(+), 2 deletions(-)
 create mode 100644 hw/misc/ibex_lc_ctrl.c
 create mode 100644 include/hw/misc/ibex_lc_ctrl.h

-- 
2.37.3