-
Notifications
You must be signed in to change notification settings - Fork 21
Home
The Linux DFL driver provides support for FPGA devices that are designed to support the Device Feature List. The DFL, which is implemented in RTL, consists of a self-describing data structure in the PCI BAR space that allows the DFL driver to automatically load the drivers required for a given FPGA configuration.
The fpga-upstream-dev branch consists of patches that Intel is currently in the process of submitting to the upstream linux kernel. Consistent with the upstreaming process, this branch will be rebased for each new version of the mainline linux kernel. The current convention is to rebase these patches onto the latest *-rc1 kernel. The first version of the fpga-upstream-dev branch is based on 5.7-rc1. When advancing to a new version, older versions will be renamed to append the version number (e.g. fpga-upstream-dev-5.7-rc1) and will be kept around as a reference.
The fpga-ofs-dev branch is provided as a service to Intel customers to facilitate their driver development for Intel FPGA based products. This branch consists of a set of patches on top of the fpga-upstream-dev branch. Most of these additional patches will eventually be submitted upstream, but should be considered "not fully baked". They will likely be refined or replaced before they are moved into fpga-upstream-dev and eventually submitted to the upstream linux community.
Note that because fpga-ofs-dev sits on top fpga-upstream-dev, it is rebased every time fpga-upstream-dev changes. To facilitate comparison with previous versions of fpga-ofs-dev, older versions are archived with the date appended to the name (e.g. fpga-ofs-dev-2021-03-04)
When advancing to a new kernel version, older versions of fpga-ofs-dev will be renamed to append the kernel version. Unlike the fpga-upstream-dev branches, saved versions of the fpga-ofs-dev branches will be based on the the *.0 kernel version. For example, when the 5.11-rc1 version of fpga-upstream-dev was saved aside as fpga-upstream-dev-5.11-rc1, fpga-ofs-dev was rebased onto kernel version 5.11.0, and was archived as fpga-ofs-dev-5.11.0.
The most recent long term support (LTS) kernel will be maintained with both bug fixes and new functionality. The naming for these branches will include "-lts" (e.g. fpga-ofs-dev-5.10-lts).
The fpga-ofs-dev-5.10-lts branch was created from the 5.10-rc1 version of fpga-ofs-dev at the time that fpga-ofs-dev transitioned to the 5.11.rc1 kernel. As such, the content of the DFL driver patches included on this branch may become stale with respect to the upstreaming version of the same patches over time. The most recent LTS branch will receive functionality updates and bug fixes in the form of additional patches until the next LTS upstream kernel has been released. LTS branches are not rebasing branches: they will maintain a consistent patch history.
The latest LTS branch will be merged with the latest stable kernel version on about a two week cadence. For example, at the time of this writing, the fpga-ofs-dev-5.10-lts branch is based on kernel version 5.10-19. The process of doing these merges introduces hundreds of new patches that can obscure the DFL driver patch history. In order to identify and harvest the DFL driver patches from an LTS branch, use the --first-parent option of git log. With the --first-parent option, each merge is represented with a single entry in the git log output, making it easier to track the DFL driver specific patches:
$ git log --oneline --first-parent github/fpga-ofs-dev-5.10-lts
96c1297e8fa2 fpga: dfl: fix the kernel warning when release/assign ports for SRIOV
69b7f854e746 Revert "REVERTME: fpga: dfl: init needs_suppliers after disabling sriov"
**4fe7948e1af3 Merge stable kernel version 5.10.19**
d847e0bf1ef2 mfd: intel-m10-bmc: Handle d5005 fw handshake registers
45f184b3818b mfd: intel-m10-bmc: Fix n3000 telemetry address range
45981cde2097 fpga: m10bmc-sec: Add missing line-return to error message
a72e98b23173 fpga: m10bmc-sec: fix count parameter to regmap_bulk_write
ba400137b3da fpga: m10bmc-sec: fix rsu_check_complete criteria
1a719208550a fpga: sec-mgr: move sysfs security sub-directory
**467631253a98 Merge stable kernel version 5.10.16**
9a41bdd57ea0 fpga: dfl: Update the dfl emif driver support revision 1
a970418b023b fpga: dfl: Move DFH header register macros to linux/dfl.h
**72484e87d7a6 Merge stable kernel version 5.10.12**
c7f2b81d6219 drivers: fpga: dfl: handle empty port list
bcf34c12b61a drivers: fpga: dfl-pci: Add PCIE device ID for OFS
In order to filter out the stable kernel updates completely, add the --no-merges option to the command line. For example, you can get a complete listing of the DFL patches from the 5.10-lts kernel with this command:
$ git log --oneline --first-parent --no-merges v5.10.4..github/fpga-ofs-dev-5.10-lts
96c1297e8fa2 fpga: dfl: fix the kernel warning when release/assign ports for SRIOV
69b7f854e746 Revert "REVERTME: fpga: dfl: init needs_suppliers after disabling sriov"
d847e0bf1ef2 mfd: intel-m10-bmc: Handle d5005 fw handshake registers
45f184b3818b mfd: intel-m10-bmc: Fix n3000 telemetry address range
45981cde2097 fpga: m10bmc-sec: Add missing line-return to error message
a72e98b23173 fpga: m10bmc-sec: fix count parameter to regmap_bulk_write
ba400137b3da fpga: m10bmc-sec: fix rsu_check_complete criteria
1a719208550a fpga: sec-mgr: move sysfs security sub-directory
Note that the port to the 5.10-lts kernel began with kernel version 5.10.4, as reflected in the above command.
The fpga-ofs-dev* branches each contain a configs directory at the top level of the kernel source tree. The n3000_d5005_defconfig file contains the configuration parameters that are required to enable the features that are provided by the linux DFL driver. The readme.txt file in the same directory explains how to modify your current kernel configuration to incorporate these new parameters.
The CONFIG_LOCALVERSION option can be used to modify the kernel version string to differentiate the kernel you build from a stock kernel build of the same base version. For example, if you use the following option when building a 5.8.0 kernel, the resulting kernel will have a version string of "5.8.0-dfl".
CONFIG_LOCALVERSION="-dfl"
Note: If you are starting with a kernel configuration file from a significantly different kernel version (e.g. 3.14 vs 5.7), then you may see warning messages associated with configuration parameters that have changed or been removed between kernel versions. Be sure to evaluate any warning messages to determine if additional configuration changes are required to maintain your desired set of features.
To use SRIOV and pass a VF to a virtual machine, you must add intel_iommu=on to the kernel command line.
When using SRIOV, it may also be necessary to add pci=realloc to the kernel command line. For additional information regarding this command line option, see https://access.redhat.com/solutions/37376. configuration.
The kernel Makefile supports build targets for building .rpm and .deb packages:
- rpm-pkg: Build both source and binary RPM kernel packages
- binrpm-pkg: Build only the binary kernel RPM package
- deb-pkg: Build both source and binary deb kernel packages
- bindeb-pkg: Build only the binary kernel deb package
If you are concerned about the size of the resulting package and binaries, you can significantly reduce the size of the package and object files by setting the make variable INSTALL_MOD_STRIP. For example:
make INSTALL_MOD_STRIP=1 binrpm-pkg
- Introduction to FPGA Frameworks
- FPGA Bridge
- FPGA Region
- FPGA Manager
- In-kernel API for FPGA Programming
- FPGA Device Feature List (DFL) Framework
- N3000 Nios Private Feature Driver
- FPGA Security Manager Class Driver
- Documentation/ABI/testing/sysfs-class-fpga-bridge
- Documentation/ABI/testing/sysfs-class-fpga-manager
- Documentation/ABI/testing/sysfs-class-fpga-region
- Documentation/ABI/testing/sysfs-class-fpga-sec-mgr
- Documentation/ABI/testing/sysfs-class-net-dfl-eth-group
- Documentation/ABI/testing/sysfs-bus-dfl
- Documentation/ABI/testing/sysfs-platform-dfl-fme
- Documentation/ABI/testing/sysfs-bus-dfl-devices-emif
- Documentation/ABI/testing/sysfs-bus-dfl-devices-n3000-nios
- Documentation/ABI/testing/sysfs-driver-intel-m10-bmc
- Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-secure
- Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-pkvl
- Documentation/ABI/testing/sysfs-bus-vfio-mdev
- Documentation/ABI/testing/sysfs-bus-pci
DFL devices do not use device tree, but the following device tree documentation provides a lot of useful information about FPGA regions and bridges.