PCIe Root Port/Bus Not Detected in VMD

From: Neel Chauhan <neel_at_neelc.org>
Date: Wed, 30 Dec 2020 21:42:42 -0800
Hi freebsd-current_at_,

My apologies for so many emails from me. I sent another copy of this 
email to freebsd-hackers_at_.

I have the following patch:

diff --git a/sys/dev/vmd/vmd.c b/sys/dev/vmd/vmd.c
index 2cc6f45bed9..7cc0a8a91a7 100644
--- a/sys/dev/vmd/vmd.c
+++ b/sys/dev/vmd/vmd.c
_at__at_ -66,10 +66,12 _at__at_ struct vmd_type {
  #define INTEL_VENDOR_ID		0x8086
  #define INTEL_DEVICE_ID_VMD	0x201d
  #define INTEL_DEVICE_ID_VMD2	0x28c0
+#define INTEL_DEVICE_ID_VMD3	0x9a0b

  static struct vmd_type vmd_devs[] = {
          { INTEL_VENDOR_ID, INTEL_DEVICE_ID_VMD,  "Intel Volume 
Management Device" },
          { INTEL_VENDOR_ID, INTEL_DEVICE_ID_VMD2, "Intel Volume 
Management Device" },
+        { INTEL_VENDOR_ID, INTEL_DEVICE_ID_VMD3, "Intel Volume 
Management Device" },
          { 0, 0, NULL }
  };

_at__at_ -425,6 +427,7 _at__at_ vmd_attach(device_t dev)
  	return (0);

  fail:
+	rman_fini(&sc->vmd_bus.rman);
  	vmd_free(sc);
  	return (ENXIO);
  }

This patch helps me detect the VMD controller, but I am unable to attach 
to it.

Therefore, I am not able to attach any PCIe buses that will be used by a 
NVMe SSD.

If this patch worked, I would see these devices (as I do in Linux):

10000:e0:1d.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP PCI 
Express Root Port #9 [8086:a0b0] (rev 20) SI
10000:e0:1d.2 PCI bridge [0604]: Intel Corporation Device [8086:a0b2] 
(rev 20)
10000:e1:00.0 Non-Volatile memory controller [0108]: Intel Corporation 
Device [8086:0975] (rev 03)
10000:e2:00.0 Non-Volatile memory controller [0108]: Intel Corporation 
Device [8086:0975]

And therefore a `nvd*` device.

Could a developer please help me with this?

-Neel

===

https://www.neelc.org/
Received on Thu Dec 31 2020 - 04:42:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC