cambridgehackers / connectal

Connectal is a framework for software-driven hardware development.
MIT License
159 stars 46 forks source link

Replace XDMA driver with latest Xilinx upstream #173

Closed jrtc27 closed 4 years ago

jrtc27 commented 4 years ago

The AWS-provided drivers are old and have since-fixed bugs[1]. Whilst doing this, clearly annotate every change made locally for Connectal so future updates are easy to do.

Note that upstream now only maps the single BAR if XDMA_CONFIG_BAR_NUM is defined, so we now map the BARs ourselves if they are not yet mapped.

[1] https://github.com/Xilinx/dma_ip_drivers/commit/d1f334b1372dbd7f2fa6f28a31b496779119f8d7

Also includes a change to portalmem.c I needed to make for it to compile out of the box on the AWS FPGA developer AMI (kernel versions 3.10.0-1062.4.1.el7.x86_64 and 3.10.0-1127.13.1.el7.x86_64).