[Bug 260131] RPI [ CM4 /io-ref.-board] panics on pcie with nvme connected

[email protected]
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260131

            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: [email protected]
          Reporter: [email protected]

well, while the story of "how to boot off of nvme on the RPI CM4 I/O-board" 
is quite too long at this place, I booted successfully from nvme and that
heavily depends from rpi-foundation`s closed source proprietary software (and
from fine-tuned configs) ( this dependence will never end although some devs
like dreaming of it ;-). 
the good news is that only the pcie-driver`s magic numbers have to be adjusted
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=0, physical bus=0
found-> vendor=0x14e4, dev=0x2711, revid=0x00
        domain=0, bus=0, slot=0, func=0
        class=06-04-00, hdrtype=0x01, mfdev=0
        cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        intpin=a, irq=0
        powerspec 3  supports D0 D3  current D0
        secbus=0, subbus=0
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=0xc0000000, end=0xc00fffff, count=0x100000
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=0, physical bus=1
  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 = 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+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 able
to boot from eMMC/uSD which can also be handled by adding devmatch_enable="NO"
to /etc/rc.conf
/afaik the VL805 should not be involved no more to pcie(except pcie-usb-cards)
since the I/o-board has an own USB- controller. 
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.  
tests were made on CM4108032/CM4IO Board which I received last week.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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.