Kconfig 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Coresight configuration
  4. #
  5. menuconfig CORESIGHT
  6. tristate "CoreSight Tracing Support"
  7. depends on ARM || ARM64
  8. depends on OF || ACPI
  9. select ARM_AMBA
  10. select PERF_EVENTS
  11. select CONFIGFS_FS
  12. help
  13. This framework provides a kernel interface for the CoreSight debug
  14. and trace drivers to register themselves with. It's intended to build
  15. a topological view of the CoreSight components based on a DT
  16. specification and configure the right series of components when a
  17. trace source gets enabled.
  18. To compile this driver as a module, choose M here: the
  19. module will be called coresight.
  20. if CORESIGHT
  21. config CORESIGHT_LINKS_AND_SINKS
  22. tristate "CoreSight Link and Sink drivers"
  23. help
  24. This enables support for CoreSight link and sink drivers that are
  25. responsible for transporting and collecting the trace data
  26. respectively. Link and sinks are dynamically aggregated with a trace
  27. entity at run time to form a complete trace path.
  28. To compile these drivers as modules, choose M here: the
  29. modules will be called coresight-funnel and coresight-replicator.
  30. config CORESIGHT_LINK_AND_SINK_TMC
  31. tristate "Coresight generic TMC driver"
  32. depends on CORESIGHT_LINKS_AND_SINKS
  33. help
  34. This enables support for the Trace Memory Controller driver.
  35. Depending on its configuration the device can act as a link (embedded
  36. trace router - ETR) or sink (embedded trace FIFO). The driver
  37. complies with the generic implementation of the component without
  38. special enhancement or added features.
  39. To compile this driver as a module, choose M here: the
  40. module will be called coresight-tmc.
  41. config CORESIGHT_CATU
  42. tristate "Coresight Address Translation Unit (CATU) driver"
  43. depends on CORESIGHT_LINK_AND_SINK_TMC
  44. help
  45. Enable support for the Coresight Address Translation Unit (CATU).
  46. CATU supports a scatter gather table of 4K pages, with forward/backward
  47. lookup. CATU helps TMC ETR to use a large physically non-contiguous trace
  48. buffer by translating the addresses used by ETR to the physical address
  49. by looking up the provided table. CATU can also be used in pass-through
  50. mode where the address is not translated.
  51. To compile this driver as a module, choose M here: the
  52. module will be called coresight-catu.
  53. config CORESIGHT_SINK_TPIU
  54. tristate "Coresight generic TPIU driver"
  55. depends on CORESIGHT_LINKS_AND_SINKS
  56. help
  57. This enables support for the Trace Port Interface Unit driver,
  58. responsible for bridging the gap between the on-chip coresight
  59. components and a trace for bridging the gap between the on-chip
  60. coresight components and a trace port collection engine, typically
  61. connected to an external host for use case capturing more traces than
  62. the on-board coresight memory can handle.
  63. To compile this driver as a module, choose M here: the
  64. module will be called coresight-tpiu.
  65. config CORESIGHT_SINK_ETBV10
  66. tristate "Coresight ETBv1.0 driver"
  67. depends on CORESIGHT_LINKS_AND_SINKS
  68. help
  69. This enables support for the Embedded Trace Buffer version 1.0 driver
  70. that complies with the generic implementation of the component without
  71. special enhancement or added features.
  72. To compile this driver as a module, choose M here: the
  73. module will be called coresight-etb10.
  74. config CORESIGHT_SOURCE_ETM3X
  75. tristate "CoreSight Embedded Trace Macrocell 3.x driver"
  76. depends on !ARM64
  77. select CORESIGHT_LINKS_AND_SINKS
  78. help
  79. This driver provides support for processor ETM3.x and PTM1.x modules,
  80. which allows tracing the instructions that a processor is executing
  81. This is primarily useful for instruction level tracing. Depending
  82. the ETM version data tracing may also be available.
  83. To compile this driver as a module, choose M here: the
  84. module will be called coresight-etm3x.
  85. config CORESIGHT_SOURCE_ETM4X
  86. tristate "CoreSight ETMv4.x / ETE driver"
  87. depends on ARM64
  88. select CORESIGHT_LINKS_AND_SINKS
  89. select PID_IN_CONTEXTIDR
  90. help
  91. This driver provides support for the CoreSight Embedded Trace Macrocell
  92. version 4.x and the Embedded Trace Extensions (ETE). Both are CPU tracer
  93. modules, tracing the instructions that a processor is executing. This is
  94. primarily useful for instruction level tracing.
  95. To compile this driver as a module, choose M here: the
  96. module will be called coresight-etm4x.
  97. config ETM4X_IMPDEF_FEATURE
  98. bool "Control implementation defined overflow support in ETM 4.x driver"
  99. depends on CORESIGHT_SOURCE_ETM4X
  100. help
  101. This control provides implementation define control for CoreSight
  102. ETM 4.x tracer module that can't reduce commit rate automatically.
  103. This avoids overflow between the ETM tracer module and the cpu core.
  104. config CORESIGHT_STM
  105. tristate "CoreSight System Trace Macrocell driver"
  106. depends on (ARM && !(CPU_32v3 || CPU_32v4 || CPU_32v4T)) || ARM64
  107. select CORESIGHT_LINKS_AND_SINKS
  108. select STM
  109. help
  110. This driver provides support for hardware assisted software
  111. instrumentation based tracing. This is primarily used for
  112. logging useful software events or data coming from various entities
  113. in the system, possibly running different OSs
  114. To compile this driver as a module, choose M here: the
  115. module will be called coresight-stm.
  116. config CORESIGHT_CTCU
  117. tristate "CoreSight TMC Control Unit driver"
  118. depends on CORESIGHT_LINK_AND_SINK_TMC
  119. help
  120. This driver provides support for CoreSight TMC Control Unit
  121. that hosts miscellaneous configuration registers. This is
  122. primarily used for controlling the behaviors of the TMC
  123. ETR device.
  124. To compile this driver as a module, choose M here: the
  125. module will be called coresight-ctcu.
  126. config CORESIGHT_CPU_DEBUG
  127. tristate "CoreSight CPU Debug driver"
  128. depends on ARM || ARM64
  129. depends on DEBUG_FS
  130. help
  131. This driver provides support for coresight debugging module. This
  132. is primarily used to dump sample-based profiling registers when
  133. system triggers panic, the driver will parse context registers so
  134. can quickly get to know program counter (PC), secure state,
  135. exception level, etc. Before use debugging functionality, platform
  136. needs to ensure the clock domain and power domain are enabled
  137. properly, please refer Documentation/trace/coresight/coresight-cpu-debug.rst
  138. for detailed description and the example for usage.
  139. To compile this driver as a module, choose M here: the
  140. module will be called coresight-cpu-debug.
  141. config CORESIGHT_CPU_DEBUG_DEFAULT_ON
  142. bool "Enable CoreSight CPU Debug by default"
  143. depends on CORESIGHT_CPU_DEBUG
  144. help
  145. Say Y here to enable the CoreSight Debug panic-debug by default. This
  146. can also be enabled via debugfs, but this ensures the debug feature
  147. is enabled as early as possible.
  148. Has the same effect as setting coresight_cpu_debug.enable=1 on the
  149. kernel command line.
  150. Say N if unsure.
  151. config CORESIGHT_CTI
  152. tristate "CoreSight Cross Trigger Interface (CTI) driver"
  153. depends on ARM || ARM64
  154. help
  155. This driver provides support for CoreSight CTI and CTM components.
  156. These provide hardware triggering events between CoreSight trace
  157. source and sink components. These can be used to halt trace or
  158. inject events into the trace stream. CTI also provides a software
  159. control to trigger the same halt events. This can provide fast trace
  160. halt compared to disabling sources and sinks normally in driver
  161. software.
  162. To compile this driver as a module, choose M here: the
  163. module will be called coresight-cti.
  164. config CORESIGHT_CTI_INTEGRATION_REGS
  165. bool "Access CTI CoreSight Integration Registers"
  166. depends on CORESIGHT_CTI
  167. help
  168. This option adds support for the CoreSight integration registers on
  169. this device. The integration registers allow the exploration of the
  170. CTI trigger connections between this and other devices.These
  171. registers are not used in normal operation and can leave devices in
  172. an inconsistent state.
  173. config CORESIGHT_TRBE
  174. tristate "Trace Buffer Extension (TRBE) driver"
  175. depends on ARM64 && CORESIGHT_SOURCE_ETM4X
  176. help
  177. This driver provides support for percpu Trace Buffer Extension (TRBE).
  178. TRBE always needs to be used along with its corresponding percpu ETE
  179. component. ETE generates trace data which is then captured with TRBE.
  180. Unlike traditional sink devices, TRBE is a CPU feature accessible via
  181. system registers. But its explicit dependency with trace unit (ETE)
  182. requires it to be plugged in as a coresight sink device.
  183. To compile this driver as a module, choose M here: the module will be
  184. called coresight-trbe.
  185. config ULTRASOC_SMB
  186. tristate "Ultrasoc system memory buffer drivers"
  187. depends on ACPI || COMPILE_TEST
  188. depends on ARM64 && CORESIGHT_LINKS_AND_SINKS
  189. help
  190. This driver provides support for the Ultrasoc system memory buffer (SMB).
  191. SMB is responsible for receiving the trace data from Coresight ETM devices
  192. and storing them to a system buffer.
  193. To compile this driver as a module, choose M here: the module will be
  194. called ultrasoc-smb.
  195. config CORESIGHT_TPDM
  196. tristate "CoreSight Trace, Profiling & Diagnostics Monitor driver"
  197. select CORESIGHT_LINKS_AND_SINKS
  198. select CORESIGHT_TPDA
  199. help
  200. This driver provides support for configuring monitor. Monitors are
  201. primarily responsible for data set collection and support the
  202. ability to collect any permutation of data set types.
  203. To compile this driver as a module, choose M here: the module will be
  204. called coresight-tpdm.
  205. config CORESIGHT_TPDA
  206. tristate "CoreSight Trace, Profiling & Diagnostics Aggregator driver"
  207. help
  208. This driver provides support for configuring aggregator. This is
  209. primarily useful for pulling the data sets from one or more
  210. attached monitors and pushing the resultant data out. Multiple
  211. monitors are connected on different input ports of TPDA.
  212. To compile this driver as a module, choose M here: the module will be
  213. called coresight-tpda.
  214. config CORESIGHT_DUMMY
  215. tristate "Dummy driver support"
  216. help
  217. Enables support for dummy driver. Dummy driver can be used for
  218. CoreSight sources/sinks that are owned and configured by some
  219. other subsystem and use Linux drivers to configure rest of trace
  220. path.
  221. To compile this driver as a module, choose M here: the module will be
  222. called coresight-dummy.
  223. config CORESIGHT_KUNIT_TESTS
  224. tristate "Enable Coresight unit tests"
  225. depends on KUNIT
  226. default KUNIT_ALL_TESTS
  227. help
  228. Enable Coresight unit tests. Only useful for development and not
  229. intended for production.
  230. config CORESIGHT_TNOC
  231. tristate "Coresight Trace Network On Chip driver"
  232. help
  233. This driver provides support for Trace Network On Chip (TNOC) component.
  234. TNOC is an interconnect used to collect traces from various subsystems
  235. and transport to a coresight trace sink. It sits in the different
  236. tiles of SOC and aggregates the trace local to the tile and transports
  237. it another tile or to coresight trace sink eventually.
  238. To compile this driver as a module, choose M here: the module will be
  239. called coresight-tnoc.
  240. endif