118da2c9eSDan Williamsmenuconfig LIBNVDIMM 2b94d5230SDan Williams tristate "NVDIMM (Non-Volatile Memory Device) Support" 3b94d5230SDan Williams depends on PHYS_ADDR_T_64BIT 429b9aa0aSDan Williams depends on HAS_IOMEM 5b94d5230SDan Williams depends on BLK_DEV 6b94d5230SDan Williams help 7b94d5230SDan Williams Generic support for non-volatile memory devices including 8b94d5230SDan Williams ACPI-6-NFIT defined resources. On platforms that define an 9b94d5230SDan Williams NFIT, or otherwise can discover NVDIMM resources, a libnvdimm 10b94d5230SDan Williams bus is registered to advertise PMEM (persistent memory) 11b94d5230SDan Williams namespaces (/dev/pmemX) and BLK (sliding mmio window(s)) 125212e11fSVishal Verma namespaces (/dev/ndblkX.Y). A PMEM namespace refers to a 135212e11fSVishal Verma memory resource that may span multiple DIMMs and support DAX 145212e11fSVishal Verma (see CONFIG_DAX). A BLK namespace refers to an NVDIMM control 155212e11fSVishal Verma region which exposes an mmio register set for windowed access 165212e11fSVishal Verma mode to non-volatile memory. 1718da2c9eSDan Williams 1818da2c9eSDan Williamsif LIBNVDIMM 1918da2c9eSDan Williams 2018da2c9eSDan Williamsconfig BLK_DEV_PMEM 2118da2c9eSDan Williams tristate "PMEM: Persistent memory block device support" 2218da2c9eSDan Williams default LIBNVDIMM 23c1d6e828SDan Williams select DAX 245212e11fSVishal Verma select ND_BTT if BTT 25e1455744SDan Williams select ND_PFN if NVDIMM_PFN 2618da2c9eSDan Williams help 2718da2c9eSDan Williams Memory ranges for PMEM are described by either an NFIT 2818da2c9eSDan Williams (NVDIMM Firmware Interface Table, see CONFIG_NFIT_ACPI), a 2918da2c9eSDan Williams non-standard OEM-specific E820 memory type (type-12, see 3018da2c9eSDan Williams CONFIG_X86_PMEM_LEGACY), or it is manually specified by the 3118da2c9eSDan Williams 'memmap=nn[KMG]!ss[KMG]' kernel command line (see 328c27ceffSMauro Carvalho Chehab Documentation/admin-guide/kernel-parameters.rst). This driver converts 3318da2c9eSDan Williams these persistent memory ranges into block devices that are 3418da2c9eSDan Williams capable of DAX (direct-access) file system mappings. See 3518da2c9eSDan Williams Documentation/nvdimm/nvdimm.txt for more details. 3618da2c9eSDan Williams 3718da2c9eSDan Williams Say Y if you want to use an NVDIMM 3818da2c9eSDan Williams 39047fc8a1SRoss Zwislerconfig ND_BLK 40047fc8a1SRoss Zwisler tristate "BLK: Block data window (aperture) device support" 41047fc8a1SRoss Zwisler default LIBNVDIMM 42047fc8a1SRoss Zwisler select ND_BTT if BTT 43047fc8a1SRoss Zwisler help 44047fc8a1SRoss Zwisler Support NVDIMMs, or other devices, that implement a BLK-mode 45047fc8a1SRoss Zwisler access capability. BLK-mode access uses memory-mapped-i/o 46047fc8a1SRoss Zwisler apertures to access persistent media. 47047fc8a1SRoss Zwisler 48047fc8a1SRoss Zwisler Say Y if your platform firmware emits an ACPI.NFIT table 49047fc8a1SRoss Zwisler (CONFIG_ACPI_NFIT), or otherwise exposes BLK-mode 50047fc8a1SRoss Zwisler capabilities. 51047fc8a1SRoss Zwisler 52e1455744SDan Williamsconfig ND_CLAIM 53e1455744SDan Williams bool 54e1455744SDan Williams 555212e11fSVishal Vermaconfig ND_BTT 565212e11fSVishal Verma tristate 575212e11fSVishal Verma 588c2f7e86SDan Williamsconfig BTT 595212e11fSVishal Verma bool "BTT: Block Translation Table (atomic sector updates)" 605212e11fSVishal Verma default y if LIBNVDIMM 61e1455744SDan Williams select ND_CLAIM 625212e11fSVishal Verma help 635212e11fSVishal Verma The Block Translation Table (BTT) provides atomic sector 645212e11fSVishal Verma update semantics for persistent memory devices, so that 655212e11fSVishal Verma applications that rely on sector writes not being torn (a 665212e11fSVishal Verma guarantee that typical disks provide) can continue to do so. 675212e11fSVishal Verma The BTT manifests itself as an alternate personality for an 685212e11fSVishal Verma NVDIMM namespace, i.e. a namespace can be in raw mode (pmemX, 695212e11fSVishal Verma ndblkX.Y, etc...), or 'sectored' mode, (pmemXs, ndblkX.Ys, 705212e11fSVishal Verma etc...). 715212e11fSVishal Verma 725212e11fSVishal Verma Select Y if unsure 738c2f7e86SDan Williams 74e1455744SDan Williamsconfig ND_PFN 75e1455744SDan Williams tristate 76e1455744SDan Williams 77e1455744SDan Williamsconfig NVDIMM_PFN 78e1455744SDan Williams bool "PFN: Map persistent (device) memory" 79e1455744SDan Williams default LIBNVDIMM 8032ab0a3fSDan Williams depends on ZONE_DEVICE 81e1455744SDan Williams select ND_CLAIM 82e1455744SDan Williams help 83e1455744SDan Williams Map persistent memory, i.e. advertise it to the memory 84e1455744SDan Williams management sub-system. By default persistent memory does 85e1455744SDan Williams not support direct I/O, RDMA, or any other usage that 86e1455744SDan Williams requires a 'struct page' to mediate an I/O request. This 87e1455744SDan Williams driver allocates and initializes the infrastructure needed 88e1455744SDan Williams to support those use cases. 89e1455744SDan Williams 90e1455744SDan Williams Select Y if unsure 91e1455744SDan Williams 92cd03412aSDan Williamsconfig NVDIMM_DAX 93867dfe34SArnd Bergmann bool "NVDIMM DAX: Raw access to persistent memory" 94cd03412aSDan Williams default LIBNVDIMM 95cd03412aSDan Williams depends on NVDIMM_PFN 96cd03412aSDan Williams help 97cd03412aSDan Williams Support raw device dax access to a persistent memory 98cd03412aSDan Williams namespace. For environments that want to hard partition 99*83fc61a5SMasanari Iida persistent memory, this capability provides a mechanism to 100cd03412aSDan Williams sub-divide a namespace into character devices that can only be 101cd03412aSDan Williams accessed via DAX (mmap(2)). 102cd03412aSDan Williams 103cd03412aSDan Williams Select Y if unsure 104cd03412aSDan Williams 10518da2c9eSDan Williamsendif 106