arm-trusted-firmware/plat/imx/common
Igor Opaniuk 6d2c502afb feat(imx8m): obtain boot image set for imx8mn/mp
In i.MX8MM/MQ it is possible to have two copies of bootloader in
SD/eMMC and switch between them. The switch is triggered either
by the BootROM in case the bootloader image is faulty OR can be
enforced by the user, and there is API introduced in
9ce232fe ("feat(plat/imx8m): add SiP call for secondary boot"),
which leverages this SoC feature.

However neither i.MX8MP nor i.MX8MN have a dedicated bit
which indicates what boot image set is currently booted.
According to AN12853 [1] "i.MX ROMs Log Events", it is
possible to determine whether fallback event occurred
by parsing the BootROM event log. In case ROM event ID 0x51 is
present,fallback event did occur and secondary boot image was booted.

Knowing which boot image was booted might be useful for reliable
bootloader A/B updates, detecting fallback event might be used for
making decision if boot firmware rollback is required.

This patche introduces implementation, that replicates the same
imx_src_handler() behaviour as on i.MX8MM/MQ SoCs.

The code is based on original U-Boot implementation [2].

[1]: https://www.nxp.com/webapp/Download?colCode=AN12853
[2]: a5ee05cf71

Change-Id: I9a4c5229aa0e53fa23b5261459da99cb3ce6bdbe
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2024-01-26 08:51:27 +01:00
..
aarch32 refactor(console): disable getc() by default 2023-10-11 08:40:14 +02:00
include feat(imx8m): obtain boot image set for imx8mn/mp 2024-01-26 08:51:27 +01:00
sci fix: remove useless "return" at void functions 2023-02-16 15:15:30 +02:00
imx7_clock.c imx7: imx7_clock: usb: Initialize the USB core clocks 2018-09-04 13:36:23 +01:00
imx8_helpers.S Add plat_crash_console_flush to platforms without it 2018-10-25 09:56:09 +01:00
imx8_psci.c imx: power optimization for i.mx8qm 2019-01-29 09:26:41 +08:00
imx8_topology.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
imx_aips.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
imx_caam.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
imx_clock.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
imx_csu.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
imx_ehf.c plat: imx: add sdei support for i.MX8MM 2020-08-06 07:10:21 +00:00
imx_io_mux.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
imx_io_storage.c refactor(plat/imx/imx): make imx io-storage logic for TBBR/FIP common 2021-09-14 21:42:01 +08:00
imx_sdei.c plat: imx: add sdei support for i.MX8MM 2020-08-06 07:10:21 +00:00
imx_sip_handler.c feat(imx8m): obtain boot image set for imx8mn/mp 2024-01-26 08:51:27 +01:00
imx_sip_svc.c feat(imx8m): obtain boot image set for imx8mn/mp 2024-01-26 08:51:27 +01:00
imx_snvs.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
imx_uart_console.S refactor(console): disable getc() by default 2023-10-11 08:40:14 +02:00
imx_wdog.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
lpuart_console.S refactor(console): disable getc() by default 2023-10-11 08:40:14 +02:00
plat_imx8_gic.c plat: imx: add sdei support for i.MX8MM 2020-08-06 07:10:21 +00:00