[U-Boot] RISC-V: Crashes with OpenSBI+U-Boot on the qemu "virt" machine
Anup Patel
anup at brainfault.org
Sat May 4 03:54:15 UTC 2019
Hi Karsten,
I tried again with image header changes applied to u-boot and
Linux kernel but still not able to reproduce the issues.
Either you might have more local changes or debian toolchain
is causing issue for u-boot.
Here are the logs....
anup at anup-ubuntu64:~/Work/riscv-test$ qemu-system-riscv64 -nographic
-machine virt -m 2G \
> -kernel opensbi/build/platform/qemu/virt/firmware/fw_jump.elf \
> -device loader,file=u-boot/u-boot.bin,addr=0x80200000 \
> -object rng-random,filename=/dev/urandom,id=rng0 \
> -device virtio-rng-device,rng=rng0 \
> -append "console=ttyS0 rw root=/dev/vda1" \
> -device virtio-blk-device,drive=hd0 \
> -drive file=./rootfs_riscv64.ext2,format=raw,id=hd0 \
> -device virtio-net-device,netdev=usernet \
> -netdev user,id=usernet,hostfwd=tcp::22222-:22
OpenSBI v0.3 (May 4 2019 09:17:54)
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : QEMU Virt Machine
Platform HART Features : RV64ACDFIMSU
Platform Max HARTs : 8
Current Hart : 0
Firmware Base : 0x80000000
Firmware Size : 100 KB
Runtime SBI Version : 0.1
PMP0: 0x0000000080000000-0x000000008001ffff (A)
PMP1: 0x0000000000000000-0xffffffffffffffff (A,R,W,X)
U-Boot 2019.07-rc1-00001-g93789509a3 (May 04 2019 - 08:58:04 +0530)
CPU: rv64imafdcsu
Model: riscv-virtio,qemu
DRAM: 2 GiB
In: uart at 10000000
Out: uart at 10000000
Err: uart at 10000000
Net:
Warning: virtio-net#2 using MAC address from ROM
eth0: virtio-net#2
Hit any key to stop autoboot: 0
Device 0: QEMU VirtIO Block Device
Type: Hard Disk
Capacity: 32.0 MB = 0.0 GB (65536 x 512)
... is now current device
** No partition table - virtio 0 **
BOOTP broadcast 1
DHCP client bound to address 10.0.2.15 (3 ms)
Using virtio-net#2 device
TFTP from server 10.0.2.2; our IP address is 10.0.2.15
Filename 'boot.scr.uimg'.
Load address: 0x82100000
Loading: *
TFTP error: 'Access violation' (2)
Not retrying...
BOOTP broadcast 1
DHCP client bound to address 10.0.2.15 (3 ms)
Using virtio-net#2 device
TFTP from server 10.0.2.2; our IP address is 10.0.2.15
Filename 'boot.scr.uimg'.
Load address: 0x81000000
Loading: *
TFTP error: 'Access violation' (2)
Not retrying...
=>
=>
=> QEMU 3.1.92 monitor - type 'help' for more information
(qemu) q
anup at anup-ubuntu64:~/Work/riscv-test$ qemu-system-riscv64 -nographic
-smp 2 -machine virt -m 1.9G -kernel
opensbi/build/platform/qemu/virt/firmware/fw_payload.elf -device
loader,file=build-riscv64/arch/riscv/boot/Image,addr=0x81000000
-object rng-random,filename=/dev/urandom,id=rng0 -device
virtio-rng-device,rng=rng0 -append "console=ttyS0 rw root=/dev/vda"
-device virtio-blk-device,drive=hd0 -drive
file=./rootfs_riscv64.ext2,format=raw,id=hd0 -device
virtio-net-device,netdev=usernet -netdev
user,id=usernet,hostfwd=tcp::22222-:22
OpenSBI v0.3 (May 4 2019 09:17:54)
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : QEMU Virt Machine
Platform HART Features : RV64ACDFIMSU
Platform Max HARTs : 8
Current Hart : 0
Firmware Base : 0x80000000
Firmware Size : 104 KB
Runtime SBI Version : 0.1
PMP0: 0x0000000080000000-0x000000008001ffff (A)
PMP1: 0x0000000000000000-0xffffffffffffffff (A,R,W,X)
U-Boot 2019.07-rc1-00001-g93789509a3 (May 04 2019 - 08:58:04 +0530)
CPU: rv64imafdcsu
Model: riscv-virtio,qemu
DRAM: 1.9 GiB
In: uart at 10000000
Out: uart at 10000000
Err: uart at 10000000
Net:
Warning: virtio-net#2 using MAC address from ROM
eth0: virtio-net#2
Hit any key to stop autoboot: 0
Device 0: QEMU VirtIO Block Device
Type: Hard Disk
Capacity: 32.0 MB = 0.0 GB (65536 x 512)
... is now current device
** No partition table - virtio 0 **
BOOTP broadcast 1
DHCP client bound to address 10.0.2.15 (7 ms)
Using virtio-net#2 device
TFTP from server 10.0.2.2; our IP address is 10.0.2.15
Filename 'boot.scr.uimg'.
Load address: 0x82100000
Loading: *
TFTP error: 'Access violation' (2)
Not retrying...
BOOTP broadcast 1
DHCP client bound to address 10.0.2.15 (1 ms)
Using virtio-net#2 device
TFTP from server 10.0.2.2; our IP address is 10.0.2.15
Filename 'boot.scr.uimg'.
Load address: 0x81000000
Loading: *
TFTP error: 'Access violation' (2)
Not retrying...
=>
=>
=> booti ${kernel_addr_r} - ${fdtcontroladdr}
## Flattened Device Tree blob at f9134f90
Booting using the fdt blob at 0xf9134f90
Using Device Tree in place at 00000000f9134f90, end 00000000f9138d9d
Starting kernel ...
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 5.1.0-rc7-00001-g2448469727e9
(anup at anup-ubuntu64) (gcc version 8.2.0 (Buildroot
2018.11-rc2-00003-ga0787e9)) #1 SMP Sat May 4 09:03:40 IST 2019
[ 0.000000] initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000f9999fff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x00000000f9999fff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000f9999fff]
[ 0.000000] software IO TLB: mapped [mem 0xf3692000-0xf7692000] (64MB)
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] percpu: Embedded 17 pages/cpu s29592 r8192 d31848 u69632
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 490759
[ 0.000000] Kernel command line: console=ttyS0 rw root=/dev/vda
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Memory: 1885076K/1990248K available (5586K kernel code,
352K rwdata, 1774K rodata, 192K init, 817K bss, 105172K reserved, 0K
cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay
is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 53 interrupts with 2 handlers for 4 contexts.
[ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [1]
[ 0.000000] clocksource: riscv_clocksource: mask:
0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120
ns
[ 0.000116] sched_clock: 64 bits at 10MHz, resolution 100ns, wraps
every 4398046511100ns
[ 0.003029] Console: colour dummy device 80x25
[ 0.004259] Calibrating delay loop (skipped), value calculated
using timer frequency.. 20.00 BogoMIPS (lpj=40000)
[ 0.004403] pid_max: default: 32768 minimum: 301
[ 0.008473] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.008543] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.017452] *** VALIDATE proc ***
[ 0.019957] *** VALIDATE cgroup1 ***
[ 0.020007] *** VALIDATE cgroup2 ***
[ 0.049945] rcu: Hierarchical SRCU implementation.
[ 0.056260] smp: Bringing up secondary CPUs ...
[ 0.063030] smp: Brought up 1 node, 2 CPUs
[ 0.097027] devtmpfs: initialized
[ 0.102825] random: get_random_u32 called from
bucket_table_alloc+0x74/0x17c with crng_init=0
[ 0.107079] clocksource: jiffies: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.108535] futex hash table entries: 512 (order: 3, 32768 bytes)
[ 0.112706] NET: Registered protocol family 16
[ 0.150745] vgaarb: loaded
[ 0.151570] SCSI subsystem initialized
[ 0.153772] usbcore: registered new interface driver usbfs
[ 0.154033] usbcore: registered new interface driver hub
[ 0.154327] usbcore: registered new device driver usb
[ 0.164363] clocksource: Switched to clocksource riscv_clocksource
[ 0.217528] NET: Registered protocol family 2
[ 0.225491] tcp_listen_portaddr_hash hash table entries: 1024
(order: 2, 16384 bytes)
[ 0.225632] TCP established hash table entries: 16384 (order: 5,
131072 bytes)
[ 0.225976] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[ 0.226237] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.227526] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.227749] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.229436] NET: Registered protocol family 1
[ 0.233122] RPC: Registered named UNIX socket transport module.
[ 0.233183] RPC: Registered udp transport module.
[ 0.233219] RPC: Registered tcp transport module.
[ 0.233248] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.243061] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[ 0.260156] NFS: Registering the id_resolver key type
[ 0.261137] Key type id_resolver registered
[ 0.261196] Key type id_legacy registered
[ 0.261324] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.280092] NET: Registered protocol family 38
[ 0.281005] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 254)
[ 0.281113] io scheduler mq-deadline registered
[ 0.281214] io scheduler kyber registered
[ 0.283298] pci-host-generic 30000000.pci: host bridge
/soc/pci at 30000000 ranges:
[ 0.283770] pci-host-generic 30000000.pci: IO
0x03000000..0x0300ffff -> 0x00000000
[ 0.284978] pci-host-generic 30000000.pci: MEM
0x40000000..0x7fffffff -> 0x40000000
[ 0.286325] pci-host-generic 30000000.pci: ECAM at [mem
0x30000000-0x3fffffff] for [bus 00-ff]
[ 0.287292] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00
[ 0.287472] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.287597] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.287639] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff]
[ 0.676815] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.684832] printk: console [ttyS0] disabled
[ 0.685828] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 10,
base_baud = 230400) is a 16550A
[ 0.719729] printk: console [ttyS0] enabled
[ 0.722810] [drm] radeon kernel modesetting enabled.
[ 0.750455] loop: module loaded
[ 0.758478] virtio_blk virtio1: [vda] 65536 512-byte logical blocks
(33.6 MB/32.0 MiB)
[ 0.793933] libphy: Fixed MDIO Bus: probed
[ 0.801214] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 0.801565] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.803142] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.804015] ehci-pci: EHCI PCI platform driver
[ 0.805783] ehci-platform: EHCI generic platform driver
[ 0.806998] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.807380] ohci-pci: OHCI PCI platform driver
[ 0.807842] ohci-platform: OHCI generic platform driver
[ 0.809318] usbcore: registered new interface driver uas
[ 0.810013] usbcore: registered new interface driver usb-storage
[ 0.825451] mousedev: PS/2 mouse device common for all mice
[ 0.832491] usbcore: registered new interface driver usbhid
[ 0.833527] usbhid: USB HID core driver
[ 0.837848] NET: Registered protocol family 10
[ 0.850345] Segment Routing with IPv6
[ 0.850922] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 0.853623] NET: Registered protocol family 17
[ 0.854370] Key type dns_resolver registered
[ 0.885848] EXT4-fs (vda): mounting ext2 file system using the ext4 subsystem
[ 0.901519] EXT4-fs (vda): warning: mounting unchecked fs, running
e2fsck is recommended
[ 0.922309] EXT4-fs (vda): mounted filesystem without journal. Opts: (null)
[ 0.923053] VFS: Mounted root (ext2 filesystem) on device 254:0.
[ 0.963165] Freeing unused kernel memory: 192K
[ 0.963671] This architecture does not have kernel memory protection.
[ 0.964881] Run /sbin/init as init process
_ _
| ||_|
| | _ ____ _ _ _ _
| || | _ \| | | |\ \/ /
| || | | | | |_| |/ \
|_||_|_| |_|\____|\_/\_/
Busybox Rootfs
Please press Enter to activate this console.
/ #
/ # cat /proc/interrupts
CPU0 CPU1
6: 0 0 SiFive PLIC 6 virtio2
7: 45 0 SiFive PLIC 7 virtio1
10: 82 0 SiFive PLIC 10 ttyS0
IPI0: 660 692 Rescheduling interrupts
IPI1: 0 4 Function call interrupts
IPI2: 0 0 CPU stop interrupts
/ #
/ #
/ # QEMU 3.1.92 monitor - type 'help' for more information
(qemu) q
Regards,
Anup
More information about the U-Boot
mailing list