Skip to content

hw/arm: Fix modelling of SSE-300 TCMs and SRAM

Peter Maydell qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6hw/arm/mps2-tz: Don't duplicate modelling of SRAM in AN524hw/arm/mps2-tz.c+1 -71 reply
2/6hw/arm/mps2-tz: Make SRAM_ADDR_WIDTH board-specifichw/arm/mps2-tz.c+6 -01 reply
3/6hw/arm/armsse.c: Correct modelling of SSE-300 internal SRAMshw/arm/armsse.c+6 -21 reply
4/6hw/arm/armsse: Convert armsse_realize() to use ERRP_GUARDhw/arm/armsse.c+4 -41 reply
5/6hw/arm/mps2-tz: Allow board to specify a boot RAM sizehw/arm/mps2-tz.c+13 -01 reply
6/6hw/arm: Model TCMs in the SSE-300, not the AN547hw/arm/armsse.c hw/arm/mps2-tz.c include/hw/arm/armsse.h+21 -121 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchRichard Henderson
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] hw/arm: Fix modelling of SSE-300 TCMs and SRAM

This patchset fixes some bugs in how we were modelling the TCMs and the SRAM in the SSE-300 which were preventing Arm TF-M from booting on our AN547 model; there are also some fixes to things I noticed while I was in the code.

The specific bugs preventing boot were:
* SRAM_ADDR_WIDTH for the AN547 is 21, not 15, so the SRAM area was too small
* we were putting the SRAMs at the wrong address (0x2100_0000 for SSE-300, not 0x2000_0000 as for SSE-200)

The other stuff I've fixed is:
* we were modelling the SRAM in the AN524 both in the SSE and in the board model (harmlessly, as the board-model memory was just always shadowed in the memory map and unreachable)
* we were modelling the TCMs in the AN547 board model, which is conceptually wrong because in hardware they're part of the SSE-300. No guest-visible change, but it will avoid problems if/when we add another SSE-300 board model

thanks
-- PMM

Peter Maydell (6):
hw/arm/mps2-tz: Don't duplicate modelling of SRAM in AN524 hw/arm/mps2-tz: Make SRAM_ADDR_WIDTH board-specific hw/arm/armsse.c: Correct modelling of SSE-300 internal SRAMs hw/arm/armsse: Convert armsse_realize() to use ERRP_GUARD hw/arm/mps2-tz: Allow board to specify a boot RAM size hw/arm: Model TCMs in the SSE-300, not the AN547

 include/hw/arm/armsse.h |  2 ++
 hw/arm/armsse.c         | 35 +++++++++++++++++++++++++++++------
 hw/arm/mps2-tz.c        | 39 ++++++++++++++++++++-------------------
 3 files changed, 51 insertions(+), 25 deletions(-)
Signature · 1 line
2.20.1