bperez77 / xilinx_axidma

A zero-copy Linux driver and a userspace interface library for Xilinx's AXI DMA and VDMA IP blocks. These serve as bridges for communication between the processing system and FPGA programmable logic fabric, through one of the DMA ports on the Zynq processing system. Distributed under the MIT License.
MIT License
474 stars 230 forks source link

Unable to handle kernel NULL pointer dereference at virtual address 00000000 #153

Closed Cuty-pink closed 1 year ago

Cuty-pink commented 1 year ago

According to the operations in the readme, I generated a .ko file and an App file. However, when I tried to load the driver on the development board, I encountered an error. Can you help me figure out what the problem is? YSV {7EC~MB~1ZDC}(93CY8

hamidrmt commented 1 year ago

I have same issue, You should enable two dma channels and give right device-id to dma channels in dts file and dmas property in chrdev should start with 0: dmas = <&axi_dma_0 0 &axi_dma_0 1> correct dmas = < &axi_dma_0 1> not correct

Cuty-pink commented 1 year ago

You are right! Thanks for your suggest!

WalkingSeason commented 7 months ago

I have another solution, for builds that axidma doesn't have channel 0. I commented out lines 98-100 of /driver/axidma_of.c :

    // if (channel == 1) {
        // dma_chan_node = of_get_next_child(dma_node, dma_chan_node);
    // }

then it works well.

image

Here is my device-tree:

&amba_pl{

    /* Comaptible point for axidma for bmperez axidma drivers */
    axidma_chrdev: axidma_chrdev@0 {
        compatible = "xlnx,axidma-chrdev";
        dmas = <&axi_dma_2 0 &axi_dma_3 0 &axi_dma_0 1 &axi_dma_1 1>;
        dma-names = "dma2", "dma3", "dma0", "dma1";
    };
}
wangzhenhua92429 commented 7 months ago

你发给我的邮件已收到!                                ——王振华