From owner-freebsd-current@freebsd.org Thu Dec 31 05:04:17 2020 Return-Path: Delivered-To: freebsd-current@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 C9F924DC3C7 for ; Thu, 31 Dec 2020 05:04:17 +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 4D5x006Flbz3l5F for ; Thu, 31 Dec 2020 05:04:16 +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 0DA3CEB2A5; Wed, 30 Dec 2020 21:04:13 -0800 (PST) MIME-Version: 1.0 Date: Wed, 30 Dec 2020 21:04:12 -0800 From: Neel Chauhan To: Chuck Tuffli Cc: FreeBSD-Current Subject: Re: Intel TigerLake NVMe vmd: Adding Support & Debugging a Patch In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.9 Message-ID: <75d6b956e227249774978dc09cd26c3f@neelc.org> X-Sender: neel@neelc.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4D5x006Flbz3l5F X-Spamd-Bar: - X-Spamd-Result: default: False [-1.80 / 15.00]; RCVD_TLS_ALL(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]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[66.42.69.219:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[neelc.org,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; 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-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 05:04:17 -0000 I think I found the issue: This PCIe controller is not detected: 10000:e0:1d.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 [8086:a0b0] (rev 20) SI I believe the above PCIe controller is exposed by VMD (as it is on Linux), but FreeBSD vmd/vmd_bus is unable to attach this controller. It is likely because VMD uses PCI domain above 0x10000 but we aren't looking at this. Source: https://github.com/torvalds/linux/blob/master/drivers/pci/controller/vmd.c#L437 Don't yet have a patch though. Sorry for the number of emails earlier. -Neel On 2020-12-30 10:04, Chuck Tuffli wrote: > On Tue, Dec 29, 2020 at 6:30 PM Neel Chauhan wrote: >> >> Hi freebsd-hackers@, CC'd freebsd-current@, >> >> I hope you all had a wonderful holiday season. >> >> I recently got a HP Spectre x360 13t-aw200 which is an Intel >> TigerLake-based laptop. It has the Intel "Evo" branding and an >> "Optane" >> SSD which I disabled (so I can get a "second" SSD). >> >> On the Spectre, the NVMe is not detected: https://imgur.com/a/ighTwHQ >> >> I don't know if it is HP or Intel, but the VMD IDs device id is >> 8086:9a0b. I'm guessing Intel since Dell laptops (XPS, Vostro) also >> have >> this device ID [1]. >> >> Sadly, NVMe RAID is forced on this laptop. >> >> I wrote a rough patch to add the device IDs, and the patch is below: > > FWIW, that is the same change I would have made. Peeking at the Linux > vmd driver, it doesn't appear to do anything special for 8086:9a0b as > compared to the 8086:2a0c device the FreeBSD driver already supports. > That said, the Linux driver reads a capability register to determine > the bus number start (vmd_bus_number_start()) which I don't see in the > FreeBSD driver. This is curious because, looking at the "lspci all" > output from the XPS link you provided, the NVMe device shows up in PCI > domain 0x1000 (i.e. not 0x0000). Which (and I have no direct > experience with this device or code) only happens if the bus number > start function returns 0x0. > > What is the output from > # pciconf -rb pci0:0:14:0 0x40:0x48 > > --chuck > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"