Another VFP-in-kernel problem on armv8

John F Carr <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
I upgraded from mid-February CURRENT (5dc00f00b747) to yesterday (f02879f19925) and my system panics during boot with

  panic: VFP exception in the kernel

Most likely this panic is while trying to import the root ZFS pool.  The crash is at the first vector instruction in zfs_sha256_block_neon (in zfs.ko):

   f9284: 4cdf7020      ld1     { v0.16b }, [x1], #16

This instruction is implemented on my CPU (Cortex A-57), confirmed by running it in user mode.

I don't see any obviously related changes in ZFS since the last working kernel.  What's going on recently with VFP in the kernel?
crash20230407a.txt (text/plain, 6.3 KB)
   Autoboot in 0 seconds. [Space] to pause  
Loading kernel...
/boot/kernel/kernel text=0x2a8 text=0x938a10 text=0x292284 data=0x1d1138 data=0x0+0x2a0000 syms=[0x8+0x152c10+0x8+0x17b0cf]
Loading configured modules...
/boot/kernel/zfs.ko text=0xe80fc text=0x236e10 data=0x2c640+0xab86c syms=[0x8+0x35190+0x8+0x2e2da]
/boot/kernel/cryptodev.ko text=0x179f text=0x2380 data=0x648+0x10 syms=[0x8+0xcc0+0x8+0x958]
/boot/entropy size=0x1000
/etc/hostid size=0x25
Using DTB provided by EFI at 0x801fe00000.
EFI framebuffer information:
addr, size     0x0, 0x0
dimensions     0 x 0
stride         0
masks          0x00000000, 0x00000000, 0x00000000, 0x00000000
---<<BOOT>>---
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
WARNING: Cannot find freebsd,dts-version property, cannot check DTB compliance
Copyright (c) 1992-2023 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 14.0-CURRENT #32 main-n262011-f02879f19925: Thu Apr  6 16:07:54 EDT 2023
    root@striatus:/usr/obj/usr/home/jfc/freebsd/src/arm64.aarch64/sys/STRIATUS arm64
FreeBSD clang version 15.0.7 (https://github.com/llvm/llvm-project.git llvmorg-15.0.7-0-g8dfdcc7b7bf6)
VT: init without driver.
module scmi already present!
module firmware already present!
real memory  = 8574730240 (8177 MB)
avail memory = 8326242304 (7940 MB)
Starting CPU 1 (1)
Starting CPU 2 (100)
Starting CPU 3 (101)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
MAP 81fb830000 mode 2 pages 992
MAP 81fbe10000 mode 2 pages 496
MAP 81fffd0000 mode 2 pages 32
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
clk_fixed0: <Fixed clock> on simplebus0
clk_fixed1: <Fixed clock> on simplebus0
clk_fixed2: <Fixed clock> on simplebus0
clk_fixed3: <Fixed clock> on simplebus0
clk_fixed4: <Fixed clock> on simplebus0
clk_fixed5: <Fixed clock> on simplebus0
clk_fixed6: <Fixed clock> on simplebus0
clk_fixed7: <Fixed clock> on simplebus0
clk_fixed8: <Fixed clock> on simplebus0
clk_fixed9: <Fixed clock> on simplebus0
clk_fixed10: <Fixed clock> on simplebus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
gic0: <ARM Generic Interrupt Controller> mem 0xe1110000-0xe1110fff,0xe112f000-0xe1130fff,0xe1140000-0xe114ffff,0xe1160000-0xe116ffff irq 4 on ofwbus0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 448
gicv2m0: <ARM Generic Interrupt Controller MSI/MSIX> mem 0x80000-0x80fff on gic0
generic_timer0: <ARMv8 Generic Timer> irq 5,6,7,8 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 250000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 250000000 Hz quality 1000
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
pmu0: <Performance Monitoring Unit> irq 0,1,2,3 on ofwbus0
pmu0: Cannot find CPU with MPIDR: 0x00000002
pmu0: Cannot parse affinity for CPUid: 2.
device_attach: pmu0 attach returned 6
ahci0: <AHCI SATA controller> mem 0xe0300000-0xe03effff irq 9 on simplebus0
ahci0: AHCI v1.30 with 8 6Gbps ports, Port Multiplier supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
uart0: <PrimeCell UART (PL011)> mem 0xe1010000-0xe1010fff irq 13 on simplebus0
uart0: console (115200,n,8,1)
pcib0: <Generic PCI host controller> mem 0xf0000000-0xffffffff on simplebus0
pci0: <OFW PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 2.2 on pci0
pci1: <PCI bus> on pcib1
xhci0: <Fresco Logic FL1009 USB 3.0 controller> mem 0x40100000-0x4010ffff,0x40110000-0x40110fff,0x40111000-0x40111fff at device 0.0 on pci1
xhci0: 32 bytes context size, 64-bit DMA
usbus0 on xhci0
pcib2: <PCI-PCI bridge> at device 2.3 on pci0
pci2: <PCI bus> on pcib2
mskc0: <Marvell Yukon 88E8059 Gigabit Ethernet> port 0x1000-0x10ff mem 0x40000000-0x40003fff at device 0.0 on pci2
msk0: <Marvell Technology Group Ltd. Yukon Optima Id 0xbc Rev 0x01> on mskc0
msk0: Using defaults for TSO: 65518/35/2048
msk0: Ethernet address: e0:ff:f7:00:20:f0
miibus0: <MII bus> on msk0
e1000phy0: <Marvell PHYG65G Gigabit PHY> PHY 0 on miibus0
e1000phy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
armv8crypto0: <AES-CBC,AES-XTS,AES-GCM>
Timecounters tick every 1.000 msec
  x0: ffff000000da17c8 (initstack + 37c8)
  x1: ffff0000d0aa9000 (crypto_dev + cf2fde90)
  x2: ffff0000d0aa9400 (crypto_dev + cf2fe290)
  x3: ffff00000152e6a0 (sha_incremental + 0)
  x4:                0
  x5:           100000
  x6:         8e16db93
  x7:                0
  x8: ffff000001413060 (tf_sha256_neon + 0)
  x9: ffff00000139fdfb ($d.1 + b)
 x10: ffff000001411554 (SHA2Update + f4)
 x11:               29
 x12:                1
 x13:                0
 x14:         20020000
 x15:                0
 x16: ffff000001404100 ($d.0 + 0)
 x17: ffff00000049b340 (nanouptime + 0)
 x18: ffff000000da1660 (initstack + 3660)
 x19: ffff000000da17c8 (initstack + 37c8)
 x20:              400
 x21: ffff0000d0aa9000 (crypto_dev + cf2fde90)
 x22: ffff000000da17f8 (initstack + 37f8)
 x23:                0
 x24:                0
 x25:                0
 x26: ffff00000164b070 (sha256_neon_impl + 0)
 x27:              203
 x28:                1
 x29: ffff000000da16a0 (initstack + 36a0)
  sp: ffff000000da1660
  lr: ffff0000014115c8 (SHA2Update + 168)
 elr: ffff000001405284 (zfs_sha256_block_neon + 14)
spsr:         20000045
 esr: 000000001fe00000
panic: VFP exception in the kernel
cpuid = 0
time = 1
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
vpanic() at vpanic+0x13c
panic() at panic+0x44
do_el1h_sync() at do_el1h_sync+0x210
handle_el1h_sync() at handle_el1h_sync+0x10
--- exception, esr 0xffff000000da17f8
(null)() at 0x400
KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at      kdb_enter+0x44: undefined       f905c27f
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.