NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-riscv/60987: visionfive crashes with latest u-boot release



>Number:         60987
>Category:       port-riscv
>Synopsis:       visionfive crashes with latest u-boot release
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-riscv-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 10 20:55:00 +0000 2026
>Originator:     Martin Husemann
>Release:        NetBSD 11.99.10
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD big-apple.aprisoft.de 11.99.10 NetBSD 11.99.10 (POWERMAC_G5.MP) #168: Sun Nov 8 11:14:37 CET 2026 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/macppc/compile/POWERMAC_G5.MP macppc
Architecture: powerpc
Machine: macppc
>Description:

I played with the u-boot pkgsrc to allow building post-denx versions
and ended up with a version for my VisionFive 2 board.

Unfortnately it crashes the kernel due to a failing SBI call.

Currently not sure if this is a u-boot regression or something wrong in
our kernel, just filing this as a reminder.


U-Boot SPL 2026.10 (Nov 10 2026 - 18:13:57 +0100)
DDR version: dc2e84f0.
Trying to boot from SPI

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

Platform Name             : StarFive VisionFive 2 v1.3B
Platform Features         : medeleg
Platform HART Count       : 4
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 4000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : gpio-restart
Platform Shutdown Device  : ---
Platform Suspend Device   : ---
Platform CPPC Device      : ---
Firmware Base             : 0x40000000
Firmware Size             : 353 KB
Firmware RW Offset        : 0x40000
Firmware RW Size          : 97 KB
Firmware Heap Offset      : 0x4e000
Firmware Heap Size        : 41 KB (total), 2 KB (reserved), 9 KB (used), 29 KB (free)
Firmware Scratch Size     : 4096 B (total), 328 B (used), 3768 B (free)
Runtime SBI Version       : 2.0

Domain0 Name              : root
Domain0 Boot HART         : 3
Domain0 HARTs             : 1*,2*,3*,4*
Domain0 Region00          : 0x0000000010000000-0x0000000010000fff M: (I,R,W) S/U: (R,W)
Domain0 Region01          : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region02          : 0x0000000040040000-0x000000004005ffff M: (R,W) S/U: ()
Domain0 Region03          : 0x0000000040000000-0x000000004003ffff M: (R,X) S/U: ()
Domain0 Region04          : 0x000000000c000000-0x000000000fffffff M: (I,R,W) S/U: (R,W)
Domain0 Region05          : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X)
Domain0 Next Address      : 0x0000000040200000
Domain0 Next Arg1         : 0x00000000402e5628
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes
Domain0 SysSuspend        : yes

Boot HART ID              : 3
Boot HART Domain          : root
Boot HART Priv Version    : v1.11
Boot HART Base ISA        : rv64imafdcbx
Boot HART ISA Extensions  : zihpm
Boot HART PMP Count       : 8
Boot HART PMP Granularity : 12 bits
Boot HART PMP Address Bits: 34
Boot HART MHPM Info       : 2 (0x00000018)
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109


U-Boot 2026.10 (Nov 10 2026 - 18:13:57 +0100)

CPU:   sifive,u74-mc
Model: StarFive VisionFive 2 v1.3B
DRAM:  8 GiB
Core:  159 devices, 30 uclasses, devicetree: board
WDT:   Not starting watchdog@13070000
MMC:   mmc@16010000: 0, mmc@16020000: 1
Loading Environment from SPIFlash...
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

StarFive EEPROM format v2

--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7110B1-2253-D008E000-00004536
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:46:cc
Ethernet MAC1 address: 6c:cf:39:00:46:cd
--------EEPROM INFO--------

In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
starting USB...
USB XHCI 1.00
Bus xhci_pci: 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Working FDT set to ff6f3030
Hit any key to stop autoboot: 0
[..]
Booting: Label: usb 0 Device path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,7200000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,5a00000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,5a00000001000[?25h

  \\-__,------,___.
   \\        __,---`  NetBSD/riscv efiboot (riscv64)
    \\       `---,_.  Revision 2.13 (Thu Apr  4 17:27:32 UTC 2024)
     \\-,_____,.---`
      \\
       \\
        \\

Press return to boot now, any other key for boot prompt
booting netbsd - starting in 0 seconds.
[..]


------------
NetBSD start

sp:      0x0000_0000_fd40_3000
pc:      0x0000_0000_fcc0_0080
hart:    0x0000_0000_0000_0003
dtb:     0x0000_0000_fd80_0000
vendor:  0x0000_0000_0000_0489
l1:      0x0000_0000_fd40_c000
l2:      0x0000_0000_fd40_b000
uspace:  0x0000_0000_fd40_1000
bootstk: 0x0000_0000_fd40_3000
vtopdiff:0xffff_ffbf_0340_0000

bss:     0x0000_0000_fd56_ba5c - 0x0000_0000_fd40_d000
l2pde:   0x0000_0000_fd40_b800:  0x0000_0000_3f50_3001

kern:    0x0000_0000_fd40_c000:  0x0000_0000_3f30_00ef
kern:    0x0000_0000_fd40_c008:  0x0000_0000_3f38_00ef
kern:    0x0000_0000_fd40_c010:  0x0000_0000_3f40_00ef
kern:    0x0000_0000_fd40_c018:  0x0000_0000_3f48_00ef
kern:    0x0000_0000_fd40_c020:  0x0000_0000_3f50_00ef
kern:    0x0000_0000_fd40_c028:  0x0000_0000_3f58_00ef
kern:    0x0000_0000_fd40_c030:  0x0000_0000_3f60_00ef
kern:    0x0000_0000_fd40_c038:  0x0000_0000_3f68_00ef
kern:    0x0000_0000_fd40_c040:  0x0000_0000_3f70_00ef
kern:    0x0000_0000_fd40_c048:  0x0000_0000_3f78_00ef
kern:    0x0000_0000_fd40_c050:  0x0000_0000_3f80_00ef
kern:    0x0000_0000_fd40_c058:  0x0000_0000_3f88_00ef
kern:    0x0000_0000_fd40_c060:  0x0000_0000_3f90_00ef
kern:    0x0000_0000_fd40_c068:  0x0000_0000_3f98_00ef
kern:    0x0000_0000_fd40_c070:  0x0000_0000_3fa0_00ef
kern:    0x0000_0000_fd40_c078:  0x0000_0000_3fa8_00ef
dtb:     0x0000_0000_fd40_c080:  0x0000_0000_3f60_00e7
PM
[   1.0000000] FDT<0xffffffc002000000>
[   1.0000000] cpufunc
[   1.0000000] devmap 0xffffffc00082f828
[   1.0000000] bootstrap
[   1.0000000] stdout
[   1.0000000] fdt size a000/9b50
[   1.0000000] consinit ok
[   1.0000000] NetBSD/riscv (fdt) booting ...
[   1.0000000] FDT /memory @ 0x40060000 size 0xbe3a0000
[   1.0000000] FDT /memory @ 0xfe401000 size 0x29c000
[   1.0000000] FDT /memory @ 0xfe6aa000 size 0x3000
[   1.0000000] FDT /memory @ 0xfe6ae000 size 0x2000
[   1.0000000] FDT /memory @ 0xfe6b1000 size 0x6000
[   1.0000000] FDT /memory @ 0xfe6b8000 size 0x5000
[   1.0000000] FDT /memory @ 0xfe6e1000 size 0x1032000
[   1.0000000] FDT /memory @ 0xff714000 size 0x7fb000
[   1.0000000] FDT /memory @ 0xfff11000 size 0x1400ef000
[   1.0000000] init_riscv: memory start 40060000 end 240000000 (len 1fffa0000)
[   1.0000000] cpu_kernel_vm_init: kernel phys start 0xfcc00000 end 0xfd600000
[   1.0000000] dm:   0xffffffc00080bc08 :  0x100000e7
[   1.0000000] dm:   0xffffffc00080bc10 :  0x200000e7
[   1.0000000] dm:   0xffffffc00080bc18 :  0x300000e7
[   1.0000000] dm:   0xffffffc00080bc20 :  0x400000e7
[   1.0000000] dm:   0xffffffc00080bc28 :  0x500000e7
[   1.0000000] dm:   0xffffffc00080bc30 :  0x600000e7
[   1.0000000] dm:   0xffffffc00080bc38 :  0x700000e7
[   1.0000000] dm:   0xffffffc00080bc40 :  0x800000e7
[   1.0000000] bootargs: console=ttyS0,115200 debug rootwait earlycon=sbi
[   1.0000000] msgbufaddr = 0xffffffe23fff0000
[   1.0000000] ------------------------------------------
[   1.0000000]            kern_vtopdiff = 0xffffffbf03400000
[   1.0000000]             memory_start = 0x        40060000
[   1.0000000]               memory_end = 0x       240000000
[   1.0000000]              memory_size = 0x       1fffa0000
[   1.0000000]           kernstart_phys = 0x        fcc00000
[   1.0000000]             kernend_phys = 0x        fd600000
[   1.0000000]               msgbufaddr = 0xffffffe23fff0000
[   1.0000000]    VM_MIN_KERNEL_ADDRESS = 0xffffffc000000000
[   1.0000000]           kernstart_mega = 0xffffffc000000000
[   1.0000000]                kernstart = 0xffffffc000000000
[   1.0000000]                  kernend = 0xffffffc000a00000
[   1.0000000]             kernend_mega = 0xffffffc000a00000
[   1.0000000]    VM_MAX_KERNEL_ADDRESS = 0xffffffd000000000
[   1.0000000]         pmap_direct_base = 0xffffffe000000000
[   1.0000000] ------------------------------------------
[   1.0000000] adding       0x40060000 -       0xfcc00000  to freelist 0
[   1.0000000] adding       0xfd600000 -       0xfd800000  to freelist 0
[   1.0000000] adding       0xfd80a000 -       0xfe400000  to freelist 0
[   1.0000000] adding       0xfe401000 -       0xfe69d000  to freelist 0
[   1.0000000] adding       0xfe6aa000 -       0xfe6ad000  to freelist 0
[   1.0000000] adding       0xfe6ae000 -       0xfe6af000  to freelist 0
[   1.0000000] adding       0xfe6b1000 -       0xfe6b7000  to freelist 0
[   1.0000000] adding       0xfe6b8000 -       0xfe6bd000  to freelist 0
[   1.0000000] adding       0xfe6e1000 -       0xff713000  to freelist 0
[   1.0000000] adding       0xff714000 -       0xfff0f000  to freelist 0
[   1.0000000] adding       0xfff11000 -      0x23fff0000  to freelist 0
[   1.0000000] common bs_pde 0xffffffc00080b000 ASID max 0 kcpusets nkmempages limits: ffffffc004000000 - ffffffd000000000
[   1.0000000] kva   : ffffffc004000000 - ffffffc2b9400000
[   1.0000000] mpstart
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024, 2025, 2026
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 11.99.10 (GENERIC64) #10: Mon Nov  9 13:58:04 CET 2026
[   1.0000000] 	martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/riscv/compile/GENERIC64
[   1.0000000] total memory = 8181 MB
[   1.0000000] avail memory = 7912 MB
[   1.0000000] panic: kernel diagnostic assertion "sbiret.error == SBI_SUCCESS" failed: file "../../../../arch/riscv/riscv/riscv_tlb.c", line 142 error -3
[   1.0000000] cpu0: Begin traceback...
[   1.0000000] have_addr: true
[   1.0000000] addr: ffffffc000802c90
[   1.0000000] count: 65535
[   1.0000000] modif: 
[   1.0000000] trace fp ffffffc000802c90
[   1.0000000] fp ffffffc000802cd0 vpanic() at ffffffc00036d1d4 netbsd:vpanic+0x140
[   1.0000000] fp ffffffc000802cf0 kern_assert() at ffffffc00049de12 netbsd:kern_assert+0x52
[   1.0000000] fp ffffffc000802d50 tlb_update_addr() at ffffffc00001643c netbsd:tlb_update_addr+0x1a
[   1.0000000] fp ffffffc000802da0 pmap_tlb_update_addr() at ffffffc00001fd50 netbsd:pmap_tlb_update_addr+0x64
[   1.0000000] fp ffffffc000802de0 pmap_kenter_pa() at ffffffc00001d1f0 netbsd:pmap_kenter_pa+0xae
[   1.0000000] fp ffffffc000802e20 fdt_map_range() at ffffffc00045a6fe netbsd:fdt_map_range+0x68
[   1.0000000] fp ffffffc000802e50 fdt_setup_efirng() at ffffffc00045aef0 netbsd:fdt_setup_efirng+0x24
[   1.0000000] fp ffffffc000802e90 cpu_startup() at ffffffc000017242 netbsd:cpu_startup+0x1b4
[   1.0000000] fp ffffffc000802ee0 main() at ffffffc00049df5a netbsd:main+0x144
[   1.0000000] fp 0000000000000000 start() at ffffffc000000476 netbsd:start+0x476
[   1.0000000] cpu0: End traceback...
[   1.0000000] Trapframe @ 0xffffffc000802b70 (cause=3 (breakpoint), status=0x100, pc=0xffffffc000000640, va=0):
[   1.0000000]                         ra =0xffffffc00036d1d8  sp =0xffffffc000802c90  gp =0xffffffc00096b280  
[   1.0000000] tp =0xff30fefefefefefe  t0 =               0x7  t1 =0xffffffc0000003d2  t2 =              0x1c  
[   1.0000000] s0 =0xffffffc000802cd0  s1 =0xffffffc00066f130  a0 =               0x7  a1 =0xffffffc003000000  
[   1.0000000] a2 =                 0  a3 =0xffffffc00081bd40  a4 =0xffffffc00081bd40  a5 =               0x1  
[   1.0000000] a6 =0xfffffffffffffffe  a7 =               0x5  s2 =0xffffffc000996568  s3 =0xffffffc000802cf8  
[   1.0000000] s4 =             0x104  s5 =0xffffffc00098b618  s6 =               0x6  s7 =              0xe7  
[   1.0000000] s8 =0xffffffbf03400000  s9 =        0xfd40c080  s10=               0x3  s11=        0xfd800000  
[   1.0000000] t3 =0xfffffffffffffffe  t4 =               0x1  t5 =               0x4  t6 =0xffffffc00096b6e8  
[   1.0000000] kernel: breakpoint
Stopped in pid 0.0 (system) at  netbsd:clear_bss+0x10:  c.ebreak
db{0}> 



>How-To-Repeat:
s/a

>Fix:
n/a




Home | Main Index | Thread Index | Old Index