20 Aug, 2018

2 commits


13 Jun, 2018

2 commits


23 Jan, 2018

1 commit

  • This patch provides
    * a uclass for EFI drivers
    * a EFI driver for block devices

    For each EFI driver the uclass
    * creates a handle
    * adds the driver binding protocol

    The uclass provides the bind, start, and stop entry points for the driver
    binding protocol.

    In bind() and stop() it checks if the controller implements the protocol
    supported by the EFI driver. In the start() function it calls the bind()
    function of the EFI driver. In the stop() function it destroys the child
    controllers.

    The EFI block driver binds to controllers implementing the block io
    protocol.

    When the bind function of the EFI block driver is called it creates a
    new U-Boot block device. It installs child handles for all partitions and
    installs the simple file protocol on these.

    The read and write functions of the EFI block driver delegate calls to the
    controller that it is bound to.

    A usage example is as following:

    U-Boot loads the iPXE snp.efi executable. iPXE connects an iSCSI drive and
    exposes a handle with the block IO protocol. It calls ConnectController.

    Now the EFI block driver installs the partitions with the simple file
    protocol.

    iPXE uses the simple file protocol to load Grub or the Linux Kernel.

    Signed-off-by: Heinrich Schuchardt
    [agraf: add comment on calloc len]
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

06 Oct, 2017

1 commit


03 Oct, 2017

1 commit


19 Sep, 2017

1 commit

  • 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
     

15 Sep, 2017

1 commit


13 Sep, 2017

1 commit


11 Sep, 2017

1 commit


13 Aug, 2017

1 commit


01 Jun, 2017

1 commit


22 May, 2017

1 commit

  • Commit 94e3c8c4fd7b ("crypto/fsl - Add progressive hashing support
    using hardware acceleration.") created entries for CONFIG_SHA1,
    CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and CONFIG_SHA_PROG_HW_ACCEL.
    However, no defconfig has migrated to it. Complete the move by first
    adding additional logic to various Kconfig files to select this when
    required and then use the moveconfig tool. In many cases we can select
    these because they are required to implement other drivers. We also
    correct how we include the various hashing algorithms in SPL.

    This commit was generated as follows (after Kconfig additions):

    [1] tools/moveconfig.py -y SHA1 SHA256 SHA_HW_ACCEL
    [2] tools/moveconfig.py -y SHA_PROG_HW_ACCEL

    Note:
    We cannot move SHA_HW_ACCEL and SHA_PROG_HW_ACCEL simultaneously
    because there is dependency between them.

    Cc: Poonam Aggrwal
    Cc: Naveen Burmi
    Cc: Po Liu
    Cc: Shengzhou Liu
    Cc: Priyanka Jain
    Cc: Shaohui Xie
    Cc: Chunhe Lan
    Cc: Chander Kashyap
    Cc: Steve Rae
    Cc: Dirk Eibach
    Cc: Feng Li
    Cc: Alison Wang
    Cc: Sumit Garg
    Cc: Mingkai Hu
    Cc: York Sun
    Cc: Prabhakar Kushwaha
    Cc: Jaehoon Chung
    Cc: Akshay Saraswat
    Cc: Heiko Schocher
    Cc: Jagan Teki
    Signed-off-by: Tom Rini
    Reviewed-by: Simon Glass
    Signed-off-by: Tom Rini

    Tom Rini
     

19 Oct, 2016

2 commits


08 Oct, 2016

1 commit

  • By default saveenv option is not supported for SPL. This patch
    enable the support for save environment variable for SPL build.

    Enable save environment support in SPL after setenv. By default
    the saveenv option is not provided in SPL, but some boards need
    this support in 'Falcon' boot, where SPL need to boot from
    different images based on environment variable set by OS. For
    example OS may set "reboot_image" environment variable to
    "recovery" inorder to boot recovery image by SPL. The SPL read
    "reboot_image" and act accordingly and change the reboot_image
    to default mode using setenv and save the environemnt.

    Signed-off-by: Ravi Babu
    Reviewed-by: Simon Glass

    change in v1:
    - dropped SUPPORT, use CONFIG_SPL_SAVEENV
    - updates the comments in mmc_private.h

    B, Ravi
     

17 Sep, 2016

1 commit

  • At present TPL uses the same options as SPL support. In a few cases the board
    config enables or disables the SPL options depending on whether
    CONFIG_TPL_BUILD is defined.

    With the move to Kconfig, options are determined for the whole build and
    (without a hack like an #undef in a header file) cannot be controlled in this
    way.

    Create new TPL options for these and update users. This will allow Kconfig
    conversion to proceed for these boards.

    Signed-off-by: Simon Glass

    Simon Glass
     

15 Jul, 2016

1 commit


13 Jun, 2016

1 commit

  • This allows a board to configure verified boot within the SPL using
    a FIT or FIT with external data. It also allows the SPL to perform
    signature verification without needing relocation.

    The board configuration will need to add the following feature defines:
    CONFIG_SPL_CRYPTO_SUPPORT
    CONFIG_SPL_HASH_SUPPORT
    CONFIG_SPL_SHA256

    In this example, SHA256 is the only selected hashing algorithm.

    And the following booleans:
    CONFIG_SPL=y
    CONFIG_SPL_DM=y
    CONFIG_SPL_LOAD_FIT=y
    CONFIG_SPL_FIT=y
    CONFIG_SPL_OF_CONTROL=y
    CONFIG_SPL_OF_LIBFDT=y
    CONFIG_SPL_FIT_SIGNATURE=y

    Signed-off-by: Teddy Reed
    Acked-by: Simon Glass
    Acked-by: Andreas Dannenberg
    Acked-by: Sumit Garg

    Teddy Reed
     

07 Jun, 2016

1 commit

  • When setting up a DDR controller it is useful to be able to display
    frequencies in a readable form. Make the strmhz() function available in
    SPL builds provided there is full vsprintf available.

    Reviewed-by: Tony O'Brien
    Reviewed-by: Simon Glass
    Signed-off-by: Chris Packham

    Chris Packham
     

16 Mar, 2016

1 commit

  • Now that we have all the bits and pieces ready for EFI payload loading
    support, hook them up in Makefiles and KConfigs so that we can build.

    Signed-off-by: Alexander Graf
    Reviewed-by: Simon Glass
    Tested-by: Simon Glass
    [trini: Enable only when we of OF_LIBFDT, disable on kwb and colibri_pxa270]
    Signed-off-by: Tom Rini

    Alexander Graf
     

15 Mar, 2016

1 commit

  • Add an option to enable libfdt in SPL. This can be useful when decoding
    FIT files in SPL.

    We need to make sure this option is not enabled in SPL by this change.
    Also this option needs to be enabled in host builds. Si add a new
    IMAGE_USE_LIBFDT #define which can be used in files that are built on the
    host but must also build for U-Boot and SPL.

    Signed-off-by: Simon Glass

    Simon Glass
     

16 Feb, 2016

1 commit

  • If BUILD_TAG is part of KBUILD_CFLAGS, then any time the value changes,
    all files get rebuilt. In a continuous integration environment, the value
    will change every build. This wastes time, assuming that incremental
    builds would otherwise occur.

    To solve this, remove BUILD_TAG from KBUILD_CFLAGS and add it to CFLAGS
    for just the one file that uses it. This does have the disadvantage that
    if any other files want to use the flag, we'll need to duplicate this
    custom CFLAGS setup logic. However, it seems unlikely we'll need this.

    An alternative would be to add BUILD_TAG to the "local version" and remove
    the special case code from display_options.c. However, that would affect
    the format of the U-Boot signon message, which may negatively affect
    people looking for specific data there. The approach of using
    file-specific CFLAGS was suggested by Masahiro Yamada.

    Signed-off-by: Stephen Warren
    Reviewed-by: Tom Rini
    Reviewed-by: Masahiro Yamada
    Acked-by: Simon Glass

    Stephen Warren
     

14 Dec, 2015

2 commits


23 Nov, 2015

1 commit

  • This patch adds a small printf() version that supports all basic formats.
    Its intented to be used in U-Boot SPL versions on platforms with very
    limited internal RAM sizes.

    To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
    will result in the SPL using this tiny function and the main U-Boot
    still using the full-blown printf() function.

    This code was copied from:
    http://www.sparetimelabs.com/printfrevisited
    With mostly only coding style related changes so that its checkpatch
    clean.

    The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
    (Marvell AXP) SPL:

    Without this patch:
    58963 18536 1928 79427 13643 ./spl/u-boot-spl

    With this patch:
    56542 18536 1956 77034 12cea ./spl/u-boot-spl

    Note:
    To make it possible to compile tiny-printf.c instead of vsprintf.c when
    CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
    moved from common/console.c into vsprintf.c in this patch.

    Signed-off-by: Stefan Roese
    Cc: Simon Glass
    Cc: Hans de Goede
    Cc: Tom Rini
    Cc: Albert Aribaud

    Stefan Roese
     

20 Nov, 2015

1 commit


12 Oct, 2015

1 commit

  • This patch adds support for LZ4-compressed FIT image contents. This
    algorithm has a slightly worse compression ration than LZO while being
    nearly twice as fast to decompress. When loading images from a fast
    storage medium this usually results in a boot time win.

    Sandbox-tested only since I don't have a U-Boot development system set
    up right now. The code was imported unchanged from coreboot where it's
    proven to work, though. I'm mostly interested in getting this recognized
    by mkImage for use in a downstream project.

    Signed-off-by: Julius Werner
    Acked-by: Simon Glass

    Julius Werner
     

19 Aug, 2015

2 commits

  • We have flipped CONFIG_SPL_DISABLE_OF_CONTROL. We have cleansing
    devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear
    away the ugly logic in include/fdtdec.h:

    #ifdef CONFIG_OF_CONTROL
    # if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL)
    # define OF_CONTROL 0
    # else
    # define OF_CONTROL 1
    # endif
    #else
    # define OF_CONTROL 0
    #endif

    Now CONFIG_IS_ENABLED(OF_CONTROL) is the substitute. It refers to
    CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for
    SPL.

    Also, we no longer have to cancel CONFIG_OF_CONTROL in
    include/config_uncmd_spl.h and scripts/Makefile.spl.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass
    Acked-by: Linus Walleij

    Masahiro Yamada
     
  • As we discussed a couple of times, negative CONFIG options make our
    life difficult; CONFIG_SYS_NO_FLASH, CONFIG_SYS_DCACHE_OFF, ...
    and here is another one.

    Now, there are three boards enabling OF_CONTROL on SPL:
    - socfpga_arria5_defconfig
    - socfpga_cyclone5_defconfig
    - socfpga_socrates_defconfig

    This commit adds CONFIG_SPL_OF_CONTROL for them and deletes
    CONFIG_SPL_DISABLE_OF_CONTROL from the other boards to invert
    the logic.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

05 Aug, 2015

1 commit

  • When running as an EFI application, U-Boot must request memory from EFI,
    and provide access to the boot services U-Boot needs.

    Add library code to perform these tasks. This includes efi_main() which is
    the entry point from EFI. U-Boot is built as a shared library.

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

    Simon Glass
     

22 Jul, 2015

3 commits


23 Apr, 2015

1 commit


12 Dec, 2014

1 commit

  • The functions error's numbers are standarized - but the error
    messages are not.

    The errors are often handled with unclear error messages,
    so why not use an errno standarized messages.

    Advantages:
    - This could decrease the binary size.
    - Appended with a detailed information,
    the error message will be clear.

    This commit introduces new function:
    - const char *errno_to_str(int errno)

    The functions returns a pointer to the errno corresponding text message:
    - if errno is null or positive number - a pointer to "Success" message
    - if errno is negative - a pointer to errno related message

    Signed-off-by: Przemyslaw Marczak
    Reviewed-by: Tom Rini

    Przemyslaw Marczak
     

08 Dec, 2014

3 commits