>Synopsis:      Samsung NVMe M.2 SSD 970 EVO Plus fails to attach on VisionFive 
>2 (JH7110 SoC) board
>Category:      riscv64
>Environment:
        System      : OpenBSD 7.3
        Details     : OpenBSD 7.3-current (GENERIC.MP) #377: Fri Jul 14 
04:39:21 MDT 2023
                         
dera...@riscv64.openbsd.org:/usr/src/sys/arch/riscv64/compile/GENERIC.MP

        Architecture: OpenBSD.riscv64
        Machine     : riscv64
>Description:
        Samsung NVMe M.2 SSD 970 EVO Plus fails to attach on VisionFive 2 
(JH7110 SoC) board


I just got a Samsung NVMe M.2 SSD 970 EVO Plus to test the recently added
support for PCIE devices to JH7110 SoC but it has not been working correctly
with this disk.

The behavior I'm observing is a little erratic, the NVMe disk only attached
correctly like in 1 of 10 or more boot attempts.

Only a couple of times worked OK, but most of the times one of the following
is observed:

- No nvme0 device detected during autoconf phase, nothing related to the
  device shows up in dmesg and no sd0 device is attached. When this
  happens the board boots OK and SD/MMC devices are detected and attached.

- nvme0 device is detected during autoconf, sd0 device attaches but boot
  hangs. Looks like kernel never reaches diskconf() or if it reached it
  something is preventing the kernel from print the typical message:

root on sd0a (062aeb9d33543517.a) swap on sd0b dump on sd0b

- nvme0 device appears in dmesg but the device fails to attach with the
  following message:

nvme0 at pci3 dev 0 function 0 "Samsung SM981/PM981 NVMe" rev 0x00: unable to 
map registers

- To workaround this I'm just booting the kernel with -c option to disable
  nvme driver in UKC and proceed with the boot.


I tried to debug more by building a kernel with DEBUG option set to gather more
info but unfortunately if I boot such a kernel my board gets stuck very early
in the boot process just after printing how much real memory is available.

I'm more than happy to provide more info if required or to try patches if
that helps to troubleshoot the issue.

Thanks.
Miguel.



dmesg:
OpenBSD 7.3-current (GENERIC.MP) #377: Fri Jul 14 04:39:21 MDT 2023
    dera...@riscv64.openbsd.org:/usr/src/sys/arch/riscv64/compile/GENERIC.MP
real mem  = 4294967296 (4096MB)
avail mem = 8239276032 (7857MB)
SBI: OpenSBI v1.2, SBI Specification Version 1.0
random: boothowto does not indicate good seed
mainbus0 at root: StarFive VisionFive 2 v1.3B
cpu0 at mainbus0: SiFive U7 imp 4210427 rv64imafdc_zba_zbb
intc0 at cpu0
cpu0: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu0: 2048KB 64b/line 2048-way L2 cache
cpu1 at mainbus0: SiFive U7 imp 4210427 rv64imafdc_zba_zbb
cpu1: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu1: 2048KB 64b/line 2048-way L2 cache
cpu2 at mainbus0: SiFive U7 imp 4210427 rv64imafdc_zba_zbb
cpu2: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu2: 2048KB 64b/line 2048-way L2 cache
cpu3 at mainbus0: SiFive U7 imp 4210427 rv64imafdc_zba_zbb
cpu3: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu3: 2048KB 64b/line 2048-way L2 cache
"opp-table-0" at mainbus0 not configured
"dvp-clock" at mainbus0 not configured
"gmac0-rgmii-rxin-clock" at mainbus0 not configured
"gmac0-rmii-refin-clock" at mainbus0 not configured
"gmac1-rgmii-rxin-clock" at mainbus0 not configured
"gmac1-rmii-refin-clock" at mainbus0 not configured
"hdmitx0-pixel-clock" at mainbus0 not configured
"i2srx-bclk-ext-clock" at mainbus0 not configured
"i2srx-lrck-ext-clock" at mainbus0 not configured
"i2stx-bclk-ext-clock" at mainbus0 not configured
"i2stx-lrck-ext-clock" at mainbus0 not configured
"mclk-ext-clock" at mainbus0 not configured
"oscillator" at mainbus0 not configured
"rtc-oscillator" at mainbus0 not configured
"stmmac-axi-config" at mainbus0 not configured
"tdm-ext-clock" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
plic0 at simplebus0
stfpciephy0 at simplebus0
stfpciephy1 at simplebus0
stfclock0 at simplebus0: stgcrg
syscon0 at simplebus0: "syscon"
stfclock1 at simplebus0: syscrg
syscon1 at simplebus0: "syscon"
stfclock2 at syscon1: pll
stfpinctrl0 at simplebus0
stfclock3 at simplebus0: aoncrg
syscon2 at simplebus0: "syscon"
"timer" at simplebus0 not configured
"cache-controller" at simplebus0 not configured
com0 at simplebus0: dw16550
com0: console
"i2c" at simplebus0 not configured
"i2c" at simplebus0 not configured
"tdm" at simplebus0 not configured
"usb" at simplebus0 not configured
"phy" at simplebus0 not configured
"i2c" at simplebus0 not configured
"i2c" at simplebus0 not configured
"pwm" at simplebus0 not configured
stftemp0 at simplebus0
"spi" at simplebus0 not configured
"timer" at simplebus0 not configured
"watchdog" at simplebus0 not configured
"dma" at simplebus0 not configured
"rng" at simplebus0 not configured
dwmmc0 at simplebus0: 198 MHz base clock
sdmmc0 at dwmmc0: 8-bit, mmc high-speed, dma
dwmmc1 at simplebus0: 198 MHz base clock
sdmmc1 at dwmmc1: 4-bit, sd high-speed, dma
dwqe0 at simplebus0 gmac 0dwqe0: reset timeout
: rev 0x00, address xx:xx:xx:xx:xx:xx
dwqe0: reset timeout
ytphy0 at dwqe0 phy 0: YT8531 10/100/1000 PHY, rev. 11
dwqe1 at simplebus0 gmac 1dwqe1: reset timeout
: rev 0x00, address xx:xx:xx:xx:xx:xx
dwqe1: reset timeout
ytphy1 at dwqe1 phy 0: YT8531 10/100/1000 PHY, rev. 11
"dma-controller" at simplebus0 not configured
"pinctrl" at simplebus0 not configured
"power-controller" at simplebus0 not configured
"csi-bridge" at simplebus0 not configured
"clock-controller" at simplebus0 not configured
"phy" at simplebus0 not configured
"camss" at simplebus0 not configured
"clock-controller" at simplebus0 not configured
stfpcie0 at simplebus0
pci0 at stfpcie0
ppb0 at pci0 dev 0 function 0 "PLDA XpressRICH-AXI" rev 0x00
pci1 at ppb0 bus 1
xhci0 at pci1 dev 0 function 0 "VIA VL805 xHCI" rev 0x01: intx, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "VIA xHCI root hub" rev 3.00/1.00 
addr 1
stfpcie1 at simplebus0
pci2 at stfpcie1
ppb1 at pci2 dev 0 function 0 "PLDA XpressRICH-AXI" rev 0x00
pci3 at ppb1 bus 1
nvme0 at pci3 dev 0 function 0 "Samsung SM981/PM981 NVMe" rev 0x00: unable to 
map registers
gpiorestart0 at mainbus0
"clk_ext_camera" at mainbus0 not configured
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Sandisk, DA4064, 0000> removable
sd0: 59640MB, 512 bytes/sector, 122142720 sectors
scsibus1 at sdmmc1: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Sandisk, SN64G, 0086> removable
sd1: 60906MB, 512 bytes/sector, 124735488 sectors
uhub1 at uhub0 port 1 configuration 1 interface 0 "vendor 0x2109 USB2.0 Hub" 
rev 2.10/4.20 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (062aeb9d33543517.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!
athn0 at uhub1 port 2 configuration 1 interface 0 "ATHEROS UB93" rev 2.00/1.08 
addr 3
athn0: AR9271 rev 1 (1T1R), ROM rev 15, address xx:xx:xx:xx:xx:xx

usbdevs:
Controller /dev/usb0:
addr 01: 1106:0000 VIA, xHCI root hub
         super speed, self powered, config 1, rev 1.00
         driver: uhub0
addr 02: 2109:3431 vendor 0x2109, USB2.0 Hub
         high speed, self powered, config 1, rev 4.20
         driver: uhub1
addr 03: 0cf3:9271 ATHEROS, UB93
         high speed, power 500 mA, config 1, rev 1.08, iSerial 12345
         driver: athn0

Reply via email to