From owner-freebsd-hackers@freebsd.org Thu Dec 31 05:41:59 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 039D24DD458 for ; Thu, 31 Dec 2020 05:41:59 +0000 (UTC) (envelope-from neel@neelc.org) Received: from rainpuddle.neelc.org (rainpuddle.neelc.org [66.42.69.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5xqV1q0Sz3nN0 for ; Thu, 31 Dec 2020 05:41:58 +0000 (UTC) (envelope-from neel@neelc.org) Received: from mail.neelc.org (rainpuddle.neelc.org [IPv6:2001:19f0:8001:fed:5400:2ff:fe73:c622]) by rainpuddle.neelc.org (Postfix) with ESMTPSA id E5522EB2A5 for ; Wed, 30 Dec 2020 21:41:55 -0800 (PST) MIME-Version: 1.0 Date: Wed, 30 Dec 2020 21:41:55 -0800 From: Neel Chauhan To: freebsd-hackers@freebsd.org Subject: PCIe Root Port/Bus Not Detected in VMD User-Agent: Roundcube Webmail/1.4.9 Message-ID: <9cb4a47a4899b3cccaab2028c1e81177@neelc.org> X-Sender: neel@neelc.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4D5xqV1q0Sz3nN0 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=neelc.org; spf=pass (mx1.freebsd.org: domain of neel@neelc.org designates 66.42.69.219 as permitted sender) smtp.mailfrom=neel@neelc.org X-Spamd-Result: default: False [-1.80 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[neel]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.42.69.219:from]; R_SPF_ALLOW(-0.20)[+a:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[66.42.69.219:from:127.0.2.255]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_TLS_ALL(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[neelc.org,none]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:20473, ipnet:66.42.64.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 05:41:59 -0000 Hi freebsd-hackers@, My apologies for so many emails from me. 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 @@ -66,10 +66,12 @@ 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 } }; @@ -425,6 +427,7 @@ 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/