diff options
author | Liming Sun <lsun@mellanox.com> | 2019-10-07 17:48:46 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-10-15 09:55:10 +0200 |
commit | 79e29cb8fbc5c568358989327a164257b05cc608 (patch) | |
tree | 8bacd81b37987d6cc94b9f2767bb6e8acd0d5c9e /drivers/platform/mellanox/Kconfig | |
parent | platform/x86: classmate-laptop: remove unused variable (diff) | |
download | linux-79e29cb8fbc5c568358989327a164257b05cc608.tar.xz linux-79e29cb8fbc5c568358989327a164257b05cc608.zip |
platform/mellanox: Add bootctl driver for Mellanox BlueField Soc
This commit adds the bootctl platform driver for Mellanox BlueField
Soc, which queries secure state and controls the eMMC boot partition
swapping by sending SMC calls to ATF running at EL3.
Below are the sequences of typical use case.
1. User requests boot partition swapping, which could be on-demand or
during boot-image upgrade via UEFI capsule;
2. This bootctl driver handles the request and sends SMC call
to ATF. ATF programs register BREADCRUMB0 which has value
preserved during warm reset. It also programs eMMC to swap
the boot partition;
3. After software reset (rebooting), ATF BL1 (BootRom) checks
register BREADCRUMB0 and enable watchdog if configured;
4. If booting fails, the watchdog timer will trigger rebooting.
In such case, ATF Boot ROM will switch the boot partition
back to the previous one. This is a robust feature and used
to prevent failure during boot partition upgrade.
Reviewed-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform/mellanox/Kconfig')
-rw-r--r-- | drivers/platform/mellanox/Kconfig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/platform/mellanox/Kconfig b/drivers/platform/mellanox/Kconfig index 530fe7e31397..386336d1e48b 100644 --- a/drivers/platform/mellanox/Kconfig +++ b/drivers/platform/mellanox/Kconfig @@ -44,4 +44,16 @@ config MLXBF_TMFIFO platform driver support for the TmFifo which supports console and networking based on the virtio framework. +config MLXBF_BOOTCTL + tristate "Mellanox BlueField Firmware Boot Control driver" + depends on ARM64 + depends on ACPI + help + The Mellanox BlueField firmware implements functionality to + request swapping the primary and alternate eMMC boot partition, + and to set up a watchdog that can undo that swap if the system + does not boot up correctly. This driver provides sysfs access + to the userspace tools, to be used in conjunction with the eMMC + device driver to do necessary initial swap of the boot partition. + endif # MELLANOX_PLATFORM |