This patchset reduces the boot time for ARM architecture, Exynos boards, and boards with DFU enabled.
For tested Trats2 and Odroid X2 devices, this was done in four steps. 1. Enable the arch memcpy and memset 2. Enable arch memset for .bss clear 3. Reduce the .bss section small as possible by removing the static dfu buffer (32MiB in .bss - Trats2), and use the malloc. 4. Skip zeroing the memory reserved for malloc at malloc init. For Trats2 it was 80MiB of memory. The .bss section will grow if we have a lot of static variables. This section is cleared before jump to the relocated U-Boot, and it was done word by word. To reduce the time for this step, we can enable arch memset, which uses multiple ARM registers. For configs with DFU enabled, we can find the dfu buffer in this section, which has at least 8MB (32MB for Trats2). This is a lot of useless data, which is not required for standard boot. So this buffer should be dynamic allocated. The next issue was about the malloc reserved memory, which was zeroed at malloc init in one of early init call. Some boards has more than one MiB of reserved malloc memory. Zeroing this, adds another boot delay. Now the memory is zeroed only on calloc call. So, actually the all was about unnecessary operations on 'big' data. Przemyslaw Marczak (8): exynos: config: enable arch memcpy and arch memset arm: relocation: clear .bss section with arch memset if defined dfu: mmc: file buffer: remove static allocation dlmalloc: add option for skip memset in malloc init README: add info about skip memset at malloc init kconfig: malloc: add option for skip memset at malloc init trats2: defconfig: enable expert and skip memset at malloc init odroid: defconfig: enable expert and skip malloc memset Kconfig | 26 +++++++++++++++++++------- README | 7 +++++++ arch/arm/lib/crt0.S | 10 +++++++++- common/dlmalloc.c | 10 +++++++--- configs/odroid_defconfig | 2 ++ configs/trats2_defconfig | 2 ++ drivers/dfu/dfu_mmc.c | 25 ++++++++++++++++++++++--- include/configs/exynos-common.h | 3 +++ 8 files changed, 71 insertions(+), 14 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot