diff options
| author | Tom Rini <[email protected]> | 2024-06-07 14:01:15 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-06-07 14:01:15 -0600 |
| commit | 30060e0480636b3fccdbdf97cdca98ee89e3e58a (patch) | |
| tree | 307db160a3fb40eb10d7fe7bfc5d3ef62cea2e98 /drivers | |
| parent | bf3d5baa868a658d4625aaf177096751b8597891 (diff) | |
| parent | 4db7d62f858b82b493a7c6a32d5ba25a85a6f9dd (diff) | |
Merge patch series "Adding support to load secure firmware for HS devices"
Udit Kumar <[email protected]> says:
Some use case needs rproc firmware to be loaded at u-boot stage,
using following commands at u-boot shell, firmware could be loaded
=> setenv dorprocboot 1
=> run boot_rprocs
For Secure devices, secure version of rproc firmware should be loaded,
which is appended by sec keyword[0].
but currently non-secure firmware is loaded even for secure devices.
So adding support for loading secure firmware on Secured devices.
[0]: https://gist.github.com/uditkumarti/cd8bf6a448079b59145d17a0e8bf13b7
Bootlogs:
GP : https://gist.github.com/uditkumarti/23a00c313e1c28b62537aab733a585df#file-gp_device line 65 onwards
HS : https://gist.github.com/uditkumarti/23a00c313e1c28b62537aab733a585df#file-hs-device line 60 onwards
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/remoteproc/ti_k3_dsp_rproc.c | 4 | ||||
| -rw-r--r-- | drivers/remoteproc/ti_k3_r5f_rproc.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/remoteproc/ti_k3_dsp_rproc.c b/drivers/remoteproc/ti_k3_dsp_rproc.c index 076b6f2acdb..e90f75a188c 100644 --- a/drivers/remoteproc/ti_k3_dsp_rproc.c +++ b/drivers/remoteproc/ti_k3_dsp_rproc.c @@ -21,6 +21,7 @@ #include <linux/sizes.h> #include <linux/soc/ti/ti_sci_protocol.h> #include "ti_sci_proc.h" +#include <mach/security.h> #define KEYSTONE_RPROC_LOCAL_ADDRESS_MASK (SZ_16M - 1) @@ -127,6 +128,7 @@ static int k3_dsp_load(struct udevice *dev, ulong addr, ulong size) struct k3_dsp_privdata *dsp = dev_get_priv(dev); struct k3_dsp_boot_data *data = dsp->data; u32 boot_vector; + void *image_addr = (void *)addr; int ret; if (dsp->in_use) { @@ -148,6 +150,8 @@ static int k3_dsp_load(struct udevice *dev, ulong addr, ulong size) goto proc_release; } + ti_secure_image_post_process(&image_addr, &size); + ret = rproc_elf_load_image(dev, addr, size); if (ret < 0) { dev_err(dev, "Loading elf failed %d\n", ret); diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c index 74bf0433e12..ef2c1872249 100644 --- a/drivers/remoteproc/ti_k3_r5f_rproc.c +++ b/drivers/remoteproc/ti_k3_r5f_rproc.c @@ -20,6 +20,7 @@ #include <linux/kernel.h> #include <linux/soc/ti/ti_sci_protocol.h> #include "ti_sci_proc.h" +#include <mach/security.h> /* * R5F's view of this address can either be for ATCM or BTCM with the other @@ -306,6 +307,7 @@ static int k3_r5f_load(struct udevice *dev, ulong addr, ulong size) u64 boot_vector; u32 ctrl, sts, cfg = 0; bool mem_auto_init; + void *image_addr = (void *)addr; int ret; dev_dbg(dev, "%s addr = 0x%lx, size = 0x%lx\n", __func__, addr, size); @@ -333,6 +335,8 @@ static int k3_r5f_load(struct udevice *dev, ulong addr, ulong size) k3_r5f_init_tcm_memories(core, mem_auto_init); + ti_secure_image_post_process(&image_addr, &size); + ret = rproc_elf_load_image(dev, addr, size); if (ret < 0) { dev_err(dev, "Loading elf failedi %d\n", ret); |
