OpenCloudOS-Kernel/drivers/remoteproc
AngeloGioacchino Del Regno 26c6d7dc8c remoteproc: mediatek: Make sure IPI buffer fits in L2TCM
commit 331f91d86f71d0bb89a44217cc0b2a22810bbd42 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:22:55 +02:00
..
Kconfig remoteproc: stm32: use correct format strings on 64-bit 2023-06-22 09:54:44 +02:00
Makefile drivers: remoteproc: Add Xilinx r5 remoteproc driver 2022-11-25 09:12:05 -07:00
da8xx_remoteproc.c remoteproc: da8xx: Convert to platform remove callback returning void 2023-05-09 11:45:22 -06:00
imx_dsp_rproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
imx_rproc.c remoteproc: imx_rproc: Switch iMX8MN/MP from SMCCC to MMIO 2023-07-27 10:44:17 -06:00
imx_rproc.h remoteproc: imx_rproc: Switch iMX8MN/MP from SMCCC to MMIO 2023-07-27 10:44:17 -06:00
ingenic_rproc.c remoteproc: ingenic: Request IRQ disabled 2021-12-06 10:17:44 -07:00
keystone_remoteproc.c remoteproc: keystone: Convert to platform remove callback returning void 2023-05-09 11:48:38 -06:00
meson_mx_ao_arc.c remoteproc: meson_mx_ao_arc: Convert to platform remove callback returning void 2023-05-09 13:17:22 -06:00
mtk_common.h remoteproc: mediatek: Fix side effect of mt8195 sram power on 2022-04-11 09:56:42 -06:00
mtk_scp.c remoteproc: mediatek: Make sure IPI buffer fits in L2TCM 2024-05-25 16:22:55 +02:00
mtk_scp_ipi.c remoteproc/mtk_scpi_ipi: Fix one kernel-doc comment 2023-03-16 12:12:18 -06:00
omap_remoteproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
omap_remoteproc.h
pru_rproc.c remoteproc: pru: add support for configuring GPMUX based on client setup 2023-08-21 15:19:28 -06:00
pru_rproc.h remoteproc: pru: Add support for PRU specific interrupt configuration 2020-12-10 10:56:01 -06:00
qcom_common.c remoteproc: qcom: Expand MD_* as MINIDUMP_* 2023-07-15 13:26:52 -07:00
qcom_common.h remoteproc updates for v6.3 2023-02-26 12:18:36 -08:00
qcom_pil_info.c remoteproc: qcom: pil_info: Don't memcpy_toio more than is provided 2021-12-13 16:58:05 -06:00
qcom_pil_info.h remoteproc: qcom: Introduce helper to store pil info in IMEM 2020-07-01 22:10:18 -07:00
qcom_q6v5.c soc: qcom: aoss: Tidy up qmp_send() callers 2023-08-13 19:27:32 -07:00
qcom_q6v5.h remoteproc: qcom: q6v5: Add interconnect path proxy vote 2022-03-11 14:22:03 -06:00
qcom_q6v5_adsp.c remoteproc: qcom: Use of_reserved_mem_lookup() 2023-07-15 12:39:48 -07:00
qcom_q6v5_mss.c remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660 2023-07-15 15:01:40 -07:00
qcom_q6v5_pas.c remoteproc: qcom: pas: add SDM845 SLPI compatible 2023-07-15 15:18:34 -07:00
qcom_q6v5_wcss.c remoteproc: qcom: q6v5: use devm_platform_ioremap_resource_byname() 2023-07-15 13:09:35 -07:00
qcom_sysmon.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
qcom_wcnss.c remoteproc: qcom: wcnss: use devm_platform_ioremap_resource_byname() 2023-07-15 13:10:34 -07:00
qcom_wcnss.h remoteproc: qcom: wcnss: remove unused qcom_iris_driver declaration 2022-12-28 09:50:07 -06:00
qcom_wcnss_iris.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
rcar_rproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
remoteproc_cdev.c remoteproc: core: Move state checking to remoteproc_core 2022-04-14 11:13:33 -06:00
remoteproc_core.c remoteproc: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:53 -07:00
remoteproc_coredump.c remoteproc: core: Export the rproc coredump APIs 2023-07-15 12:56:48 -07:00
remoteproc_debugfs.c remoteproc: Don't bother checking the return value of debugfs_create* 2022-04-11 10:04:40 -06:00
remoteproc_elf_helpers.h remoteproc: fix an typo in fw_elf_get_class code comments 2021-07-28 14:57:30 -05:00
remoteproc_elf_loader.c ELF: fix all "Elf" typos 2023-04-08 13:45:37 -07:00
remoteproc_internal.h remoteproc: core: Export the rproc coredump APIs 2023-07-15 12:56:48 -07:00
remoteproc_sysfs.c remoteproc: core: Move state checking to remoteproc_core 2022-04-14 11:13:33 -06:00
remoteproc_virtio.c remoteproc: virtio: Fix wdg cannot recovery remote processor 2024-04-03 15:28:16 +02:00
st_remoteproc.c remoteproc: st: Convert to platform remove callback returning void 2023-05-09 13:37:08 -06:00
st_slim_rproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
stm32_rproc.c remoteproc: stm32: Fix incorrect type assignment returned by stm32_rproc_get_loaded_rsc_tablef 2024-03-26 18:20:04 -04:00
ti_k3_dsp_remoteproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
ti_k3_r5_remoteproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
ti_sci_proc.h remoteproc: k3: Add TI-SCI processor control helper functions 2020-07-28 17:06:43 -07:00
wkup_m3_rproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
xlnx_r5_remoteproc.c remoteproc: Remove unnecessary (void*) conversions 2023-04-03 11:01:08 -06:00