-
Notifications
You must be signed in to change notification settings - Fork 427
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
xdma0_user lseek fails #96
Comments
If you look at the reg_rw tool you'll notice that the way to use the xdma0_user is by mmap'ing it. After doing the mmap you can access your memory through the mmap pointer. |
The xdma0_user device does not implement the lseek, it was using the mmap to access the bar space. |
The answers above are not quite correct, because it is not the only and IMO not the best way to access xdmaN_user. Upstream XDMA already implements read/write functions, which can be utilised with Linux POSIX pread/pwrite system functions. I've had the same problem with I would like to add that |
Hi,
I have the following setup
The problem - can't change the offset for the
xdma0_user
device. I tried to open this device in 3 different modes from C++ - as a stream, file and char device, all 3 ways are failing. All of 3 ways work fine forxdma0_[h2c][c2]_[0..3]
devices.See the full error reproducing code here
https://paste.ofcode.org/Q5iP3cVfzH9mevswKLXUXm
Errors from stdout for
xdma0_user
.Two aspects of this problem
it leads to the following error in kernel log
From
dma_ip_drivers/XDMA/linux-kernel/xdma/cdev_ctrl.c
Line 146 in 1fe2bd0
xdma0_user
device as a stream, I can't read.tellg()
valuehttp://www.cplusplus.com/reference/istream/istream/tellg/
So something is wrong even before offset changing
The text was updated successfully, but these errors were encountered: