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
464 stars 227 forks source link

[axidma_init_sg_entry: 98] Requested transfer address does not fall. #22

Closed ymd8bit closed 7 years ago

ymd8bit commented 7 years ago

we ran axidma_twoway_transfer function several times,
however I failed to run in 5th step with the error axidma: axidma_dma.c: axidma_init_sg_entry: 98: Requested transfer address (null) does not fall within a previously allocated DMA buffer. Did you guys have some problem like this so far ?? our When we get the error axidma: axidma_dma.c: axidma_init_sg_entry: 98: ??

the part of code executing axidma_twoway_transfer is,

  printf("Start twoway transfer\n");
  rc = axidma_twoway_transfer(axidma_dev, tx_channel, (void*)tx_buf, tx_size,
                                          rx_channel, (void*)rx_buf, rx_size, true);
  if (rc < 0) {
    goto stop_rem;
  }
  printf("Finished twoway transfer\n");

  stop_rem:
    stop_remainder_transactions(axidma_dev, tx_channel, rx_channel, tx_size);
    printf("Error: single transfer\n");

I pasted actual error message I got below. I wanted to repeat this loop 8 times but, after 4th loop, suddenly raise the error and every after executions failed....

root@zynq:~# ./multi_kernel_load_module.elf
Start twoway transfer
Finished twoway transfer
Start twoway transfer
Finished twoway transfer
Start twoway transfer
Finished twoway transfer
Start twoway transfer
Finished twoway transfer
Start twoway transfer
axidma: axidma_dma.c: axidma_init_sg_entry: 98: Requested transfer address   (null) does not fall within a previously allocated DMA buffer.
Failed to perform the AXI DMA read-write transfer: Bad address
Eraxidma: axidma_dma.c: axidma_init_sg_entry: 98: Requested transfer address 00000003 does not fall within a previously allocated DMA buffer.
ror: single transfer
Start twoway transfer
Failed to perform theaxidma: axidma_dma.c: axidma_init_sg_entry: 98: Requested transfer address   (null) does not fall within a previously allocated DMA buffer.
 AXI DMA read-write transfer: Bad address
axidma: axidma_dma.c: axidma_init_sg_entry: 98: Requested transfer address   (null) does not fall within a previously allocated DMA buffer.

Start twoway transfer
Failed to perform the AXI DMA read-write transfer: Bad address
Error: single transfer
Start twoway transfer
Failed to perform the AXI DMA read-write transfer: Bad address
Error: single transfer
Start twoway transfer
xilinx-vdma 40400000.dma: Channel cc1d7b10 has errors 10, cdr 0 tdr 0
Finished twoway transfer
bperez77 commented 7 years ago

Sorry, haven't been active lately. What did you end up needing to do to solve this issue? It might be helpful to others.

Based on what I'm seeing, it looks like you were passing a NULL pointer.