18 May, 2020

1 commit

  • The A/B slot selection is moved to spl, it may lead to hang
    if no bootable slots found. The only way to recover the board
    is re-flash images with uuu tool, which is quite inconvenient
    for some customers who can't enter serial download mode.

    This patch will set "spl recovery mode" which will give us a
    chance to re-flash images with fastboot commands.

    Test: Enter spl recovery mode and flash images when no bootable
    slots found.

    Change-Id: I31278f5212bde7609fe2f49e77b3849e92c0c516
    Signed-off-by: Ji Luo
    (cherry picked from commit 46cc755cf3f42422ee1d7783394e14e8125df2b6)

    Ji Luo
     

27 Apr, 2020

3 commits

  • Use trusty_os_init to load Trusty OS from CONFIG_TRUSTY_OS_ENTRY
    before u-boot ready.

    Add Trusty OS SOC level codes and u-boot/SPL common codes.

    Signed-off-by: Ye Li
    Signed-off-by: Haoran.Wang
    (cherry picked from commit 1ae9ecc73f5001b8bd743011c06a7d07861be64e)
    (cherry picked from commit 6fa4f4a42fd90631f8dc8303b17f600c085d8595)

    Ye Li
     
  • Porting the FSL android fastboot features from imx u-boot v2018.03 to
    support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m.

    The UUU commands like UCmd and ACmd are also added. Users need set
    CONFIG_FASTBOOT_UUU_SUPPORT=y to enable the feature.

    Signed-off-by: Frank Li
    Signed-off-by: Ye Li
    (cherry picked from commit 65120b06a7f750b9b1a6e0db3d2082cc7088d5a8)
    (cherry picked from commit 9b149c2a28829fe7017f83981d634157bc31cc94)

    Ye Li
     
  • Porting the android AVB lib from imx u-boot v2018.03. Since 2019 u-boot
    has added latest AVB library, try to reuse it.

    Signed-off-by: Ye Li
    (cherry picked from commit 2105662ada738a271e12a81d775134a5821dc38f)
    (cherry picked from commit f7291d86c4183ce2e299ad271aa5618c71507ffc)
    (cherry picked from commit b871714c519e1bda3de6afbd354bee2cb246e4b7)

    Ye Li
     

27 Jan, 2020

1 commit


26 Jan, 2020

1 commit

  • On m68k, block_cache list is relocated, but next and prev list
    pointers are not adjusted to the relocated struct list_head address,
    so the first iteration over the block_cache list hangs.

    This patch initializes the block_cache list after relocation.

    Signed-off-by: Angelo Durgehello
    Reviewed-by: Eric Nelson

    Angelo Durgehello
     

18 Jan, 2020

6 commits


15 Dec, 2019

3 commits

  • With FSP2 we need to run silicon init early after relocation. Add a new
    hook for this.

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

    Simon Glass
     
  • At present the early timer init happens as soon as driver model is set up.
    This makes it impossible to do anything that needs driver model but must
    run before devices are probed (as needed with Intel's FSP-S, for example).

    In any case it is not a good idea to tie probing of particular drivers too
    closely to the DM init.

    Create a new function to init the timer and put it a bit later in the
    sequence.

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

    Simon Glass
     
  • SPL and TPL can access information about binman entries using link-time
    symbols but this is not available in U-Boot proper. Of course it could be
    made available, but the intention is to just read the device tree.

    Add support for this, so that U-Boot can locate entries.

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

    Simon Glass
     

03 Dec, 2019

5 commits


21 Nov, 2019

1 commit

  • Today in initr_reloc_global_data() we use some non-obvious tests to
    determine if we need to relocate the env_addr within gd or not. In
    order to facilitate migration of other symbols to Kconfig we need to
    introduce a new symbol for this particular use case.

    Cc: Wolfgang Denk
    Cc: Joe Hershberger
    Signed-off-by: Tom Rini

    Tom Rini
     

28 Oct, 2019

1 commit

  • At present bootstage relocation assumes that it is possible to point back
    to memory available before relocation, so it does not relocate the
    strings. However this is not the case on some platforms, such as x86 which
    uses the cache as RAM and loses access to this when the cache is enabled.

    Move the relocation step to before U-Boot relocates, expand the allocated
    region to include space for the strings and relocate the strings at the
    same time as the bootstage records.

    This ensures that bootstage data can remain accessible from TPL through
    SPL to U-Boot before/after relocation.

    Signed-off-by: Simon Glass

    Simon Glass
     

31 Aug, 2019

1 commit

  • The current code in reserve_noncached() has two issues:

    1) The first update of gd->start_addr_sp always rounds down to a section
    start. However, the equivalent calculation in cache.c:noncached_init()
    always first rounds up to a section start, then subtracts a section size.
    These two calculations differ if the initial value is already rounded to
    section alignment.

    2) The second update of gd->start_addr_sp subtracts exactly
    CONFIG_SYS_NONCACHED_MEMORY, whereas the equivalent calculation in
    cache.c:noncached_init() rounds the noncached size up to section
    alignment before subtracting it. The two calculations differ if the
    noncached region size is not a multiple of the MMU section size.

    In practice, one/both of those issues causes a practical problem on
    Jetson TX1; U-Boot triggers a synchronous abort during initialization,
    likely due to overlapping use of some memory region.

    This change fixes both these issues by duplicating the exact calculations
    from noncached_init() into reserve_noncached().

    However, this fix assumes that gd->start_addr_sp on entry to
    reserve_noncached() exactly matches mem_malloc_start on entry to
    noncached_init(). I haven't traced the code to see whether it absolutely
    guarantees this in all (or indeed any!) cases. Consequently, I added some
    comments in the hope that this condition will continue to be true.

    Fixes: 5f7adb5b1c02 ("board_f: reserve noncached space below malloc area")
    Cc: Vikas Manocha
    Signed-off-by: Stephen Warren

    Stephen Warren
     

12 Aug, 2019

4 commits


29 Jul, 2019

1 commit


20 Jul, 2019

1 commit

  • Use CONFIG_IS_ENABLED(WDT) to permit use of WDT in SPL without DM,
    while the full U-Boot can use rich DM/DT WDT driver.

    Signed-off-by: Marek Vasut
    Cc: Peng Fan
    Cc: Stefano Babic
    Tested-by: Heiko Schocher
    Tested-by: Suniel Mahesh

    Marek Vasut
     

13 Jul, 2019

1 commit

  • add gpio-hog support. GPIO hogging is a mechanism
    providing automatic GPIO request and configuration
    as part of the gpio-controller's driver probe function.

    for more infos see:
    doc/device-tree-bindings/gpio/gpio.txt

    Signed-off-by: Heiko Schocher
    Tested-by: Michal Simek (zcu102)
    Tested-by: Patrick Delaunay

    Heiko Schocher
     

08 Jul, 2019

1 commit

  • The initr_watchdog is currently placed before initr_serial. The
    initr_watchdog calls printf and printf finally calls ops->putc of a serial
    driver.

    However, gd->cur_serial_dev points to a udevice allocated in board_f. The
    gd->cur_serial_dev->driver->ops->putc points the the code region before
    relocation.

    Some serial drivers call WATCHDOG_RESET() in ops->putc. When DM is enabled
    for watchdog, watchdog_reset() is called. watchdog_reset() calls get_timer
    to get current timer.

    On some platforms the timer driver is also a DM driver. initr_watchdog is
    placed right after initr_dm, which means the timer driver hasn't been
    initialized. So dm_timer_init() is called. To create a new udevice, calloc
    is called.

    However start from ops->putc, u-boot execution flow is redirected into the
    memory region before relocation (board_f). In board_f, dlmalloc hasn't
    been initialized. The call to calloc will fail, and this will cause DM to
    print out an error message, and it will call printf again, causing
    recursive error outputs.

    This patch places initr_watchdog after initr_serial to solve this issue.

    Cc: Stefan Roese
    Reviewed-by: Ryder Lee
    Signed-off-by: Weijie Gao
    Reviewed-by: Stefan Roese
    Tested-by: Frank Wunderlich
    Tested-by: Suniel Mahesh

    Weijie Gao
     

26 Apr, 2019

1 commit

  • This patch tries to implement a generic watchdog_reset() function that
    can be used by all boards that want to service the watchdog device in
    U-Boot. This watchdog servicing is enabled via CONFIG_WATCHDOG.

    Without this approach, new boards or platforms needed to implement a
    board specific version of this functionality, mostly copy'ing the same
    code over and over again into their board or platforms code base.

    With this new generic function, the scattered other functions are now
    removed to be replaced by the generic one. The new version also enables
    the configuration of the watchdog timeout via the DT "timeout-sec"
    property (if enabled via CONFIG_OF_CONTROL).

    This patch also adds a new flag to the GD flags, to flag that the
    watchdog is ready to use and adds the pointer to the watchdog device
    to the GD. This enables us to remove the global "watchdog_dev"
    variable, which was prone to cause problems because of its potentially
    very early use in watchdog_reset(), even before the BSS is cleared.

    Signed-off-by: Stefan Roese
    Cc: Heiko Schocher
    Cc: Tom Rini
    Cc: Michal Simek
    Cc: "Marek Behún"
    Cc: Daniel Schwierzeck
    Cc: Maxim Sloyko
    Cc: Erik van Luijk
    Cc: Ryder Lee
    Cc: Weijie Gao
    Cc: Simon Glass
    Cc: "Álvaro Fernández Rojas"
    Cc: Philippe Reynes
    Cc: Christophe Leroy
    Reviewed-by: Michal Simek
    Tested-by: Michal Simek (on zcu100)

    Stefan Roese
     

13 Apr, 2019

1 commit

  • The first functions of the UEFI sub-system are invoked before reaching the
    U-Boot shell, e.g. efi_set_bootdev(), efi_dp_from_name(),
    efi_dp_from_file(). We should be able to print out device paths for
    debugging purposes here.

    When printing device paths via printf("%pD\n", dp) this invokes functions
    defined as EFIAPI. So efi_save_gd() must be called beforehand.

    So let's move the efi_save_gd() call to function initr_reloc_global_data(()
    in board_r.c.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     

09 Feb, 2019

1 commit

  • The board_r init function was complaining that we are looping through
    an array, calling all our tiny init stubs sequentially via indirect
    function calls (which can't be speculated, so they are slow).

    The solution to that is pretty easy though. All we need to do is inline
    the function that loops through the functions and the compiler will
    automatically convert almost all indirect calls into direct inlined code.

    With this patch, the overall code size drops (by 40 bytes on riscv64)
    and boot time should become measurably faster for every target.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

06 Dec, 2018

1 commit


04 Dec, 2018

1 commit

  • Patch queue for efi - 2018-12-03

    This release is fully packed with lots of glorious improvements in UEFI
    land again!

    - Make PE images more standards compliant
    - Improve sandbox support
    - Improve correctness
    - Fix RISC-V execution on virt model
    - Honor board defined top of ram (fixes a few boards)
    - Imply DM USB access when distro boot is available
    - Code cleanups

    Tom Rini
     

03 Dec, 2018

2 commits

  • CC common/board_r.o
    common/board_r.c:747:2: error: ‘initr_spi’ undeclared here (not in a function)
    initr_spi,
    ^
    make[1]: *** [common/board_r.o] Error 1

    Fixes: ebe76a2df9f6 ("dm: Remove spi_init() from board_r.c when using driver model")
    Signed-off-by: Christophe Leroy

    Christophe Leroy
     
  • The sandbox uses a virtual address space that is neither the physical nor
    the virtual address space of the operating system. All address used on the
    command line live in this address space. So also the environment variable
    ${fdtcontroladdr} has to be in this address space.

    Commands like bootefi and booti receive the fdt address as parameter.
    Without the patch ${fdtcontroladdr} cannot be used as parameter value on
    the sandbox.

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

    Heinrich Schuchardt
     

27 Nov, 2018

2 commits