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