06 Oct, 2017

1 commit


07 Oct, 2016

1 commit

  • When using gzwrite to eMMC on an i.MX6Q board, the following warning
    occurs repeatedly:
    CACHE: Misaligned operation at range [4fd63318, 4fe63318]

    This patch cache-aligns the memory allocation for the gzwrite writebuf,
    therefore avoiding the misaligned dcache flush and the warning from
    check_cache_range.

    Signed-off-by: Clemens Gruber
    Reviewed-by: Eric Nelson
    Reviewed-by: Stefan Agner

    Clemens Gruber
     

19 Apr, 2016

1 commit


15 Mar, 2016

1 commit


10 Feb, 2016

1 commit

  • Current, the following passes:
    ./u-boot -d arch/sandbox/dts/test.dtb -c 'ut_image_decomp'
    but the following fails:
    ./u-boot -d arch/sandbox/dts/test.dtb -c 'ut dm; ut_image_decomp'

    This is because the gunzip code reads input data beyond the end of its
    input buffer. In the first case above, this data just happens to be 0,
    which just happens to trigger gzip to signal the error the decompression
    unit test expects. In the second case above, the "ut dm" test has written
    data to the accidentally-read memory, which causes the gzip code to take a
    different path and so return a different value, which triggers the test
    failure.

    The cause of gunzip reading past its input buffer is the re-calculation of
    s.avail_in in zunzip(), since it can underflow. Not only is the formula
    non-sensical (it uses the delta between two output buffer pointers to
    calculate available input buffer size), it also appears to be unnecessary,
    since the gunzip code already maintains this value itself. This patch
    removes this re-calculation to avoid the underflow and redundant work.

    The loop exit condition is also adjusted so that if inflate() has consumed
    the entire input buffer, without indicating returning Z_STREAM_END (i.e.
    decompression complete without error), an error is raised. There is still
    opportunity to simplify the code here by splitting up the loop exit
    condition into separate tests. However, this patch makes the minimum
    modifications required to solve the problem at hand, in order to keep the
    Acked-by: Kees Cook

    diff simple.

    I am not entirely convinced that the loop in zunzip() is necessary at all.
    It could only be useful if inflate() can return Z_BUF_ERROR (which
    typically means that it needs more data in the input buffer, or more space
    in the output buffer), even though Z_FINISH is set /and/ the full input is
    available in the input buffer /and/ there is enough space to store the
    decompressed output in the output buffer. The comment in zlib.h after the
    prototype of inflate() implies this is never the case. However, I assume
    there must have been some reason for introducing this loop in the first
    place, as part of commit "Fix gunzip to work for any gziped uImage size".

    This patch is similar to the earlier b75650d84d4b "gzip: correctly
    bounds-check output buffer", which corrected a similar issue for
    s.avail_out.

    Cc: Catalin Radu
    Cc: Kees Cook
    Fixes: f039ada5c109 ("Fix gunzip to work for any gziped uImage size")
    Signed-off-by: Stephen Warren

    Stephen Warren
     

19 Jan, 2016

1 commit


14 Jan, 2016

1 commit

  • This will allow the implementation to make use of data in the block_dev
    structure beyond the base device number. This will be useful so that eMMC
    block devices can encompass the HW partition ID rather than treating this
    out-of-band. Equally, the existence of the priv field is crying out for
    this patch to exist.

    Signed-off-by: Stephen Warren
    Reviewed-by: Tom Rini

    Stephen Warren
     

20 Nov, 2015

1 commit


23 Apr, 2015

1 commit


15 Jan, 2015

1 commit


04 Sep, 2013

1 commit


24 Jul, 2013

1 commit


30 Apr, 2012

1 commit


13 Apr, 2011

1 commit


13 Oct, 2010

1 commit

  • As usually done in U-Boot, the watchdog_reset code is called via a
    macro (WATCHDOG_RESET). In zlib.c this was done differently, by using
    a function pointer which is initialized with WATCHDOG_RESET upon watchdog
    usage or with NULL otherwise. This patch now uses the plain
    WATCHDOG_RESET macros to call the function resulting in slightly smaller
    U-Boot images and simpler code.

    U-Boot code size reduction:

    PowerPC board with watchdog support (lwmon5):
    -> 80 bytes smaller image size

    PowerPC board without watchdog support (sequoia):
    -> 112 bytes smaller image size

    Signed-off-by: Stefan Roese
    Cc: Detlev Zundel
    Cc: Wolfgang Denk
    Acked-by: Detlev Zundel

    Stefan Roese
     

13 Apr, 2010

1 commit

  • Now that the other architecture-specific lib directories have been
    moved out of the top-level directory there's not much reason to have the
    '_generic' suffix on the common lib directory.

    Signed-off-by: Peter Tyser

    Peter Tyser