Skip to content

Commit db85ed4

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 0eda687 commit db85ed4

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
@@ -891,6 +891,14 @@ static void *pru_d_da_to_va(struct pru_rproc *pru, u32 da, int len)
891891
u32 offset;
892892
void *va = NULL;
893893

894+
/* GNU binutils do not support multiple address spaces. The
895+
* default linker script from the official GNU pru-ld places
896+
* IRAM at an arbitrary high offset, in order to differentiate it
897+
* from DRAM. Hence we need to strip the artificial offset
898+
* from the IRAM address.
899+
*/
900+
da &= ~0xf0000000u;
901+
894902
if (len <= 0)
895903
return NULL;
896904

0 commit comments

Comments
 (0)