public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexandru Gagniuc <mr.nuke.me@gmail.com>
To: u-boot@lists.denx.de, trini@konsulko.com, patrick.delaunay@foss.st.com
Cc: Alexandru Gagniuc <mr.nuke.me@gmail.com>,
	sjg@chromium.org, etienne.carriere@linaro.org
Subject: [PATCH v4 0/5] stm32mp: Enable OP-TEE and TZC support in SPL
Date: Mon, 31 May 2021 12:43:09 -0500	[thread overview]
Message-ID: <20210531174314.1395666-1-mr.nuke.me@gmail.com> (raw)

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.

Changes since v3:
  - Pass a "phys_size_t *" to ofnode_get_addr_size() to resolve warning
  - s/u-boot,dm-pre-reloc/u-boot,dm-spl/ in devicetree for clarity

Changes since v2:
  - Use ram_get_info() instead of ofnode_read("st,mem-size")
  - Only hardcode shared memory size instead of TZDRAM size
  - Use log_info() instead of pr_info()

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              |  92 +++++++++++++++
 arch/arm/mach-stm32mp/tzc400.c           | 136 +++++++++++++++++++++++
 common/spl/spl.c                         |   5 +
 common/spl/spl_mmc.c                     |   6 +-
 include/spl.h                            |  14 +++
 8 files changed, 288 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-stm32mp/include/mach/tzc.h
 create mode 100644 arch/arm/mach-stm32mp/tzc400.c

-- 
2.31.1


             reply	other threads:[~2021-05-31 17:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 17:43 Alexandru Gagniuc [this message]
2021-05-31 17:43 ` [PATCH v4 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Alexandru Gagniuc
2021-07-15 18:27   ` Patrick DELAUNAY
2021-07-15 19:11     ` Alex G.
2021-07-15 19:19     ` [PATCH v5 0/5] stm32mp: Enable OP-TEE and TZC support in SPL Alexandru Gagniuc
2021-07-15 19:19       ` [PATCH v5 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Alexandru Gagniuc
2021-07-27  9:12         ` Patrick DELAUNAY
2021-07-15 19:19       ` [PATCH v5 2/5] spl: Introduce spl_board_prepare_for_optee() hook Alexandru Gagniuc
2021-07-27  9:13         ` Patrick DELAUNAY
2021-07-15 19:19       ` [PATCH v5 3/5] arm: stm32mp: Implement support for TZC 400 controller Alexandru Gagniuc
2021-07-27  9:14         ` Patrick DELAUNAY
2021-07-15 19:19       ` [PATCH v5 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE Alexandru Gagniuc
2021-07-27  9:14         ` Patrick DELAUNAY
2021-07-15 19:19       ` [PATCH v5 5/5] ARM: dts: stm32mp: Add OP-TEE reserved memory to SPL dtb Alexandru Gagniuc
2021-07-27  9:15         ` Patrick DELAUNAY
2021-07-25 15:08       ` [PATCH v5 0/5] stm32mp: Enable OP-TEE and TZC support in SPL Alex G.
2021-05-31 17:43 ` [PATCH v4 2/5] spl: Introduce spl_board_prepare_for_optee() hook Alexandru Gagniuc
2021-05-31 17:43 ` [PATCH v4 3/5] arm: stm32mp: Implement support for TZC 400 controller Alexandru Gagniuc
2021-05-31 17:43 ` [PATCH v4 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE Alexandru Gagniuc
2021-07-08 13:23   ` Patrice CHOTARD
2021-07-09  9:03   ` Patrick DELAUNAY
2021-05-31 17:43 ` [PATCH v4 5/5] ARM: dts: stm32mp: Add OP-TEE reserved memory to SPL dtb Alexandru Gagniuc
2021-06-01 15:02   ` Patrick DELAUNAY
2021-07-06 15:18 ` [PATCH v4 0/5] stm32mp: Enable OP-TEE and TZC support in SPL Alex G.
2021-07-06 15:45   ` Tom Rini
2021-07-06 15:55     ` Alex G.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210531174314.1395666-1-mr.nuke.me@gmail.com \
    --to=mr.nuke.me@gmail.com \
    --cc=etienne.carriere@linaro.org \
    --cc=patrick.delaunay@foss.st.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox