vbe: Handle loading from an unaligned offset
authorSimon Glass <sjg@chromium.org>
Thu, 16 Jan 2025 01:27:14 +0000 (18:27 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 22 Jan 2025 15:47:49 +0000 (09:47 -0600)
commit36d6c89950e560094f8b21d773be44409077ea59
tree14f6355e475ca8c2c6b6c0e166d05d35c413d3ac
parentd337037e1a7b74c05dcaff62739df45a2933078e
vbe: Handle loading from an unaligned offset

There is no guarantee that an FIT image starts on a block boundary. When
it doesn't, the image starts part-way through the first block.

Add logic to detect this and copy the image down into place.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/vbe_common.c