OSDN Git Service

platform/mellanox: Add bootctl driver for Mellanox BlueField Soc
authorLiming Sun <lsun@mellanox.com>
Mon, 7 Oct 2019 15:48:46 +0000 (11:48 -0400)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 15 Oct 2019 07:55:10 +0000 (10:55 +0300)
commit79e29cb8fbc5c568358989327a164257b05cc608
tree8bacd81b37987d6cc94b9f2767bb6e8acd0d5c9e
parente3008bf46ce0baf617cfd1b68d35e433dc603e43
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>
Documentation/ABI/testing/sysfs-platform-mellanox-bootctl [new file with mode: 0644]
MAINTAINERS
drivers/platform/mellanox/Kconfig
drivers/platform/mellanox/Makefile
drivers/platform/mellanox/mlxbf-bootctl.c [new file with mode: 0644]
drivers/platform/mellanox/mlxbf-bootctl.h [new file with mode: 0644]