Bug 240541

Summary: Generic kernel on Rock Pi 4 RK3399 board panic
Product: Base System Reporter: me
Component: armAssignee: freebsd-arm (Nobody) <freebsd-arm>
Status: New ---    
Severity: Affects Many People CC: freebsd
Priority: ---    
Version: CURRENT   
Hardware: arm64   
OS: Any   

Description me 2019-09-12 15:25:27 UTC
I run into the following error on my Rock Pi 4(4G) board which has RK3399 SoC

Loading kernel...                                                               
/boot/kernel/kernel text=0x95091c data=0x1948d0+0x778420;syms=[0x8+0x13bf60+0x8+
0x128012]                                       0x7                             
Loading configured modules...               5                                   
can't find '/guot/entropy'                                                      Using DTB provided by EFI at 0x80f0000.                            m            
---<<BOOT>>---   8                                                             
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2019 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
-       The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-CURRENT bca42693442-c262673(master) GENERIC arm64
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
Starting CPU 4 (100)
Starting CPU 5 (101)
FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs
arc4random: WARNING: initial seeding bypassed the cryptographic random device because it was not yet seeded and the knob 'bypass_before_seeding' was enabled.
random: entropy device external interface
MAP f4f2a000 mode 2 pages 1
MAP f4f2c000 mode 2 pages 1
MAP f7f40000 mode 2 pages 16
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
clk_fixed0: <Fixed clock> on ofwbus0
simplebus0: <Flattened device tree simple bus> on ofwbus0
rk_grf0: <RockChip General Register Files> mem 0xff320000-0xff320fff on ofwbus0
rk3399_pmucru0: <Rockchip RK3399 PMU Clock and Reset Unit> mem 0xff750000-0xff750fff on ofwbus0
rk3399_cru0: <Rockchip RK3399 Clock and Reset Unit> mem 0xff760000-0xff760fff on ofwbus0
rk_grf1: <RockChip General Register Files> mem 0xff770000-0xff77ffff on ofwbus0
clk_fixed1: <Fixed clock> on ofwbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
regfix2: <Fixed Regulator> on ofwbus0
regfix3: <Fixed Regulator> on ofwbus0
regfix4: <Fixed Regulator> on ofwbus0
regfix5: <Fixed Regulator> on ofwbus0
regfix6: <Fixed Regulator> on ofwbus0
simple_mfd0: <Simple MFD (Multi-Functions Device)> mem 0xff310000-0xff310fff on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
gic0: <ARM Generic Interrupt Controller v3.0> mem 0xfee00000-0xfee0ffff,0xfef00000-0xfefbffff,0xfff00000-0xfff0ffff,0xfff10000-0xfff1ffff,0xfff20000-0xfff2ffff irq 18 on ofwbus0
its0: <ARM GIC Interrupt Translation Service> mem 0xfee20000-0xfee3ffff on gic0
rk_pinctrl0: <RockChip Pinctrl controller> on ofwbus0
gpio0: <RockChip GPIO Bank controller> mem 0xff720000-0xff7200ff irq 65 on rk_pinctrl0
gpiobus0: <OFW GPIO bus> on gpio0
gpio1: <RockChip GPIO Bank controller> mem 0xff730000-0xff7300ff irq 66 on rk_pinctrl0
gpiobus1: <OFW GPIO bus> on gpio1
gpio2: <RockChip GPIO Bank controller> mem 0xff780000-0xff7800ff irq 67 on rk_pinctrl0
gpiobus2: <OFW GPIO bus> on gpio2
gpio3: <RockChip GPIO Bank controller> mem 0xff788000-0xff7880ff irq 68 on rk_pinctrl0
gpiobus3: <OFW GPIO bus> on gpio3
gpio4: <RockChip GPIO Bank controller> mem 0xff790000-0xff7900ff irq 69 on rk_pinctrl0
gpiobus4: <OFW GPIO bus> on gpio4
rk_i2c0: <RockChip I2C> mem 0xff110000-0xff110fff irq 20 on ofwbus0
iicbus0: <OFW I2C bus> on rk_i2c0
rk_i2c1: <RockChip I2C> mem 0xff130000-0xff130fff irq 22 on ofwbus0
iicbus1: <OFW I2C bus> on rk_i2c1
rk_i2c2: <RockChip I2C> mem 0xff3c0000-0xff3c0fff irq 38 on ofwbus0
iicbus2: <OFW I2C bus> on rk_i2c2
syr8270: <Silergy SYR827 regulator> at addr 0x80 on iicbus2
rk_i2c3: <RockChip I2C> mem 0xff3d0000-0xff3d0fff irq 39 on ofwbus0
iicbus3: <OFW I2C bus> on rk_i2c3
rk805_pmu0: <RockChip RK805 PMIC> at addr 0x36 irq 70 on iicbus2
generic_timer0: <ARMv8 Generic Timer> irq 2,3,4,5 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
rk_emmcphy0: <Rockchip RK3399 eMMC PHY> mem 0-0xff76ffff,0-0xffff on rk_grf1
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpufreq_dt0: <Generic cpufreq driver> on cpu0
cpu1: <Open Firmware CPU> on cpulist0
cpufreq_dt1: <Generic cpufreq driver> on cpu1
cpu2: <Open Firmware CPU> on cpulist0
cpufreq_dt2: <Generic cpufreq driver> on cpu2
cpu3: <Open Firmware CPU> on cpulist0
cpufreq_dt3: <Generic cpufreq driver> on cpu3
cpu4: <Open Firmware CPU> on cpulist0
cpufreq_dt4: <Generic cpufreq driver> on cpu4
cpu5: <Open Firmware CPU> on cpulist0
cpufreq_dt5: <Generic cpufreq driver> on cpu5
dwc0: <Rockchip Gigabit Ethernet Controller> mem 0xfe300000-0xfe30ffff irq 9 on ofwbus0
miibus0: <MII bus> on dwc0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
dwc0: Ethernet address: 62:73:64:f8:04:9b
rockchip_dwmmc0: <Synopsys DesignWare Mobile Storage Host Controller (RockChip)> mem 0xfe320000-0xfe323fff irq 11 on ofwbus0
rockchip_dwmmc0: Hardware version ID is 270a
mmc0: <MMC/SD bus> on rockchip_dwmmc0
sdhci_fdt0: <Rockchip RK3399 fdt SDHCI controller> mem 0xfe330000-0xfe33ffff irq 12 on ofwbus0
rk_emmcphy0: got emmcclk clock
sdhci_fdt0-slot0: Hardware doesn't specify timeout clock frequency, setting BROKEN_TIMEOUT quirk.
sdhci_fdt0: 1 slot(s) allocated
mmc1: <MMC/SD bus> on sdhci_fdt0
ohci0: <Generic OHCI Controller> mem 0xfe3a0000-0xfe3bffff irq 14 on ofwbus0
usbus0 on ohci0
ohci1: <Generic OHCI Controller> mem 0xfe3e0000-0xfe3fffff irq 16 on ofwbus0
usbus1 on ohci1
iic0: <I2C generic I/O> on iicbus0
iic1: <I2C generic I/O> on iicbus1
uart0: <16750 or compatible> mem 0xff1a0000-0xff1a00ff irq 28 on ofwbus0
uart0: console (1500000,n,8,1)
syscon_generic0: <syscon> mem 0xffa58000-0xffa5801f on ofwbus0
syscon_generic1: <syscon> mem 0xffa5c000-0xffa5c01f on ofwbus0
syscon_generic2: <syscon> mem 0xffa60080-0xffa6009f on ofwbus0
syscon_generic3: <syscon> mem 0xffa60100-0xffa6011f on ofwbus0
syscon_generic4: <syscon> mem 0xffa60180-0xffa6019f on ofwbus0
syscon_generic5: <syscon> mem 0xffa70000-0xffa7001f on ofwbus0
syscon_generic6: <syscon> mem 0xffa70080-0xffa7009f on ofwbus0
syscon_generic7: <syscon> mem 0xffa74000-0xffa7401f on ofwbus0
syscon_generic8: <syscon> mem 0xffa76000-0xffa7601f on ofwbus0
syscon_generic9: <syscon> mem 0xffa90000-0xffa9001f on ofwbus0
syscon_generic10: <syscon> mem 0xffa98000-0xffa9801f on ofwbus0
syscon_generic11: <syscon> mem 0xffaa0000-0xffaa001f on ofwbus0
syscon_generic12: <syscon> mem 0xffaa0080-0xffaa009f on ofwbus0
syscon_generic13: <syscon> mem 0xffaa8000-0xffaa801f on ofwbus0
syscon_generic14: <syscon> mem 0xffaa8080-0xffaa809f on ofwbus0
syscon_generic15: <syscon> mem 0xffab0000-0xffab001f on ofwbus0
syscon_generic16: <syscon> mem 0xffab0080-0xffab009f on ofwbus0
syscon_generic17: <syscon> mem 0xffab8000-0xffab801f on ofwbus0
syscon_generic18: <syscon> mem 0xffac0000-0xffac001f on ofwbus0
syscon_generic19: <syscon> mem 0xffac0080-0xffac009f on ofwbus0
syscon_generic20: <syscon> mem 0xffac8000-0xffac801f on ofwbus0
syscon_generic21: <syscon> mem 0xffac8080-0xffac809f on ofwbus0
syscon_generic22: <syscon> mem 0xffad0000-0xffad001f on ofwbus0
syscon_generic23: <syscon> mem 0xffad8080-0xffad809f on ofwbus0
syscon_generic24: <syscon> mem 0xffae0000-0xffae001f on ofwbus0
syscon_generic25: <syscon> mem 0xff330000-0xff33e3d3 on ofwbus0
iicbus2: <unknown card> at addr 0x82
iic2: <I2C generic I/O> on iicbus2
iic3: <I2C generic I/O> on iicbus3
syscon_generic26: <syscon> mem 0xff620000-0xff6200ff on ofwbus0
gpioc0: <GPIO controller> on gpio0
gpioc1: <GPIO controller> on gpio1
gpioc2: <GPIO controller> on gpio2
gpioc3: <GPIO controller> on gpio3
gpioc4: <GPIO controller> on gpio4
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
ugen0.1: <Generic OHCI root HUB> at usbus0
uhub0 on usbus0
uhub0: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Generic OHCI root HUB> at usbus1
uhub1 on usbus1
uhub1: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
mmcsd0: 32GB <SDHC USD00 1.0 SN 67A6F295 MFG 04/2019 by 156 SO> at mmc0 50.0MHz/4bit/256-block
mmc1: No compatible cards found on bus
Release APs...done
CPU  0: ARM Cortex-A53 r0p4 affinity:  0  0
 Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
 Instruction Set Attributes 1 = <>
         Processor Features 0 = <GIC,AdvSIMD,Float,EL3 32,EL2 32,EL1 32,EL0 32>
         Processor Features 1 = <0>
      Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,1TB PA>
      Memory Model Features 1 = <>
      Memory Model Features 2 = <32b CCIDX,48b VA>
             Debug Features 0 = <2 CTX Breakpoints,4 Watchpoints,6 Breakpoints,PMUv3,Debug v8>
Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]...
             Debug Features 1 = <0>
         Auxiliary Features 0 = <0>
         Auxiliary Features 1 = <0>
CPU  1: ARM Cortex-A53 r0p4 affinity:  0  1
      Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,1TB PA>
CPU  2: ARM Cortex-A53 r0p4 affinity:  0  2
      Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,1TB PA>
CPU  3: ARM Cortex-A53 r0p4 affinity:  0  3
      Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,1TB PA>
CPU  4: ARM Cortex-A72 r0p2 affinity:  1  0
      Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,16TB PA>
CPU  5: ARM Cortex-A72 r0p2 affinity:  1  1
      Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,16TB PA>
WARNING: WITNESS option enabled, expect reduced performance.
uhub0: 1 port with 1 removable, self powered
uhub1: 1 port with 1 removable, self powered
Warning: no time-of-day clock registered, system time will not be set accurately
  x0:         40a00000
  x1:                0
  x2:                3
  x3:         15001002
  x4:         ffffffff
  x5:                0
  x6:           200000
  x7:               40
  x8:                7
  x9:           380000
 x10: fffffffffff80000
 x11:               23
 x12:                1
 x13:         40444d20
 x14:                0
 x15:         4067c000
 x16:         404369a8
 x17:         40422ec4
 x18:                1
 x19:         40800160
 x20:         4080015c
 x21:         408000c0
 x22:           400000
 x23:         40288020
 x24:         40a00000
 x25:         406694a8
 x26:         408008b0
 x27:               e8
 x28:               27
 x29:     ffffffffd0b0
  sp:     ffffffffd060
  lr:         40385b4c
 elr:         40385ef0
spsr:         20000000
 far:                0
 esr:         bf000000
panic: Unhandled System Error
cpuid = 5
time = 1568342866
KDB: stack backtrace:
db_trace_self() at db_trace_self_wrapper+0x28
	 pc = 0xffff0000007192e8  lr = 0xffff0000001061f4
	 sp = 0xffff00006786b6f0  fp = 0xffff00006786b900

db_trace_self_wrapper() at vpanic+0x18c
	 pc = 0xffff0000001061f4  lr = 0xffff0000003fec04
	 sp = 0xffff00006786b910  fp = 0xffff00006786b9c0

vpanic() at panic+0x44
	 pc = 0xffff0000003fec04  lr = 0xffff0000003fe9b4
	 sp = 0xffff00006786b9d0  fp = 0xffff00006786ba50

panic() at do_serror+0x40
	 pc = 0xffff0000003fe9b4  lr = 0xffff000000736740
	 sp = 0xffff00006786ba60  fp = 0xffff00006786ba70

do_serror() at handle_serror+0x7c
	 pc = 0xffff000000736740  lr = 0xffff00000071bc38
	 sp = 0xffff00006786ba80  fp = 0xffff00006786bb90

handle_serror() at 0x40385b48
	 pc = 0xffff00000071bc38  lr = 0x0000000040385b48
	 sp = 0xffff00006786bba0  fp = 0x0000ffffffffd0b0

KDB: enter: panic
[ thread pid 40 tid 100104 ]
Stopped at      0x40385ef0:     undefined       a9007f16