summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/pru_rproc.c
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2021-03-15 15:58:59 -0500
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-03-17 14:15:07 -0500
commit9afeefcf06fc7b4bdab06a6e2cb06745bded34dd (patch)
treeac8c2d90c35da1f59369fe1012f2f7bd168cc1c3 /drivers/remoteproc/pru_rproc.c
parente6d9423d31b2f9bdd0220fd0584e3bb6ed2c4e52 (diff)
remoteproc: pru: Fix firmware loading crashes on K3 SoCs
The K3 PRUs are 32-bit processors and in general have some limitations in using the standard ARMv8 memcpy function for loading firmware segments, so the driver already uses a custom memcpy implementation. This added logic however is limited to only IRAMs at the moment, but the loading into Data RAMs is not completely ok either and does generate a kernel crash for unaligned accesses. Fix these crashes by removing the existing IRAM logic limitation and extending the custom memcpy usage to Data RAMs as well for all K3 SoCs. Fixes: 1d39f4d19921 ("remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs") Signed-off-by: Suman Anna <s-anna@ti.com> Link: https://lore.kernel.org/r/20210315205859.19590-1-s-anna@ti.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/pru_rproc.c')
-rw-r--r--drivers/remoteproc/pru_rproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
index 5fad787ba012..dcb380e868df 100644
--- a/drivers/remoteproc/pru_rproc.c
+++ b/drivers/remoteproc/pru_rproc.c
@@ -603,7 +603,7 @@ pru_rproc_load_elf_segments(struct rproc *rproc, const struct firmware *fw)
break;
}
- if (pru->data->is_k3 && is_iram) {
+ if (pru->data->is_k3) {
ret = pru_rproc_memcpy(ptr, elf_data + phdr->p_offset,
filesz);
if (ret) {