DMA in Linux

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: DMA in Linux

Re: DMA in Linux

Post by support »

Hello,

To begin with, Xillinux isn't available for ZC706 -- I suppose you've made the porting yourselves.

As for your problem, it's a general-Linux issues, and not Xillinux specific. I suppose you can get plenty of information on memory mapping /dev/mem on the internet. Xillinux is just another Linux distribution for this purpose.

Besides, since you're using Xillinux, I would suggest trying out the Xillybus IP core that comes built-in, which supplies a simple solution for end-to-end DMA communication.

Regards,
Eli

DMA in Linux

Post by SO007 »

We are trying to implement a data acquisition system on ZC706 board. DMA is used to transfer data from the ADC to the PL DDR (SODIMM memory).
The entire project runs perfectly on SDK, however on porting the system design to Xillinux we are facing issues.
I have used to following code to memory map my DMA base address, however its unable to get mapped.



void *dma_base;
int dma_fd = open("/dev/mem", O_RDWR);
if (dma_fd < 1) {
printf("ERROR Opening mem\n");
return 1;
}

dma_base = mmap(NULL, 64*1024, PROT_READ | PROT_WRITE, MAP_SHARED, dma_fd, XPAR_AXI_DMA_0_BASEADDR);

printf(" Dma Reg is : %02x \n", *((uint32_t *) ((uint32_t*)dma_base)));


This code section is functional for all other base address mapping. Is there any specific way to memory map DMA base address?

Top

cron