08 Feb, 2020

1 commit

  • Based on reading the text of the license comment this appears to be
    the BSD-2-Clause license but with an imperfect word match as
    BSD-2-Clause was not (as far as I recall) a common license choice at the
    time the code was written.

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

    Tom Rini
     

18 Jan, 2020

2 commits


03 Dec, 2019

1 commit


12 Aug, 2019

2 commits


19 Feb, 2019

1 commit

  • Currently there are two problems in 'bootelf -p' (load elf by segments)
    command:
    - bss section is not flushed, so booted elf can have non zero values
    in bss;
    - at least on ARM there are 'CACHE: Misaligned operation at
    range...' warnings

    Use p_memsz instead of p_filesz during cache flushing for elf segment.
    p_filesz doesn't include zero initialized memory (e.g. bss section),
    which also should be flushed.

    Align these cache flushes to line boundaries.

    Signed-off-by: Kurban Mallachiev

    Kurban Mallachiev
     

01 Oct, 2018

1 commit


25 Aug, 2018

1 commit

  • Prevent cache warning messages when using the 'bootelf' command on an
    Arm target. Round down each section start address and round up the
    respective section end to the nearest cache line.

    Currently when using bootelf to load an image on Arm, several warnings
    such as the following appear in the console:
    CACHE: Misaligned operation at range [87800000, 8783c5e0]
    CACHE: Misaligned operation at range [8783c5e0, 8784b3e0]

    Signed-off-by: Neil Stainton
    [trini: Reword commit message to include the info after the --- which
    included the Signed-off-by line, and change ' at ' to '@']
    Signed-off-by: Tom Rini

    Neil Stainton
     

11 Aug, 2018

1 commit

  • This update adds PPC64 ELF V1 ABI support to bootelf for both the
    program header and section header options. Elf64 support was already
    present for the program header option, but it was not handling the
    PPC64 ELF V1 ABI case. For the PPC64 ELF V1 ABI, the e_entry field of
    the elf header must be treated as function descriptor pointer instead
    of a function address. The first doubleword of the function descriptor
    is the function's entry address.

    Signed-off-by: Rob Bracero
    [trini: Fix whitespace issues]
    Signed-off-by: Tom Rini

    Rob Bracero
     

16 Apr, 2018

9 commits

  • On VxWorks x86 its bootline address is at a pre-defined offset @
    0x1200. If 'bootaddr' is not passed via environment variable, we
    assign its value based on the kernel memory base address.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • Exit the 'bootvx' command if bootline address is not specified.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • There is a small duplication in do_bootvx() that does the bootline
    copy. Refactor this a little bit to make it simpler.

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

    Bin Meng
     
  • When booting from EFI BIOS, VxWorks bootloader stores the EFI GOP
    framebuffer info at a pre-defined offset @ 0x6100. When VxWorks
    kernel boots up, its EFI console driver tries to find such a block
    and if the signature matches, the framebuffer information will be
    used to initialize the driver.

    However it is not necessary to prepare an EFI environment for
    VxWorks's EFI console driver to function (eg: EFI loader in
    U-Boot). If U-Boot has already initialized the graphics card and
    set it to a VESA mode that is compatible with EFI GOP, we can
    simply prepare such a block for VxWorks.

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

    Bin Meng
     
  • This adds a very simple ELF64 loader via program headers, similar
    to load_elf_image_phdr() that we already have.

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

    Bin Meng
     
  • This changes 'struct e820entry' to 'struct e820_entry' to conform
    with the coding style.

    Signed-off-by: Bin Meng
    Reviewed-by: Christian Gmeiner

    Bin Meng
     
  • This changes 'struct e820info' to 'struct e820_info' to conform
    with the coding style.

    Signed-off-by: Bin Meng
    Reviewed-by: Christian Gmeiner

    Bin Meng
     
  • VxWorks bootloader stores its size at a pre-defined offset @ 0x5004.
    Later when VxWorks kernel boots up and system memory information is
    retrieved from the E820 table, the bootloader size will be subtracted
    from the total system memory size to calculate the size of available
    memory for the OS.

    Explicitly clear the bootloader image size otherwise if memory
    at this offset happens to contain some garbage data, the final
    available memory size for the kernel is insane.

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

    Bin Meng
     
  • At present two environment variables 'e820data'/'e820info' are required
    to boot a VxWorks x86 kernel, but this is superfluous. The offset of
    these two tables are actually at a fixed offset from the kernel memory
    base address and we can provide the kernel memory base address to U-Boot
    via only one variable 'vx_phys_mem_base'.

    Note as it name indicates, the physical address should be provided.

    Signed-off-by: Bin Meng
    Reviewed-by: Christian Gmeiner

    Bin Meng
     

14 Apr, 2018

1 commit

  • Without armv8_setup_psci register VBAR_EL3 is not set up property which
    makes SMC calls jump to invalid location.

    smp_kick_all_cpus is required to make slave cpus leave gic_wait_for_interrupt.
    Without this they will never pursue booting process.

    Fix was applied to the two ways of booting VxWorks: bootvx and bootm commands.

    This implementation is very similar to what is done in boot_jump_linux
    in arch/arm/lib/bootm.c file.

    Tested on VxWorks 7 release SR0520 2017-12-08 Intel Stratix 10 SX SoC
    Development Kit board.

    Signed-off-by: Vasyl Vavrychuk
    Reviewed-by: Bin Meng

    Vasyl Vavrychuk
     

09 Apr, 2018

1 commit

  • In order that we can use eth_env_* even when CONFIG_NET isn't set, move
    these functions to environment code from net code.

    This fixes failures such as:

    board/ti/am335x/built-in.o: In function `board_late_init':
    board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
    u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

    which caters for use cases such as:

    commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
    variable")

    when Ethernet is required in Linux, but not U-Boot.

    Signed-off-by: Alex Kiernan

    Alex Kiernan
     

07 Apr, 2018

1 commit

  • The section header address is a VMA whereas the address found in
    the program header is a physical one. With this change it is
    possible to load and start a vx7 intel generic based image.

    $ readelf -l /tmp/vx7

    Elf file type is EXEC (Executable file)
    Entry point 0x408000
    There are 2 program headers, starting at offset 52

    Program Headers:
    Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
    LOAD 0x001000 0x00408000 0x00408000 0x04000 0x04000 RWE 0x1000
    LOAD 0x005000 0xe040c000 0x0040c000 0x583a84 0x5ccc70 RWE 0x1000

    Section to Segment mapping:
    Segment Sections...
    00 .text.locore .data.locore
    01 .text .eh_frame .wrs_build_vars .data .tls_data .tls_vars .bss

    $ readelf -S /tmp/vx7
    There are 13 section headers, starting at offset 0x588af8:

    Section Headers:
    [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
    [ 0] NULL 00000000 000000 000000 00 0 0 0
    [ 1] .text.locore PROGBITS 00408000 001000 00011e 00 AX 0 0 16
    [ 2] .data.locore PROGBITS 00409000 002000 003000 00 WA 0 0 4096
    [ 3] .text PROGBITS e040c000 005000 4802a0 00 WAX 0 0 32
    [ 4] .eh_frame PROGBITS e088c2a0 4852a0 0a1ed0 00 A 0 0 4
    [ 5] .wrs_build_vars PROGBITS e092e170 527170 000190 00 Ax 0 0 1
    [ 6] .data PROGBITS e092f000 528000 060a70 00 WA 0 0 4096
    [ 7] .tls_data PROGBITS e098fa70 588a70 000004 00 A 0 0 4
    [ 8] .tls_vars PROGBITS e098fa78 588a78 00000c 00 WA 0 0 4
    [ 9] .bss NOBITS e098faa0 588a84 0491d0 00 WA 0 0 32
    [10] .shstrtab STRTAB 00000000 588a84 000074 00 0 0 1
    [11] .symtab SYMTAB 00000000 588d00 056ee0 10 12 9758 4
    [12] .strtab STRTAB 00000000 5dfbe0 05f48a 00 0 0 1
    Key to Flags:
    W (write), A (alloc), X (execute), M (merge), S (strings)
    I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
    O (extra OS processing required) o (OS specific), p (processor specific)

    For completeness here are the same information for an old vx5 based image. After
    this change it is possible to boot vx5 and vx7 (intel generic) images.

    $ readelf -l /tmp/vx5

    Elf file type is EXEC (Executable file)
    Entry point 0x308000
    There are 1 program headers, starting at offset 52

    Program Headers:
    Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
    LOAD 0x000060 0x00308000 0x00308000 0x3513a0 0x757860 RWE 0x20

    Section to Segment mapping:
    Segment Sections...
    00 .text .data .bss
    [christian@chgm-pc ~]$ readelf -S /tmp/vx5
    There are 12 section headers, starting at offset 0x356580:

    Section Headers:
    [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
    [ 0] NULL 00000000 000000 000000 00 0 0 0
    [ 1] .text PROGBITS 00308000 000060 319b10 00 WAX 0 0 32
    [ 2] .data PROGBITS 00621b20 319b80 037880 00 WA 0 0 32
    [ 3] .bss NOBITS 006593a0 351400 4064c0 00 WA 0 0 16
    [ 4] .debug_aranges PROGBITS 00000000 351400 000060 00 0 0 1
    [ 5] .debug_pubnames PROGBITS 00000000 351460 00018b 00 0 0 1
    [ 6] .debug_info PROGBITS 00000000 3515eb 003429 00 0 0 1
    [ 7] .debug_abbrev PROGBITS 00000000 354a14 000454 00 0 0 1
    [ 8] .debug_line PROGBITS 00000000 354e68 0016a4 00 0 0 1
    [ 9] .shstrtab STRTAB 00000000 35650c 000071 00 0 0 1
    [10] .symtab SYMTAB 00000000 356760 0440e0 10 11 8574 4
    [11] .strtab STRTAB 00000000 39a840 03e66c 00 0 0 1
    Key to Flags:
    W (write), A (alloc), X (execute), M (merge), S (strings)
    I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
    O (extra OS processing required) o (OS specific), p (processor specific)

    Signed-off-by: Christian Gmeiner
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Christian Gmeiner
     

29 Jan, 2018

1 commit


16 Aug, 2017

3 commits


06 Jun, 2017

1 commit

  • The bootelf command could, but does not, pass additional arguments along
    on the command line. Make do_bootelf consume bootelf/flags/address as
    needed and then pass along anything else to the ELF application we've
    launched.

    Reported-by: Thomas Doerfler
    Signed-off-by: Tom Rini

    Tom Rini
     

21 Jan, 2017

1 commit


25 Jan, 2016

1 commit

  • Now that they are in their own directory, we can remove this prefix.
    This makes it easier to find a file since the prefix does not get in the
    way.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass