April 11, 2022
The FreeBSD Foundation Technology Team and grant recipients have been busy over the first 3 months of 2022. Take a look at the status of the latest development projects and see what’s coming later in the year. For a more broad look at the Foundation’s plan for software development over the coming year, check out the Technology Roadmap.
Intel Wireless Driver Support and LinuxKPI 802.11 Compatibility Layer
The Foundation has been sponsoring Bjoern Zeeb to improve wireless support on FreeBSD. The goals of this project are two-fold. The first is to improve the mac80211 LinuxKPI compatibility code and the second is to add support for newer chipsets. This second goal is much more attainable given the work on the LinuxKPI compatibility code in that new (and suitably licensed) Linux drivers can be imported into FreeBSD without major modification. When code modifications are necessary for importing into FreeBSD, these changes have often been kindly accepted into the upstream driver.
During the first quarter of 2022, work continued with about 70 commits. Updating the driver and firmware reduced differences to the Linux version and gave us bug fixes and other improvements. Work on the LinuxKPI 802.11 compatibility layer continued, which most notably allows many contemporary Intel wireless cards to work out-of-the-box on FreeBSD 13.1 and CURRENT. Other commits included fixes to avoid firmware crashes and possible panics.
Auto-loading support for LinuxKPI PCI drivers was committed. This means that iwlwifi(4) will now load automatically during boot if a supported card is detected without any user interactions. Considering the current state of the driver and the next release, the decision was made to have the iwm(4) supported chipsets continue for now to attach to iwm(4) and only newer and otherwise unsupported chipsets will use the iwlwifi(4) driver. This is likely going to change in CURRENT as soon as iwlwifi(4) provides better support than iwm(4). The code was merged to the stable/13 branch and the current state will be shipped with the upcoming 13.1-RELEASE.
FreeBSD WireGuard Driver
John Baldwin continues his work to improve FreeBSD support for the WireGuard VPN tunnel, with changes in both FreeBSD and in the WireGuard kernel module. On the FreeBSD side, support was added for the XChaCha20-Poly1305 AEAD cipher and a dedicated API for [X]ChaCha20-Poly1035 on small, flat buffers. Lastly, an API wrapper for the curve25519 implementation from libsodium was committed. For the WireGuard driver, John wrote a series of patches which updates the driver to use crypto APIs such as those mentioned above in place of internal cipher implementations. The series also includes a fix to avoid scheduling excessive crypto tasks as well as a few other small fixes. This series is pending review.
FreeBSD on Framework Laptops
Two Foundation staff members, Ed Maste and Mark Johnston, as well as a few developers and community members now each have access to Framework laptops, which are designed to make hardware upgrades, repairs, and customizations straightforward for the average user. The goal of this work is to ensure that the experience running FreeBSD on the laptops matches the stability that FreeBSD users expect.
Recent improvements and fixes include:
- making audio switch appropriately between speakers and the headphone jack when headphones are plugged in or unpluged
- A fix for bug 259230, which would cause a Framework laptop to reboot or power off when the touchpad was used.
- Adding the Tempo Semiconductor 92HD95B HDA codec ID.
- A temporary fix for stalling usb enumeration, bluetooth, and S3 resume. The temporary fix is to avoid attaching to several newer Intel controllers, which require firmware to be loaded, which is different from that implemented by ng_ubt_intel and iwmbtfw, so they are not usable yet.
- Avoid a 16 second boot delay, by probing the TSC frequency earlier. This lets us use the TSC to implement early DELAY, limiting the use of the sometimes-unreliable 8254 PIT.
- With the recent mac80211 LinuxKPI improvements described earlier, the wireless card, which uses the AX210 chipset, works reliably.
You can follow news about FreeBSD work on the Framework laptop at: https://wiki.freebsd.org/Laptops/Framework_Laptop.
Upcoming Projects
Two other Foundation-sponsored projects have recently begun.
Multiprocess support for LLDB
Moritz Systems will continue their debugging work by adding multiprocess support to LLDB. This will include three milestones.
1. Add support for the non-stop variant of the GDB Remote Serial Protocol.
2. Extend multiprocess support to all GDB Remote Serial Protocol commands implemented by lldb-server.
3. Add support for multiprocess in the LLDB client through multiplexing multiple targets through a single GDB Remote Serial Protocol connection.
Project completion is expected in early August.
Handbook Revitalization
The FreeBSD Handbook needs revitalization. Many FreeBSD components are either not documented or the documentation is outdated. As such, the Foundation has contracted Pau Amma to begin this work. The first goal for the project is to determine what work needs to be done to make the Handbook a better resource, so that both new and seasoned FreeBSD users can easily find quality instruction to set up and configure a FreeBSD system. Pau also plans to make the Handbook more accessible for those using screen readers or mouseless systems.