I'm working on FPGA driver for Linux kernel. Code seems to work fine on x86, but on x86_64 I've got some problems. I implemented streaming DMA. So it goes like
get_user_pages(...);
for (...) {
sg_set_page();
}
pci_map_sg();
But pci_map_sg
returned addresses like 0xbd285800
, which are not aligned by PAGE_SIZE
, so I can't send full first page, because PCIE specification says
"Requests must not specify an Address/Length combination which causes a Memory Space access to cross a 4-KB boundary."
Is there any way to get aligned addresses, or did I just missed something important?