2
0
Fork 0
mirror of https://github.com/AsahiLinux/u-boot synced 2024-12-14 07:13:03 +00:00
u-boot/arch/arm/mach-sunxi
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
..
dram_timings WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
board.c sunxi: eMMC: support TOC0 on boot partitions 2023-01-23 01:18:23 +00:00
clock.c mach-sunxi: Add support for SUNIV architecture 2022-02-04 00:09:57 +00:00
clock_sun4i.c sunxi: Clean up inclusions of asm/arch/gpio.h 2021-10-11 10:46:44 +01:00
clock_sun6i.c sunxi: board: annotate #endif lines 2022-12-14 22:31:33 +00:00
clock_sun8i_a83t.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
clock_sun9i.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
clock_sun50i_h6.c sunxi: clock: H6: Adjust PLL LDO before clock setup 2022-04-04 23:24:17 +01:00
cpu_info.c mach-sunxi: Add support for SUNIV architecture 2022-02-04 00:09:57 +00:00
dram_helpers.c global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_* 2022-12-05 16:06:07 -05:00
dram_sun4i.c WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
dram_sun6i.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dram_sun8i_a23.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dram_sun8i_a33.c WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
dram_sun8i_a83t.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dram_sun9i.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dram_sun50i_h6.c sunxi: prcm: Add a few registers 2022-04-04 23:24:17 +01:00
dram_sun50i_h616.c sunxi: prcm: Add a few registers 2022-04-04 23:24:17 +01:00
dram_suniv.c global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_* 2022-12-05 16:06:07 -05:00
dram_sunxi_dw.c global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_* 2022-12-05 16:06:07 -05:00
gtbus_sun9i.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig sunxi: remove CONFIG_MMC?_CD_PIN 2023-01-21 01:32:23 +00:00
Makefile sunxi: Add F1C100s DRAM initial support 2022-02-04 00:09:57 +00:00
pinmux.c sunxi: gpio: Fix up pointer arithmetic 2022-01-30 01:25:00 +00:00
pmic_bus.c sunxi: pmic_bus: Use the DM PMIC interface when possible 2021-10-12 10:48:37 +01:00
prcm.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rmr_switch.S sunxi: Introduce common symbol for H6 like SoCs 2021-01-25 21:52:00 +00:00
spl_spi_sunxi.c Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
timer.c mach-sunxi: Move timer code to mach folder 2022-02-04 00:09:57 +00:00