11 Sep, 2018

18 commits


27 Aug, 2018

1 commit


25 Aug, 2018

2 commits


22 Aug, 2018

1 commit


21 Aug, 2018

5 commits

  • In some cases it can be useful to be able to bind a device to a driver from
    the command line.
    The obvious example is for versatile devices such as USB gadget.
    Another use case is when the devices are not yet ready at startup and
    require some setup before the drivers are bound (ex: FPGA which bitsream is
    fetched from a mass storage or ethernet)

    usage example:

    bind usb_dev_generic 0 usb_ether
    unbind usb_dev_generic 0 usb_ether
    or
    unbind eth 1

    bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether
    unbind /ocp/omap_dwc3@48380000/usb@48390000

    Signed-off-by: Jean-Jacques Hiblot

    Jean-Jacques Hiblot
     
  • In case when user provides '-' as USB controller index, like this:

    => fastboot -

    data abort occurs in strcmp() function in do_fastboot(), here:

    if (!strcmp(argv[1], "udp"))

    (tested on BeagleBone Black).

    That's because argv[1] is NULL when user types in the '-', and null
    pointer dereference occurs in strcmp() (which is ok according to C
    standard specification). So we must validate user input to prevent such
    behavior.

    While at it, check also the result of strtoul() function and handle
    error cases properly.

    Signed-off-by: Sam Protsenko
    Reviewed-by: Simon Glass
    Reviewed-by: Lukasz Majewski

    Sam Protsenko
     
  • Fix cppcheck complaint:
    [cmd/efi.c:173]: (style) Clarify calculation precedence for '&' and '?'.

    Fixes: f1a0bafb5802 ("efi: Add a command to display the memory map")
    Signed-off-by: Eugeniu Rosca
    Reviewed-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Eugeniu Rosca
     
  • With this update, the memory attributes are in sync with Linux
    kernel v4.18-rc4. They also match page 190 of UEFI 2.7 spec [1].

    [1] http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf

    Suggested-by: Heinrich Schuchardt
    Signed-off-by: Eugeniu Rosca
    Reviewed-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Eugeniu Rosca
     
  • Starting with commit 867a6ac86dd8 ("efi: Add start-up library code"),
    sparse constantly complains about truncated constant value in efi.h:

    include/efi.h:176:35: warning: cast truncates bits from constant value (8000000000000000 becomes 0)

    This can get quite noisy, preventing real issues to be noticed:

    $ make defconfig
    *** Default configuration is based on 'sandbox_defconfig'
    $ make C=2 -j12 2>&1 | grep truncates | wc -l
    441

    After the patch is applied:
    $ make C=2 -j12 2>&1 | grep truncates | wc -l
    0
    $ sparse --version
    v0.5.2

    Following the suggestion of Heinrich Schuchardt, instead of only
    fixing the root-cause, I replaced the whole enum of _SHIFT values
    by ULL defines. This matches both the UEFI 2.7 spec and the Linux
    kernel implementation.

    Some ELF size comparison before and after the patch (gcc 7.3.0):

    efi-x86_payload64_defconfig:
    text data bss dec hex filename
    407174 29432 278676 715282 aea12 u-boot.old
    407152 29464 278676 715292 aea1c u-boot.new
    -22 +32 0 +10

    efi-x86_payload32_defconfig:
    text data bss dec hex filename
    447075 30308 280076 757459 b8ed3 u-boot.old
    447053 30340 280076 757469 b8edd u-boot.new
    -22 +32 0 +10

    Fixes: 867a6ac86dd8 ("efi: Add start-up library code")
    Suggested-by: Heinrich Schuchardt
    Signed-off-by: Eugeniu Rosca
    Reviewed-by: Heinrich Schuchardt
    Reviewed-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Eugeniu Rosca
     

20 Aug, 2018

1 commit

  • dtimg command allows user to work with Android DTB/DTBO image format.
    Such as, getting the address of desired DTB/DTBO file, printing the dump
    of the image in U-Boot shell, etc.

    This command is needed to provide Android boot with new Android DT image
    format further.

    Signed-off-by: Sam Protsenko
    Reviewed-by: Tom Rini

    Sam Protsenko
     

18 Aug, 2018

1 commit


12 Aug, 2018

1 commit


11 Aug, 2018

2 commits

  • Add a command to debug the AXI bus.

    Reviewed-by: Simon Glass
    Signed-off-by: Mario Six

    Mario Six
     
  • This update adds PPC64 ELF V1 ABI support to bootelf for both the
    program header and section header options. Elf64 support was already
    present for the program header option, but it was not handling the
    PPC64 ELF V1 ABI case. For the PPC64 ELF V1 ABI, the e_entry field of
    the elf header must be treated as function descriptor pointer instead
    of a function address. The first doubleword of the function descriptor
    is the function's entry address.

    Signed-off-by: Rob Bracero
    [trini: Fix whitespace issues]
    Signed-off-by: Tom Rini

    Rob Bracero
     

10 Aug, 2018

1 commit


31 Jul, 2018

1 commit


30 Jul, 2018

4 commits


28 Jul, 2018

1 commit

  • While there is probably no reason to do so in a real life situation, it
    will allow to compile test both stacks with the same sandbox defconfig.

    As we cannot define two 'tpm' commands at the same time, the command for
    TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this
    is the exact command name that must be written into eg. test files, any
    user already using the TPM v2 stack can continue to do so by just writing
    'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt
    will search for the closest command named after 'tpm'.

    The command set can also be changed at runtime (not supported yet, but
    ready to be), but as one can compile only either one stack or the other,
    there is still one spot in the code where conditionals are used: to
    retrieve the v1 or v2 command set.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    [trini: In sandbox_tpm2_fill_buf() use NULL not \0 to ensure NULL
    terminated string due to LLVM warning]
    Signed-off-by: Tom Rini

    Miquel Raynal
     

27 Jul, 2018

1 commit