blob: a5fde15e91d397ec4fe81796f88df75abdd4b0ca [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Dan Williams18da2c92015-06-09 14:13:37 -04002menuconfig LIBNVDIMM
Dan Williamsb94d5232015-05-19 22:54:31 -04003 tristate "NVDIMM (Non-Volatile Memory Device) Support"
4 depends on PHYS_ADDR_T_64BIT
Dan Williams29b9aa02016-06-06 17:42:38 -07005 depends on HAS_IOMEM
Dan Williamsb94d5232015-05-19 22:54:31 -04006 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 Verma5212e112015-06-25 04:20:32 -040013 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 Williams18da2c92015-06-09 14:13:37 -040018
19if LIBNVDIMM
20
21config BLK_DEV_PMEM
22 tristate "PMEM: Persistent memory block device support"
23 default LIBNVDIMM
Dan Williams2080e882018-03-29 17:20:39 -070024 select DAX_DRIVER
Vishal Verma5212e112015-06-25 04:20:32 -040025 select ND_BTT if BTT
Dan Williamse1455742015-07-30 17:57:47 -040026 select ND_PFN if NVDIMM_PFN
Dan Williams18da2c92015-06-09 14:13:37 -040027 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 Chehab8c27ceff32016-10-18 10:12:27 -020033 Documentation/admin-guide/kernel-parameters.rst). This driver converts
Dan Williams18da2c92015-06-09 14:13:37 -040034 these persistent memory ranges into block devices that are
35 capable of DAX (direct-access) file system mappings. See
Mauro Carvalho Chehabae4a0502019-06-18 16:32:31 -030036 Documentation/driver-api/nvdimm/nvdimm.rst for more details.
Dan Williams18da2c92015-06-09 14:13:37 -040037
38 Say Y if you want to use an NVDIMM
39
Ross Zwisler047fc8a2015-06-25 04:21:02 -040040config 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 Williamse1455742015-07-30 17:57:47 -040053config ND_CLAIM
54 bool
55
Vishal Verma5212e112015-06-25 04:20:32 -040056config ND_BTT
57 tristate
58
Dan Williams8c2f7e82015-06-25 04:20:04 -040059config BTT
Vishal Verma5212e112015-06-25 04:20:32 -040060 bool "BTT: Block Translation Table (atomic sector updates)"
61 default y if LIBNVDIMM
Dan Williamse1455742015-07-30 17:57:47 -040062 select ND_CLAIM
Vishal Verma5212e112015-06-25 04:20:32 -040063 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 Williams8c2f7e82015-06-25 04:20:04 -040074
Dan Williamse1455742015-07-30 17:57:47 -040075config ND_PFN
76 tristate
77
78config NVDIMM_PFN
79 bool "PFN: Map persistent (device) memory"
80 default LIBNVDIMM
Dan Williams32ab0a3f2015-08-01 02:16:37 -040081 depends on ZONE_DEVICE
Dan Williamse1455742015-07-30 17:57:47 -040082 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 Williamscd034122016-03-11 10:15:36 -080093config NVDIMM_DAX
Arnd Bergmann867dfe32016-10-25 17:52:04 +020094 bool "NVDIMM DAX: Raw access to persistent memory"
Dan Williamscd034122016-03-11 10:15:36 -080095 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 Iida83fc61a2017-09-26 12:47:59 +0900100 persistent memory, this capability provides a mechanism to
Dan Williamscd034122016-03-11 10:15:36 -0800101 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'Halloran71719762018-04-06 15:21:14 +1000106config OF_PMEM
Dan Williamsf22acf82018-04-19 15:07:42 -0700107 tristate "Device-tree support for persistent memory regions"
Oliver O'Halloran71719762018-04-06 15:21:14 +1000108 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 Jiang4c6926a2018-12-06 12:40:01 -0800116config NVDIMM_KEYS
117 def_bool y
118 depends on ENCRYPTED_KEYS
119 depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m
120
Dan Williams18da2c92015-06-09 14:13:37 -0400121endif