21 Mar, 2018

1 commit

  • Disabling relocation might be useful on ARC for 2 reasons:
    a) For advanced debugging with Synopsys proprietary MetaWare debugger
    which is capable of accessing much more specific hardware resources
    compared to gdb. For example it may show contents of L1 and L2 caches,
    internal states of some hardware blocks etc.

    But on the downside MetaWare debugger still cannot work with PIE.
    Even though that limitation could be work-arounded with change of ELF's
    header and stripping down all debug info but with it we won't have
    debug info for source-level debugging which is quite inconvenient.

    b) Some platforms which might benefit from usage of U-Boot basically
    don't have enough RAM to accommodate relocation of U-Boot so we
    keep code in flash and use as much of RAM as possible for more
    interesting things.

    Signed-off-by: Alexey Brodkin
    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Heiko Schocher
    Cc: York Sun
    Cc: Stefan Roese

    Alexey Brodkin
     

20 Mar, 2018

4 commits

  • This patch makes it possible to verify the contents and location of an
    OPTEE image in DRAM prior to handing off control to that image. If image
    verification fails we won't try to boot any further.

    Signed-off-by: Bryan O'Donoghue
    Suggested-by: Andrew F. Davis
    Cc: Harinarayan Bhatta
    Cc: Andrew F. Davis
    Cc: Tom Rini
    Cc: Kever Yang
    Cc: Philipp Tomsich
    Cc: Peng Fan

    Bryan O'Donoghue
     
  • This patch adds a new type IH_OS_TEE. This new OS type will be used for
    chain-loading to Linux via a TEE.

    With this patch in-place you can generate a bootable OPTEE image like this:

    mkimage -A arm -T kernel -O tee -C none -d tee.bin uTee.optee

    where "tee.bin" is the input binary prefixed with an OPTEE header and
    uTee.optee is the output prefixed with a u-boot wrapper header.

    This image type "-T kernel -O tee" is differentiated from the existing
    IH_TYPE_TEE "-T tee" in that the IH_TYPE is installed by u-boot (flow
    control returns to u-boot) whereas for the new IH_OS_TEE control passes to
    the OPTEE firmware and the firmware chainloads onto Linux.

    Andrew Davis gave the following ASCII diagram:

    IH_OS_TEE: (mkimage -T kernel -O tee)
    Non-Secure Secure

    BootROM
    |
    -------------
    |
    v
    SPL
    |
    v
    U-Boot ------>


    Suggested-by: Andrew F. Davis
    Cc: Harinarayan Bhatta
    Cc: Andrew F. Davis
    Cc: Tom Rini
    Cc: Kever Yang
    Cc: Philipp Tomsich
    Cc: Peng Fan
    Link: http://mrvan.github.io/optee-imx6ul

    Bryan O'Donoghue
     
  • Add option to include RESET driver and uclass in SPL.
    That can be useful to handle IP reset with same driver
    in U-Boot and in SPL.

    Signed-off-by: Patrick Delaunay

    Patrick Delaunay
     
  • STM32MP157 bootrom needs a specific header for first boot stage.
    This patch adds support of this header in mkimage.

    Signed-off-by: Patrick Delaunay

    Patrick Delaunay
     

19 Mar, 2018

1 commit

  • U-boot proper signature is not verified by SPL on most platforms
    even config SPL_FIT_SIGNATURE is enabled. Only fsl-layerscape
    platform support secure boot in platform specific code. So
    verified boot cannot be achieved if u-boot proper is loaded by
    SPL.

    This patch add signature verification to u-boot proper images
    when loading FIT image in SPL. It is tested on Allwinner bananapi
    zero board with H2+ SoC.

    Signed-off-by: Jun Nie

    Jun Nie
     

17 Mar, 2018

2 commits


14 Mar, 2018

2 commits


05 Mar, 2018

2 commits


24 Feb, 2018

2 commits


23 Feb, 2018

1 commit


22 Feb, 2018

3 commits


19 Feb, 2018

2 commits

  • Memory banks with address 0 and size 0 are empty and should not be
    passed to the OS via device tree.

    Signed-off-by: Thierry Reding
    Acked-by: Stephen Warren

    Thierry Reding
     
  • Only ARM and in some configs MIPS really implement arch_fixup_fdt().
    Others just use the same boilerplate which is not good by itself,
    but what's worse if we try to build with disabled CONFIG_CMD_BOOTM
    and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was
    apparently implemented in arch/xxx/lib/bootm.c.

    Now with weak arch_fixup_fdt() right in image-fdt.c where it is
    used we get both items highlighted above fixed.

    Signed-off-by: Alexey Brodkin
    Cc: Daniel Schwierzeck
    Cc: Simon Glass
    Cc: York Sun
    Cc: Stefan Roese
    Reviewed-by: Tom Rini
    Reviewed-by: Daniel Schwierzeck

    Alexey Brodkin
     

15 Feb, 2018

1 commit

  • Migrate the option CONFIG_SPL_FRAMEWORK and make this gate most of the
    current set of options we have in Kconfig. We will need to have some
    options available for SPL and !SPL_FRAMEWORK so this is important. In a
    few cases we re-order existing options so that we have less escapes from
    the SPL_FRAMEWORK guard.

    Signed-off-by: Tom Rini

    Tom Rini
     

14 Feb, 2018

3 commits


13 Feb, 2018

1 commit

  • The fdt_record_loadable()-function was wedged between other functions
    that were guarded by ARCH_FIXUP_FDT_MEMORY. This could lead to linker
    errors on some configurations.

    With this change, fdt_record_loadable() is moved out of the
    ARCH_FIXUP_FDT_MEMORY guard (plus I tried to retain alphabetical
    ordering for functions by placing it appropriately).

    References: 9f45aeb ("spl: fit: implement fdt_record_loadable")
    Signed-off-by: Philipp Tomsich
    Reported-by: Michal Simek
    Tested-by: Michal Simek

    Philipp Tomsich
     

08 Feb, 2018

2 commits

  • The goal of this patch is to clean up the code related to choosing SPL
    MMC boot mode.

    The spl_boot_mode() now is called only in spl_mmc_load_image() function,
    which is only compiled in if CONFIG_SPL_MMC_SUPPORT is enabled.

    To achieve the goal, all per mach/arch implementations eligible for
    unification has been replaced with one __weak implementation.

    Signed-off-by: Lukasz Majewski
    Reviewed-by: Marek Vasut
    Reviewed-by: Stefano Babic
    Acked-by: Michal Simek (For ZynqMP)
    Reviewed-by: Fabio Estevam

    Lukasz Majewski
     
  • The second area of android image was intended to put a 2nd stage
    bootloader but in practice were rarely used (in my knowledge).

    An proposal was made to the AOSP to (re)use the second area as the dtb[1],
    This patch itself doesn't depend on that proposal being accepted but it won't
    be that helpful as well if that proposal won't be accepted. But don't do
    any harm as well.

    [1] https://android-review.googlesource.com/#/c/417447/
    Signed-off-by: Bin Chen
    Reviewed-by: Tom Rini
    Reviewed-by: Kever Yang

    Bin Chen
     

04 Feb, 2018

5 commits

  • The EFI implementation does not fit into any of the existing categories.

    Provide LOGC_EFI so that EFI related message can be filtered.

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

    Heinrich Schuchardt
     
  • When functions return an error it propagates up the stack to the point
    where it is reported. Often the error code provides enough information
    about the root cause of the error that this is obvious what went wrong.

    However in some cases the error may be hard to trace. For example if a
    driver uses several devices to perform an operation, it may not be
    obvious which one failed.

    Add a log_ret() macro to help with this. This can be used to wrap any
    error-return value. The logging system will then output a log record when
    the original error is generated, making it easy to trace the call stack
    of the error.

    This macro can significantly impact code size, so its use is controlled
    by a Kconfig option, which is enabled for sandbox.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present this just outputs the message. Update it to output whatever the
    format requests.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • It is useful to be able to control the output format of log records on the
    console. As a starting point, add definitions for controlling which
    elements of the log record are displayed. Use function and message as the
    default, since these are the most useful fields.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Category and level both use an enum for their ID values. Add functions to
    convert these IDs to strings and vice versa. This will allow the log to
    output the strings instead of the (inscrutable) values.

    At the same time, add a new 'driver-model' category, to cover core
    driver-model functions and fix an incorrect value for LOGL_MAX.

    Tests will be added with the new 'log' subcommands.

    Signed-off-by: Simon Glass
    (Updated to correct clang warnings)

    Simon Glass
     

30 Jan, 2018

1 commit


29 Jan, 2018

5 commits


28 Jan, 2018

2 commits