Kconfig 4.2 KB

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