cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
116 Views
Registered: ‎10-19-2019

Reserved DDR memory region : Unable to handle kernel paging request

Jump to solution

Hi everyone and thank you for reading me,

I'm working with vivado and petalinux 2018.3 design flow, my FPGA target is a MPSoC Ultrascale+ (Xu5ev) implemented on Mercury Xu5Ev board from enclustra.

I'm able to boot linux on the board, loading template modules also works.

Problems starts when I try to implement a memory reservation. I followed instructions from this tutorial : https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841683/Linux+Reserved+Memory

But everytime I try to boot, when the module is inserted I got the following message :

Unable to handle kernel paging request at virtual address 7fff35d8

 

It seems to be triggered on the driver instruction :

rc = of_address_to_resource(np, 0, &r);

 

I have checked memory settings of my board (4GB) so I added the memory node 

memory {
device_type = "memory";
reg = <0x0 0x0 0x0 0x80000000>, <0x00000008 0x00000000 0x0 0x80000000>;
};

In my system_user.dtsi

I used the same procedure on a Zynq device where it worked properly...

Do you have any advice ? What am I missing ? My understanding of the problem is that some addresses cannot be mapped for some reasons, from what I see on the enclustra board, it seems like there are 4 dies of DDR memory, in that case shouldn't I describe my memory noe I a differrent way ?

You can you find the code of the driver I modified, the log and my user device-tree linked below.

Thank you for any help

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
34 Views
Registered: ‎10-19-2019

Hi,

I found that using the dma API resolved my issue. Using the combination of compatible = "shared-dma-pool"; in my DT and the referenced driver code line in this tutorial https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841683/Linux+Reserved+Memory

For information I had to add

#include <linux/of_reserved_mem.h>
#include <linux/dma-mapping.h>

at the begining of the driver code to use the API

regards,

LB

View solution in original post

0 Kudos
1 Reply
Highlighted
35 Views
Registered: ‎10-19-2019

Hi,

I found that using the dma API resolved my issue. Using the combination of compatible = "shared-dma-pool"; in my DT and the referenced driver code line in this tutorial https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841683/Linux+Reserved+Memory

For information I had to add

#include <linux/of_reserved_mem.h>
#include <linux/dma-mapping.h>

at the begining of the driver code to use the API

regards,

LB

View solution in original post

0 Kudos