U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: "Richard Genoud (TI)" <richard.genoud@bootlin.com>,
	Tom Rini <trini@konsulko.com>,
	Manorit Chawdhry <m-chawdhry@ti.com>,
	Apurva Nandan <a-nandan@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>, Bryan Brattlof <bb@ti.com>,
	Vaishnav Achath <vaishnav.a@ti.com>,
	Jayesh Choudhary <j-choudhary@ti.com>,
	Simon Glass <sjg@chromium.org>,
	Alper Nebi Yasak <alpernebiyasak@gmail.com>
Cc: Markus Schneider-Pargmann <msp@baylibre.com>,
	Udit Kumar <u-kumar1@ti.com>, Abhash Kumar <a-kumar2@ti.com>,
	Thomas Richard <thomas.richard@bootlin.com>,
	Gregory CLEMENT <gregory.clement@bootlin.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	<u-boot@lists.denx.de>
Subject: Re: [PATCH 20/20] arm: dts: k3-j7200: Extend firewall for ATF region to TIFS
Date: Thu, 30 Apr 2026 12:28:47 -0500	[thread overview]
Message-ID: <af7ef143-2bfb-424c-b1cf-a49fc02f9192@ti.com> (raw)
In-Reply-To: <20260430084414.1354490-21-richard.genoud@bootlin.com>

On 4/30/26 3:44 AM, Richard Genoud (TI) wrote:
> From: Prasanth Babu Mantena <p-mantena@ti.com>
> 
> Extend the access to SRAM region of ATF to TIFS as well. This is
> needed for TIFS for encryption and decryption of ATF as a part of
> low power mode sequence. TIFS encrypts the ATF while entering into
> low power mode and decrypts it back while resuming back.
> So, giving permissions for TIFS to access this region.
> 
> Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
> ---
>   arch/arm/dts/k3-binman.dtsi       | 18 ++++++++++++++++--
>   arch/arm/dts/k3-j7200-binman.dtsi |  4 ++--
>   arch/arm/dts/k3-security.h        |  1 +
>   3 files changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/dts/k3-binman.dtsi b/arch/arm/dts/k3-binman.dtsi
> index 0fd93f9536a2..4ffd8ec9e1c1 100644
> --- a/arch/arm/dts/k3-binman.dtsi
> +++ b/arch/arm/dts/k3-binman.dtsi
> @@ -479,7 +479,21 @@
>   		start_address = <0x0 CONFIG_K3_ATF_LOAD_ADDR>;
>   		end_address = <0x0 (CONFIG_K3_ATF_LOAD_ADDR + 0x1ffff)>;
>   	};
> -	firewall_armv8_optee_fg: template-8 {
> +	firewall_armv8_atf_tifs_fg: template-8 {
> +		control = <(FWCTRL_EN | FWCTRL_LOCK |
> +					FWCTRL_CACHE)>;
> +		permissions = <((FWPRIVID_ARMV8 << FWPRIVID_SHIFT) |
> +						FWPERM_SECURE_PRIV_RWCD |
> +						FWPERM_SECURE_USER_RWCD)>,
> +					<((FWPRIVID_TIFS << FWPRIVID_SHIFT) |
> +						FWPERM_SECURE_PRIV_RWCD |
> +						FWPERM_SECURE_USER_RWCD |
> +						FWPERM_NON_SECURE_PRIV_RWCD |
> +						FWPERM_NON_SECURE_USER_RWCD)>;
> +		start_address = <0x0 0x70000000>;

Should this be using CONFIG_K3_ATF_LOAD_ADDR like the other templates?

Might be easier to just update the existing `firewall_armv8_atf_fg`
template to also always allow TIFS. TIFS is the security root and
if it really wanted to it could just update firewalls to let itself
in, not like anything is really protected from TIFS to begin with.
(if we are not locking the firewalls that is)

Andrew

> +		end_address = <0x0 0x7001ffff>;
> +	};
> +	firewall_armv8_optee_fg: template-9 {
>   		control = <(FWCTRL_EN | FWCTRL_LOCK |
>   					FWCTRL_CACHE)>;
>   		permissions = <((FWPRIVID_ARMV8 << FWPRIVID_SHIFT) |
> @@ -489,7 +503,7 @@
>   		end_address = <0x0 (CONFIG_K3_OPTEE_LOAD_ADDR + 0x17fffff)>;
>   	};
>   
> -	ti_falcon_template: template-9 {
> +	ti_falcon_template: template-10 {
>   		filename = "tifalcon.bin";
>   		pad-byte = <0xff>;
>   
> diff --git a/arch/arm/dts/k3-j7200-binman.dtsi b/arch/arm/dts/k3-j7200-binman.dtsi
> index c2b86339d593..68ce4aa0ff12 100644
> --- a/arch/arm/dts/k3-j7200-binman.dtsi
> +++ b/arch/arm/dts/k3-j7200-binman.dtsi
> @@ -259,7 +259,7 @@
>   
>   						firewall-4760-1 {
>   							/* nb_slv0__mem0 Foreground Firewall */
> -							insert-template = <&firewall_armv8_atf_fg>;
> +							insert-template = <&firewall_armv8_atf_tifs_fg>;
>   							id = <4760>;
>   							region = <1>;
>   						};
> @@ -272,7 +272,7 @@
>   
>   						firewall-4761-1 {
>   							/* nb_slv1__mem0 Foreground Firewall */
> -							insert-template = <&firewall_armv8_atf_fg>;
> +							insert-template = <&firewall_armv8_atf_tifs_fg>;
>   							id = <4761>;
>   							region = <1>;
>   						};
> diff --git a/arch/arm/dts/k3-security.h b/arch/arm/dts/k3-security.h
> index 33609caa8fb5..3e066bca6ad7 100644
> --- a/arch/arm/dts/k3-security.h
> +++ b/arch/arm/dts/k3-security.h
> @@ -7,6 +7,7 @@
>   #define DTS_ARM64_TI_K3_FIREWALL_H
>   
>   #define FWPRIVID_ALL    0xc3
> +#define FWPRIVID_TIFS   0xca
>   #define FWPRIVID_ARMV8  1
>   #define FWPRIVID_SHIFT  16
>   


      reply	other threads:[~2026-04-30 17:29 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30  8:43 [PATCH 00/20] Introduce resume for J7xx SoCs Richard Genoud (TI)
2026-04-30  8:43 ` [PATCH 01/20] configs: j784s4_evm_r5: enable TI_SCI_POWER_DOMAIN Richard Genoud (TI)
2026-05-11  9:49   ` Kumar, Udit
2026-04-30  8:43 ` [PATCH 02/20] global: k3: use gd to store the resume state Richard Genoud (TI)
2026-04-30  8:43 ` [PATCH 03/20] board: ti: j721e: Add resume detection for J721e/J7200 Richard Genoud (TI)
2026-05-11  9:53   ` Kumar, Udit
2026-04-30  8:43 ` [PATCH 04/20] board: ti: j784s4: Add resume detection Richard Genoud (TI)
2026-05-11 10:47   ` Kumar, Udit
2026-04-30  8:43 ` [PATCH 05/20] board: ti: j722s: " Richard Genoud (TI)
2026-04-30  8:43 ` [PATCH 06/20] board: ti: j721s2: " Richard Genoud (TI)
2026-05-11 10:48   ` Kumar, Udit
2026-04-30  8:44 ` [PATCH 07/20] ram: k3-ddrss: Add exit retention support Richard Genoud (TI)
2026-04-30  8:44 ` [PATCH 08/20] ram: k3-ddrss: Add j722s DDR resume sequence Richard Genoud (TI)
2026-04-30  8:44 ` [PATCH 09/20] ram: k3-ddrss: support j784s4/j721e/j721s2 DDR resume Richard Genoud (TI)
2026-04-30  8:44 ` [PATCH 10/20] firmware: ti_sci: add low power mode operations Richard Genoud (TI)
2026-05-11 10:50   ` Kumar, Udit
2026-04-30  8:44 ` [PATCH 11/20] mach-k3: r5: common: add helper functions needed in LPM resume sequence Richard Genoud (TI)
2026-05-11 10:52   ` Kumar, Udit
2026-04-30  8:44 ` [PATCH 12/20] arm: mach-k3: j721e: Enable LPM resume flow for J7200/J721e SOC Richard Genoud (TI)
2026-04-30  8:44 ` [PATCH 13/20] arm: mach-k3: j784s4: Enable LPM resume flow for J784s4/J742s2 SOCs Richard Genoud (TI)
2026-04-30  8:44 ` [PATCH 14/20] arm: mach-k3: j722s: Enable LPM resume flow Richard Genoud (TI)
2026-04-30  8:44 ` [PATCH 15/20] arm: mach-k3: j721s2: " Richard Genoud (TI)
2026-04-30  8:44 ` [PATCH 16/20] arm: mach-k3: Update pm-boardcfg for all k3 platforms Richard Genoud (TI)
2026-05-11 10:54   ` Kumar, Udit
2026-04-30  8:44 ` [PATCH 17/20] board: evm: Enable de-isolation of IOs at resume for j7200 and j784s4 Richard Genoud (TI)
2026-04-30  8:44 ` [PATCH 18/20] board: ti: evm: Store wakeup reason on scratchpad memory Richard Genoud (TI)
2026-04-30 17:32   ` Andrew Davis
2026-04-30  8:44 ` [PATCH 19/20] arm: dts: k3-j7200: Remove background firewall on DDR Richard Genoud (TI)
2026-04-30 17:30   ` Andrew Davis
2026-05-11 10:56     ` Kumar, Udit
2026-04-30  8:44 ` [PATCH 20/20] arm: dts: k3-j7200: Extend firewall for ATF region to TIFS Richard Genoud (TI)
2026-04-30 17:28   ` Andrew Davis [this message]

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=af7ef143-2bfb-424c-b1cf-a49fc02f9192@ti.com \
    --to=afd@ti.com \
    --cc=a-kumar2@ti.com \
    --cc=a-nandan@ti.com \
    --cc=alpernebiyasak@gmail.com \
    --cc=bb@ti.com \
    --cc=gregory.clement@bootlin.com \
    --cc=j-choudhary@ti.com \
    --cc=m-chawdhry@ti.com \
    --cc=msp@baylibre.com \
    --cc=richard.genoud@bootlin.com \
    --cc=sjg@chromium.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=thomas.richard@bootlin.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=u-kumar1@ti.com \
    --cc=vaishnav.a@ti.com \
    --cc=vigneshr@ti.com \
    /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