Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

petalinux2020.2 do not work with u-dma-buf #70

Open
roundchen opened this issue Mar 5, 2021 · 2 comments
Open

petalinux2020.2 do not work with u-dma-buf #70

roundchen opened this issue Mar 5, 2021 · 2 comments

Comments

@roundchen
Copy link

roundchen commented Mar 5, 2021

Hi ikwzm

I'm using u-dma-buf (master branch)on a Zynq MPSoC Ultrascale+ board (ZCU111),and I use xilinx offer petalinux bsp for zcu111 with the petalinux version is 2020.2.
I compile u-dma-buf.c and insmod it install well. then I run the test program a.out ( u-dma-buf_test.c) ,there is a Segmentation fault .
It seems u-dma-buf can not work with petalinux 2020.2

then I compile u-dma-buf.c in petalinux 2019.1,it work well

thanks

root@xilinx-zcu111-2020_2:# mount /dev/mmcblk0p1 /mnt
[ 54.788933] /dev/mmcblk0p1: Can't open blockdev
root@xilinx-zcu111-2020_2:
#
root@xilinx-zcu111-2020_2:~# cd /mnt
root@xilinx-zcu111-2020_2:/mnt#
048576ilinx-zcu111-2020_2:/mnt# insmod u-dma-buf.ko udmabuf0=78643200 udmabuf1=1048576
[ 54.867568] u_dma_buf: loading out-of-tree module taints kernel.
[ 54.896593] u-dma-buf udmabuf0: driver version = 3.2.4
[ 54.901732] u-dma-buf udmabuf0: major number = 242
[ 54.906689] u-dma-buf udmabuf0: minor number = 0
[ 54.911482] u-dma-buf udmabuf0: phys address = 0x0000000068500000
[ 54.917747] u-dma-buf udmabuf0: buffer size = 78643200
[ 54.923144] u-dma-buf u-dma-buf.0: driver installed.
[ 54.929525] u-dma-buf udmabuf1: driver version = 3.2.4
[ 54.934669] u-dma-buf udmabuf1: major number = 242
[ 54.939632] u-dma-buf udmabuf1: minor number = 1
[ 54.944418] u-dma-buf udmabuf1: phys address = 0x000000006d000000
[ 54.950680] u-dma-buf udmabuf1: buffer size = 1048576
[ 54.955987] u-dma-buf u-dma-buf.1: driver installed.
root@xilinx-zcu111-2020_2:/mnt#
root@xilinx-zcu111-2020_2:/mnt# ./a.out
phys_addr=0x68500000
size=78643200
check_buf()
Segmentation fault

rfsoc_ps(2021-3-5 18_27_51).txt

@roundchen
Copy link
Author

I solve this problem using petalinux generated kernel compile u-dma-buf.c
when I download linux-xlnx and compiled as the kernel to compile u-dma-buf.c ,this problem appear.
thank you for your contribution to open Source

@ikwzm
Copy link
Owner

ikwzm commented Mar 5, 2021

Thank you for the issue.

This issue did not occur with 5.4.0-xlnx-v2020.2-zynqmp-fpga provided by ZynqMP-FPGA-Linux. 5.4.0-xlnx-v2020.2-zynqmp-fpga is not built using PetaLinux.

I'm not using PetaLinux, so it's not easy to solve this problem.
Please provide any information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants