summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-security/optee
diff options
context:
space:
mode:
authorManorit Chawdhry <m-chawdhry@ti.com>2025-11-29 00:11:25 +0530
committerRyan Eatmon <reatmon@ti.com>2025-12-01 16:12:44 -0600
commitb05876bb9c3c7ac273494e00f76bb90cff8ca17b (patch)
tree76ad5a3b1779420a6f0ca3d68af12825ddb5d51d /meta-ti-bsp/recipes-security/optee
parent7bec7f73c68c467f06860cfe3ba27531194d9894 (diff)
downloadmeta-ti-b05876bb9c3c7ac273494e00f76bb90cff8ca17b.tar.gz
trusted-firmware-a/optee-os: Add LPM support on few platforms
Adds the required TF-A and OP-TEE patches to enable LPM support on J7200, J784s4, J742s2. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp/recipes-security/optee')
-rw-r--r--meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc11
-rw-r--r--meta-ti-bsp/recipes-security/optee/optee-os/0001-plat-k3-drivers-Open-TRNG-firewall-for-TIFS-on-all-k.patch45
2 files changed, 56 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc b/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc
index 61a74a06..d636ae00 100644
--- a/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc
+++ b/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc
@@ -1,6 +1,8 @@
1# Use TI SECDEV for signing 1# Use TI SECDEV for signing
2inherit ti-secdev 2inherit ti-secdev
3 3
4FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os:"
5
4EXTRA_OEMAKE:remove = "CFG_MAP_EXT_DT_SECURE=y" 6EXTRA_OEMAKE:remove = "CFG_MAP_EXT_DT_SECURE=y"
5 7
6EXTRA_OEMAKE:append:k3 = " ${@ 'CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}" 8EXTRA_OEMAKE:append:k3 = " ${@ 'CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
@@ -76,3 +78,12 @@ RDEPENDS:${PN} += "${PN}-ta"
76 78
77# This is needed for bl32.elf 79# This is needed for bl32.elf
78INSANE_SKIP:${PN}:append:k3 = " textrel" 80INSANE_SKIP:${PN}:append:k3 = " textrel"
81
82# LPM support patch for Jacinto platforms (J7200, J742S2, J784S4)
83OPTEE_JACINTO_LPM_PATCHES = " \
84 file://0001-plat-k3-drivers-Open-TRNG-firewall-for-TIFS-on-all-k.patch \
85"
86
87SRC_URI:append:j7200 = " ${OPTEE_JACINTO_LPM_PATCHES}"
88SRC_URI:append:j742s2 = " ${OPTEE_JACINTO_LPM_PATCHES}"
89SRC_URI:append:j784s4 = " ${OPTEE_JACINTO_LPM_PATCHES}"
diff --git a/meta-ti-bsp/recipes-security/optee/optee-os/0001-plat-k3-drivers-Open-TRNG-firewall-for-TIFS-on-all-k.patch b/meta-ti-bsp/recipes-security/optee/optee-os/0001-plat-k3-drivers-Open-TRNG-firewall-for-TIFS-on-all-k.patch
new file mode 100644
index 00000000..59d7a795
--- /dev/null
+++ b/meta-ti-bsp/recipes-security/optee/optee-os/0001-plat-k3-drivers-Open-TRNG-firewall-for-TIFS-on-all-k.patch
@@ -0,0 +1,45 @@
1From 00f74ba2ab00088d51e6da3c0eefe50599ef5c82 Mon Sep 17 00:00:00 2001
2From: Prasanth Babu Mantena <p-mantena@ti.com>
3Date: Mon, 3 Nov 2025 12:42:57 +0530
4Subject: [PATCH] plat-k3: drivers: Open TRNG firewall for TIFS on all k3 devs
5
6On k3 devices, TRNG is firewalled to be accessed only by OPTEE.
7
8TIFS needs this for the encryption and decryption services to support
9different low power modes. So, open firewall to TIFS as well.
10
11There is no concurrent usage of TRNG, as TIFS uses TRNG only at suspend
12when OPTEE is down and resume, when firewalls are restored but OPTEE is
13not up yet.
14
15As this is a firewall that required to be shared along with TIFS on all
16devices, making this a common change and open on all devs.
17
18Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/7582]
19
20Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
21Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
22Reviewed-by: Andrew Davis <afd@ti.com>
23---
24 core/arch/arm/plat-k3/drivers/sa2ul.c | 5 -----
25 1 file changed, 5 deletions(-)
26
27diff --git a/core/arch/arm/plat-k3/drivers/sa2ul.c b/core/arch/arm/plat-k3/drivers/sa2ul.c
28index c50757b2c..e10bde131 100644
29--- a/core/arch/arm/plat-k3/drivers/sa2ul.c
30+++ b/core/arch/arm/plat-k3/drivers/sa2ul.c
31@@ -121,12 +121,7 @@ static TEE_Result sa2ul_init(void)
32 start_address = RNG_BASE;
33 end_address = RNG_BASE + RNG_REG_SIZE - 1;
34 permissions[num_perm++] = (FW_BIG_ARM_PRIVID << 16) | FW_SECURE_ONLY;
35-#if defined(PLATFORM_FLAVOR_am62x) || \
36- defined(PLATFORM_FLAVOR_am62ax) || \
37- defined(PLATFORM_FLAVOR_am62px)
38-
39 permissions[num_perm++] = (FW_TIFS_PRIVID << 16) | FW_NON_SECURE;
40-#endif
41 ret = ti_sci_set_fwl_region(fwl_id, rng_region, num_perm,
42 control, permissions,
43 start_address, end_address);
44--
452.34.1