30 Nov, 2018

1 commit


25 Aug, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

29 Jan, 2017

1 commit


17 Mar, 2016

1 commit


22 Oct, 2015

1 commit


21 Oct, 2015

2 commits

  • It's useful to get a a trace of memory allocations in early init. Add a
    debug() call to provide that. It can be enabled by adding '#define DEBUG'
    to the top of the file.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • common/dlmalloc.c is quite big, both in .text and .data usage, therefor
    on some boards the SPL is build to use only malloc_simple.c and not the
    dlmalloc.c code. This is done in various include/configs/foo.h with the
    following construct:

    #ifdef CONFIG_SPL_BUILD
    #define CONFIG_SYS_MALLOC_SIMPLE
    #endif

    This commit introduces a SPL_MALLOC_SIMPLE Kconfig bool which allows
    selecting this functionality through Kconfig instead.

    Signed-off-by: Hans de Goede
    Acked-by: Simon Glass

    Hans de Goede
     

28 Sep, 2015

1 commit


29 Aug, 2015

1 commit


11 Jun, 2015

1 commit


19 Apr, 2015

1 commit


13 Feb, 2015

1 commit

  • All callers of malloc should already do error checking, and may even be able
    to continue without the alloc succeeding.

    Moreover, common/malloc_simple.c is the only user of .rodata.str1.1 in
    common/built-in.o when building the SPL, triggering this gcc bug:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

    Causing .rodata to grow with e.g. 0xc21 bytes, nullifying all benefits of
    using malloc_simple in the first place.

    Signed-off-by: Hans de Goede
    Acked-by: Simon Glass

    Hans de Goede
     

21 Nov, 2014

1 commit

  • The simple malloc() implementation is used when memory is tight. It provides
    a simple buffer with an incrementing pointer.

    At present the implementation is inside dlmalloc. Move it into its own file
    so that it is easier to find.

    Rather than using relocation as a signal that the full malloc() is
    available, add a special GD_FLG_FULL_MALLOC_INIT flag. This signals that the
    simple malloc() should no longer be used.

    In some cases, such as SPL, even the code space used by the full malloc() is
    wasteful. Add a CONFIG_SYS_MALLOC_SIMPLE option to provide only the simple
    malloc. In this case the full malloc is not available at all. It saves about
    1KB of code space and about 0.5KB of data on Thumb 2.

    Acked-by: Tom Rini
    Signed-off-by: Simon Glass

    Simon Glass