]> git.baikalelectronics.ru Git - uboot.git/commit
arm: mvebu: spl: Fix parsing SATA kwbimage
authorPali Rohár <pali@kernel.org>
Sat, 21 Jan 2023 12:47:45 +0000 (13:47 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commitf16beb22167e444050ea54792ed4cba2229d60a2
tree4a315f9875083db307d14c06b6fc0669ae7e2d50
parent017364c536ace031f4443855391d85d2cbe3f7af
arm: mvebu: spl: Fix parsing SATA kwbimage

Despite the official specification, Marvell BootROM does not interpret
srcaddr from SATA image as number of sectors the beginning of the hard
drive, but as number of sectors relative to the main header.

To process SATA kwbimage and load U-Boot proper from it in the same way as
Marvell BootROM, it is needed to interpret srcaddr as relative offset to
the main header. This change fixes booting of U-Boot proper from SPL code
in SATA image.

Fixes: 3f0f1d263c27 ("arm: mvebu: Load U-Boot proper binary in SPL code based on kwbimage header")
Signed-off-by: Pali Rohár <pali@kernel.org>
arch/arm/mach-mvebu/spl.c