xref: /openbmc/linux/drivers/dax/Kconfig (revision 09d09e04)
1# SPDX-License-Identifier: GPL-2.0-only
2menuconfig DAX
3	tristate "DAX: direct access to differentiated memory"
4	select SRCU
5	default m if NVDIMM_DAX
6
7if DAX
8
9config DEV_DAX
10	tristate "Device DAX: direct access mapping device"
11	depends on TRANSPARENT_HUGEPAGE
12	help
13	  Support raw access to differentiated (persistence, bandwidth,
14	  latency...) memory via an mmap(2) capable character
15	  device.  Platform firmware or a device driver may identify a
16	  platform memory resource that is differentiated from the
17	  baseline memory pool.  Mappings of a /dev/daxX.Y device impose
18	  restrictions that make the mapping behavior deterministic.
19
20config DEV_DAX_PMEM
21	tristate "PMEM DAX: direct access to persistent memory"
22	depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX
23	default DEV_DAX
24	help
25	  Support raw access to persistent memory.  Note that this
26	  driver consumes memory ranges allocated and exported by the
27	  libnvdimm sub-system.
28
29	  Say M if unsure
30
31config DEV_DAX_HMEM
32	tristate "HMEM DAX: direct access to 'specific purpose' memory"
33	depends on EFI_SOFT_RESERVE
34	select NUMA_KEEP_MEMINFO if (NUMA && X86)
35	default DEV_DAX
36	help
37	  EFI 2.8 platforms, and others, may advertise 'specific purpose'
38	  memory. For example, a high bandwidth memory pool. The
39	  indication from platform firmware is meant to reserve the
40	  memory from typical usage by default. This driver creates
41	  device-dax instances for these memory ranges, and that also
42	  enables the possibility to assign them to the DEV_DAX_KMEM
43	  driver to override the reservation and add them to kernel
44	  "System RAM" pool.
45
46	  Say M if unsure.
47
48config DEV_DAX_CXL
49	tristate "CXL DAX: direct access to CXL RAM regions"
50	depends on CXL_REGION && DEV_DAX
51	default CXL_REGION && DEV_DAX
52	help
53	  CXL RAM regions are either mapped by platform-firmware
54	  and published in the initial system-memory map as "System RAM", mapped
55	  by platform-firmware as "Soft Reserved", or dynamically provisioned
56	  after boot by the CXL driver. In the latter two cases a device-dax
57	  instance is created to access that unmapped-by-default address range.
58	  Per usual it can remain as dedicated access via a device interface, or
59	  converted to "System RAM" via the dax_kmem facility.
60
61config DEV_DAX_HMEM_DEVICES
62	depends on DEV_DAX_HMEM && DAX
63	def_bool y
64
65config DEV_DAX_KMEM
66	tristate "KMEM DAX: map dax-devices as System-RAM"
67	default DEV_DAX
68	depends on DEV_DAX
69	depends on MEMORY_HOTPLUG # for add_memory() and friends
70	help
71	  Support access to persistent, or other performance
72	  differentiated memory as if it were System RAM. This allows
73	  easier use of persistent memory by unmodified applications, or
74	  adds core kernel memory services to heterogeneous memory types
75	  (HMEM) marked "reserved" by platform firmware.
76
77	  To use this feature, a DAX device must be unbound from the
78	  device_dax driver and bound to this kmem driver on each boot.
79
80	  Say N if unsure.
81
82endif
83