Re: [PATCH 1/2] remoteproc: elf_loader: Create new callback for copying segments to remote cpu

From: Peng Fan

Date: Mon Oct 26 2026 - 23:06:02 EST


On Mon, Oct 26, 2026 at 11:09:30AM +0100, Uwe Kleine-K??nig wrote:
>Some devices have special needs about how an Elf segment is copied to
>the remote cpu's memory space where the default implementation using
>memcpy_toio/memcpy and memset_io/memset isn't suitable. An affected
>mainline driver is imx-dsp-rproc which includes a near-copy of
>rproc_elf_load_segments() just to handle the IRAM only allowing 32 bit
>accesses. On (not-yet-mainline) ADI SC846 the respective memory isn't
>directly accessible at all and DMA must be used to copy the data.
>
>The new callback can be used to implement just the driver specific
>memcpy + memset to increase code reuse.
>
>The patch only appears big because of indentation changes.
>
>Signed-off-by: Uwe Kleine-K??nig <u.kleine-koenig@xxxxxxxxxxxx>

Reviewed-by: Peng Fan <peng.fan@xxxxxxx>