u-boot/arch
Andre Przywara 382b837134 sunxi: eMMC: support TOC0 on boot partitions
To determine whether we have been booted from an eMMC boot partition, we
replay some of the checks that the BROM must have done to successfully
load the SPL. This involves a checksum check, which currently relies on
the SPL being wrapped in an "eGON" header.

If a board has secure boot enabled, the BROM will only accept the "TOC0"
format, which is internally very different, but uses the same
checksumming algorithm. Actually the only difference for calculating the
checksum is that the size of the SPL is stored at a different offset.

Do a header check to determine whether we deal with an eGON or TOC0
format, then set the SPL size accordingly. The rest of the code is
unchanged.

This fixes booting from an eMMC boot partition on devices with secure
boot enabled, like the Remix Mini PC.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
2023-01-23 01:18:23 +00:00
..
arc arc: Migrate ARC_MMU_VER to Kconfig 2023-01-20 12:27:06 -05:00
arm sunxi: eMMC: support TOC0 on boot partitions 2023-01-23 01:18:23 +00:00
m68k global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
microblaze Convert CONFIG_STANDALONE_LOAD_ADDR to Kconfig 2022-12-22 10:31:48 -05:00
mips global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
nios2 Convert CONFIG_STANDALONE_LOAD_ADDR to Kconfig 2022-12-22 10:31:48 -05:00
powerpc global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
riscv global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
sandbox bootstd: Add a test for the bootstd menu 2023-01-16 18:26:51 -05:00
sh global: Migrate CONFIG_BOARDDIR to CFG 2022-12-23 10:07:03 -05:00
x86 global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
xtensa global: Migrate CONFIG_MAX_MEM_MAPPED to CFG 2022-12-23 10:14:51 -05:00
.gitignore
Kconfig event: Correct dependencies on the EVENT framework 2023-01-18 12:46:13 -05:00
Kconfig.nxp nxp: Finish migration of SYS_FSL_SRDS_[12] to Kconfig 2023-01-20 12:27:23 -05:00
u-boot-elf.lds