mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-04 02:20:25 +00:00
b19236fd1c
The current SPL header, created by the 'mksunxiboot' tool, has size 32 bytes. But the code in the boot ROM stores the information about the boot media at the offset 0x28 before passing control to the SPL. For example, when booting from the SD card, the magic number written by the boot ROM is 0. And when booting from the SPI flash, the magic number is 3. NAND and eMMC probably have their own special magic numbers too. Currently the corrupted byte is a part of one of the instructions in the reset vectors table: b reset ldr pc, _undefined_instruction ldr pc, _software_interrupt <- Corruption happens here ldr pc, _prefetch_abort ldr pc, _data_abort ldr pc, _not_used ldr pc, _irq ldr pc, _fiq In practice this does not cause any visible problems, but it's still better to fix it. As a bonus, the reported boot media type can be later used in the 'spl_boot_device' function, but this is out of the scope of this patch. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||
---|---|---|
.. | ||
clock.h | ||
clock_sun4i.h | ||
clock_sun6i.h | ||
clock_sun8i_a83t.h | ||
clock_sun9i.h | ||
cpu.h | ||
cpu_sun4i.h | ||
cpu_sun9i.h | ||
cpucfg_sun6i.h | ||
display.h | ||
dma.h | ||
dma_sun4i.h | ||
dram.h | ||
dram_sun4i.h | ||
dram_sun6i.h | ||
dram_sun8i_a23.h | ||
dram_sun8i_a33.h | ||
dram_sun8i_a83t.h | ||
dram_sun8i_h3.h | ||
gpio.h | ||
i2c.h | ||
mmc.h | ||
p2wi.h | ||
pmic_bus.h | ||
prcm.h | ||
rsb.h | ||
spl.h | ||
sys_proto.h | ||
timer.h | ||
tzpc.h | ||
usb_phy.h | ||
watchdog.h |