cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
7,275 Views

PCIE endpoint memory access -ML507 board in linux

I have programmed PCIE endpoint block in ML507 board and plugged in the board to PCIe slot. In linux, lspci -v -d 10EE:0007 identifies the Xilinx device. With the following code , I am trying to do map the  PCIE memory. 

fd = open ("/dev/mem", O_RDWR | O_SYNC); 

addr = mmap (0,size_t(getpagesize()),PROT_WRITE | PROT_READ,MAP_SHARED,fd, off_t(offset address)

 

-- offset address - the address displayed in above lspci command (Memory at 0xf3d00000)

-- addr always returns 0x7ffff7ff8000

 

When I try to do read/write operation , the data returned is 0. I had programmed the ML507 using JTAG and after programming did a power cycle of PC so that the PCIe is recogonised.  Could anyone tell me what I am missing here? 

0 Kudos
Reply
1 Reply
Scholar
Scholar
6,949 Views
Registered: ‎02-03-2010

Hi,

 

Can you check the drivers of XAPP1052 drivers ?

I think it has similar operations.

 

Regards,

KR

--------------------------------------------------​--------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
Reply