Source: u-boot
Version: 2023.01~rc4+dfsg-2
Severity: important
User: debian-ri...@lists.debian.org
Usertags: riscv64
X-Debbugs-CC: debian-ri...@lists.debian.org

Hello,

when booting a riscv64 VM in qemu 1:7.0+dfsg-1 with OpenSBI 1.1-2
and u-boot-qemu 2023.01~rc4+dfsg-2 with the following commandline

  qemu-system-riscv64 -smp 4 -nographic -machine virt -m 8G -bios 
/usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf -kernel 
/usr/lib/u-boot/qemu-riscv64_smode/u-boot.bin -object 
rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0 
-append "console=ttyS0 rw root=/dev/vda1 scsi_mod.use_blk_mq=0" -device 
virtio-blk-device,drive=hd0 -drive file=riscv64.img,format=raw,id=hd0 -device 
virtio-net-device,netdev=usernet -netdev user,id=usernet,hostfwd=tcp::22222-:22

the following error occurs:

-----8<----------8<----------8<----------8<----------8<-----

OpenSBI v1.1
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name             : riscv-virtio,qemu
Platform Features         : medeleg
Platform HART Count       : 4
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 10000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform Reboot Device    : sifive_test
Platform Shutdown Device  : sifive_test
Firmware Base             : 0x80000000
Firmware Size             : 312 KB
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 2
Domain0 HARTs             : 0*,1*,2*,3*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01          : 0x0000000080000000-0x000000008007ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000080200000
Domain0 Next Arg1         : 0x0000000082200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 2
Boot HART Domain          : root
Boot HART Priv Version    : v1.12
Boot HART Base ISA        : rv64imafdch
Boot HART ISA Extensions  : time,sstc
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count      : 16
Boot HART MIDELEG         : 0x0000000000001666
Boot HART MEDELEG         : 0x0000000000f0b509


U-Boot 2023.01-rc4+dfsg-2 (Jan 06 2023 - 03:38:24 +0000)

CPU:   rv64imafdch_zicsr_zifencei_zihintpause_zba_zbb_zbc_zbs_sstc
Model: riscv-virtio,qemu
DRAM:  8 GiB
Core:  31 devices, 15 uclasses, devicetree: board
Flash: 32 MiB
Loading Environment from nowhere... OK
In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Net:   eth0: virtio-net#2
Working FDT set to ff7344b0
Hit any key to stop autoboot:  0 

Device 0: QEMU VirtIO Block Device
            Type: Hard Disk
            Capacity: 102400.0 MB = 100.0 GB (209715200 x 512)
... is now current device
Scanning virtio 0:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
U-Boot menu
1:      Debian GNU/Linux bookworm/sid 6.1.0-1-riscv64
2:      Debian GNU/Linux bookworm/sid 6.1.0-1-riscv64 (rescue target)
3:      Debian GNU/Linux bookworm/sid 6.0.0-6-riscv64
4:      Debian GNU/Linux bookworm/sid 6.0.0-6-riscv64 (rescue target)
5:      Debian GNU/Linux bookworm/sid 6.0.0-5-riscv64
6:      Debian GNU/Linux bookworm/sid 6.0.0-5-riscv64 (rescue target)
Enter choice: 1:        Debian GNU/Linux bookworm/sid 6.1.0-1-riscv64
Retrieving file: /boot/initrd.img-6.1.0-1-riscv64
Retrieving file: /boot/vmlinux-6.1.0-1-riscv64
append: root=/dev/vda1 rw noquiet
Moving Image from 0x84000000 to 0x80200000, end=815e5000
## Flattened Device Tree blob at ff7344b0
   Booting using the fdt blob at 0xff7344b0
Working FDT set to ff7344b0
   Using Device Tree in place at 00000000ff7344b0, end 00000000ff738dea
Working FDT set to ff7344b0
ERROR: fdt fixup event failed: -22
 - must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

-----8<----------8<----------8<----------8<----------8<-----

The source of the issue seems to be in u-boot as with u-boot-qemu
2022.10+dfsg-2 (the previous u-boot release in Debian/sid)
everything works without problems (boot log below).

The problem appears to be independent from the kernel image that
gets booted - all three installed kernels boot fine with
u-boot-qemu 2022.10+dfsg-2 but trying to boot any of them
with u-boot-qemu 2023.01~rc4+dfsg-2 shows the above error.

I've also tested the previous u-boot 2023.01 release candidates
from experimental (2023.01-rc2+dfsg-1 and 2023.01-rc3+dfsg-1) and
they show the same behaviour as 2023.01~rc4+dfsg-2.


For comparison, a working boot process with u-boot-qemu
2022.10+dfsg-2:

-----8<----------8<----------8<----------8<----------8<-----

OpenSBI v1.1
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name             : riscv-virtio,qemu
Platform Features         : medeleg
Platform HART Count       : 4
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 10000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform Reboot Device    : sifive_test
Platform Shutdown Device  : sifive_test
Firmware Base             : 0x80000000
Firmware Size             : 312 KB
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*,1*,2*,3*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01          : 0x0000000080000000-0x000000008007ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000080200000
Domain0 Next Arg1         : 0x0000000082200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 0
Boot HART Domain          : root
Boot HART Priv Version    : v1.12
Boot HART Base ISA        : rv64imafdch
Boot HART ISA Extensions  : time,sstc
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count      : 16
Boot HART MIDELEG         : 0x0000000000001666
Boot HART MEDELEG         : 0x0000000000f0b509


U-Boot 2022.10+dfsg-2 (Dec 23 2022 - 23:18:44 +0000)

CPU:   rv64imafdch_zicsr_zifencei_zihintpause_zba_zbb_zbc_zbs_sstc
Model: riscv-virtio,qemu
DRAM:  8 GiB
Core:  31 devices, 15 uclasses, devicetree: board
Flash: 32 MiB
Loading Environment from nowhere... OK
In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Net:   eth0: virtio-net#2
Hit any key to stop autoboot:  0 

Device 0: QEMU VirtIO Block Device
            Type: Hard Disk
            Capacity: 102400.0 MB = 100.0 GB (209715200 x 512)
... is now current device
Scanning virtio 0:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
U-Boot menu
1:      Debian GNU/Linux bookworm/sid 6.1.0-1-riscv64
2:      Debian GNU/Linux bookworm/sid 6.1.0-1-riscv64 (rescue target)
3:      Debian GNU/Linux bookworm/sid 6.0.0-6-riscv64
4:      Debian GNU/Linux bookworm/sid 6.0.0-6-riscv64 (rescue target)
5:      Debian GNU/Linux bookworm/sid 6.0.0-5-riscv64
6:      Debian GNU/Linux bookworm/sid 6.0.0-5-riscv64 (rescue target)
Enter choice: 1:        Debian GNU/Linux bookworm/sid 6.1.0-1-riscv64
Retrieving file: /boot/initrd.img-6.1.0-1-riscv64
Retrieving file: /boot/vmlinux-6.1.0-1-riscv64
append: root=/dev/vda1 rw noquiet
Moving Image from 0x84000000 to 0x80200000, end=815e5000
## Flattened Device Tree blob at ff7344b0
   Booting using the fdt blob at 0xff7344b0
   Using Device Tree in place at 00000000ff7344b0, end 00000000ff738dea

Starting kernel ...

[    0.000000] Linux version 6.1.0-1-riscv64 (debian-ker...@lists.debian.org) 
(gcc-12 (Debian 12.2.0-11) 12.2.0, GNU ld (GNU Binutils for Debian) 
2.39.90.20221231) #1 SMP Debian 6.1.4-1 (2023-01-07)
[    0.000000] random: crng init done
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Machine model: riscv-virtio,qemu
[...]

-----8<----------8<----------8<----------8<----------8<-----

Regards,
Karsten
-- 
Hiermit widerspreche ich ausdrücklich der Nutzung sowie der Weitergabe
meiner personenbezogenen Daten für Zwecke der Werbung sowie der Markt-
oder Meinungsforschung.

Reply via email to