Bug 257771 - M.2 pcie/nvme device can't mount root and panics on Rock960 rk3399
Summary: M.2 pcie/nvme device can't mount root and panics on Rock960 rk3399
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-11 16:38 UTC by Klaus Küchemann
Modified: 2021-08-12 04:01 UTC (History)
1 user (show)

See Also:


Attachments
u-boot, loader & dmesg (74.54 KB, text/plain)
2021-08-11 16:38 UTC, Klaus Küchemann
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Küchemann 2021-08-11 16:38:44 UTC
Created attachment 227116 [details]
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.
Comment 1 Klaus Küchemann 2021-08-12 04:01:57 UTC
since compiling rk3399-rock960.dts into the kernel and additionally loading the resulting dtb from the loader prompt didn't also make any difference, 
I realized that this seems to be an hardware errata of the board revision 1.2 I own.
This was seemingly fixed in manufacturer`s board rev. 1.3 by an additional added pcie
high power-peak hw component.

I close this bugreport as a hardware errata and non-fbsd-bug.

K.