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

Bernhard Nortmann bernhard.nortmann at web.de
Mon May 16 11:56:58 CEST 2016


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

Regards, B. Nortmann


More information about the U-Boot mailing list