Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2021 04:51:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-arm@FreeBSD.org
Subject:   [Bug 260131] RPI [ CM4 /io-ref.-board] panics on pcie with nvme connected
Message-ID:  <bug-260131-7@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260131

            Bug ID: 260131
           Summary: RPI [ CM4 /io-ref.-board] panics on pcie with nvme
                    connected
           Product: Base System
           Version: CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: maciphone2@googlemail.com

well, while the story of "how to boot off of nvme on the RPI CM4 I/O-board"=
=20
is quite too long at this place, I booted successfully from nvme and that
heavily depends from rpi-foundation`s closed source proprietary software (a=
nd
from fine-tuned configs) ( this dependence will never end although some devs
like dreaming of it ;-).=20
the good news is that only the pcie-driver`s magic numbers have to be adjus=
ted
to fix this bugzilla.
the 'best' debug information I could get for the first is :

--------------------------
pcib0: <BCM2838-compatible PCI-express controller> mem 0x7d500000-0x7d50930f
irq 80,81 on simplebus2
pcib0: parsing FDT for ECAM0:
pcib0:  PCI addr: 0xc0000000, CPU addr: 0x600000000, Size: 0x40000000
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0:  PCI addr: 0x0, CPU addr: 0x0, Size: 0x0
pcib0: Bus is not cache-coherent
pcib0: hardware identifies as revision 0x304.
pcib0: note: reported link speed is 5.0 GT/s.
pci0: <OFW PCI bus> on pcib0
pci0: domain=3D0, physical bus=3D0
found-> vendor=3D0x14e4, dev=3D0x2711, revid=3D0x00
        domain=3D0, bus=3D0, slot=3D0, func=3D0
        class=3D06-04-00, hdrtype=3D0x01, mfdev=3D0
        cmdreg=3D0x0000, statreg=3D0x0010, cachelnsz=3D0 (dwords)
        lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 ns)
        intpin=3Da, irq=3D0
        powerspec 3  supports D0 D3  current D0
        secbus=3D0, subbus=3D0
pcib1: <PCI-PCI bridge> irq 91 at device 0.0 on pci0
pcib1: Lazy allocation of 1 bus at 1
pcib0: rman_reserve_resource: start=3D0xc0000000, end=3D0xc00fffff, count=
=3D0x100000
pcib0: Failed to translate resource 0-fffff type 3 for pcib1
pcib1: failed to allocate initial prefetch window: 0-0xfffff
pcib1:   domain            0
pcib1:   secondary bus     1
pcib1:   subordinate bus   1
pcib1:   memory decode     0xc0000000-0xc00fffff
pci1: <OFW PCI bus> on pcib1
pcib1: allocated bus range (1-1) for rid 0 of pci1
pci1: domain=3D0, physical bus=3D1
  x0: ffffa00000f23368
  x1:                8
  x2: ffff000000846817 (cam_status_table + d8cf)
  x3:              14a
  x4: ffffa001ffd95e00
  x5:              13c
  x6: ffff0000007ece68 (bcm_pcib_read_config + 0)
  x7:                0
  x8: ffff000000dd01f8 (thread0_st + 158)
  x9: ffff000000aded70 (lock_class_mtx_sleep + 0)
 x10:                1
 x11: ffff000000e819c0 (w_locklistdata + 43f78)
 x12:                1
 x13: ffff000000e819f4 (w_locklistdata + 43fac)
 x14:            10000
 x15:                1
 x16:                8
 x17: ffff00000103923c (initstack + 323c)
 x18: ffff000000f11a80 (pcpu0 + 0)
 x19: ffffa00000f23380
 x20:                0
 x21: ffff000000e819c0 (w_locklistdata + 43f78)
 x22: ffffa00000f23000
 x23:                0
 x24:                0
 x25:                1
 x26:             dead
 x27: ffffa00000e6d350
 x28: ffff000040466cd8 (ucom_cons_softc + 3f156718)
 x29: ffff000001039380 (initstack + 3380)
  sp: ffff000000b37160
  lr: ffff00000044d3e0 (__mtx_unlock_flags + 58)
 elr: ffff0000004dfb48 (witness_unlock + f8)
spsr:         600000c5
 far:                0
 esr:         bf000002
panic: Unhandled System Error
cpuid =3D 0
time =3D 1
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
vpanic() at vpanic+0x174
panic() at panic+0x44
do_serror() at do_serror+0x40
handle_serror() at handle_serror+0x94
--- system error, esr 0xbf000002
witness_unlock() at witness_unlock+0xf8
__mtx_unlock_flags() at __mtx_unlock_flags+0x54
bcm_pcib_read_config() at bcm_pcib_read_config+0x160
pci_read_device() at pci_read_device+0x84
pci_add_children() at pci_add_children+0x44
pci_attach() at pci_attach+0xe0
device_attach() at device_attach+0x400
device_probe_and_attach() at device_probe_and_attach+0x7c
bus_generic_attach() at bus_generic_attach+0x18
device_attach() at device_attach+0x400
device_probe_and_attach() at device_probe_and_attach+0x7c
bus_generic_attach() at bus_generic_attach+0x18
pci_attach() at pci_attach+0xe8
device_attach() at device_attach+0x400
device_probe_and_attach() at device_probe_and_attach+0x7c
bus_generic_attach() at bus_generic_attach+0x18
bcm_pcib_attach() at bcm_pcib_attach+0x87c
device_attach() at device_attach+0x400
device_probe_and_attach() at device_probe_and_attach+0x7c
bus_generic_new_pass() at bus_generic_new_pass+0xfc
bus_generic_new_pass() at bus_generic_new_pass+0xac
bus_generic_new_pass() at bus_generic_new_pass+0xac
bus_generic_new_pass() at bus_generic_new_pass+0xac
bus_set_pass() at bus_set_pass+0x4c
mi_startup() at mi_startup+0x12c
virtdone() at virtdone+0x78
KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at      kdb_enter+0x44: undefined       f901811f
db> bt
Tracing pid 0 tid 100000 td 0xffff000000dd00a0
db_trace_self() at db_trace_self
db_stack_trace() at db_stack_trace+0x11c
db_command() at db_command+0x368
db_command_loop() at db_command_loop+0x54
db_trap() at db_trap+0xf8
kdb_trap() at kdb_trap+0x1cc
handle_el1h_sync() at handle_el1h_sync+0x78
--- exception, esr 0xf2000000
kdb_enter() at kdb_enter+0x44
vpanic() at vpanic+0x1b0
panic() at panic+0x44
do_serror() at do_serror+0x40
handle_serror() at handle_serror+0x94
--- system error, esr 0xbf000002
witness_unlock() at witness_unlock+0xf8
__mtx_unlock_flags() at __mtx_unlock_flags+0x54
bcm_pcib_read_config() at bcm_pcib_read_config+0x160
pci_read_device() at pci_read_device+0x84
pci_add_children() at pci_add_children+0x44
pci_attach() at pci_attach+0xe0
device_attach() at device_attach+0x400
device_probe_and_attach() at device_probe_and_attach+0x7c
bus_generic_attach() at bus_generic_attach+0x18
device_attach() at device_attach+0x400
device_probe_and_attach() at device_probe_and_attach+0x7c
bus_generic_attach() at bus_generic_attach+0x18
pci_attach() at pci_attach+0xe8
device_attach() at device_attach+0x400
device_probe_and_attach() at device_probe_and_attach+0x7c
bus_generic_attach() at bus_generic_attach+0x18
bcm_pcib_attach() at bcm_pcib_attach+0x87c
device_attach() at device_attach+0x400
device_probe_and_attach() at device_probe_and_attach+0x7c
bus_generic_new_pass() at bus_generic_new_pass+0xfc
bus_generic_new_pass() at bus_generic_new_pass+0xac
bus_generic_new_pass() at bus_generic_new_pass+0xac
bus_generic_new_pass() at bus_generic_new_pass+0xac
bus_set_pass() at bus_set_pass+0x4c
mi_startup() at mi_startup+0x12c
virtdone() at virtdone+0x78
------------

this is with nvme module loaded .
excluding Rob`s pcie-driver from /...files.arm64 fixes boot panic to get ab=
le
to boot from eMMC/uSD which can also be handled by adding devmatch_enable=
=3D"NO"
to /etc/rc.conf
/afaik the VL805 should not be involved no more to pcie(except pcie-usb-car=
ds)
since the I/o-board has an own USB- controller.=20
since bcm2838_xhci.c contains code to not try to load VL805-firmware if not
soldered to pcie: I didn't yet try to exclude bcm2838_xhci.c from kernel.=
=20=20
tests were made on CM4108032/CM4IO Board which I received last week.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260131-7>