Lines Matching +full:pcie +full:- +full:host +full:- +full:1
1 .. SPDX-License-Identifier: GPL-2.0
8 manager is an entity running on the host router (host controller)
19 ``user`` which means PCIe tunneling is disabled by default. The
25 -----------------------------------
27 should be a userspace tool that handles all the low-level details, keeps
31 found in ``Documentation/ABI/testing/sysfs-bus-thunderbolt``.
35 ``/etc/udev/rules.d/99-local.rules``::
37 ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"
46 be DMA masters and thus read contents of the host memory without CPU and OS
50 Some USB4 systems have a BIOS setting to disable PCIe tunneling. This is
75 USB. No PCIe tunneling is done. In BIOS settings this is
80 Display Port in a dock. All PCIe links downstream of the dock are
84 PCIe tunneling is disabled/forbidden from the BIOS. Available in some
89 the Thunderbolt domain the host controller manages. There is typically
90 one domain per Thunderbolt host controller.
93 device must be authorized by the user before PCIe tunnels are created
94 (e.g the PCIe device appears).
102 -----------------------------------------------------------------
105 /sys/bus/thunderbolt/devices/0-1/authorized - 0
106 /sys/bus/thunderbolt/devices/0-1/device - 0x8004
107 /sys/bus/thunderbolt/devices/0-1/device_name - Thunderbolt to FireWire Adapter
108 /sys/bus/thunderbolt/devices/0-1/vendor - 0x1
109 /sys/bus/thunderbolt/devices/0-1/vendor_name - Apple, Inc.
110 /sys/bus/thunderbolt/devices/0-1/unique_id - e0376f00-0300-0100-ffff-ffffffffffff
112 The ``authorized`` attribute reads 0 which means no PCIe tunnels are
115 # echo 1 > /sys/bus/thunderbolt/devices/0-1/authorized
117 This will create the PCIe tunnels and the device is now connected.
121 a random 32-byte value used for authorization and challenging the device in
124 /sys/bus/thunderbolt/devices/0-3/authorized - 0
125 /sys/bus/thunderbolt/devices/0-3/device - 0x305
126 /sys/bus/thunderbolt/devices/0-3/device_name - AKiTiO Thunder3 PCIe Box
127 /sys/bus/thunderbolt/devices/0-3/key -
128 /sys/bus/thunderbolt/devices/0-3/vendor - 0x41
129 /sys/bus/thunderbolt/devices/0-3/vendor_name - inXtron
130 /sys/bus/thunderbolt/devices/0-3/unique_id - dc010000-0000-8508-a22d-32ca6421cb16
134 If the user does not want to use secure connect they can just ``echo 1``
135 to the ``authorized`` attribute and the PCIe tunnels will be created in
141 # key=$(openssl rand -hex 32)
142 # echo $key > /sys/bus/thunderbolt/devices/0-3/key
143 # echo 1 > /sys/bus/thunderbolt/devices/0-3/authorized
145 Now the device is connected (PCIe tunnels are created) and in addition
151 # echo $key > /sys/bus/thunderbolt/devices/0-3/key
152 # echo 2 > /sys/bus/thunderbolt/devices/0-3/authorized
155 on the key, the device is connected and the PCIe tunnels are created.
160 the device without a key or write a new key and write 1 to the
163 De-authorizing devices
164 ----------------------
165 It is possible to de-authorize devices by writing ``0`` to their
168 ``deauthorization`` attribute. If it reads ``1`` then the feature is
171 When a device is de-authorized the PCIe tunnel from the parent device
172 PCIe downstream (or root) port to the device PCIe upstream port is torn
173 down. This is essentially the same thing as PCIe hot-remove and the PCIe
180 ------------------------------
186 systems can be identified by reading ``1`` from
197 …SYSTEM=="thunderbolt", ATTRS{iommu_dma_protection}=="1", ATTR{authorized}=="0", ATTR{authorized}="…
199 Upgrading NVM on Thunderbolt device, host or retimer
200 ----------------------------------------------------
202 host controller or a device, it is important that the firmware can be
211 Before you upgrade firmware on a device, host or retimer, please make
216 Host NVM upgrade on Apple Macs is not supported.
219 Thunderbolt device so that the host controller appears. It does not
221 device - then you need to connect that particular device).
223 Note an OEM-specific method to power the controller up ("force power") may
227 After that we can write the firmware to the non-active parts of the NVM
228 of the host or device. As an example here is how Intel NUC6i7KYK (Skull
231 # dd if=KYK_TBT_FW_0018.bin of=/sys/bus/thunderbolt/devices/0-0/nvm_non_active0/nvmem
236 # echo 1 > /sys/bus/thunderbolt/devices/0-0/nvm_authenticate
238 If no errors are returned, the host controller shortly disappears. Once
240 After a while the host controller appears again and this time it should
246 # cat /sys/bus/thunderbolt/devices/0-0/nvm_authenticate
248 # cat /sys/bus/thunderbolt/devices/0-0/nvm_version
259 Upgrading on-board retimer NVM when there is no cable connected
260 ---------------------------------------------------------------
267 # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/offline
273 # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/rescan
275 This enumerates and adds the on-board retimers. Now retimer NVM can be
278 mode) so after writing ``1`` to ``nvm_authenticate`` one should wait for
281 # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/rescan
286 # echo 0 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/offline
288 Upgrading NVM when host controller is in safe mode
289 --------------------------------------------------
291 host controller goes into safe mode which means that the only available
297 host controller in the same way it is done in the previous chapter.
300 ---------------------------------
307 If the other host is running Windows or macOS, the only thing you need to
309 ``thunderbolt-net`` driver is loaded automatically. If the other host is
310 also Linux you should load ``thunderbolt-net`` manually on one host (it
313 # modprobe thunderbolt-net
315 This triggers module load on the other host automatically. If the driver
316 is built-in to the kernel image, there is no need to do anything.
324 -------------
330 For example the intel-wmi-thunderbolt driver exposes this attribute in:
331 /sys/bus/wmi/devices/86CCFD48-205E-4A77-9C48-2021CBEDE341/force_power
333 To force the power to on, write 1 to this attribute file.