FreeBSD Might Get A Linux Kernel API Wrapper To Help Porting Linux Drivers
Written by Michael Larabel in BSD on 7 November 2014 at 02:58 PM EST. 62 Comments
BSD --
In a discussion about porting the modern Nouveau open-source NVIDIA driver to FreeBSD, it was brought up that a FreeBSD developer is looking at the possibility of introducing a Linux kernel API wrapper to help in porting Linux drivers to FreeBSD.

There's been a discussion this week about FreeBSD support for Nouveau. Nouveau isn't really necessary for NVIDIA graphics hardware support like it is for porting the Intel and AMD Radeon drivers since NVIDIA maintains their closed-source driver for FreeBSD too... Albeit proprietary, NVIDIA provides high-performance OpenGL support via their FreeBSD binary driver that's on par with their Solaris and Linux drivers. For Intel/AMD BSD support, it's been up to porting the Linux DRM/KMS drivers and their Mesa/Gallium3D user-space code for experiencing 3D acceleration.

Anyhow, there's still users pursuing Nouveau on FreeBSD for having open-source graphics support within their kernel. Right now it's a bit of a mess with most of the Linux-ported code being from around 3.8 kernel (for the OpenBSD and DragonFlyBSD driver ports too) since many code changes are needed for interface differences between Linux and BSD when it comes to memory management, PCI, etc. Right now it's a big burden to port the drivers from the mainline Linux kernel to the BSDs, but Jean-Sébastien Pédron is looking at potentially a different approach.

Jean-Sébastien Pédron is working out a proposal for introducing a possible Linux kernel API wrapper that would wrap the common Linux kernel APIs around the respective FreeBSD kernel functions, which in turn would reduce the number of changes needed in porting Linux DRM/KMS code. Jean-Sébastien wrote, "I'm preparing a proposal to have some sort of Linux kernel API wrapper above FreeBSD facilities to reduce the diff with Linux and help with porting new drivers."
Related News
About The Author
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week