162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_cimenuconfig DAX 362306a36Sopenharmony_ci tristate "DAX: direct access to differentiated memory" 462306a36Sopenharmony_ci default m if NVDIMM_DAX 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciif DAX 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciconfig DEV_DAX 962306a36Sopenharmony_ci tristate "Device DAX: direct access mapping device" 1062306a36Sopenharmony_ci depends on TRANSPARENT_HUGEPAGE 1162306a36Sopenharmony_ci help 1262306a36Sopenharmony_ci Support raw access to differentiated (persistence, bandwidth, 1362306a36Sopenharmony_ci latency...) memory via an mmap(2) capable character 1462306a36Sopenharmony_ci device. Platform firmware or a device driver may identify a 1562306a36Sopenharmony_ci platform memory resource that is differentiated from the 1662306a36Sopenharmony_ci baseline memory pool. Mappings of a /dev/daxX.Y device impose 1762306a36Sopenharmony_ci restrictions that make the mapping behavior deterministic. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciconfig DEV_DAX_PMEM 2062306a36Sopenharmony_ci tristate "PMEM DAX: direct access to persistent memory" 2162306a36Sopenharmony_ci depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX 2262306a36Sopenharmony_ci default DEV_DAX 2362306a36Sopenharmony_ci help 2462306a36Sopenharmony_ci Support raw access to persistent memory. Note that this 2562306a36Sopenharmony_ci driver consumes memory ranges allocated and exported by the 2662306a36Sopenharmony_ci libnvdimm sub-system. 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci Say M if unsure 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciconfig DEV_DAX_HMEM 3162306a36Sopenharmony_ci tristate "HMEM DAX: direct access to 'specific purpose' memory" 3262306a36Sopenharmony_ci depends on EFI_SOFT_RESERVE 3362306a36Sopenharmony_ci select NUMA_KEEP_MEMINFO if (NUMA && X86) 3462306a36Sopenharmony_ci default DEV_DAX 3562306a36Sopenharmony_ci help 3662306a36Sopenharmony_ci EFI 2.8 platforms, and others, may advertise 'specific purpose' 3762306a36Sopenharmony_ci memory. For example, a high bandwidth memory pool. The 3862306a36Sopenharmony_ci indication from platform firmware is meant to reserve the 3962306a36Sopenharmony_ci memory from typical usage by default. This driver creates 4062306a36Sopenharmony_ci device-dax instances for these memory ranges, and that also 4162306a36Sopenharmony_ci enables the possibility to assign them to the DEV_DAX_KMEM 4262306a36Sopenharmony_ci driver to override the reservation and add them to kernel 4362306a36Sopenharmony_ci "System RAM" pool. 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci Say M if unsure. 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ciconfig DEV_DAX_CXL 4862306a36Sopenharmony_ci tristate "CXL DAX: direct access to CXL RAM regions" 4962306a36Sopenharmony_ci depends on CXL_BUS && CXL_REGION && DEV_DAX 5062306a36Sopenharmony_ci default CXL_REGION && DEV_DAX 5162306a36Sopenharmony_ci help 5262306a36Sopenharmony_ci CXL RAM regions are either mapped by platform-firmware 5362306a36Sopenharmony_ci and published in the initial system-memory map as "System RAM", mapped 5462306a36Sopenharmony_ci by platform-firmware as "Soft Reserved", or dynamically provisioned 5562306a36Sopenharmony_ci after boot by the CXL driver. In the latter two cases a device-dax 5662306a36Sopenharmony_ci instance is created to access that unmapped-by-default address range. 5762306a36Sopenharmony_ci Per usual it can remain as dedicated access via a device interface, or 5862306a36Sopenharmony_ci converted to "System RAM" via the dax_kmem facility. 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ciconfig DEV_DAX_HMEM_DEVICES 6162306a36Sopenharmony_ci depends on DEV_DAX_HMEM && DAX 6262306a36Sopenharmony_ci def_bool y 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ciconfig DEV_DAX_KMEM 6562306a36Sopenharmony_ci tristate "KMEM DAX: map dax-devices as System-RAM" 6662306a36Sopenharmony_ci default DEV_DAX 6762306a36Sopenharmony_ci depends on DEV_DAX 6862306a36Sopenharmony_ci depends on MEMORY_HOTPLUG # for add_memory() and friends 6962306a36Sopenharmony_ci help 7062306a36Sopenharmony_ci Support access to persistent, or other performance 7162306a36Sopenharmony_ci differentiated memory as if it were System RAM. This allows 7262306a36Sopenharmony_ci easier use of persistent memory by unmodified applications, or 7362306a36Sopenharmony_ci adds core kernel memory services to heterogeneous memory types 7462306a36Sopenharmony_ci (HMEM) marked "reserved" by platform firmware. 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci To use this feature, a DAX device must be unbound from the 7762306a36Sopenharmony_ci device_dax driver and bound to this kmem driver on each boot. 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci Say N if unsure. 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ciendif 82