cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
724 Views
Registered: ‎09-26-2017

how to access DDR3 from Linux

Hi,

 

I am using ZyncMP with zync102 board.

I want to read and write in to DDR3 memory from Linux , please suggest me how to read/write in to DDR3 memory.

 

Regards,

Pushpendra

0 Kudos
3 Replies
Highlighted
682 Views
Registered: ‎04-20-2017

Re: how to access DDR3 from Linux

It's not clear what you mean. All your application in Linux exist in DDR and hence they read / write it

You can write directly to Ddr or any other memory mapped device in physical address space by using mmap on /dev/mem. But if the memory you are trying to write is not excluded from Linux or somehow reserved it might crash your Linux and causes undefined behavior.
0 Kudos
Highlighted
Moderator
Moderator
661 Views
Registered: ‎06-27-2017

Re: how to access DDR3 from Linux

@psk1801,

 

You can use devmem command to read/write[32-bit value] into ddr address.

if you want to write onto chunk of memory  then you have to do memory map the address range from user application.

Use below link on how to use mmap in linux.

http://man7.org/linux/man-pages/man2/mmap.2.html

 

Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
 

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
618 Views
Registered: ‎01-21-2014

Re: how to access DDR3 from Linux

You should review the following wiki page that talks about reserving chunks of memory so that the kernel will not use them. 

 

http://www.wiki.xilinx.com/Linux+Reserved+Memory

 

0 Kudos