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

udmabuf write issue from firmware/pci #84

Open
njsys opened this issue Jan 17, 2022 · 4 comments
Open

udmabuf write issue from firmware/pci #84

njsys opened this issue Jan 17, 2022 · 4 comments

Comments

@njsys
Copy link

njsys commented Jan 17, 2022

we used 4MB udmabuf to read and write from firmware to host(linux) memory successfully on hardware configuration1 for a while.
Also we are able to read and write to udmabuf with linux test programs in the host. So both the firmware writes and host writes work.

Now we have new piece of hardware configuration and we are seeing strange/different behavior.
In the new hardware we are still able to read and write completely to udmabuf with linux test programs in the host.
HOWEVER, the firmware/PCI writes are not working properly with the new hardware. We see that even if we are writing 10000 bytes from firmware, only the last 80 bytes are written to the udmabuf space when we read it on linux host. What happened to the remaining bytes being written from firmware to udmabuf?

Does anyone know what could be going wrong here or any debugging tips?
thanks

@ikwzm
Copy link
Owner

ikwzm commented Jan 17, 2022

Thank you for the issue.

What CPU are you running u-dma-buf?

u-dma-buf supports cache control only on ARM or ARM64.
x86 or amd86 does not support cache control. (Please read the Readme.md)

@njsys
Copy link
Author

njsys commented Jan 17, 2022

x86_64

@njsys
Copy link
Author

njsys commented Jan 17, 2022

in that case at driver level is it possible to write debug print statements to see what is being received by the kernel and monitor that in dmesg?

@ikwzm
Copy link
Owner

ikwzm commented Jan 17, 2022

It's very difficult.
It is difficult for the Linux Kernel to detect when a device on the PCI side accesses memory or cache.

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