Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my Linux system with over 16 GB of RAM, I would like to allocate about 100 MB of space, which:
- is physically contiguous. Ideally, all the 100MB would be physically contiguous, but I'm also OK with using HUGEPAGEs so that each 2MB is physically contiguous.
- can be used as a DMA target, with the 32 bit PCI space, not the 64 bit.This will allow us to use the shorter header for the PCIe transactions which saves a bit of bandwidth.
- is accessible from userspace programs (not just from kernel drivers).
I think the use of HUGEPAGEs and mmap can achieve the 1st (partial contiguity up to 2 MB at a time) and 3rd constraints (user space access through mmap), but I'm not sure how to ensure that the 2nd constraint (32 bit DMA) is guaranteed.
I don't argue with people on the internet, so let me just ask a question. If the device doing the DMA handles 64 bit addresses, what are you planning on putting in the top 32?
When I try using pci_set_dma_mask(32), and then pci_map_sg() on a page, it returns a failure, even for small sizes. So, it doesn't sound like this scheme will work, although I can't explain why.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.