15 Jul, 2019

1 commit

  • Serial init in board_init_f will cost much time, skip it here
    because the serial will be initialized again in board_init_r
    and it's more faster (after cache is enabled). We will miss
    some logs before the serial is ready but it's ok for Android Auto.
    This commit will save about 190ms on imx8qm.

    Test: boot ok for both imx8qm and imx8qxp.

    Change-Id: If6efdc19794aecda862f22b6fec7f7aba2005766
    Signed-off-by: Ji Luo
    Reviewed-by: Ye Li

    Ji Luo
     

24 May, 2019

1 commit


06 Dec, 2018

1 commit


27 Nov, 2018

2 commits


26 Nov, 2018

2 commits

  • There is some basic informaton that SPL normally wants to pass through to
    U-Boot, such as the SDRAM size and bank information.

    Mkae use of the new bloblist structure for this. Add a new 'handoff' blob
    which is set up in SPL and passed to U-Boot proper. Also adda test for
    sandbox_spl that checks that this works correctly and a new 'sb' command
    to show the information passed from SPL.

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

    Simon Glass
     
  • Add support for locating a bloblist in U-Boot that has been set up by SPL.
    It is copied into RAM during relocation.

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

    Simon Glass
     

17 Nov, 2018

1 commit


15 Nov, 2018

2 commits

  • It was observed that current output of print_cpuinfo() on QEMU
    x86 targets does not have an ending '\n', neither have a leading
    'CPU:' any more. However it used to have these before.

    It turns out commit c0434407b595 introduced a unified DM version
    of print_cpuinfo() that exposed such issue on QEMU x86.

    Fixes: c0434407b595 ("board_f: Use static print_cpuinfo if CONFIG_CPU is active")
    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass

    Bin Meng
     
  • When the DM CPU drivers are active, printing information about a CPU
    should be delegated to a matching driver.

    Hence, add a static print_cpuinfo that implements this delegation when
    DM CPU drivers are active.

    Reviewed-by: Simon Glass
    Signed-off-by: Mario Six
    Changed condition to CONFIG_IS_ENABLED(CPU):
    Signed-off-by: Simon Glass

    Mario Six
     

08 Nov, 2018

1 commit

  • This reverts commit c0434407b595f785fc7401237896c48c791b45fd.

    It turns out commit c0434407b595 broke some boards which have DM CPU
    driver with CONFIG_DISPLAY_CPUINFO option on. These boards just fail
    to boot when print_cpuinfo() is called during boot.

    Fixes are already sent to ML and in u-boot-dm/next, however since
    we are getting close to the v2018.11 release, it's safer we revert
    the original commit.

    This commit should be reverted after v2018.11 release.

    Signed-off-by: Bin Meng
    Acked-by: Peng Fan
    Reviewed-by: Simon Glass

    Bin Meng
     

18 Sep, 2018

3 commits


19 Jul, 2018

1 commit


06 Jun, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

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
     

17 Mar, 2018

2 commits


28 Jan, 2018

1 commit


25 Jan, 2018

1 commit


24 Jan, 2018

2 commits


12 Jan, 2018

1 commit


08 Dec, 2017

2 commits


16 Sep, 2017

1 commit

  • Once U-Boot relocates itself the existing driver-model timer (if any) is
    no-longer valid until the device is reinitialised. Any use of the device
    may cause a crash. To handle this, set the timer to NULL after relocation.

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

    Simon Glass
     

20 Aug, 2017

1 commit


16 Aug, 2017

1 commit


02 Aug, 2017

1 commit


27 Jul, 2017

1 commit

  • Some platforms have very limited SRAM to run SPL code, so there may
    not be the same amount space for a malloc pool before relocation in
    the SPL stage as the normal U-Boot stage.

    Make SPL and (the full) U-Boot stage use independent SYS_MALLOC_F_LEN,
    so the size of pre-relocation malloc pool can be configured memory
    space independently.

    Signed-off-by: Andy Yan
    Reviewed-by: Tom Rini
    Acked-by: Philipp Tomsich
    Reviewed-by: Philipp Tomsich
    [fixed up commit-message:]
    Signed-off-by: Philipp Tomsich

    Andy Yan
     

26 Jul, 2017

1 commit

  • U-Boot has up until now built with -fpic for the MIPS architecture,
    producing position independent code which uses indirection through a
    global offset table, making relocation fairly straightforward as it
    simply involves patching up GOT entries.

    Using -fpic does however have some downsides. The biggest of these is
    that generated code is bloated in various ways. For example, function
    calls are indirected through the GOT & the t9 register:

    8f998064 lw t9,-32668(gp)
    0320f809 jalr t9

    Without -fpic the call is simply:

    0f803f01 jal be00fc04

    This is more compact & faster (due to the lack of the load & the
    dependency the jump has on its result). It is also easier to read &
    debug because the disassembly shows what function is being called,
    rather than just an offset from gp which would then have to be looked up
    in the ELF to discover the target function.

    Another disadvantage of -fpic is that each function begins with a
    sequence to calculate the value of the gp register, for example:

    3c1c0004 lui gp,0x4
    279c3384 addiu gp,gp,13188
    0399e021 addu gp,gp,t9

    Without using -fpic this sequence no longer appears at the start of each
    function, reducing code size considerably.

    This patch switches U-Boot from building with -fpic to building with
    -fno-pic, in order to gain the benefits described above. The cost of
    this is an extra step during the build process to extract relocation
    data from the ELF & write it into a new .rel section in a compact
    format, plus the added complexity of dealing with multiple types of
    relocation rather than the single type that applied to the GOT. The
    benefit is smaller, cleaner, more debuggable code. The relocate_code()
    function is reimplemented in C to handle the new relocation scheme,
    which also makes it easier to read & debug.

    Taking maltael_defconfig as an example the size of u-boot.bin built
    using the Codescape MIPS 2016.05-06 toolchain (gcc 4.9.2, binutils
    2.24.90) shrinks from 254KiB to 224KiB.

    Signed-off-by: Paul Burton
    Cc: Daniel Schwierzeck
    Cc: u-boot@lists.denx.de
    Reviewed-by: Daniel Schwierzeck
    Tested-by: Daniel Schwierzeck

    Paul Burton
     

11 Jul, 2017

1 commit

  • Runtime U-boot dtb selection is generally a two step process. First step
    is to simply use an initial generic dtb. The second step is to select
    the dtb and perhaps execute additional code ones U-boot knows what board
    it is running on. Embedded_dtb_select handles the second step by allowing
    board specific code to run and perform what ever necessary configuration
    that is needed.

    Signed-off-by: Franklin S Cooper Jr
    Reviewed-by: Tom Rini

    Cooper Jr., Franklin
     

04 Jul, 2017

1 commit

  • There was for long time no activity in the 4xx area.
    We need to go further and convert to Kconfig, but it
    turned out, nobody is interested anymore in 4xx,
    so remove it.

    Signed-off-by: Heiko Schocher

    Heiko Schocher
     

16 Jun, 2017

1 commit


12 Jun, 2017

4 commits

  • relocate_code() calculates the relocation offset wrt. the symbol
    __image_copy_start which happens to have the same value as
    CONFIG_TEXT_BASE on most systems.
    When creating an i.MX boot image with an integrated IVT it is
    convenient to have CONFIG_TEXT_BASE point to the start of the IVT
    that is prepended to the actual code. Thus CONFIG_TEXT_BASE will
    differ from __image_copy_start, while the calculation
    'gd->relocaddr - __image_copy_start' still gives the right relocation
    offset.

    Signed-off-by: Lothar Waßmann

    Lothar Waßmann
     
  • The current implementation makes it look like the 'if (from_spl)' part is
    dead code because these features are not enabled for sandbox. We could
    enable it for sandbox_spl, but this is not done yet (it requires sharing
    memory between SPL and U-Boot proper which is in fact supported).

    It is probably nicer to avoid #ifdef anyway. Change it.

    Signed-off-by: Simon Glass
    Reported-by: Coverity (CID: 163244)
    Fixes: 824bb1b (bootstage: Support SPL)

    Simon Glass
     
  • There was for long time no activity in the 5xx area.
    We need to go further and convert to Kconfig, but it
    turned out, nobody is interested anymore in 5xx,
    so remove it.

    Signed-off-by: Heiko Schocher

    Heiko Schocher
     
  • There was for long time no activity in the 8260 area.
    We need to go further and convert to Kconfig, but it
    turned out, nobody is interested anymore in 8260,
    so remove it.

    Signed-off-by: Heiko Schocher

    Heiko Schocher