This is a minimal implementation based on [1] that matches the existing
code style for handling the page crossing edge case. Previously only one
place in the code correctly handled adjacent descriptors crossing a page
boundary, but now that code is copied to the other relevant places too.
We hit this case when attempting to re-load ELF files after a few
attempts, at least with my CheriBSD image.
This is a minimal implementation based on [1] that matches the existing code style for handling the page crossing edge case. Previously only one place in the code correctly handled adjacent descriptors crossing a page boundary, but now that code is copied to the other relevant places too.
We hit this case when attempting to re-load ELF files after a few attempts, at least with my CheriBSD image.
[1] https://github.com/Xilinx/dma_ip_drivers/pull/49