From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex G. Date: Mon, 8 Feb 2021 15:23:36 -0600 Subject: [PATCH 3/5] arm: stm32mp: Implement support for TZC 400 controller In-Reply-To: References: <20210204195556.2056956-1-mr.nuke.me@gmail.com> <20210204195556.2056956-3-mr.nuke.me@gmail.com> Message-ID: <99048ba5-3f08-0eb2-eb42-16a0cf9e99bc@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2/7/21 8:37 AM, Simon Glass wrote: > Hi Alexandru, > > On Thu, 4 Feb 2021 at 12:56, Alexandru Gagniuc wrote: >> >> The purpose of this change is to allow configuring TrustZone (TZC) >> memory permissions. For example, OP-TEE expects TZC regions to be >> configured in a very particular way. The API presented here is >> intended to allow exactly that. >> >> UCLASS support is not implemented, because it would not be too useful. >> Changing TZC permissions needs to be done with care, so as not to cut >> off access to memory we are currently using. One place where we can >> use this is at the end of SPL, right before jumping to OP-TEE. >> >> Signed-off-by: Alexandru Gagniuc >> --- >> arch/arm/mach-stm32mp/Makefile | 1 + >> arch/arm/mach-stm32mp/include/mach/tzc.h | 33 ++++++ >> arch/arm/mach-stm32mp/tzc400.c | 135 +++++++++++++++++++++++ >> 3 files changed, 169 insertions(+) >> create mode 100644 arch/arm/mach-stm32mp/include/mach/tzc.h >> create mode 100644 arch/arm/mach-stm32mp/tzc400.c > > If this is an API you should add comments to the header file structs > and functions. > > Is this API specific to just this chip? I've designed and validated this to set up stm32mp for starting up OP-TEE. It's a narrow use case. I can't speak for other chips. Alex