27 Feb, 2019

1 commit

  • The QEMU CPU support under arch/riscv is pretty much generic
    and works fine for SiFive Unleashed as well. In fact, there
    will be quite a few RISC-V SOCs for which QEMU CPU support
    will work fine.

    This patch renames cpu/qemu to cpu/generic to indicate the
    above fact. If there are SOC specific errata workarounds
    required in cpu/generic then those can be done at runtime
    in cpu/generic based on CPU vendor specific DT compatible
    string.

    Signed-off-by: Anup Patel
    Reviewed-by: Alexander Graf
    Reviewed-by: Lukas Auer
    Reviewed-by: Bin Meng

    Anup Patel
     

18 Dec, 2018

2 commits


05 Dec, 2018

2 commits

  • This patch adds S-mode defconfigs for QEMU virt machine so
    that we can run u-boot in S-mode on QEMU using M-mode runtime
    firmware (BBL or equivalent).

    Signed-off-by: Anup Patel
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng
    Reviewed-by: Lukas Auer

    Anup Patel
     
  • When u-boot runs in S-mode, the M-mode runtime firmware
    (BBL or equivalent) uses memory range in 0x80000000 to
    0x80200000. Due to this, we cannot use 0x80000000 as
    SYS_TEXT_BASE when running in S-mode. Instead for S-mode,
    we use 0x80200000 as SYS_TEXT_BASE.

    Even Linux RISC-V kernel ignores/reserves memory range
    0x80000000 to 0x80200000 because it runs in S-mode.

    Signed-off-by: Anup Patel
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng
    Reviewed-by: Lukas Auer

    Anup Patel
     

26 Nov, 2018

3 commits

  • QEMU specifies the location of Linux (supplied with the -kernel
    argument) in the device tree using the riscv,kernel-start and
    riscv,kernel-end properties. We currently rely on the SBI implementation
    of BBL to run Linux and therefore embed Linux as payload in BBL. This
    causes an issue, because BBL detects the kernel properties in the device
    tree and ignores the Linux payload as a result.
    Work around this issue by clearing the kernel properties in the device
    tree before booting Linux.

    Signed-off-by: Lukas Auer
    Reviewed-by: Bin Meng

    Lukas Auer
     
  • QEMU embeds the location of the kernel image in the device tree. Store
    this address in the environment as variable kernel_start. It is used in
    the board-local distro boot command QEMU to boot the kernel with the
    U-Boot device tree. The QEMU boot command is added as the first boot
    target device.

    Signed-off-by: Lukas Auer
    Reviewed-by: Bin Meng
    Reviewed-by: Alexander Graf

    Lukas Auer
     
  • QEMU provides a device tree, which is passed to U-Boot using register
    a1. We are now able to directly select the device tree with the
    configuration CONFIG_OF_PRIOR_STAGE. Replace the hard-coded address in
    qemu-riscv with it.

    Signed-off-by: Lukas Auer
    Reviewed-by: Bin Meng
    Reviewed-by: Rick Chen

    Lukas Auer
     

15 Nov, 2018

5 commits


03 Oct, 2018

1 commit

  • This adds QEMU RISC-V 'virt' board target support, with the hope of
    helping people easily test U-Boot on RISC-V.

    The QEMU virt machine models a generic RISC-V virtual machine with
    support for the VirtIO standard networking and block storage devices.
    It has CLINT, PLIC, 16550A UART devices in addition to VirtIO and
    it also uses device-tree to pass configuration information to guest
    software. It implements RISC-V privileged architecture spec v1.10.

    Both 32-bit and 64-bit builds are supported. Support is pretty much
    preliminary, only booting to U-Boot shell with the UART driver on
    a single core. Booting Linux is not supported yet.

    Signed-off-by: Bin Meng
    Reviewed-by: Lukas Auer

    Bin Meng
     

06 Sep, 2018

1 commit

  • QEMU 3.0 introduced additional memory-mapped regions for PCI-E ECAM and
    MMIO. Thus we need to add them to our MMU map or U-Boot will crash with
    a Synchronous Abort during PCI-E probing when it tries to access the
    unmapped ECAM memory area.

    Reported-by: Jonathan Gray
    Signed-off-by: Tuomas Tynkkynen
    Tested-by: Jonathan Gray

    Tuomas Tynkkynen
     

19 Jul, 2018

1 commit


17 Jun, 2018

1 commit


27 May, 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
     

20 Jan, 2018

1 commit

  • This adds support for '-machine virt' on AArch64. This is rather simple:
    we just add TARGET_QEMU_ARM_xxBIT to select a few different Kconfig
    symbols, provide the ARMv8 memory map from the board file and add a new
    defconfig based on the 32-bit defconfig.

    Signed-off-by: Tuomas Tynkkynen
    Reviewed-by: Tom Rini

    Tuomas Tynkkynen
     

06 Oct, 2017

1 commit

  • This board builds an U-Boot binary that is bootable with QEMU's 'virt'
    machine on ARM. The minimal QEMU command line is:

    qemu-system-arm -machine virt,highmem=off -bios u-boot.bin

    (Note that the 'highmem=off' parameter to the 'virt' machine is required for
    PCI to work in U-Boot.) This command line enables the following:
    - u-boot.bin loaded and executing in the emulated flash at address 0x0
    - A generated device tree blob placed at the start of RAM
    - A freely configurable amount of RAM, described by the DTB
    - A PL011 serial port, discoverable via the DTB
    - An ARMv7 architected timer
    - PSCI for rebooting the system
    - A generic ECAM-based PCI host controller, discoverable via the DTB

    Additionally, QEMU allows plugging a bunch of useful peripherals to the PCI bus.
    The following ones are supported by both U-Boot and Linux:

    - To add a Serial ATA disk via an Intel ICH9 AHCI controller, pass e.g.:
    -drive if=none,file=disk.img,id=mydisk -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0
    - To add an Intel E1000 network adapter, pass e.g.:
    -net nic,model=e1000 -net user
    - To add an EHCI-compliant USB host controller, pass e.g.:
    -device usb-ehci,id=ehci
    - To add a NVMe disk, pass e.g.:
    -drive if=none,file=disk.img,id=mydisk -device nvme,drive=mydisk,serial=foo

    Signed-off-by: Tuomas Tynkkynen

    Tuomas Tynkkynen
     

07 Feb, 2017

2 commits

  • Add a new board config which uses 64-bit U-Boot. Supported features
    are the same as the other 64-bit board (Google Chromebook Link).
    It is a start for us to test 64-bit U-Boot easily without the need
    to access a real hardware.

    Note CONFIG_SPL_ENV_SUPPORT is required for QEMU 64-bit as without
    this the SPL build fails at the end. This is just a workaround as
    CONFIG_SPL_ENV_SUPPORT is not needed at all.

    common/built-in.o:(.data.env_htab+0xc): undefined reference to 'env_flags_validate'
    lib/built-in.o: In function `hsearch_r':
    lib/hashtable.c:380: undefined reference to 'env_callback_init'
    lib/hashtable.c:382: undefined reference to 'env_flags_init'
    make[1]: *** [spl/u-boot-spl] Error 1

    Except those SPL options required by 64-bit, compared to 32-bit
    config, the following options are different:

    - CONFIG_SYS_MALLOC_F_LEN has to be increased to 0x1000 for SPL.
    - CONFIG_DEBUG_UART has to be included due to the weird issue.
    See TODO comments in arch/x86/cpu/x86_64/cpu.c:arch_setup_gd().
    Once this issue gets fixed, debug uart can be optional.

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

    Bin Meng
     
  • Set up the 64-bit U-Boot text base if building for that target.

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

    Bin Meng
     

30 Aug, 2016

1 commit


13 Nov, 2015

1 commit


05 Aug, 2015

1 commit


04 Jun, 2015

1 commit

  • This commit introduces the initial U-Boot support for QEMU x86 targets.
    U-Boot can boot from coreboot as a payload, or directly without coreboot.

    Signed-off-by: Bin Meng
    Acked-by: Simon Glass
    Tested-by: Simon Glass
    Merged in patch 'x86: qemu: Add CMD_NET to qemu-x86_defconfig
    https://patchwork.ozlabs.org/patch/479745/

    Bin Meng