1d2757137SKonstantin Belousov.\" Copyright (c) 2019 The FreeBSD Foundation, Inc. 2d2757137SKonstantin Belousov.\" 3d2757137SKonstantin Belousov.\" This documentation was written by 4d2757137SKonstantin Belousov.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship 5d2757137SKonstantin Belousov.\" from the FreeBSD Foundation. 6d2757137SKonstantin Belousov.\" 7d2757137SKonstantin Belousov.\" Redistribution and use in source and binary forms, with or without 8d2757137SKonstantin Belousov.\" modification, are permitted provided that the following conditions 9d2757137SKonstantin Belousov.\" are met: 10d2757137SKonstantin Belousov.\" 1. Redistributions of source code must retain the above copyright 11d2757137SKonstantin Belousov.\" notice, this list of conditions and the following disclaimer. 12d2757137SKonstantin Belousov.\" 2. Redistributions in binary form must reproduce the above copyright 13d2757137SKonstantin Belousov.\" notice, this list of conditions and the following disclaimer in the 14d2757137SKonstantin Belousov.\" documentation and/or other materials provided with the distribution. 15d2757137SKonstantin Belousov.\" 16d2757137SKonstantin Belousov.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 17d2757137SKonstantin Belousov.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18d2757137SKonstantin Belousov.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19d2757137SKonstantin Belousov.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 20d2757137SKonstantin Belousov.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21d2757137SKonstantin Belousov.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22d2757137SKonstantin Belousov.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23d2757137SKonstantin Belousov.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24d2757137SKonstantin Belousov.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25d2757137SKonstantin Belousov.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26d2757137SKonstantin Belousov.\" SUCH DAMAGE. 27d2757137SKonstantin Belousov.\" 28d2757137SKonstantin Belousov.\" $FreeBSD$ 29d2757137SKonstantin Belousov.\" 30ed4e4cffSD Scott Phillips.Dd September 5, 2019 31d2757137SKonstantin Belousov.Dt NVDIMM 4 32d2757137SKonstantin Belousov.Os 33d2757137SKonstantin Belousov.Sh NAME 34d2757137SKonstantin Belousov.Nm nvdimm 35d2757137SKonstantin Belousov.Nd ACPI NVDIMM driver 36d2757137SKonstantin Belousov.Sh SYNOPSIS 37d2757137SKonstantin BelousovTo load the driver as a module at boot, place the following line in 38d2757137SKonstantin Belousov.Xr loader.conf 5 : 39d2757137SKonstantin Belousov.Bd -literal -offset indent 40d2757137SKonstantin Belousovnvdimm_load="YES" 41d2757137SKonstantin Belousov.Ed 42d2757137SKonstantin Belousov.Sh DESCRIPTION 43d2757137SKonstantin Belousov.Bf -symbolic 44d2757137SKonstantin BelousovNote: 45d2757137SKonstantin BelousovThe 46d2757137SKonstantin Belousov.Nm 47d2757137SKonstantin Belousovdriver is under development and has some important limitations 48d2757137SKonstantin Belousovdescribed below. 49d2757137SKonstantin Belousov.Ef 50d2757137SKonstantin Belousov.Pp 51d2757137SKonstantin BelousovThe 52d2757137SKonstantin Belousov.Nm 53d2757137SKonstantin Belousovdriver provides access to Non-Volatile DIMM (NVDIMM) persistent memory 54d2757137SKonstantin Belousovdevices, which are ACPI-enumerated under the root NVDIMM device 55d2757137SKonstantin Belousovwith a 56d2757137SKonstantin Belousov.Va _HID 57d2757137SKonstantin Belousovof 58d2757137SKonstantin Belousov.Dv ACPI0012 59d2757137SKonstantin Belousovand in the 60d2757137SKonstantin Belousov.Dv NFIT 61d2757137SKonstantin Belousovtable. 62d2757137SKonstantin Belousov.Pp 63d2757137SKonstantin BelousovFor each System Physical Address (SPA) Range described by NFIT, a 64d2757137SKonstantin Belousovdevice node 65d2757137SKonstantin Belousov.Pa /dev/nvdimm_spaNNN 66d2757137SKonstantin Belousovis created, where 67d2757137SKonstantin Belousov.Dv NNN 68d2757137SKonstantin Belousovis the SPA position in the table. 69d2757137SKonstantin BelousovThe node can be used to 70d2757137SKonstantin Belousov.Xr read 2 , 71d2757137SKonstantin Belousov.Xr write 2 , 72d2757137SKonstantin Belousovor 73d2757137SKonstantin Belousov.Xr mmap 2 74d2757137SKonstantin Belousovthe device. 75d2757137SKonstantin Belousov.Pp 76d2757137SKonstantin BelousovAlso, for each SPA, the geom provider 77d2757137SKonstantin Belousov.Pa spaNNN 78ed4e4cffSD Scott Phillipsis created, which can be used to create a conventional filesystem (e.g., 79d2757137SKonstantin Belousovby 80d2757137SKonstantin Belousov.Xr newfs 8 ) 81d2757137SKonstantin Belousovand 82d2757137SKonstantin Belousov.Xr mount 8 83d2757137SKonstantin Belousovit as any storage volume. 84d2757137SKonstantin BelousovContent accessible by 85d2757137SKonstantin Belousov.Pa /dev/nvdimm_spaNNN 86d2757137SKonstantin Belousovand 87d2757137SKonstantin Belousov.Pa /dev/spaNNN 88d2757137SKonstantin Belousovis coherent. 89ed4e4cffSD Scott Phillips.Pp 90ed4e4cffSD Scott PhillipsThe 91ed4e4cffSD Scott Phillips.Nm 92ed4e4cffSD Scott Phillipsdriver has support for reading NVDIMM namespaces (if supported by your 93ed4e4cffSD Scott Phillipshardware and already configured by some other mechanism, e.g., a BIOS 94ed4e4cffSD Scott Phillipsconfiguration screen). 95ed4e4cffSD Scott PhillipsThe driver will provide a 96ed4e4cffSD Scott Phillips.Pa /dev/nvdimm_spaNNNnsMMM 97ed4e4cffSD Scott Phillipsdevice node and 98ed4e4cffSD Scott Phillips.Pa spaNNNnsMMM 99ed4e4cffSD Scott Phillipsgeom provider for each namespace in a SPA, which behave analogously to their 100ed4e4cffSD Scott Phillipsfull-SPA cousins described above. 101d2757137SKonstantin Belousov.Sh SEE ALSO 102*14e3d324SJens Schweikhardt.Xr acpi 4 , 103d2757137SKonstantin Belousov.Xr GEOM 4 , 104d2757137SKonstantin Belousov.Xr geom 8 , 105d2757137SKonstantin Belousov.Xr mount 8 , 106d2757137SKonstantin Belousov.Xr newfs 8 , 107d2757137SKonstantin Belousov.Xr disk 9 108d2757137SKonstantin Belousov.Sh HISTORY 109d2757137SKonstantin BelousovThe 110d2757137SKonstantin Belousov.Nm 111d2757137SKonstantin Belousovdriver first appeared in 112d2757137SKonstantin Belousov.Fx 12.0 . 113d2757137SKonstantin Belousov.Sh AUTHORS 114d2757137SKonstantin Belousov.An -nosplit 115d2757137SKonstantin BelousovThe 116d2757137SKonstantin Belousov.Nm 117d2757137SKonstantin Belousovdriver was originally written by 118d2757137SKonstantin Belousov.An Konstantin Belousov Aq Mt kib@FreeBSD.org , 119d2757137SKonstantin Belousovand then updated by 120d2757137SKonstantin Belousov.An D. Scott Phillips Aq Mt scottph@FreeBSD.org . 121d2757137SKonstantin Belousov.Sh BUGS 122d2757137SKonstantin BelousovThe 123d2757137SKonstantin Belousov.Nm 1244011767fSEd Mastedriver does not utilize the Block Window interface, so if a write to an 1254011767fSEd MasteNVDIMM is interrupted due to a system crash or power outage, 1264011767fSEd Mastethe corresponding page might be left in a partially updated state. 127d2757137SKonstantin Belousov.Pp 128d2757137SKonstantin BelousovThere is no support for Device-Specific Methods (DSM), used to report and 1294011767fSEd Mastecontrol device health and wearing. 130d2757137SKonstantin Belousov.Pp 131d2757137SKonstantin BelousovThe driver depends on the 132d2757137SKonstantin Belousov.Xr pmap_largemap 9 133d2757137SKonstantin Belousovpmap interface, which is currently only implemented on amd64. 134d2757137SKonstantin BelousovThe interface can be only reasonable implemented on 64bit architectures. 135