All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] stm32mp: Enable OP-TEE and TZC support in SPL
@ 2021-03-15 15:47 Alexandru Gagniuc
  2021-03-15 15:47 ` [PATCH v2 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Alexandru Gagniuc
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Alexandru Gagniuc @ 2021-03-15 15:47 UTC (permalink / raw)
  To: u-boot

The purpose of this series is to allow booting an OP-TEE image from
SPL, by corectly configuring the TrustZone (TZC) memory regions.

Although TZC400 is a generic silicon logic that could apply to other
mach- families, support is currently restricted to stm32mp. I have
neither a feasible way nor interest in validating this for other
chips. It's fairly trivial to move the code from mach- to arch/,
should another use case arise.

The configuration of the memory regions is devicetree-driven, so there
isn't much to hardcode, However the delineation between OP-TEE secure
memory and shared memory is not given in the devicetree. This is the
one thing that has to be hardcoded.

Although a variable CONFIG_OPTEE_TZDRAM_SIZE exists which advertises
to do exactly the above, it is not suitable. This variable is used in
u-boot proper, and is dependent on lib/optee being enabled.
CONFIG_SPL_OPTEE, used herein, is independent of lib/optee. Thus,
CONFIG_OPTEE_TZDRAM_SIZE is not guaranteed to exist

Changes since v1:
  - Removed "Weak functions are stupid" comment
  - Addressed blank line complaints from checkpatch

Alexandru Gagniuc (5):
  spl: mmc: Support OP-TEE payloads in Falcon mode
  spl: Introduce spl_board_prepare_for_optee() hook
  arm: stm32mp: Implement support for TZC 400 controller
  stm32mp1: spl: Configure TrustZone controller for OP-TEE
  ARM: dts: stm32mp: Add OP-TEE reserved memory to SPL dtb

 arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi |   3 +
 arch/arm/mach-stm32mp/Makefile           |   1 +
 arch/arm/mach-stm32mp/include/mach/tzc.h |  33 ++++++
 arch/arm/mach-stm32mp/spl.c              |  84 ++++++++++++++
 arch/arm/mach-stm32mp/tzc400.c           | 133 +++++++++++++++++++++++
 common/spl/spl.c                         |   5 +
 common/spl/spl_mmc.c                     |   6 +-
 include/spl.h                            |  14 +++
 8 files changed, 277 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-stm32mp/include/mach/tzc.h
 create mode 100644 arch/arm/mach-stm32mp/tzc400.c

-- 
2.26.2

q

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-04-07  8:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 15:47 [PATCH v2 0/5] stm32mp: Enable OP-TEE and TZC support in SPL Alexandru Gagniuc
2021-03-15 15:47 ` [PATCH v2 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Alexandru Gagniuc
2021-04-07  7:53   ` Patrick DELAUNAY
2021-03-15 15:47 ` [PATCH v2 2/5] spl: Introduce spl_board_prepare_for_optee() hook Alexandru Gagniuc
2021-04-07  8:02   ` Patrick DELAUNAY
2021-03-15 15:47 ` [PATCH v2 3/5] arm: stm32mp: Implement support for TZC 400 controller Alexandru Gagniuc
2021-04-07  8:10   ` Patrick DELAUNAY
2021-03-15 15:47 ` [PATCH v2 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE Alexandru Gagniuc
2021-04-07  8:48   ` Patrick DELAUNAY
2021-03-15 15:47 ` [PATCH v2 5/5] ARM: dts: stm32mp: Add OP-TEE reserved memory to SPL dtb Alexandru Gagniuc
2021-03-29  7:43   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.