cmd: mvebu/bubt: Fix parsing SATA kwbimage
authorPali Rohár <pali@kernel.org>
Sat, 21 Jan 2023 12:59:20 +0000 (13:59 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commita2cd076b7f5ad3017fc8a2b22687cd58d02e85db
treec89557d0f220aa0e2dc681e77d762129a19c3aea
parentd4aa2104327fd8b6d46f7c51de1e35f5ec702c93
cmd: mvebu/bubt: 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.

Reject invalid and accept valid SATA images.

Fixes: 5a0653493307 ("cmd: mvebu/bubt: Check for A38x image data checksum")
Signed-off-by: Pali Rohár <pali@kernel.org>
cmd/mvebu/bubt.c