]> git.baikalelectronics.ru Git - uboot.git/commit
board: freescale: imx93_evk: Fix MMC environment offset boot conflict.
authorKen Sloat <ken.s@variscite.com>
Tue, 11 Apr 2023 20:05:31 +0000 (16:05 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 29 Jun 2023 13:55:45 +0000 (09:55 -0400)
commit1a4bfd53924dbdd3dec3c5968ef5e52e7279010f
tree06d360e7d4f3cfe9fc956f7ebc388936b0b17cb5
parent2c7499b27aebc966454674d52b1add00ddde8901
board: freescale: imx93_evk: Fix MMC environment offset boot conflict.

Currently, the imx93_evk is configured with CONFIG_ENV_IS_IN_MMC and the
chosen environment offset in the config is 0x400000. Unless the user
programs the associated fuses, this offset is the default secondary boot
image offset used by the i.MX 93 ROM bootloader. With certain
combinations of environmental variables, the CRC and beginning of the
environment can potentially falsely appear as a valid boot image
container header. If the expected "sw_version" offset within this
mistaken boot image container is greater than the primary's, the ROM
bootloader can skip booting of the primary image altogether and attempt
to boot with the content of the environment data. This will then hang
the system.

To fix this, move the environment from 0x400000 to 0x700000 reserving up
to 3 MB at 0x400000 for any actual secondary user image container.

Signed-off-by: Ken Sloat <ken.s@variscite.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
configs/imx93_11x11_evk_defconfig