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