diff options
| author | Manorit Chawdhry <m-chawdhry@ti.com> | 2025-11-29 00:11:25 +0530 |
|---|---|---|
| committer | Ryan Eatmon <reatmon@ti.com> | 2025-12-01 16:12:44 -0600 |
| commit | b05876bb9c3c7ac273494e00f76bb90cff8ca17b (patch) | |
| tree | 76ad5a3b1779420a6f0ca3d68af12825ddb5d51d /meta-ti-bsp/recipes-security/optee | |
| parent | 7bec7f73c68c467f06860cfe3ba27531194d9894 (diff) | |
| download | meta-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.inc | 11 | ||||
| -rw-r--r-- | meta-ti-bsp/recipes-security/optee/optee-os/0001-plat-k3-drivers-Open-TRNG-firewall-for-TIFS-on-all-k.patch | 45 |
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 |
| 2 | inherit ti-secdev | 2 | inherit ti-secdev |
| 3 | 3 | ||
| 4 | FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os:" | ||
| 5 | |||
| 4 | EXTRA_OEMAKE:remove = "CFG_MAP_EXT_DT_SECURE=y" | 6 | EXTRA_OEMAKE:remove = "CFG_MAP_EXT_DT_SECURE=y" |
| 5 | 7 | ||
| 6 | EXTRA_OEMAKE:append:k3 = " ${@ 'CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}" | 8 | EXTRA_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 |
| 78 | INSANE_SKIP:${PN}:append:k3 = " textrel" | 80 | INSANE_SKIP:${PN}:append:k3 = " textrel" |
| 81 | |||
| 82 | # LPM support patch for Jacinto platforms (J7200, J742S2, J784S4) | ||
| 83 | OPTEE_JACINTO_LPM_PATCHES = " \ | ||
| 84 | file://0001-plat-k3-drivers-Open-TRNG-firewall-for-TIFS-on-all-k.patch \ | ||
| 85 | " | ||
| 86 | |||
| 87 | SRC_URI:append:j7200 = " ${OPTEE_JACINTO_LPM_PATCHES}" | ||
| 88 | SRC_URI:append:j742s2 = " ${OPTEE_JACINTO_LPM_PATCHES}" | ||
| 89 | SRC_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 @@ | |||
| 1 | From 00f74ba2ab00088d51e6da3c0eefe50599ef5c82 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Prasanth Babu Mantena <p-mantena@ti.com> | ||
| 3 | Date: Mon, 3 Nov 2025 12:42:57 +0530 | ||
| 4 | Subject: [PATCH] plat-k3: drivers: Open TRNG firewall for TIFS on all k3 devs | ||
| 5 | |||
| 6 | On k3 devices, TRNG is firewalled to be accessed only by OPTEE. | ||
| 7 | |||
| 8 | TIFS needs this for the encryption and decryption services to support | ||
| 9 | different low power modes. So, open firewall to TIFS as well. | ||
| 10 | |||
| 11 | There is no concurrent usage of TRNG, as TIFS uses TRNG only at suspend | ||
| 12 | when OPTEE is down and resume, when firewalls are restored but OPTEE is | ||
| 13 | not up yet. | ||
| 14 | |||
| 15 | As this is a firewall that required to be shared along with TIFS on all | ||
| 16 | devices, making this a common change and open on all devs. | ||
| 17 | |||
| 18 | Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/7582] | ||
| 19 | |||
| 20 | Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com> | ||
| 21 | Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com> | ||
| 22 | Reviewed-by: Andrew Davis <afd@ti.com> | ||
| 23 | --- | ||
| 24 | core/arch/arm/plat-k3/drivers/sa2ul.c | 5 ----- | ||
| 25 | 1 file changed, 5 deletions(-) | ||
| 26 | |||
| 27 | diff --git a/core/arch/arm/plat-k3/drivers/sa2ul.c b/core/arch/arm/plat-k3/drivers/sa2ul.c | ||
| 28 | index 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 | -- | ||
| 45 | 2.34.1 | ||
