Skip to content

Commit d36a624

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 071da69 commit d36a624

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
@@ -955,6 +955,14 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, int len)
955955
u32 offset;
956956
void *va = NULL;
957957

958+
/* GNU binutils do not support multiple address spaces. The
959+
* default linker script from the official GNU pru-ld places
960+
* IRAM at an arbitrary high offset, in order to differentiate it
961+
* from DRAM. Hence we need to strip the artificial offset
962+
* from the IRAM address.
963+
*/
964+
da &= ~0xf0000000u;
965+
958966
if (len <= 0)
959967
return NULL;
960968

0 commit comments

Comments
 (0)