10 Dec, 2018

1 commit

  • In some cases it may be useful to be able to change the fdt we have been
    using and use another one instead. For example, the TI platforms uses an
    EEPROM to store board information and, based on the type of board,
    different dtbs are used by the SPL. When DM_I2C is used, a first dtb must
    be used before the I2C is initialized and only then the final dtb can be
    selected.
    To speed up the process and reduce memory usage, introduce a new function
    fdtdec_setup_best_match() that re-use the DTBs loaded in memory by
    fdtdec_setup() to select the best match.

    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Heiko Schocher

    Jean-Jacques Hiblot
     

03 Dec, 2018

1 commit

  • This adds characteristics macros as defined by the Microsoft PE
    Format documentation [1].

    [1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

    Signed-off-by: Bin Meng
    Reviewed-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Bin Meng
     

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
     

26 Sep, 2018

1 commit

  • The arm, xtensa and mips version of atomic.h were already very similar
    (the mips one was a copy of xtensa). Combine these implementations
    together to produce a generic atomic.h that can be included by these
    architectures (and any others that need it in future).

    Signed-off-by: Chris Packham
    Reviewed-by: Tom Rini

    Chris Packham
     

11 Sep, 2018

1 commit


30 Jul, 2018

1 commit

  • When called with ENVOP_SAVE, env_get_location() only returns the
    gd->env_load_location variable without actually checking for
    the environment location and priority.

    This behaviour causes env_save() to fall into an infinite loop when
    the low-level drv->save() call fails.

    The env_save() function should not loop through the environment
    location list but it should save the environment into the location
    stored in gd->env_load_location by the last env_load() call.

    Signed-off-by: Nicholas Faustini
    Reviewed-by: Simon Goldschmidt

    Nicholas Faustini
     

09 Jul, 2018

1 commit

  • Support a default memory bank, specified in reg, as well as
    board-specific memory banks in subtree board-id nodes.

    This allows memory information to be provided in the device tree,
    rather than hard-coded in, which will make it simpler to handle
    similar devices with different memory banks, as the board-id values
    or masks can be used to match devices.

    Signed-off-by: Michael Pratt
    Signed-off-by: Simon Glass
    Reviewed-by: Vadim Bendebury

    Michael Pratt
     

03 Jun, 2018

1 commit

  • The UEFI spec mandates that unaligned memory access should be enabled if
    supported by the CPU architecture.

    This patch adds an empty weak function unaligned_access() that can be
    overridden by an architecture specific routine.

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

    Heinrich Schuchardt
     

11 May, 2018

1 commit

  • As part of the main conversion a few files were missed. These files had
    additional whitespace after the '*' and before the SPDX tag and my
    previous regex was too strict. This time I did a grep for all SPDX tags
    and then filtered out anything that matched the correct styles.

    Fixes: 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
    Reported-by: Heinrich Schuchardt
    Signed-off-by: Tom Rini

    Tom Rini
     

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
     

07 Apr, 2018

1 commit


17 Feb, 2018

1 commit

  • Commit 7d714a24d725 ("env: Support multiple environments") added
    static variable env_load_location. When saving environmental
    variables, this variable is presumed to have the value set before.
    In case the value was set before relocation and U-Boot runs from a
    NOR flash, this variable wasn't writable. This causes failure when
    saving the environment. To save this location, global data must be
    used instead.

    Signed-off-by: York Sun
    CC: Maxime Ripard

    York Sun
     

10 Feb, 2018

1 commit

  • Before the patch an undefined constant EFI_SUBSYSTEM was used in the
    crt0 code. The current version of binutils does not swallow the error.

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888403

    The necessary constant IMAGE_SUBSYSTEM_EFI_APPLICATION is already
    defined in pe.h. So let's factor out asm-generic/pe.h for the
    image subsystem constants and use it in our assembler code.

    IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER does not exist in the specification
    let's use IMAGE_SUBSYSTEM_EFI_ROM instead.

    The include pe.h is only used in code maintained by Alex so let him be the
    maintainer here too.

    Reported-by: Andre Przywara
    Signed-off-by: Heinrich Schuchardt
    Tested-by: Vagrant Cascadian
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

04 Feb, 2018

1 commit

  • 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
     

28 Jan, 2018

1 commit

  • Several inline functions in this file reference undefined functions in
    U-Boot. For example:

    atomic-long.h:73:9: warning: implicit declaration of function
    'atomic64_sub_and_test'
    atomic-long.h:80:9: warning: implicit declaration of function
    'atomic64_dec_and_test'
    atomic-long.h:87:9: warning: implicit declaration of function
    'atomic64_inc_and_test'

    Handle this the same as the 32 bit build by wrapping these functions in
    a __UBOOT__ check.

    Signed-off-by: Bradley Bolen

    Bradley Bolen
     

27 Jan, 2018

1 commit

  • Since we want to have multiple environments, we will need to initialise
    all the environments since we don't know at init time what drivers might
    fail when calling load.

    Let's init all of them, and only consider for further operations the ones
    that have not reported any errors at init time.

    Reviewed-by: Simon Glass
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     

08 Dec, 2017

3 commits


03 Oct, 2017

1 commit

  • Most architectures currently supported by U-Boot use trivial
    implementations of map_to_physmem & virt_to_phys which simply cast a
    physical address to a pointer for use a virtual address & vice-versa.
    This results in a lot of duplicate implementations of these mapping
    functions.

    The set of functions provided by different architectures also differs,
    with some having implementations of phys_to_virt & others not. A later
    patch will make use of phys_to_virt in architecture-neutral code, and so
    requires that it be provided for all architectures.

    This patch introduces an asm-generic/io.h which provides generic
    implementations of address mapping functions, allowing the duplication
    of them between architectures to be removed. Once architectures are
    converted to make use of this generic header it will also ensure that
    all of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are
    provided. The 2 families of functions differ in that map_physmem may
    create dynamic mappings whilst phys_to_virt may not & therefore is more
    limited in scope but doesn't require information such as a length &
    flags.

    This patch doesn't convert any architectures to make use of this generic
    header - later patches in the series will do so.

    Signed-off-by: Paul Burton
    Cc: Albert Aribaud
    Cc: Alexey Brodkin
    Cc: Angelo Dureghello
    Cc: Bin Meng
    Cc: Daniel Schwierzeck
    Cc: Macpaul Lin
    Cc: Michal Simek
    Cc: Nobuhiro Iwamatsu
    Cc: Thomas Chou
    Cc: Wolfgang Denk
    Acked-by: Angelo Dureghello
    Tested-by: Angelo Dureghello
    Reviewed-by: Simon Glass
    Reviewed-by: Daniel Schwierzeck

    Paul Burton
     

19 Sep, 2017

1 commit

  • In scripts/Makefile.lib we build section including helloworld.efi.
    This allows to load the EFI binary with command 'bootefi hello'.

    scripts/Makefile.lib contains explicit references to strings
    containing helloworld and hello_world. This makes it impossible
    to generalize the coding to accomodate additional built in
    EFI binaries.

    Let us rename the variables __efi_hello_world_* to
    __efi_helloworld_*.

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

    Heinrich Schuchardt
     

16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

15 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
     

09 Jul, 2017

1 commit

  • CS Systemes d'Information (CSSI) manufactures 8xx boards for
    critical communication systems. Those boards have been
    running U-Boot since 2010 and will have to be maintained
    until at least 2027.

    commit 5b8e76c35ec312a3f73126bd1a2d2c0965b98a9f
    ("powerpc, 8xx: remove support for 8xx") orphaned those boards
    by removing support for the mpc8xx CPU.

    This commit partially restores support for the 8xx, with the
    following limitations:
    - Restores support for MPC866 and MPC885 only
    - Does not restore IDE, PCMCIA, I2C, USB
    - Does not restore examples
    - Does not restore POST
    - Does not restore Ethernet on SCC
    - Does not restore console on SCC
    - Does not restore bedbug and kgdb support

    As the 866 and 885 do not support the following features,
    they are not restored either:
    - VIDEO / LCD
    - RTC clock

    The CPM uCODE patch is not restored either, because:
    - 866 and 885 already have support for I2C and SPI relocation
    without a uCODE patch
    - relocation of SMC, I2C or SPI is only needed for using SCCs
    for Ethernet or QMC

    The dynamic setup/calculation of clocks is removed, we
    expect the target being use with the clock and PLPRCR register
    defined in the configuration.
    All the clock settings for 8xx prior to 866 is removed as
    well as we now only support 866 and 885.

    This code is mature and addresses mature boards. Therefore
    all code enclosed in '#if 0/#endif' and '#if XX_DEBUG/#endif'
    is unneeded.

    The following files are not restored by this patch:

    - arch/powerpc/cpu/mpc8xx/bedbug_860.c
    - arch/powerpc/cpu/mpc8xx/fec.h
    - arch/powerpc/cpu/mpc8xx/kgdb.S
    - arch/powerpc/cpu/mpc8xx/plprcr_write.S
    - arch/powerpc/cpu/mpc8xx/scc.c
    - arch/powerpc/cpu/mpc8xx/upatch.c
    - arch/powerpc/cpu/mpc8xx/video.c
    - arch/powerpc/include/asm/status_led.h
    - arch/powerpc/lib/ide.c
    - arch/powerpc/lib/ide.h
    - doc/README.MPC866
    - drivers/pcmcia/mpc8xx_pcmcia.c
    - drivers/rtc/mpc8xx.c
    - drivers/usb/gadget/mpc8xx_udc.c
    - drivers/video/mpc8xx_lcd.c
    - examples/standalone/test_burst.c
    - examples/standalone/test_burst.h
    - examples/standalone/test_burst_lib.S
    - examples/standalone/timer.c
    - include/mpc823_lcd.h
    - include/usb/mpc8xx_udc.h
    - post/cpu/mpc8xx/Makefile
    - post/cpu/mpc8xx/cache.c
    - post/cpu/mpc8xx/cache_8xx.S
    - post/cpu/mpc8xx/ether.c
    - post/cpu/mpc8xx/spr.c
    - post/cpu/mpc8xx/uart.c
    - post/cpu/mpc8xx/usb.c
    - post/cpu/mpc8xx/watchdog.c

    Some of the restored files are not located in a proper location.
    In order to keep traceability of the changes, they will be
    moved to their correct location and moved to Kconfig in a
    followup patch.

    This patch also declares CSSI as point of contact for the update
    of the 8xx platform, as those boards are the only ones still
    being maintained on the 8xx area. A later patch will add
    those boards to the tree.

    Signed-off-by: Christophe Leroy

    Christophe Leroy
     

07 Jul, 2017

1 commit

  • AVR32 is gone. It's already more than two years for no support in Buildroot,
    even longer there is no support in GCC (last version is heavily patched 4.2.4).

    Linux kernel v4.12 got rid of it (and v4.11 didn't build successfully).

    There is no good point to keep this support in U-Boot either.

    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini
    Reviewed-by: Heiko Schocher
    Signed-off-by: Andy Shevchenko

    Andy Shevchenko
     

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

3 commits


06 Jun, 2017

2 commits

  • Some boards cannot access pre-relocation data after relocation. Reserve
    space for this and copy it during preparation for relocation.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present bootstage uses the data section of the image to store its
    information. There are a few problems with this:

    - It does not work on all boards (e.g. those which run from flash before
    relocation)
    - Allocated strings still point back to the pre-relocation data after
    relocation

    Now that U-Boot has a pre-relocation malloc() we can use this instead,
    with a pointer to the data in global_data. Update bootstage to do this and
    set up an init routine to allocate the memory.

    Now that we have a real init function, we can drop the fake 'reset' record
    and add a normal one instead.

    Note that part of the problem with allocated strings remains. They are
    reallocated but this will only work where pre-relocation memory is
    accessible after relocation.

    Signed-off-by: Simon Glass

    Simon Glass
     

01 Jun, 2017

4 commits


12 May, 2017

1 commit

  • Change type of timebase_l/h to unsigned int.
    >From lib/time.c: ((uint64_t)gd->timebase_h << 32) | gd->timebase_l;
    This piece code is based on that timebase_h and timebase_l are
    32bits width, so change the type to unsigned int.

    Signed-off-by: Peng Fan
    Cc: Eddie Cai
    Cc: Jagan Teki
    Cc: York Sun
    Cc: "Robert P. J. Day"
    Cc: Michal Simek
    Cc: Tom Rini
    Reviewed-by: Simon Glass

    Peng Fan
     

06 Apr, 2017

1 commit