Skip to content

hselasky/usb4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Scott Longhselasky
Scott Long
and
Oct 17, 2022
316c1eb · Oct 17, 2022
Aug 4, 2021
Jun 30, 2022
Oct 3, 2022
Oct 12, 2022
Oct 16, 2022
Oct 12, 2022
Oct 11, 2022
Oct 27, 2021
Oct 1, 2022
Aug 3, 2022
Oct 16, 2022
Oct 2, 2022
Oct 11, 2022
Oct 3, 2022
Oct 11, 2022
Sep 6, 2022
Oct 15, 2022
Oct 14, 2022
Oct 17, 2022
Oct 2, 2022
Oct 7, 2022
Oct 12, 2022
Oct 13, 2022
Oct 17, 2022
Aug 23, 2022
Dec 19, 2017
Sep 7, 2022
Sep 21, 2021
Jun 7, 2019
May 30, 2022
Jan 1, 2022
Jun 9, 2018
Nov 18, 2021
Oct 6, 2022
Oct 5, 2022
Aug 11, 2022
Dec 5, 2017
Oct 15, 2022
Oct 17, 2022
Oct 11, 2022
Jun 10, 2022

Repository files navigation

USB4 / Thunderbolt 3

This implements a basic kernel driver and userland tool for USB4 and Thunderbolt3. The relevant code is in the following locations:

  • sys/dev/thunderbolt
  • sys/modules/thunderbolt
  • usr.sbin/tbtconfig

This code has been developed against Alpine Ridge and Icelake Thunderbolt3 controllers. Other controllers could be supported, but additions will be required. Also, a full Host Connection Manager does not yet exist, only the building blocks, so full USB4 functionality does not work yet.

Besides implementing a driver for the NHI control device, this stack also overrides the PCIB drivers that belong to Thunderbolt/USB4 switches (upstream and downstream ports) so that protocol-specific configuration can be peformed without having to hack existing PCIe drivers or cross scope boundaries in the drivers.

The Thunderbolt security model is minimally supported. If User Authentication is specified in the BIOS, then the driver will automatically authenticate any device that is presented. There's a sysctl to turn this off. True user-interactive authentication is not implemented, but could be with minimal effort. Pre-shared key authentication is also not supported.

DMAR intergration is needed in order to have a useful security/protection model. Also, DPC is needed, as well as plenty of work on the PCIe attach / detach routines of FreeBSD and many of its drivers.