1*dab59af3SLi-Wen Hsu.\" Copyright (c) 2019 The FreeBSD Foundation 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.\" 28ed4e4cffSD Scott Phillips.Dd September 5, 2019 29d2757137SKonstantin Belousov.Dt NVDIMM 4 30d2757137SKonstantin Belousov.Os 31d2757137SKonstantin Belousov.Sh NAME 32d2757137SKonstantin Belousov.Nm nvdimm 33d2757137SKonstantin Belousov.Nd ACPI NVDIMM driver 34d2757137SKonstantin Belousov.Sh SYNOPSIS 35d2757137SKonstantin BelousovTo load the driver as a module at boot, place the following line in 36d2757137SKonstantin Belousov.Xr loader.conf 5 : 37d2757137SKonstantin Belousov.Bd -literal -offset indent 38d2757137SKonstantin Belousovnvdimm_load="YES" 39d2757137SKonstantin Belousov.Ed 40d2757137SKonstantin Belousov.Sh DESCRIPTION 41d2757137SKonstantin Belousov.Bf -symbolic 42d2757137SKonstantin BelousovNote: 43d2757137SKonstantin BelousovThe 44d2757137SKonstantin Belousov.Nm 45d2757137SKonstantin Belousovdriver is under development and has some important limitations 46d2757137SKonstantin Belousovdescribed below. 47d2757137SKonstantin Belousov.Ef 48d2757137SKonstantin Belousov.Pp 49d2757137SKonstantin BelousovThe 50d2757137SKonstantin Belousov.Nm 51d2757137SKonstantin Belousovdriver provides access to Non-Volatile DIMM (NVDIMM) persistent memory 52d2757137SKonstantin Belousovdevices, which are ACPI-enumerated under the root NVDIMM device 53d2757137SKonstantin Belousovwith a 54d2757137SKonstantin Belousov.Va _HID 55d2757137SKonstantin Belousovof 56d2757137SKonstantin Belousov.Dv ACPI0012 57d2757137SKonstantin Belousovand in the 58d2757137SKonstantin Belousov.Dv NFIT 59d2757137SKonstantin Belousovtable. 60d2757137SKonstantin Belousov.Pp 61d2757137SKonstantin BelousovFor each System Physical Address (SPA) Range described by NFIT, a 62d2757137SKonstantin Belousovdevice node 63d2757137SKonstantin Belousov.Pa /dev/nvdimm_spaNNN 64d2757137SKonstantin Belousovis created, where 65d2757137SKonstantin Belousov.Dv NNN 66d2757137SKonstantin Belousovis the SPA position in the table. 67d2757137SKonstantin BelousovThe node can be used to 68d2757137SKonstantin Belousov.Xr read 2 , 69d2757137SKonstantin Belousov.Xr write 2 , 70d2757137SKonstantin Belousovor 71d2757137SKonstantin Belousov.Xr mmap 2 72d2757137SKonstantin Belousovthe device. 73d2757137SKonstantin Belousov.Pp 74d2757137SKonstantin BelousovAlso, for each SPA, the geom provider 75d2757137SKonstantin Belousov.Pa spaNNN 76ed4e4cffSD Scott Phillipsis created, which can be used to create a conventional filesystem (e.g., 77d2757137SKonstantin Belousovby 78d2757137SKonstantin Belousov.Xr newfs 8 ) 79d2757137SKonstantin Belousovand 80d2757137SKonstantin Belousov.Xr mount 8 81d2757137SKonstantin Belousovit as any storage volume. 82d2757137SKonstantin BelousovContent accessible by 83d2757137SKonstantin Belousov.Pa /dev/nvdimm_spaNNN 84d2757137SKonstantin Belousovand 85d2757137SKonstantin Belousov.Pa /dev/spaNNN 86d2757137SKonstantin Belousovis coherent. 87ed4e4cffSD Scott Phillips.Pp 88ed4e4cffSD Scott PhillipsThe 89ed4e4cffSD Scott Phillips.Nm 90ed4e4cffSD Scott Phillipsdriver has support for reading NVDIMM namespaces (if supported by your 91ed4e4cffSD Scott Phillipshardware and already configured by some other mechanism, e.g., a BIOS 92ed4e4cffSD Scott Phillipsconfiguration screen). 93ed4e4cffSD Scott PhillipsThe driver will provide a 94ed4e4cffSD Scott Phillips.Pa /dev/nvdimm_spaNNNnsMMM 95ed4e4cffSD Scott Phillipsdevice node and 96ed4e4cffSD Scott Phillips.Pa spaNNNnsMMM 97ed4e4cffSD Scott Phillipsgeom provider for each namespace in a SPA, which behave analogously to their 98ed4e4cffSD Scott Phillipsfull-SPA cousins described above. 99d2757137SKonstantin Belousov.Sh SEE ALSO 10014e3d324SJens Schweikhardt.Xr acpi 4 , 101d2757137SKonstantin Belousov.Xr GEOM 4 , 102d2757137SKonstantin Belousov.Xr geom 8 , 103d2757137SKonstantin Belousov.Xr mount 8 , 104d2757137SKonstantin Belousov.Xr newfs 8 , 105d2757137SKonstantin Belousov.Xr disk 9 106d2757137SKonstantin Belousov.Sh HISTORY 107d2757137SKonstantin BelousovThe 108d2757137SKonstantin Belousov.Nm 109d2757137SKonstantin Belousovdriver first appeared in 110d2757137SKonstantin Belousov.Fx 12.0 . 111d2757137SKonstantin Belousov.Sh AUTHORS 112d2757137SKonstantin Belousov.An -nosplit 113d2757137SKonstantin BelousovThe 114d2757137SKonstantin Belousov.Nm 115d2757137SKonstantin Belousovdriver was originally written by 116d2757137SKonstantin Belousov.An Konstantin Belousov Aq Mt kib@FreeBSD.org , 117d2757137SKonstantin Belousovand then updated by 118d2757137SKonstantin Belousov.An D. Scott Phillips Aq Mt scottph@FreeBSD.org . 119d2757137SKonstantin Belousov.Sh BUGS 120d2757137SKonstantin BelousovThe 121d2757137SKonstantin Belousov.Nm 1224011767fSEd Mastedriver does not utilize the Block Window interface, so if a write to an 1234011767fSEd MasteNVDIMM is interrupted due to a system crash or power outage, 1244011767fSEd Mastethe corresponding page might be left in a partially updated state. 125d2757137SKonstantin Belousov.Pp 126d2757137SKonstantin BelousovThere is no support for Device-Specific Methods (DSM), used to report and 1274011767fSEd Mastecontrol device health and wearing. 128d2757137SKonstantin Belousov.Pp 129d2757137SKonstantin BelousovThe driver depends on the 130d2757137SKonstantin Belousov.Xr pmap_largemap 9 131d2757137SKonstantin Belousovpmap interface, which is currently only implemented on amd64. 132d2757137SKonstantin BelousovThe interface can be only reasonable implemented on 64bit architectures. 133