[U-Boot] [PATCH v2] sunxi: Increase SPL header size to 64 bytes to avoid code corruption

Hans de Goede hdegoede at redhat.com
Mon May 16 19:52:33 CEST 2016


Hi,

On 16-05-16 11:56, Bernhard Nortmann wrote:
> Given that there now are quite a few additional "reserved" entries, and while we're still at SPL_HEADER_VERSION 1, I'd like to renew my request of dedicating one of these fields to the script length - which would enable us to set the U-Boot ${filesize} accordingly.
>
> i.e.
> --- arch-arm-include-asm-arch-sunxi-spl.h
> +++ arch-arm-include-asm-arch-sunxi-spl.new.h
> @@ -49,7 +49,8 @@
>                 uint8_t spl_signature[4];
>         };
>         uint32_t fel_script_address;
> -       uint32_t reserved1[3];
> +       uint32_t fel_script_length;
> +       uint32_t reserved1[2];
>         uint32_t boot_media;            /* written here by the boot ROM */
>         uint32_t reserved2[5];          /* padding, align to 64 bytes */
>  };
>
>
> I do not intend to further push my specific use cases, however I still consider the (then somewhat theoretical) ability to do "import -t ${fel_script_addr} ${filesize}" useful. For reference, the previous discussion related to this was somewhere around http://lists.denx.de/pipermail/u-boot/2015-September/227454.html

Hmm, given that the boot-rom touches some of these, I wonder if
we should be putting anything here at all.

Other then that worry, I see no problem with adding a
fel_script_length, Siarhei what is your opinion on this ?

Regards,

Hans


More information about the U-Boot mailing list