21 Nov, 2018

1 commit


09 Oct, 2018

3 commits


08 Oct, 2018

1 commit

  • On my Ubuntu 18.04.1 machine two driver-model bus tests have started
    failing recently. The problem appears to be that the DATA region of the
    executable is protected. This does not seem correct, but perhaps there
    is a reason.

    To work around it, unprotect the regions in these tests before accessing
    them.

    Signed-off-by: Simon Glass

    Simon Glass
     

24 Sep, 2018

2 commits

  • In sandbox, longjmp returns to itself in an endless loop because
    os_longjmp() calls into longjmp() which is provided by U-Boot which
    again calls os_longjmp().

    Setjmp on the other hand must not return because otherwise the
    return freees up stack elements that we need during longjmp().

    The only straight forward fix that doesn't involve nasty hacks I
    could find is to directly link against the system setjmp/longjmp
    implementations. That means we just provide the compiler with
    hints that the symbol will be available and actually fill them
    out with versions from libc.

    This approach should be reasonably platform agnostic

    Signed-off-by: Alexander Graf
    Reviewed-by: Simon Glass
    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • This function is useful to signal that the application needs to exit
    immediate. It can be caught with a debugger (e.g. gdb). Add a stub for it
    so that it can be called from within sandbox when an internal error
    occurs.

    Signed-off-by: Simon Glass
    Signed-off-by: Alexander Graf

    Simon Glass
     

03 Jun, 2018

1 commit

  • Add an implementation of setjmp() and longjmp() which rely on the
    underlying host C library. Since we cannot know how large the jump buffer
    needs to be, pick something that should be suitable and check it at
    runtime. At present we need access to the underlying struct as well.

    Signed-off-by: Simon Glass
    Signed-off-by: Alexander Graf

    Simon Glass
     

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
     

08 Dec, 2017

1 commit

  • While sandbox works OK without the special-case code, it does result in
    console output being stored in the pre-console buffer while sandbox starts
    up. If there is a crash or a problem then there is no indication of what
    is going on.

    For ease of debugging it seems better to revert this change.

    This reverts commit 47b98ad0f6779485d0f0c14f337c3eece273eb54.

    Signed-off-by: Simon Glass

    Simon Glass
     

29 Jul, 2017

1 commit


12 Oct, 2016

1 commit


15 Jul, 2016

1 commit


04 Jun, 2015

1 commit

  • For some reason 'u-boot -D' does not restore the terminal correctly when
    the 'reset' command is used. Call the terminal restore function explicitly
    in this case.

    Signed-off-by: Simon Glass
    Reviewed-by: Joe Hershberger

    Simon Glass
     

06 May, 2015

1 commit


19 Apr, 2015

1 commit


23 Nov, 2014

1 commit


18 Mar, 2014

2 commits


07 Mar, 2014

1 commit

  • The unit-test for hush's "test -e" currently relies upon being run in
    the U-Boot build directory, because it tests for the existence of a file
    that exists in that directory.

    Fix this by explicitly creating the file we use for the existence test,
    and deleting it afterwards so that multiple successive unit-test
    invocations succeed. This required adding an os.c function to erase
    files.

    Reported-by: Simon Glass
    Signed-off-by: Stephen Warren

    Stephen Warren
     

25 Jan, 2014

1 commit


09 Jan, 2014

3 commits

  • It is useful to be able to save and restore the RAM contents of sandbox
    U-Boot either for setting up tests, for later analysys, or for chaining
    together multiple tests which need to keep the same memory contents.

    Add a function to provide a memory file for U-Boot. This is read on
    start-up and written when shutting down. If the file does not exist
    on start-up, it will be created when shutting down.

    Signed-off-by: Simon Glass
    Signed-off-by: Simon Glass

    Simon Glass
     
  • With sandbox, errors and problems may be reported before console_init_f()
    is executed. For example, an argument may not parse correctly or U-Boot may
    panic(). At present this output is swallowed so there is no indication what
    is going wrong.

    Adjust the console to deal with a very early sandbox setup, by detecting that
    there is no global_data yet, and calling os functions in that case.

    Signed-off-by: Simon Glass
    Signed-off-by: Simon Glass

    Simon Glass
     
  • Implement realloc() and free() for sandbox, by adding a header to each
    block which contains the block size.

    Signed-off-by: Simon Glass
    Signed-off-by: Simon Glass
    Reviewed-by: Che-Liang Chiou
    Reviewed-by: Hung-ying Tyan

    Simon Glass
     

22 Nov, 2013

1 commit


24 Jul, 2013

1 commit


05 Mar, 2013

1 commit


01 Mar, 2013

1 commit

  • Implements the tstc() interface for the serial driver. Multiplexing
    the console between the serial port and a keyboard uses a polling
    method of checking if characters are available; this means that the
    serial console must be non-blocking when attempting to read
    characters.

    Signed-off-by: Taylor Hutt
    Signed-off-by: Simon Glass

    Taylor Hutt
     

12 Mar, 2012

5 commits


11 Dec, 2011

2 commits


04 Nov, 2011

1 commit


18 Oct, 2011

1 commit