vbe: Allocate space for the FIT header
authorSimon Glass <sjg@chromium.org>
Thu, 16 Jan 2025 01:27:11 +0000 (18:27 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 22 Jan 2025 15:47:49 +0000 (09:47 -0600)
commit0148c14e04e8ac8855a1dfc7aeeef325ca2d9146
tree5d218a42a56206fd8196025ec301f5fbadb888ee
parentea6cfc55e0f244dbdcb8af8eb0fff5db2f77ce6d
vbe: Allocate space for the FIT header

It is convenient to use TEXT_BASE as a place to hold the FIT header, but
this does not work in VPL, since SDRAM is not inited yet.

Allocate the memory instead. Ensure the size is aligned to the media
block-size so that it can be read in directly. Improve the
error-checking for blk_read() and add some more debugging.

Keep the existing TEXT_BASE mechanism in sandbox to avoid an
'Exec format error' when trying to run the image.

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