10 Feb, 2018

1 commit


23 Jan, 2018

12 commits


01 Dec, 2017

14 commits


13 Oct, 2017

1 commit


09 Oct, 2017

8 commits

  • Avoid NULL pointer dereference after setup failed due to a
    missing network.

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

    Heinrich Schuchardt
     
  • The task priority levels test uses two events one passes the
    notification counter as context. The other passes NULL.
    Both use the same notification function. So we need to check
    for NULL here.

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

    Heinrich Schuchardt
     
  • If the memory regions are different efi_st_memcmp currently
    returns the difference of the addresses. Insted the
    difference of the first differing byte pair should be
    returned.

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • This patch provides an EFI application to check the correct function
    of the Simple Network Protocol implementation.

    It sends a DHCP request and analyzes the DHCP offer.

    Different error conditions including a 10s timeout are checked.

    A successful execution will look like this:

    => bootefi nettest
    Scanning disk ide.blk#0...
    Found 1 disks
    WARNING: Invalid device tree, expect boot to fail
    Network test
    DHCP Discover
    DHCP reply received from 192.168.76.2 (52:55:c0:a8:4c:02)
    as broadcast message.
    OK. The test was completed successfully.

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

    Heinrich Schuchardt
     
  • Add %pm as format string to print a MAC address.
    This is helpful when analyzing network problems.

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

    Heinrich Schuchardt
     
  • The UEFI spec defines parameter index of WaitForEvent as UINTN*.
    So we should use size_t here.

    I deliberately do not use UINTN because I hold a following patch
    that will eliminate UINTN because uppercase types to not match
    the U-Boot coding style.

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

    Heinrich Schuchardt
     
  • Rename counter to more illustrative names.
    Update notification function description.
    Simplify notification function.
    Add comment for arbitrary non-zero value.
    Document @return.
    Use constants for return values of setup, execute, teardown.

    Reported-by: Simon Glass
    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Simon Glass
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • All error messages in the selftests should use efi_st_error.
    efi_st_error will print the file name and line number of the error.

    Splitting message texts due to lines being over 80
    characters is avoided. This resolves the issue reported
    by Simon Glass in
    https://lists.denx.de/pipermail/u-boot/2017-September/307387.html

    Reported-by: Simon Glass
    Fixes: 623b3a579765 efi_selftest: provide an EFI selftest application
    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Simon Glass
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

19 Sep, 2017

4 commits

  • Check that the notification function of an
    EVT_SIGNAL_EXIT_BOOT_SERVICES event is called
    exactly once.

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • Run a 10 ms periodic timer and check that it is called 10 times
    while waiting for 100 ms single shot timer.

    Raise the TPL level to the level of the 10 ms timer and observe
    that the notification function is not called again.

    Lower the TPL level and check that the queued notification
    function is called.

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • This unit test uses timer events to check the implementation
    of the following boottime services:
    CreateEvent, CloseEvent, WaitForEvent, CheckEvent, SetTimer

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • A testing framework for the EFI API is provided.
    It can be executed with the 'bootefi selftest' command.

    It is coded in a way that at a later stage we may turn it
    into a standalone EFI application. The current build system
    does not allow this yet.

    All tests use a driver model and are run in three phases:
    setup, execute, teardown.

    A test may be setup and executed at boottime,
    it may be setup at boottime and executed at runtime,
    or it may be setup and executed at runtime.

    After executing all tests the system is reset.

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt