linux/drivers/thunderbolt
Mika Westerberg e6b245ccd5 thunderbolt: Add support for host and device NVM firmware upgrade
Starting from Intel Falcon Ridge the NVM firmware can be upgraded by
using DMA configuration based mailbox commands. If we detect that the
host or device (device support starts from Intel Alpine Ridge) has the
DMA configuration based mailbox we expose NVM information to the
userspace as two separate Linux NVMem devices: nvm_active and
nvm_non_active. The former is read-only portion of the active NVM which
firmware upgrade tools can be use to find out suitable NVM image if the
device identification strings are not enough.

The latter is write-only portion where the new NVM image is to be
written by the userspace. It is up to the userspace to find out right
NVM image (the kernel does very minimal validation). The ICM firmware
itself authenticates the new NVM firmware and fails the operation if it
is not what is expected.

We also expose two new sysfs files per each switch: nvm_version and
nvm_authenticate which can be used to read the active NVM version and
start the upgrade process.

We also introduce safe mode which is the mode a switch goes when it does
not have properly authenticated firmware. In this mode the switch only
accepts a couple of commands including flashing a new NVM firmware image
and triggering power cycle.

This code is based on the work done by Amir Levy and Michael Jamet.

Signed-off-by: Michael Jamet <michael.jamet@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-09 11:42:43 +02:00
..
cap.c thunderbolt: Rework capability handling 2017-06-09 11:42:41 +02:00
ctl.c thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
ctl.h thunderbolt: Rework control channel to be more reliable 2017-06-09 11:42:43 +02:00
dma_port.c thunderbolt: Add support for DMA configuration based mailbox 2017-06-09 11:42:43 +02:00
dma_port.h thunderbolt: Add support for DMA configuration based mailbox 2017-06-09 11:42:43 +02:00
domain.c thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
eeprom.c thunderbolt: Add support for DMA configuration based mailbox 2017-06-09 11:42:43 +02:00
icm.c thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
Kconfig thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
Makefile thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
nhi_regs.h thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
nhi.c thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
nhi.h thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
path.c thunderbolt: Clear hops before overwriting 2014-08-26 14:54:48 -07:00
switch.c thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
tb_msgs.h thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
tb_regs.h thunderbolt: Rework capability handling 2017-06-09 11:42:41 +02:00
tb.c thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
tb.h thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
tunnel_pci.c thunderbolt: Introduce thunderbolt bus and connection manager 2017-06-09 11:42:41 +02:00
tunnel_pci.h thunderbolt: Add support for simple pci tunnels 2014-06-19 14:07:47 -07:00