UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor cjmarquez
Visitor
114 Views
Registered: ‎03-29-2019

Re: AXI-DMA driver using UIO

Jump to solution

I have edited my system-user.dtsi file as shown in the wiki, I have included the memalloc module and I have created my Petalinux. I think I have done everything necessary to run the module but when I run the function ioctl (memAllocFd, MEMALLOC_RESERVE, BUFFER_SIZE * 2) does not reserve the memory, the function dma_alloc_coherent within the module returns NULL. The dmesg command returns this:

[ 346.689147] received command 1 arg 10
[ 346.692751] Reserving buffer 0
[ 346.695780] Allocation failure

This is my system-user.dtsi file

/include/ "system-conf.dtsi"
/ {
chosen {
        bootargs = "earlycon clk_ignore_unused   uio_pdrv_genirq.of_id=generic-uio";
        stdout-path = "serial0:115200n8";
    };

        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                reserved: buffer@0 {
                        compatible = "shared-dma-pool";
                        no-map;
                        reg = <0x0 0x70000000 0x0 0x10000000>;
                };
        };

       reserved-driver@0 {
                 compatible = "xlnx,reserved-memory";
                 memory-region = <&reserved>;
       };

};

I try to reserve X bytes but it fails. Get the file descriptor of the memalloc but it fails when you run dma_alloc_coherent of the module. I can not find out what else I'm missing.

0 Kudos