[Bug 257771] M.2 pcie/nvme device can't mount root and panics on Rock960 rk3399

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 11 Aug 2021 16:38:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257771

            Bug ID: 257771
           Summary: M.2 pcie/nvme device can't mount root and panics on
                    Rock960 rk3399
           Product: Base System
           Version: CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: maciphone2@googlemail.com

Created attachment 227116
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=227116&action=edit
u-boot, loader & dmesg

well, 
on cold boot nvme (directly attached to M.2-slot on Rock960) isn't detected by
u-boot .
seems to be something with power cycling that it will be detected by u-boot 
AFTER REBOOT while machine was booted from eMMC before
 ....
rock960 => nvme info
Device 0: Vendor: 0x15b7 Rev: 211070WD Prod: 20251C807274        
            Type: Hard Disk
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
...

well on loader prompt the nvme`s root filesystem is now detected as disk1p2 (
was previously installed by memstick.img) :
OK lsdev
disk devices:
    disk0:    59768832 X 512 blocks (removable)
      disk0p1: EFI
      disk0p2: FreeBSD UFS
    disk1:    488397168 X 512 blocks
      disk1p1: EFI
      disk1p2: FreeBSD UFS
      disk1p3: FreeBSD swap
http: (unknown)
net devices:
OK show currdev
disk0p2:
OK set currdev=disk1p2
OK show currdev
disk1p2
...
OK boot -v

...
results in panic because pci/nvme driver never detects any /dev/nda0 or
similar.. .
....
cib0: <Rockchip PCIe controller> mem
0xf8000000-0xf9ffffff,0xfd000000-0xfdffffff irq 6,7,8 on ofwbus0
pcib0: Bus is not cache-coherent
pcib0: Gen1 link training timeouted: 0x00180001.
pci0: <OFW PCI bus> on pcib0
pci0: domain=0, physical bus=0
found-> vendor=0x1d87, dev=0x0100, revid=0x00
        domain=0, bus=0, slot=0, func=0
        class=06-04-00, hdrtype=0x01, mfdev=0
        cmdreg=0x0106, statreg=0x0010, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        intpin=a, irq=255
        powerspec 3  supports D0 D1 D3  current D0
        MSI supports 1 message, 64 bit, vector masks
        MSI-X supports 1 message in map 0x10
        secbus=1, subbus=31
pcib1: <PCI-PCI bridge> at device 0.0 on pci0
pcib0: failed to reserve resource for pcib1
pcib1: failed to allocate initial memory window: 0-0xfffff
pcib1:   domain            0
pcib1:   secondary bus     1
pcib1:   subordinate bus   31
pci1: <PCI bus> on pcib1
pcib1: allocated bus range (1-1) for rid 0 of pci1
pci1: domain=0, physical bus=1
...

same result if bootable system was removed from eMMC and machine booted
directly from nvme, so nvme is bootable but panics.
same panic regardless if UFS or ZFS formatted disk.

full dmesg in attachment(UFS in this example).

Regards
K.

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