Bug 219956 - FreeBSD 11.1-BETA1 panics on boot on SoftIron Overdrive 1000 (after mskc0: couldn't set up interrupt handler)
Summary: FreeBSD 11.1-BETA1 panics on boot on SoftIron Overdrive 1000 (after mskc0: co...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-13 15:43 UTC by Ed Maste
Modified: 2017-06-13 19:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2017-06-13 15:43:49 UTC
Booting FreeBSD 11.1-BETA1 #0 r319728: Fri Jun  9 20:09:25 UTC 2017 memstick image results in:

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:52
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
mskc0: couldn't set up interrupt handler
Fatal data abort:
  x0:                0
  x1:                0
  x2: ffff0000008aa040
  x3: ffff0000005d35eb
  x4:              5ae
  x5:                0
  x6: ffff000000874300
  x7:               40
  x8:                0
  x9: ffff000000756748
 x10: ffff0000008aa040
 x11:                0
 x12:                1
 x13:         ffffffff
 x14:                0
 x15:                6
 x16:         fffffffa
 x17:                0
 x18: ffff000000010370
 x19:                0
 x20: ffff000000a56b90
 x21: ffff000000a56ba8
 x22: ffff000000708000
 x23: ffff0000008aa040
 x24:                0
 x25: ffff0000007023e0
 x26:                0
 x27:                0
 x28:                1
 x29: ffff0000000103f0
 x30: ffff0000000103f0
  sp: ffff000000010370
  lr: ffff00000028dd38
 elr: ffff00000028df24
spsr:         800001c5
 far:              3b8
 esr:         96000004
[ thread pid 0 tid 100000 ]
Stopped at      __rw_wlock_hard+0x284:  ldr     w8, [x8, #952]
db> bt
Tracing pid 0 tid 100000 td 0xffff0000008aa040
db_trace_self() at db_stack_trace+0xec
         pc = 0xffff00000053c848  lr = 0xffff00000005c2d8
         sp = 0xffff00000000fd10  fp = 0xffff00000000fd40

db_stack_trace() at db_command+0x23c
         pc = 0xffff00000005c2d8  lr = 0xffff00000005bf58
         sp = 0xffff00000000fd50  fp = 0xffff00000000fe30

db_command() at db_command_loop+0x60
         pc = 0xffff00000005bf58  lr = 0xffff00000005bd00
         sp = 0xffff00000000fe40  fp = 0xffff00000000fe60

db_command_loop() at db_trap+0xf4
         pc = 0xffff00000005bd00  lr = 0xffff00000005ec44
         sp = 0xffff00000000fe70  fp = 0xffff000000010090

db_trap() at kdb_trap+0x190
         pc = 0xffff00000005ec44  lr = 0xffff0000002d102c
         sp = 0xffff0000000100a0  fp = 0xffff000000010100
        
kdb_trap() at data_abort+0x198
         pc = 0xffff0000002d102c  lr = 0xffff000000554a9c
         sp = 0xffff000000010110  fp = 0xffff0000000101c0

data_abort() at handle_el1h_sync+0x74
         pc = 0xffff000000554a9c  lr = 0xffff00000053e874
         sp = 0xffff0000000101d0  fp = 0xffff0000000102e0

handle_el1h_sync() at __rw_wlock_hard+0x94
         pc = 0xffff00000053e874  lr = 0xffff00000028dd34
         sp = 0xffff0000000102f0  fp = 0xffff0000000103f0

__rw_wlock_hard() at _rw_wlock_cookie+0x88
         pc = 0xffff00000028dd34  lr = 0xffff00000028dbf8
         sp = 0xffff000000010400  fp = 0xffff000000010420

_rw_wlock_cookie() at in_pcbpurgeif0+0x34
         pc = 0xffff00000028dbf8  lr = 0xffff0000003a8f88
         sp = 0xffff000000010430  fp = 0xffff000000010470
        
in_pcbpurgeif0() at in_ifdetach+0x1c
         pc = 0xffff0000003a8f88  lr = 0xffff00000039fcd4
         sp = 0xffff000000010480  fp = 0xffff000000010490

in_ifdetach() at if_detach+0x5f4
         pc = 0xffff00000039fcd4  lr = 0xffff0000003708f4
         sp = 0xffff0000000104a0  fp = 0xffff000000010520

if_detach() at msk_detach+0xa8
         pc = 0xffff0000003708f4  lr = 0xffff0000001041c4
         sp = 0xffff000000010530  fp = 0xffff000000010570

msk_detach() at device_detach+0x88
         pc = 0xffff0000001041c4  lr = 0xffff0000002c1d20
         sp = 0xffff000000010580  fp = 0xffff000000010590

device_detach() at device_delete_child+0x18
         pc = 0xffff0000002c1d20  lr = 0xffff0000002c1af8
         sp = 0xffff0000000105a0  fp = 0xffff0000000105b0
        
device_delete_child() at mskc_detach+0x50
         pc = 0xffff0000002c1af8  lr = 0xffff0000000fc0bc
         sp = 0xffff0000000105c0  fp = 0xffff0000000105e0

mskc_detach() at mskc_attach+0x7b8
         pc = 0xffff0000000fc0bc  lr = 0xffff0000000fbce8
         sp = 0xffff0000000105f0  fp = 0xffff000000010680

mskc_attach() at device_attach+0x3d8
         pc = 0xffff0000000fbce8  lr = 0xffff0000002c32d0
         sp = 0xffff000000010690  fp = 0xffff0000000106e0

device_attach() at bus_generic_attach+0x50
         pc = 0xffff0000002c32d0  lr = 0xffff0000002c44cc
         sp = 0xffff0000000106f0  fp = 0xffff000000010710

bus_generic_attach() at pci_attach+0xe0
         pc = 0xffff0000002c44cc  lr = 0xffff000000119914
         sp = 0xffff000000010720  fp = 0xffff000000010750
        
pci_attach() at device_attach+0x3d8
         pc = 0xffff000000119914  lr = 0xffff0000002c32d0
         sp = 0xffff000000010760  fp = 0xffff0000000107b0

device_attach() at bus_generic_attach+0x50
         pc = 0xffff0000002c32d0  lr = 0xffff0000002c44cc
         sp = 0xffff0000000107c0  fp = 0xffff0000000107e0

bus_generic_attach() at device_attach+0x3d8
         pc = 0xffff0000002c44cc  lr = 0xffff0000002c32d0
         sp = 0xffff0000000107f0  fp = 0xffff000000010840

device_attach() at bus_generic_attach+0x50
         pc = 0xffff0000002c32d0  lr = 0xffff0000002c44cc
         sp = 0xffff000000010850  fp = 0xffff000000010870

bus_generic_attach() at pci_attach+0xe0
         pc = 0xffff0000002c44cc  lr = 0xffff000000119914
         sp = 0xffff000000010880  fp = 0xffff0000000108b0
        
pci_attach() at device_attach+0x3d8
         pc = 0xffff000000119914  lr = 0xffff0000002c32d0
         sp = 0xffff0000000108c0  fp = 0xffff000000010910

device_attach() at bus_generic_attach+0x50
         pc = 0xffff0000002c32d0  lr = 0xffff0000002c44cc
         sp = 0xffff000000010920  fp = 0xffff000000010940

bus_generic_attach() at pci_host_generic_attach+0x76c
         pc = 0xffff0000002c44cc  lr = 0xffff00000055cb8c
         sp = 0xffff000000010950  fp = 0xffff0000000109d0

pci_host_generic_attach() at device_attach+0x3d8
         pc = 0xffff00000055cb8c  lr = 0xffff0000002c32d0
         sp = 0xffff0000000109e0  fp = 0xffff000000010a30

device_attach() at bus_generic_new_pass+0x120
         pc = 0xffff0000002c32d0  lr = 0xffff0000002c4b94
         sp = 0xffff000000010a40  fp = 0xffff000000010a70
        
bus_generic_new_pass() at bus_generic_new_pass+0xe4
         pc = 0xffff0000002c4b94  lr = 0xffff0000002c4b58
         sp = 0xffff000000010a80  fp = 0xffff000000010ab0

bus_generic_new_pass() at bus_generic_new_pass+0xe4
         pc = 0xffff0000002c4b58  lr = 0xffff0000002c4b58
         sp = 0xffff000000010ac0  fp = 0xffff000000010af0

bus_generic_new_pass() at bus_generic_new_pass+0xe4
         pc = 0xffff0000002c4b58  lr = 0xffff0000002c4b58
         sp = 0xffff000000010b00  fp = 0xffff000000010b30

bus_generic_new_pass() at bus_set_pass+0x8c
         pc = 0xffff0000002c4b58  lr = 0xffff0000002c0e04
         sp = 0xffff000000010b40  fp = 0xffff000000010b70

bus_set_pass() at mi_startup+0xc8
         pc = 0xffff0000002c0e04  lr = 0xffff000000231930
         sp = 0xffff000000010b80  fp = 0xffff000000010bc0
        
mi_startup() at virtdone+0x54
         pc = 0xffff000000231930  lr = 0xffff000000001084
         sp = 0xffff000000010bd0  fp = 0x0000000000000000

db> 


It is possible to work around by disabling MSI:

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel] in 9 seconds... 

Type '?' for a list of commands, 'help' for more detailed help.
OK set hw.msk.msi_disable=1
OK boot
?[37m?[44mBooting...?[m
Using DTB provided by EFI at 0x801fe00000.
...
Welcome to FreeBSD!

Please choose the appropriate terminal type for your system.
Common console types are:
   ansi     Standard ANSI terminal
   vt100    VT100 or compatible terminal
   xterm    xterm terminal emulator (or compatible)
   cons25w  cons25w terminal

Console type [vt100]:
Comment 1 Andrew Turner freebsd_committer freebsd_triage 2017-06-13 17:08:41 UTC
Does it boot if you apply base r317428?
Comment 2 Ed Maste freebsd_committer freebsd_triage 2017-06-13 17:20:15 UTC
(In reply to Andrew Turner from comment #1)
I tested the built 11.1-BETA1 memstick image and have not built it myself.

I'm fetching the source tree and will try merging and building a new kernel on the device itself to test.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-06-13 19:00:29 UTC
A commit references this bug:

Author: emaste
Date: Tue Jun 13 18:59:34 UTC 2017
New revision: 319915
URL: https://svnweb.freebsd.org/changeset/base/319915

Log:
  MFC r317428 (cognet): fix arm64 MSI

  In arm_gicv2m_alloc_msi(), if we found a suitable irq range, leave the loop
  before we increase irq again, or we'd end up choosing an irq, and then
  really using the next one, even if it's not available.
  Also in the inner loop, correct the end check so that we check every irq,
  even the last one.
  This makes the msk(4) adapter able to use MSI on Softiron Overdrive 1000.

  PR:		219956
  Approved by:	re (gjb)

Changes:
_U  stable/11/
  stable/11/sys/arm/arm/gic.c