Skip to content

Commit 19b8b00

Browse files
dinuxbgRobertCNelson
authored andcommitted
Fix remoteproc to work with the PRU GNU Binutils port
PRU IRAM addresses need to be masked before being handled to remoteproc. This is due to PRU Binutils' lack of separate address spaces for IRAM and DRAM. Signed-off-by: Dimitar Dimitrov <[email protected]>
1 parent 2bef001 commit 19b8b00

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/remoteproc/pru_rproc.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,14 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, int len)
969969
u32 offset;
970970
void *va = NULL;
971971

972+
/* GNU binutils do not support multiple address spaces. The
973+
* default linker script from the official GNU pru-ld places
974+
* IRAM at an arbitrary high offset, in order to differentiate it
975+
* from DRAM. Hence we need to strip the artificial offset
976+
* from the IRAM address.
977+
*/
978+
da &= ~0xf0000000u;
979+
972980
if (len <= 0)
973981
return NULL;
974982

0 commit comments

Comments
 (0)