AMD Proposes An FPGA Subsystem User-Space Interface For Linux

Written by Michael Larabel in AMD on 4 January 2024 at 05:53 AM EST. 8 Comments
AMD
AMD engineers are proposing an FPGA Subsystem User-Space Interface to overcome current limitations of the Linux kernel's FPGA manager subsystem.

AMD-Xilinx engineers are proposing a new sysfs interface for the FPGA subsystem that allows for more user-space control over FPGAs. The suggested interface would handle FPGA configuration, driver probe/remove, bridges, Device Tree Overlay file support for re-programming an FPGA while the operating system is running, and other capabilities for user-space not currently presented by the mainline kernel.

AMD Xilinx SoCs


A "request for comments" issued on the Linux kernel mailing list explained:
The existing FPGA manager subsystem didn't have any user space interface (other than the status/state in sysfs) in Kernel.
Basically, FPGAs are semiconductor devices that can be reprogrammed for desired hardware functionality. FPGAs can be reprogrammed at runtime with different types of logic and IPs as per user need and hence there is a need to use device tree overlays for removing/updating/adding the devices at runtime for the IPs/controllers that are present in FPGA. But we don't have any user interface in kernel for updating the device tree at runtime.

Sometime back there was a series sent by Pantelis Antoniou. This patch introduced a user interface configfs for Device Tree overlays, a method of dynamically altering the kernel's live Device Tree. However, this patch series was not accepted in mainline due to various concerns.

One of the major valid concerns that were raised with this configfs interface was security as it opens up the interface to users for modifying the live device tree.

So, in order to configure/program the FPGA devices, All the major vendors of FPGA are using this configfs series as out-of-tree patch for configuring the FPGAs and there was never an attempt to introduce a generic interface to configure/program the FPGA in upstream and hence upstream kernel ended up in not having proper support for FPGAs.

This proposal from AMD hopes to standardize the FPGA subsystem user-space interface in a manner that is suitable for upstreaming into the mainline Linux kernel. We'll see where this work leads for improving FPGA support on Linux.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week