Kconfig 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menuconfig CXL_BUS
  3. tristate "CXL (Compute Express Link) Devices Support"
  4. depends on PCI
  5. select FW_LOADER
  6. select FW_UPLOAD
  7. select PCI_DOE
  8. select FIRMWARE_TABLE
  9. select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS
  10. select FWCTL if CXL_FEATURES
  11. help
  12. CXL is a bus that is electrically compatible with PCI Express, but
  13. layers three protocols on that signalling (CXL.io, CXL.cache, and
  14. CXL.mem). The CXL.cache protocol allows devices to hold cachelines
  15. locally, the CXL.mem protocol allows devices to be fully coherent
  16. memory targets, the CXL.io protocol is equivalent to PCI Express.
  17. Say 'y' to enable support for the configuration and management of
  18. devices supporting these protocols.
  19. if CXL_BUS
  20. config CXL_PCI
  21. tristate "PCI manageability"
  22. default CXL_BUS
  23. select CXL_MEM
  24. help
  25. The CXL specification defines a "CXL memory device" sub-class in the
  26. PCI "memory controller" base class of devices. Device's identified by
  27. this class code provide support for volatile and / or persistent
  28. memory to be mapped into the system address map (Host-managed Device
  29. Memory (HDM)).
  30. Say 'y/m' to enable a driver that will attach to CXL memory expander
  31. devices enumerated by the memory device class code for configuration
  32. and management primarily via the mailbox interface. See Chapter 2.3
  33. Type 3 CXL Device in the CXL 2.0 specification for more details.
  34. If unsure say 'm'.
  35. config CXL_MEM_RAW_COMMANDS
  36. bool "RAW Command Interface for Memory Devices"
  37. depends on CXL_PCI
  38. help
  39. Enable CXL RAW command interface.
  40. The CXL driver ioctl interface may assign a kernel ioctl command
  41. number for each specification defined opcode. At any given point in
  42. time the number of opcodes that the specification defines and a device
  43. may implement may exceed the kernel's set of associated ioctl function
  44. numbers. The mismatch is either by omission, specification is too new,
  45. or by design. When prototyping new hardware, or developing / debugging
  46. the driver it is useful to be able to submit any possible command to
  47. the hardware, even commands that may crash the kernel due to their
  48. potential impact to memory currently in use by the kernel.
  49. If developing CXL hardware or the driver say Y, otherwise say N.
  50. config CXL_ACPI
  51. tristate "CXL ACPI: Platform Support"
  52. depends on ACPI
  53. depends on ACPI_NUMA
  54. depends on CXL_PMEM || !CXL_PMEM
  55. default CXL_BUS
  56. select ACPI_TABLE_LIB
  57. select ACPI_HMAT
  58. select CXL_PORT
  59. help
  60. Enable support for host managed device memory (HDM) resources
  61. published by a platform's ACPI CXL memory layout description. See
  62. Chapter 9.14.1 CXL Early Discovery Table (CEDT) in the CXL 2.0
  63. specification, and CXL Fixed Memory Window Structures (CEDT.CFMWS)
  64. (https://www.computeexpresslink.org/spec-landing). The CXL core
  65. consumes these resource to publish the root of a cxl_port decode
  66. hierarchy to map regions that represent System RAM, or Persistent
  67. Memory regions to be managed by LIBNVDIMM.
  68. If unsure say 'm'.
  69. config CXL_PMEM
  70. tristate "CXL PMEM: Persistent Memory Support"
  71. depends on LIBNVDIMM
  72. default CXL_BUS
  73. help
  74. In addition to typical memory resources a platform may also advertise
  75. support for persistent memory attached via CXL. This support is
  76. managed via a bridge driver from CXL to the LIBNVDIMM system
  77. subsystem. Say 'y/m' to enable support for enumerating and
  78. provisioning the persistent memory capacity of CXL memory expanders.
  79. If unsure say 'm'.
  80. config CXL_MEM
  81. tristate "CXL: Memory Expansion"
  82. default CXL_BUS
  83. help
  84. The CXL.mem protocol allows a device to act as a provider of "System
  85. RAM" and/or "Persistent Memory" that is fully coherent as if the
  86. memory were attached to the typical CPU memory controller. This is
  87. known as HDM "Host-managed Device Memory".
  88. Say 'y/m' to enable a driver that will attach to CXL.mem devices for
  89. memory expansion and control of HDM. See Chapter 9.13 in the CXL 2.0
  90. specification for a detailed description of HDM.
  91. If unsure say 'm'.
  92. config CXL_FEATURES
  93. bool "CXL: Features"
  94. depends on CXL_PCI
  95. help
  96. Enable support for CXL Features. A CXL device that includes a mailbox
  97. supports commands that allows listing, getting, and setting of
  98. optionally defined features such as memory sparing or post package
  99. sparing. Vendors may define custom features for the device.
  100. If unsure say 'n'
  101. config CXL_EDAC_MEM_FEATURES
  102. bool "CXL: EDAC Memory Features"
  103. depends on EXPERT
  104. depends on CXL_MEM
  105. depends on CXL_FEATURES
  106. depends on EDAC >= CXL_BUS
  107. help
  108. The CXL EDAC memory feature is optional and allows host to
  109. control the EDAC memory features configurations of CXL memory
  110. expander devices.
  111. Say 'y' if you have an expert need to change default settings
  112. of a memory RAS feature established by the platform/device.
  113. Otherwise say 'n'.
  114. config CXL_EDAC_SCRUB
  115. bool "Enable CXL Patrol Scrub Control (Patrol Read)"
  116. depends on CXL_EDAC_MEM_FEATURES
  117. depends on EDAC_SCRUB
  118. help
  119. The CXL EDAC scrub control is optional and allows host to
  120. control the scrub feature configurations of CXL memory expander
  121. devices.
  122. When enabled 'cxl_mem' and 'cxl_region' EDAC devices are
  123. published with memory scrub control attributes as described by
  124. Documentation/ABI/testing/sysfs-edac-scrub.
  125. Say 'y' if you have an expert need to change default settings
  126. of a memory scrub feature established by the platform/device
  127. (e.g. scrub rates for the patrol scrub feature).
  128. Otherwise say 'n'.
  129. config CXL_EDAC_ECS
  130. bool "Enable CXL Error Check Scrub (Repair)"
  131. depends on CXL_EDAC_MEM_FEATURES
  132. depends on EDAC_ECS
  133. help
  134. The CXL EDAC ECS control is optional and allows host to
  135. control the ECS feature configurations of CXL memory expander
  136. devices.
  137. When enabled 'cxl_mem' EDAC devices are published with memory
  138. ECS control attributes as described by
  139. Documentation/ABI/testing/sysfs-edac-ecs.
  140. Say 'y' if you have an expert need to change default settings
  141. of a memory ECS feature established by the platform/device.
  142. Otherwise say 'n'.
  143. config CXL_EDAC_MEM_REPAIR
  144. bool "Enable CXL Memory Repair"
  145. depends on CXL_EDAC_MEM_FEATURES
  146. depends on EDAC_MEM_REPAIR
  147. help
  148. The CXL EDAC memory repair control is optional and allows host
  149. to control the memory repair features (e.g. sparing, PPR)
  150. configurations of CXL memory expander devices.
  151. When enabled, the memory repair feature requires an additional
  152. memory of approximately 43KB to store CXL DRAM and CXL general
  153. media event records.
  154. When enabled 'cxl_mem' EDAC devices are published with memory
  155. repair control attributes as described by
  156. Documentation/ABI/testing/sysfs-edac-memory-repair.
  157. Say 'y' if you have an expert need to change default settings
  158. of a memory repair feature established by the platform/device.
  159. Otherwise say 'n'.
  160. config CXL_PORT
  161. default CXL_BUS
  162. tristate
  163. config CXL_SUSPEND
  164. def_bool y
  165. depends on SUSPEND && CXL_MEM
  166. config CXL_REGION
  167. bool "CXL: Region Support"
  168. default CXL_BUS
  169. # For MAX_PHYSMEM_BITS
  170. depends on SPARSEMEM
  171. select MEMREGION
  172. select GET_FREE_REGION
  173. help
  174. Enable the CXL core to enumerate and provision CXL regions. A CXL
  175. region is defined by one or more CXL expanders that decode a given
  176. system-physical address range. For CXL regions established by
  177. platform-firmware this option enables memory error handling to
  178. identify the devices participating in a given interleaved memory
  179. range. Otherwise, platform-firmware managed CXL is enabled by being
  180. placed in the system address map and does not need a driver.
  181. If unsure say 'y'
  182. config CXL_REGION_INVALIDATION_TEST
  183. bool "CXL: Region Cache Management Bypass (TEST)"
  184. depends on CXL_REGION
  185. help
  186. CXL Region management and security operations potentially invalidate
  187. the content of CPU caches without notifying those caches to
  188. invalidate the affected cachelines. The CXL Region driver attempts
  189. to invalidate caches when those events occur. If that invalidation
  190. fails the region will fail to enable. Reasons for cache
  191. invalidation failure are due to the CPU not providing a cache
  192. invalidation mechanism. For example usage of wbinvd is restricted to
  193. bare metal x86. However, for testing purposes toggling this option
  194. can disable that data integrity safety and proceed with enabling
  195. regions when there might be conflicting contents in the CPU cache.
  196. If unsure, or if this kernel is meant for production environments,
  197. say N.
  198. config CXL_MCE
  199. def_bool y
  200. depends on X86_MCE && MEMORY_FAILURE
  201. config CXL_RAS
  202. def_bool y
  203. depends on ACPI_APEI_GHES && PCIEAER && CXL_BUS
  204. config CXL_ATL
  205. def_bool y
  206. depends on CXL_REGION
  207. depends on ACPI_PRMT && AMD_NB
  208. endif