hselasky / usb4

USB4 / Thunderbolt 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

USB4 / Thunderbolt 3

License:Other


Languages

Language:C 62.7%Language:C++ 24.0%Language:Roff 5.0%Language:Shell 2.8%Language:Assembly 1.7%Language:Makefile 1.3%Language:Perl 0.8%Language:HTML 0.3%Language:M4 0.3%Language:Python 0.3%Language:Yacc 0.2%Language:DTrace 0.2%Language:NASL 0.2%Language:Objective-C 0.1%Language:Awk 0.1%Language:Lex 0.0%Language:CMake 0.0%Language:Lua 0.0%Language:Forth 0.0%Language:RPC 0.0%Language:Scilab 0.0%Language:C# 0.0%Language:CSS 0.0%Language:Java 0.0%Language:AGS Script 0.0%Language:Raku 0.0%Language:Julia 0.0%Language:Batchfile 0.0%Language:GAP 0.0%Language:Ruby 0.0%Language:Emacs Lisp 0.0%Language:Tcl 0.0%Language:1C Enterprise 0.0%Language:Starlark 0.0%Language:Pawn 0.0%Language:Smarty 0.0%Language:TeX 0.0%Language:Vim Script 0.0%Language:sed 0.0%Language:PostScript 0.0%Language:Gnuplot 0.0%Language:PowerShell 0.0%Language:GDB 0.0%Language:Turing 0.0%Language:SWIG 0.0%Language:DIGITAL Command Language 0.0%Language:Haskell 0.0%Language:KRL 0.0%Language:Scheme 0.0%Language:Max 0.0%Language:Brainfuck 0.0%Language:IGOR Pro 0.0%Language:Reason 0.0%Language:OpenEdge ABL 0.0%Language:JavaScript 0.0%Language:D 0.0%Language:Module Management System 0.0%Language:PHP 0.0%Language:R 0.0%Language:SmPL 0.0%Language:Rebol 0.0%Language:Dockerfile 0.0%Language:VBScript 0.0%Language:GLSL 0.0%Language:Logos 0.0%Language:Berry 0.0%Language:Stata 0.0%Language:Standard ML 0.0%Language:Nextflow 0.0%Language:ChucK 0.0%Language:E 0.0%Language:Filebench WML 0.0%Language:AMPL 0.0%Language:Pascal 0.0%Language:Terra 0.0%