u-boot/arch/arm/mach-imx
Marek Vasut a5ee05cf71 ARM: imx: Pick correct eMMC boot partition from ROM log
In case the iMX8M boot from eMMC boot partition and the primary image
is corrupted, the BootROM is capable of starting a secondary image in
the other eMMC boot partition as a fallback.

However, the BootROM leaves the eMMC BOOT_PARTITION_ENABLE setting as
it was, i.e. pointing to the boot partition containing the corrupted
image, and the BootROM does not provide any indication that this sort
of fallback occured.

According to AN12853 i.MX ROMs Log Events, Rev. 0, May 2020, it is
possible to determine whether fallback event occurred by parsing the
ROM event log. In case ROM event ID 0x51 is present, fallback event
did occur.

This patch implements ROM event log parsing and search for event ID
0x51 for all iMX8M SoCs, and based on that corrects the eMMC boot
partition selection. This way, the SPL loads the remaining boot
components from the same eMMC boot partition from which it was
started, even in case of the fallback.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Harald Seiler <hws@denx.de>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Ye Li <ye.li@nxp.com>
2021-07-10 18:12:42 +02:00
..
imx8 imx: support for conga-QMX8 board 2021-06-09 13:34:09 +02:00
imx8m ARM: imx: Pick correct eMMC boot partition from ROM log 2021-07-10 18:12:42 +02:00
imxrt ARM: IMXRT: introduce is_imxrt*() macros and get_cpu_rev() 2021-06-09 13:03:33 +02:00
mx2 arm: Remove mx25pdk board 2021-02-25 11:59:05 -05:00
mx3 arm: Remove mx31pdk board 2020-07-09 20:58:06 +05:30
mx5 arm: Remove ts4800 board 2021-04-10 08:03:55 -04:00
mx6 imx: Add SeeedStudio NPI-IMX6ULL Support 2021-06-09 13:34:18 +02:00
mx7 mx7d: Add Storopack's SMEGW01 board 2021-06-09 13:34:38 +02:00
mx7ulp caam: enable support for iMX7ULP 2021-04-08 09:18:29 +02:00
mxs arm: Remove ts4600 board 2021-04-10 07:59:35 -04:00
cache.c common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
cmd_bmode.c ARM: imx: Add support for reading out the primary/secondary bmode 2020-08-17 17:55:17 +02:00
cmd_dek.c imx8: Add DEK blob encapsulation 2021-04-08 20:29:52 +02:00
cmd_hdmidet.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cmd_mfgprot.c imx: Avoid hardcoded Job Ring Max size 2021-04-08 09:18:29 +02:00
cmd_nandbcb.c nandbcb: nand support for i.MX8MP 2021-01-23 11:30:31 +01:00
cpu.c imx8mn: Add support for 11x11 UltraLite part number 2021-04-08 09:18:29 +02:00
ddrmc-vf610-calibration.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ddrmc-vf610-calibration.h ddr: vybrid: Provide code to perform on-boot calibration 2019-02-15 12:16:50 +01:00
ddrmc-vf610.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
hab.c imx: hab: Fix build warnings in 32-bit targets 2021-04-08 09:18:29 +02:00
i2c-mxv7.c dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIO 2021-02-21 06:08:00 +01:00
imx_bootaux.c imx: bootaux fix elf loading 2021-04-08 23:59:50 +02:00
init.c ARM: imx: Add support for switching primary/secondary boot mode to bmode 2020-08-17 17:54:01 +02:00
iomux-v3.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig imx8: Add DEK blob encapsulation 2021-04-08 20:29:52 +02:00
lowlevel.S imx: add lowlevel init for ARM64 2019-04-25 19:16:24 +02:00
mac.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile imx: caam: new u-boot command to set PRIBLOB bitfield from CAAM SCFGR register to 0x3 2021-04-08 20:29:52 +02:00
misc.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mkimage_fit_atf.sh imx: mkimage_fit_atf: fix file size reporting 2021-05-02 12:46:54 +02:00
mmc_env.c Revert "imx: mmc_env: update runtime SD/MMC boot env device" 2019-10-08 16:36:37 +02:00
mmdc_size.c arm/mach-imx: Fix macros in mmdc_size.c 2021-07-10 16:53:34 +02:00
priblob.c imx: caam: new u-boot command to set PRIBLOB bitfield from CAAM SCFGR register to 0x3 2021-04-08 20:29:52 +02:00
rdc-sema.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sata.c arm: Don't include common.h in header files 2020-05-18 14:54:24 -04:00
speed.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
spl.c spl: fit: Drop 'length' argument to board_spl_fit_post_load() 2021-02-17 17:12:45 -05:00
spl_imx_romapi.c ARM: make gd a function call for LTO and set via set_gd() 2021-05-24 14:21:30 -04:00
spl_qspi.cfg arm: imx: Finish migration from CONFIG_SECURE_BOOT to CONFIG_IMX_HAB 2020-06-26 10:29:06 -04:00
spl_sd.cfg imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HAB 2019-10-08 16:36:37 +02:00
syscounter.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
timer.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
video.c env: Move env_get() to env.h 2019-08-11 16:43:41 -04:00