summaryrefslogtreecommitdiff
path: root/drivers/platform/mellanox/mlxbf-bootctl.h
AgeCommit message (Collapse)AuthorFilesLines
2023-08-23mlxbf-bootctl: Support sysfs entries for MFG fieldsDavid Thompson1-0/+8
This patch extends the mlxbf-bootctl driver's sysfs entries to support read and write access for the manufacturing (MFG) fields in the board-level EEPROM. The MFG fields are set once during the board manufacturing phase, and then the MFG fields are write-protected. Signed-off-by: David Thompson <davthompson@nvidia.com> Reviewed-by: Shravan Kumar Ramani <shravankr@nvidia.com> Link: https://lore.kernel.org/r/20230821183939.3229-1-davthompson@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-10mlxbf-bootctl: Support setting the ARM boot state to "OS up"Asmaa Mnebhi1-0/+5
The BlueField has internal registers to store the ARM boot states. Support setting the BlueField ARM boot state to "OS up". Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20230809162857.21243-3-asmaa@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-10mlxbf-bootctl: Support the large icmc write/readAsmaa Mnebhi1-0/+14
Enable reading and writing the size of the memory region associated with the large ICM carveout. The max size of the large ICM carveout is 1TB, has a granularity of 128MB and will be passed and printed in hex. The size unit is MB. Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20230809162857.21243-2-asmaa@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-04-06platform/mellanox: add firmware reset supportKhalil Blaiech1-0/+6
Add a new sysfs to initiate firmware reset in isolation mode. Reviewed-by: David Thompson <davthompson@nvidia.com> Signed-off-by: Khalil Blaiech <kblaiech@nvidia.com> Link: https://lore.kernel.org/r/10da04fa43e8acce5d4ec173e225c28b9e979e4b.1675790783.git.kblaiech@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-15platform/mellanox: Add bootctl driver for Mellanox BlueField SocLiming Sun1-0/+103
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>