Skip to content

arm-trusted-firmware support for rk3288

Heiko Stuebner u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8arm: v7: add read_mpidr function for arm32arch/arm/include/asm/system.h+9 -01 reply
2/8spl: atf: add arm32 variantcommon/spl/Kconfig common/spl/spl_atf.c include/atf_common.h+137 -30 replies
3/8rockchip: rk3288: move TPL options to generic positionarch/arm/mach-rockchip/Kconfig arch/arm/mach-rockchip/rk3288/Kconfig+15 -151 reply
4/8rockchip: rk3288: adjust load addressesinclude/configs/rk3288_common.h+4 -40 replies
5/8rockchip: rk3288: reserve first 2MB when build with ATF supportarch/arm/mach-rockchip/rk3288/rk3288.c+16 -01 reply
6/8rockchip: rk3288: split evb into its two entitiesarch/arm/dts/Makefile arch/arm/dts/rk3288-evb-act8846-u-boot.dtsi arch/arm/dts/rk3288-evb-act8846.dts +5 more+738 -3120 replies
7/8rockchip: rk3288: convert rk3288-evb to use tplarch/arm/mach-rockchip/Kconfig arch/arm/mach-rockchip/rk3288/Kconfig board/rockchip/evb_rk3288/evb-rk3288.c +2 more+8 -41 reply
8/8rockchip: rk3288: make both evb variants use atfboard/rockchip/evb_rk3288/evb-rk3288.c board/rockchip/evb_rk3288/fit_spl_atf.its configs/evb-rk3288-act8846_defconfig +1 more+77 -51 reply
8/8rockchip: rk3288: make both evb variants use atf+0 -00 replies

Reviews trailers per patch

2 of 9 patches have a Reviewed-by or Acked-by.

PatchJagan TekiMatthias Brugger
1/8R-b
2/8
3/8A-b
4/8
5/8
6/8
7/8
8/8
8/8

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

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/8] arm-trusted-firmware support for rk3288

This adds support for jumping into aarch32 ATF from u-boot spl similar to how it works on aarch64.

I guess the biggest question might be "why" ;-)

Right now the status quo on Rockchip arm32 socs is, that the linux kernel itself does smp and suspend handling. This precludes us from doing fance things like virtualization but also deep suspend with the DDR in self refresh, due to at least 2 approaches for putting generalized code into sram from the kernel side failed so far.

For Virtualization we need the kernel to start in hyp mode and hence needing to use psci for smp handling as well.

So there are multiple ways for achieving that, we could do
- psci in uboot itself is bad for coreboot and barebox who would need to reimplement the same
- psci in optee is the solution Rockchip themself choose but only provides precompiled binaries for their arm32 socs and also reimplmenting this in an open way is somewhat of a dead-end because while aarch64 can use op-tee, psci itself is always done in the atf
- atf using the somewhat new aarch32 port has the advantage of being able to share a lot of platform code making maintenance together with the aarch64 parts a lot easier

Not having to rely on binary components as part of the boot process is way nicer not only for reproducible builds but also for future proofing projects as binary blobs may not receive updates after some time.

Also it is still possible to use this together with an optee implementation for specific security foobar. The only difference is that while aarch64 can has separate states for secure monitor and secure-os, in aarch32 both need to share the bl32 space, so optee needs to be a payload during the atf build. If no secure-os is needed, atf can use the sp_min payload, which is part of atf.

This works nicely on my rk3288 evb and even virtualization worked already. Full support will still need a modified devicetree to actually make use of the new psci capabilites.

Heiko Stuebner (8):
arm: v7: add read_mpidr function for arm32
spl: atf: add arm32 variant
rockchip: rk3288: move TPL options to generic position
rockchip: rk3288: adjust load addresses
rockchip: rk3288: reserve first 2MB when build with ATF support
rockchip: rk3288: split evb into its two entities
rockchip: rk3288: convert rk3288-evb to use tpl
rockchip: rk3288: make both evb variants use atf

 arch/arm/dts/Makefile                         |   3 +-
 ...evb.dts => rk3288-evb-act8846-u-boot.dtsi} |  33 +-
 arch/arm/dts/rk3288-evb-act8846.dts           | 188 +++++++
 arch/arm/dts/rk3288-evb-rk808-u-boot.dtsi     |  40 ++
 arch/arm/dts/rk3288-evb-rk808.dts             | 202 +++++++
 arch/arm/dts/rk3288-evb.dtsi                  | 493 ++++++++----------
 arch/arm/include/asm/system.h                 |   9 +
 arch/arm/mach-rockchip/Kconfig                |  16 +
 arch/arm/mach-rockchip/rk3288/Kconfig         |  16 +-
 arch/arm/mach-rockchip/rk3288/rk3288.c        |  16 +
 board/rockchip/evb_rk3288/evb-rk3288.c        |  14 +
 board/rockchip/evb_rk3288/fit_spl_atf.its     |  52 ++
 common/spl/Kconfig                            |   2 +-
 common/spl/spl_atf.c                          |  86 ++-
 ...defconfig => evb-rk3288-act8846_defconfig} |  14 +-
 configs/evb-rk3288-rk808_defconfig            |  91 ++++
 include/atf_common.h                          |  52 ++
 include/configs/rk3288_common.h               |   8 +-
 18 files changed, 998 insertions(+), 337 deletions(-)
 rename arch/arm/dts/{rk3288-evb.dts => rk3288-evb-act8846-u-boot.dtsi} (64%)
 create mode 100644 arch/arm/dts/rk3288-evb-act8846.dts
 create mode 100644 arch/arm/dts/rk3288-evb-rk808-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3288-evb-rk808.dts
 create mode 100644 board/rockchip/evb_rk3288/fit_spl_atf.its
 rename configs/{evb-rk3288_defconfig => evb-rk3288-act8846_defconfig} (87%)
 create mode 100644 configs/evb-rk3288-rk808_defconfig
Signature · 1 line
2.20.1