Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Dan Williams | 18da2c9 | 2015-06-09 14:13:37 -0400 | [diff] [blame] | 2 | menuconfig LIBNVDIMM |
Dan Williams | b94d523 | 2015-05-19 22:54:31 -0400 | [diff] [blame] | 3 | tristate "NVDIMM (Non-Volatile Memory Device) Support" |
| 4 | depends on PHYS_ADDR_T_64BIT |
Dan Williams | 29b9aa0 | 2016-06-06 17:42:38 -0700 | [diff] [blame] | 5 | depends on HAS_IOMEM |
Dan Williams | b94d523 | 2015-05-19 22:54:31 -0400 | [diff] [blame] | 6 | depends on BLK_DEV |
| 7 | help |
| 8 | Generic support for non-volatile memory devices including |
| 9 | ACPI-6-NFIT defined resources. On platforms that define an |
| 10 | NFIT, or otherwise can discover NVDIMM resources, a libnvdimm |
| 11 | bus is registered to advertise PMEM (persistent memory) |
| 12 | namespaces (/dev/pmemX) and BLK (sliding mmio window(s)) |
Vishal Verma | 5212e11 | 2015-06-25 04:20:32 -0400 | [diff] [blame] | 13 | namespaces (/dev/ndblkX.Y). A PMEM namespace refers to a |
| 14 | memory resource that may span multiple DIMMs and support DAX |
| 15 | (see CONFIG_DAX). A BLK namespace refers to an NVDIMM control |
| 16 | region which exposes an mmio register set for windowed access |
| 17 | mode to non-volatile memory. |
Dan Williams | 18da2c9 | 2015-06-09 14:13:37 -0400 | [diff] [blame] | 18 | |
| 19 | if LIBNVDIMM |
| 20 | |
| 21 | config BLK_DEV_PMEM |
| 22 | tristate "PMEM: Persistent memory block device support" |
| 23 | default LIBNVDIMM |
Dan Williams | 2080e88 | 2018-03-29 17:20:39 -0700 | [diff] [blame] | 24 | select DAX_DRIVER |
Vishal Verma | 5212e11 | 2015-06-25 04:20:32 -0400 | [diff] [blame] | 25 | select ND_BTT if BTT |
Dan Williams | e145574 | 2015-07-30 17:57:47 -0400 | [diff] [blame] | 26 | select ND_PFN if NVDIMM_PFN |
Dan Williams | 18da2c9 | 2015-06-09 14:13:37 -0400 | [diff] [blame] | 27 | help |
| 28 | Memory ranges for PMEM are described by either an NFIT |
| 29 | (NVDIMM Firmware Interface Table, see CONFIG_NFIT_ACPI), a |
| 30 | non-standard OEM-specific E820 memory type (type-12, see |
| 31 | CONFIG_X86_PMEM_LEGACY), or it is manually specified by the |
| 32 | 'memmap=nn[KMG]!ss[KMG]' kernel command line (see |
Mauro Carvalho Chehab | 8c27ceff3 | 2016-10-18 10:12:27 -0200 | [diff] [blame] | 33 | Documentation/admin-guide/kernel-parameters.rst). This driver converts |
Dan Williams | 18da2c9 | 2015-06-09 14:13:37 -0400 | [diff] [blame] | 34 | these persistent memory ranges into block devices that are |
| 35 | capable of DAX (direct-access) file system mappings. See |
Mauro Carvalho Chehab | ae4a050 | 2019-06-18 16:32:31 -0300 | [diff] [blame] | 36 | Documentation/driver-api/nvdimm/nvdimm.rst for more details. |
Dan Williams | 18da2c9 | 2015-06-09 14:13:37 -0400 | [diff] [blame] | 37 | |
| 38 | Say Y if you want to use an NVDIMM |
| 39 | |
Ross Zwisler | 047fc8a | 2015-06-25 04:21:02 -0400 | [diff] [blame] | 40 | config ND_BLK |
| 41 | tristate "BLK: Block data window (aperture) device support" |
| 42 | default LIBNVDIMM |
| 43 | select ND_BTT if BTT |
| 44 | help |
| 45 | Support NVDIMMs, or other devices, that implement a BLK-mode |
| 46 | access capability. BLK-mode access uses memory-mapped-i/o |
| 47 | apertures to access persistent media. |
| 48 | |
| 49 | Say Y if your platform firmware emits an ACPI.NFIT table |
| 50 | (CONFIG_ACPI_NFIT), or otherwise exposes BLK-mode |
| 51 | capabilities. |
| 52 | |
Dan Williams | e145574 | 2015-07-30 17:57:47 -0400 | [diff] [blame] | 53 | config ND_CLAIM |
| 54 | bool |
| 55 | |
Vishal Verma | 5212e11 | 2015-06-25 04:20:32 -0400 | [diff] [blame] | 56 | config ND_BTT |
| 57 | tristate |
| 58 | |
Dan Williams | 8c2f7e8 | 2015-06-25 04:20:04 -0400 | [diff] [blame] | 59 | config BTT |
Vishal Verma | 5212e11 | 2015-06-25 04:20:32 -0400 | [diff] [blame] | 60 | bool "BTT: Block Translation Table (atomic sector updates)" |
| 61 | default y if LIBNVDIMM |
Dan Williams | e145574 | 2015-07-30 17:57:47 -0400 | [diff] [blame] | 62 | select ND_CLAIM |
Vishal Verma | 5212e11 | 2015-06-25 04:20:32 -0400 | [diff] [blame] | 63 | help |
| 64 | The Block Translation Table (BTT) provides atomic sector |
| 65 | update semantics for persistent memory devices, so that |
| 66 | applications that rely on sector writes not being torn (a |
| 67 | guarantee that typical disks provide) can continue to do so. |
| 68 | The BTT manifests itself as an alternate personality for an |
| 69 | NVDIMM namespace, i.e. a namespace can be in raw mode (pmemX, |
| 70 | ndblkX.Y, etc...), or 'sectored' mode, (pmemXs, ndblkX.Ys, |
| 71 | etc...). |
| 72 | |
| 73 | Select Y if unsure |
Dan Williams | 8c2f7e8 | 2015-06-25 04:20:04 -0400 | [diff] [blame] | 74 | |
Dan Williams | e145574 | 2015-07-30 17:57:47 -0400 | [diff] [blame] | 75 | config ND_PFN |
| 76 | tristate |
| 77 | |
| 78 | config NVDIMM_PFN |
| 79 | bool "PFN: Map persistent (device) memory" |
| 80 | default LIBNVDIMM |
Dan Williams | 32ab0a3f | 2015-08-01 02:16:37 -0400 | [diff] [blame] | 81 | depends on ZONE_DEVICE |
Dan Williams | e145574 | 2015-07-30 17:57:47 -0400 | [diff] [blame] | 82 | select ND_CLAIM |
| 83 | help |
| 84 | Map persistent memory, i.e. advertise it to the memory |
| 85 | management sub-system. By default persistent memory does |
| 86 | not support direct I/O, RDMA, or any other usage that |
| 87 | requires a 'struct page' to mediate an I/O request. This |
| 88 | driver allocates and initializes the infrastructure needed |
| 89 | to support those use cases. |
| 90 | |
| 91 | Select Y if unsure |
| 92 | |
Dan Williams | cd03412 | 2016-03-11 10:15:36 -0800 | [diff] [blame] | 93 | config NVDIMM_DAX |
Arnd Bergmann | 867dfe3 | 2016-10-25 17:52:04 +0200 | [diff] [blame] | 94 | bool "NVDIMM DAX: Raw access to persistent memory" |
Dan Williams | cd03412 | 2016-03-11 10:15:36 -0800 | [diff] [blame] | 95 | default LIBNVDIMM |
| 96 | depends on NVDIMM_PFN |
| 97 | help |
| 98 | Support raw device dax access to a persistent memory |
| 99 | namespace. For environments that want to hard partition |
Masanari Iida | 83fc61a | 2017-09-26 12:47:59 +0900 | [diff] [blame] | 100 | persistent memory, this capability provides a mechanism to |
Dan Williams | cd03412 | 2016-03-11 10:15:36 -0800 | [diff] [blame] | 101 | sub-divide a namespace into character devices that can only be |
| 102 | accessed via DAX (mmap(2)). |
| 103 | |
| 104 | Select Y if unsure |
| 105 | |
Oliver O'Halloran | 7171976 | 2018-04-06 15:21:14 +1000 | [diff] [blame] | 106 | config OF_PMEM |
Dan Williams | f22acf8 | 2018-04-19 15:07:42 -0700 | [diff] [blame] | 107 | tristate "Device-tree support for persistent memory regions" |
Oliver O'Halloran | 7171976 | 2018-04-06 15:21:14 +1000 | [diff] [blame] | 108 | depends on OF |
| 109 | default LIBNVDIMM |
| 110 | help |
| 111 | Allows regions of persistent memory to be described in the |
| 112 | device-tree. |
| 113 | |
| 114 | Select Y if unsure. |
| 115 | |
Dave Jiang | 4c6926a | 2018-12-06 12:40:01 -0800 | [diff] [blame] | 116 | config NVDIMM_KEYS |
| 117 | def_bool y |
| 118 | depends on ENCRYPTED_KEYS |
| 119 | depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m |
| 120 | |
Dan Williams | 18da2c9 | 2015-06-09 14:13:37 -0400 | [diff] [blame] | 121 | endif |