• Liming Sun's avatar
    platform/mellanox: Add bootctl driver for Mellanox BlueField Soc · 79e29cb8
    Liming Sun authored
    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: default avatarVadim Pasternak <vadimp@mellanox.com>
    Signed-off-by: default avatarLiming Sun <lsun@mellanox.com>
    Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
    79e29cb8
sysfs-platform-mellanox-bootctl 2.16 KB