linux-stable/drivers/remoteproc
AngeloGioacchino Del Regno 00548ac6b1 remoteproc: mediatek: Make sure IPI buffer fits in L2TCM
commit 331f91d86f upstream.

The IPI buffer location is read from the firmware that we load to the
System Companion Processor, and it's not granted that both the SRAM
(L2TCM) size that is defined in the devicetree node is large enough
for that, and while this is especially true for multi-core SCP, it's
still useful to check on single-core variants as well.

Failing to perform this check may make this driver perform R/W
operations out of the L2TCM boundary, resulting (at best) in a
kernel panic.

To fix that, check that the IPI buffer fits, otherwise return a
failure and refuse to boot the relevant SCP core (or the SCP at
all, if this is single core).

Fixes: 3efa0ea743 ("remoteproc/mediatek: read IPI buffer offset from FW")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240321084614.45253-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-25 16:20:18 +02:00
..
Kconfig remoteproc: stm32: use correct format strings on 64-bit 2024-03-26 18:21:34 -04:00
Makefile
da8xx_remoteproc.c
imx_rproc.c remoteproc: imx_rproc: Call of_node_put() on iteration error 2023-05-17 11:50:24 +02:00
ingenic_rproc.c
keystone_remoteproc.c
mtk_common.h
mtk_scp.c remoteproc: mediatek: Make sure IPI buffer fits in L2TCM 2024-05-25 16:20:18 +02:00
mtk_scp_ipi.c remoteproc/mtk_scp: Move clk ops outside send_lock 2023-03-10 09:40:09 +01:00
omap_remoteproc.c
omap_remoteproc.h
pru_rproc.c
pru_rproc.h
qcom_common.c
qcom_common.h
qcom_pil_info.c
qcom_pil_info.h
qcom_q6v5.c
qcom_q6v5.h
qcom_q6v5_adsp.c
qcom_q6v5_mss.c remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers 2023-03-10 09:39:43 +01:00
qcom_q6v5_pas.c remoteproc: qcom_q6v5_pas: Fix missing of_node_put() in adsp_alloc_memory_region() 2022-12-31 13:14:36 +01:00
qcom_q6v5_wcss.c remoteproc: qcom: q6v5: Fix missing clk_disable_unprepare() in q6v5_wcss_qcs404_power_on() 2022-12-31 13:14:36 +01:00
qcom_sysmon.c
qcom_wcnss.c
qcom_wcnss.h
qcom_wcnss_iris.c
remoteproc_cdev.c
remoteproc_core.c remoteproc: core: Do pm_relax when in RPROC_OFFLINE state 2023-01-12 11:58:59 +01:00
remoteproc_coredump.c
remoteproc_debugfs.c
remoteproc_elf_helpers.h
remoteproc_elf_loader.c
remoteproc_internal.h
remoteproc_sysfs.c
remoteproc_virtio.c
st_remoteproc.c remoteproc: st: Call of_node_put() on iteration error 2023-05-17 11:50:24 +02:00
st_slim_rproc.c
stm32_rproc.c remoteproc: stm32: fix incorrect optional pointers 2024-03-26 18:21:37 -04:00
ti_k3_dsp_remoteproc.c
ti_k3_r5_remoteproc.c
ti_sci_proc.h
wkup_m3_rproc.c