From owner-freebsd-arch@freebsd.org Fri Oct 27 21:12:59 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BE6DE51271 for ; Fri, 27 Oct 2017 21:12:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2224377822 for ; Fri, 27 Oct 2017 21:12:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v9RLCmpB095854 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 28 Oct 2017 00:12:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v9RLCmpB095854 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v9RLCmf3095853; Sat, 28 Oct 2017 00:12:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Oct 2017 00:12:48 +0300 From: Konstantin Belousov To: Rebecca Cran Cc: freebsd-arch@freebsd.org, Ravi Pokala Subject: Re: Re NVDIMM status report (2017-03-25) Message-ID: <20171027211248.GL2566@kib.kiev.ua> References: <6a504eb3-0194-850a-4f36-345b7a2a738e@bluestop.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6a504eb3-0194-850a-4f36-345b7a2a738e@bluestop.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Oct 2017 21:12:59 -0000 On Fri, Oct 27, 2017 at 02:56:47PM -0600, Rebecca Cran wrote: > I'm replying to the original message at > https://lists.freebsd.org/pipermail/freebsd-arch/2017-March/018165.html > (sorry, I'm not sure how to get the raw email to import and reply to > properly). > > > "Traditional" NVDIMMs have been standardized under JEDEC with the name > 'NVDIMM-N': NVDIMM-P is an upcoming specification that will be for > 'persistent'š or 'storage class' memory modules such as 3D X-Point. > NVDIMM-F is another standard, that puts NAND directly on the memory bus > and allows accesses directly. It's very slow, and only allows block > accesses. NVDIMM-P should be in-between NVDIMM-N and NVDIMM-F in terms > of speed/latency. > > > In terms of proprietary interfaces, there are at least 3 ACPI DSMs: HPE, > Microsoft[0] and Intel[1]. The ACPI Working Group has started to work on > bringing them together under a single specification, but it's still > early days. JEDEC has however published the BAEBI (Byte Addressable > Energy Backed Interface) that's the basis for the DSM, and runs over > I2C. OEMs often lock down access to the I2C bus on boot however, > requiring all accesses to be via ACPI. > > There's currently no widespread support in UEFI for NVDIMMs: I have > prototype code running which allows OVMF running under Qemu to enumerate > them and populate the "Persistent Memory" entry of the 'memmap' shell > command, but that's as far as it goes so far. Perhaps I have some more code. It is more of 'me too' response than something that can be used practically. My WIP patch is at https://kib.kiev.ua/kib/nvdimm.1.patch . Half of it is the KPI to map very large physical memory ranges into KVA, another half is the germ of the driver. The driver provides two devices: one is /dev/nvdimm_spaX for each SPA region, which allows io and zero-copy userspace mapping. Another device is /dev/spaX which is in fact geom and it can be mounted after formatting in UFS. Namespaces support is missed, but planned, same for the blocks access interface.