xref: /linux/drivers/hwtracing/coresight/Kconfig (revision c26f4fbd58375bd6ef74f95eb73d61762ad97c59)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
201081f5aSMathieu Poirier#
301081f5aSMathieu Poirier# Coresight configuration
401081f5aSMathieu Poirier#
501081f5aSMathieu Poiriermenuconfig CORESIGHT
68e264c52STingwei Zhang	tristate "CoreSight Tracing Support"
7f08d6882SMark Brown	depends on ARM || ARM64
8745cfc56SArnd Bergmann	depends on OF || ACPI
901081f5aSMathieu Poirier	select ARM_AMBA
10882d5e11SMathieu Poirier	select PERF_EVENTS
11a13d5a24SMike Leach	select CONFIGFS_FS
1201081f5aSMathieu Poirier	help
1301081f5aSMathieu Poirier	  This framework provides a kernel interface for the CoreSight debug
1401081f5aSMathieu Poirier	  and trace drivers to register themselves with. It's intended to build
1501081f5aSMathieu Poirier	  a topological view of the CoreSight components based on a DT
16b9884d3bSAndrew F. Davis	  specification and configure the right series of components when a
1701081f5aSMathieu Poirier	  trace source gets enabled.
1801081f5aSMathieu Poirier
198e264c52STingwei Zhang	  To compile this driver as a module, choose M here: the
208e264c52STingwei Zhang	  module will be called coresight.
218e264c52STingwei Zhang
2201081f5aSMathieu Poirierif CORESIGHT
2301081f5aSMathieu Poirierconfig CORESIGHT_LINKS_AND_SINKS
24ac879266SKim Phillips	tristate "CoreSight Link and Sink drivers"
2501081f5aSMathieu Poirier	help
2601081f5aSMathieu Poirier	  This enables support for CoreSight link and sink drivers that are
2701081f5aSMathieu Poirier	  responsible for transporting and collecting the trace data
2801081f5aSMathieu Poirier	  respectively.  Link and sinks are dynamically aggregated with a trace
2901081f5aSMathieu Poirier	  entity at run time to form a complete trace path.
3001081f5aSMathieu Poirier
31ac879266SKim Phillips	  To compile these drivers as modules, choose M here: the
32ac879266SKim Phillips	  modules will be called coresight-funnel and coresight-replicator.
33ac879266SKim Phillips
3401081f5aSMathieu Poirierconfig CORESIGHT_LINK_AND_SINK_TMC
35ecfbf09bSKim Phillips	tristate "Coresight generic TMC driver"
36ecfbf09bSKim Phillips
3701081f5aSMathieu Poirier	depends on CORESIGHT_LINKS_AND_SINKS
3801081f5aSMathieu Poirier	help
3901081f5aSMathieu Poirier	  This enables support for the Trace Memory Controller driver.
4001081f5aSMathieu Poirier	  Depending on its configuration the device can act as a link (embedded
4101081f5aSMathieu Poirier	  trace router - ETR) or sink (embedded trace FIFO).  The driver
4201081f5aSMathieu Poirier	  complies with the generic implementation of the component without
4301081f5aSMathieu Poirier	  special enhancement or added features.
4401081f5aSMathieu Poirier
45ecfbf09bSKim Phillips	  To compile this driver as a module, choose M here: the
46ecfbf09bSKim Phillips	  module will be called coresight-tmc.
47ecfbf09bSKim Phillips
48fcacb5c1SSuzuki K Pouloseconfig CORESIGHT_CATU
49a114dbeaSTingwei Zhang	tristate "Coresight Address Translation Unit (CATU) driver"
50fcacb5c1SSuzuki K Poulose	depends on CORESIGHT_LINK_AND_SINK_TMC
51fcacb5c1SSuzuki K Poulose	help
52fcacb5c1SSuzuki K Poulose	   Enable support for the Coresight Address Translation Unit (CATU).
53fcacb5c1SSuzuki K Poulose	   CATU supports a scatter gather table of 4K pages, with forward/backward
54fcacb5c1SSuzuki K Poulose	   lookup. CATU helps TMC ETR to use a large physically non-contiguous trace
55fcacb5c1SSuzuki K Poulose	   buffer by translating the addresses used by ETR to the physical address
56fcacb5c1SSuzuki K Poulose	   by looking up the provided table. CATU can also be used in pass-through
57fcacb5c1SSuzuki K Poulose	   mode where the address is not translated.
58fcacb5c1SSuzuki K Poulose
59a114dbeaSTingwei Zhang	   To compile this driver as a module, choose M here: the
60a114dbeaSTingwei Zhang	   module will be called coresight-catu.
61a114dbeaSTingwei Zhang
6201081f5aSMathieu Poirierconfig CORESIGHT_SINK_TPIU
63d9ed244eSKim Phillips	tristate "Coresight generic TPIU driver"
6401081f5aSMathieu Poirier	depends on CORESIGHT_LINKS_AND_SINKS
6501081f5aSMathieu Poirier	help
6601081f5aSMathieu Poirier	  This enables support for the Trace Port Interface Unit driver,
6701081f5aSMathieu Poirier	  responsible for bridging the gap between the on-chip coresight
6801081f5aSMathieu Poirier	  components and a trace for bridging the gap between the on-chip
6901081f5aSMathieu Poirier	  coresight components and a trace port collection engine, typically
7001081f5aSMathieu Poirier	  connected to an external host for use case capturing more traces than
7101081f5aSMathieu Poirier	  the on-board coresight memory can handle.
7201081f5aSMathieu Poirier
73d9ed244eSKim Phillips	  To compile this driver as a module, choose M here: the
74d9ed244eSKim Phillips	  module will be called coresight-tpiu.
75d9ed244eSKim Phillips
7601081f5aSMathieu Poirierconfig CORESIGHT_SINK_ETBV10
77529c4451SKim Phillips	tristate "Coresight ETBv1.0 driver"
7801081f5aSMathieu Poirier	depends on CORESIGHT_LINKS_AND_SINKS
7901081f5aSMathieu Poirier	help
8001081f5aSMathieu Poirier	  This enables support for the Embedded Trace Buffer version 1.0 driver
8101081f5aSMathieu Poirier	  that complies with the generic implementation of the component without
8201081f5aSMathieu Poirier	  special enhancement or added features.
8301081f5aSMathieu Poirier
84529c4451SKim Phillips	  To compile this driver as a module, choose M here: the
85529c4451SKim Phillips	  module will be called coresight-etb10.
86529c4451SKim Phillips
8701081f5aSMathieu Poirierconfig CORESIGHT_SOURCE_ETM3X
8897fe626cSKim Phillips	tristate "CoreSight Embedded Trace Macrocell 3.x driver"
8901081f5aSMathieu Poirier	depends on !ARM64
9001081f5aSMathieu Poirier	select CORESIGHT_LINKS_AND_SINKS
9101081f5aSMathieu Poirier	help
9201081f5aSMathieu Poirier	  This driver provides support for processor ETM3.x and PTM1.x modules,
9301081f5aSMathieu Poirier	  which allows tracing the instructions that a processor is executing
9401081f5aSMathieu Poirier	  This is primarily useful for instruction level tracing.  Depending
9501081f5aSMathieu Poirier	  the ETM version data tracing may also be available.
962e1cdfe1SPratik Patel
9797fe626cSKim Phillips	  To compile this driver as a module, choose M here: the
9897fe626cSKim Phillips	  module will be called coresight-etm3x.
9997fe626cSKim Phillips
1002e1cdfe1SPratik Patelconfig CORESIGHT_SOURCE_ETM4X
10135e1c916SSuzuki K Poulose	tristate "CoreSight ETMv4.x / ETE driver"
1022e1cdfe1SPratik Patel	depends on ARM64
1032e1cdfe1SPratik Patel	select CORESIGHT_LINKS_AND_SINKS
10482500a81SMathieu Poirier	select PID_IN_CONTEXTIDR
1052e1cdfe1SPratik Patel	help
10635e1c916SSuzuki K Poulose	  This driver provides support for the CoreSight Embedded Trace Macrocell
10735e1c916SSuzuki K Poulose	  version 4.x and the Embedded Trace Extensions (ETE). Both are CPU tracer
10835e1c916SSuzuki K Poulose	  modules, tracing the instructions that a processor is executing. This is
10935e1c916SSuzuki K Poulose	  primarily useful for instruction level tracing.
1102e1cdfe1SPratik Patel
11122a550a3SKim Phillips	  To compile this driver as a module, choose M here: the
11222a550a3SKim Phillips	  module will be called coresight-etm4x.
11322a550a3SKim Phillips
114e7255092SQi Liuconfig ETM4X_IMPDEF_FEATURE
115e7255092SQi Liu	bool "Control implementation defined overflow support in ETM 4.x driver"
116e7255092SQi Liu	depends on CORESIGHT_SOURCE_ETM4X
117e7255092SQi Liu	help
118e7255092SQi Liu	  This control provides implementation define control for CoreSight
119e7255092SQi Liu	  ETM 4.x tracer module that can't reduce commit rate automatically.
120e7255092SQi Liu	  This avoids overflow between the ETM tracer module and the cpu core.
121e7255092SQi Liu
122237483aaSPratik Patelconfig CORESIGHT_STM
1238b0cf826STingwei Zhang	tristate "CoreSight System Trace Macrocell driver"
124237483aaSPratik Patel	depends on (ARM && !(CPU_32v3 || CPU_32v4 || CPU_32v4T)) || ARM64
125237483aaSPratik Patel	select CORESIGHT_LINKS_AND_SINKS
126237483aaSPratik Patel	select STM
127237483aaSPratik Patel	help
128237483aaSPratik Patel	  This driver provides support for hardware assisted software
129237483aaSPratik Patel	  instrumentation based tracing. This is primarily used for
130237483aaSPratik Patel	  logging useful software events or data coming from various entities
131237483aaSPratik Patel	  in the system, possibly running different OSs
132237483aaSPratik Patel
1338b0cf826STingwei Zhang	  To compile this driver as a module, choose M here: the
1348b0cf826STingwei Zhang	  module will be called coresight-stm.
1358b0cf826STingwei Zhang
136f78d206fSJie Ganconfig CORESIGHT_CTCU
137f78d206fSJie Gan	tristate "CoreSight TMC Control Unit driver"
138f78d206fSJie Gan	depends on CORESIGHT_LINK_AND_SINK_TMC
139f78d206fSJie Gan	help
140f78d206fSJie Gan	  This driver provides support for CoreSight TMC Control Unit
141f78d206fSJie Gan	  that hosts miscellaneous configuration registers. This is
142f78d206fSJie Gan	  primarily used for controlling the behaviors of the TMC
143f78d206fSJie Gan	  ETR device.
144f78d206fSJie Gan
145f78d206fSJie Gan	  To compile this driver as a module, choose M here: the
146f78d206fSJie Gan	  module will be called coresight-ctcu.
147f78d206fSJie Gan
1482227b7c7SLeo Yanconfig CORESIGHT_CPU_DEBUG
1492227b7c7SLeo Yan	tristate "CoreSight CPU Debug driver"
1502227b7c7SLeo Yan	depends on ARM || ARM64
1512227b7c7SLeo Yan	depends on DEBUG_FS
1522227b7c7SLeo Yan	help
1532227b7c7SLeo Yan	  This driver provides support for coresight debugging module. This
1542227b7c7SLeo Yan	  is primarily used to dump sample-based profiling registers when
1552227b7c7SLeo Yan	  system triggers panic, the driver will parse context registers so
1562227b7c7SLeo Yan	  can quickly get to know program counter (PC), secure state,
1572227b7c7SLeo Yan	  exception level, etc. Before use debugging functionality, platform
1582227b7c7SLeo Yan	  needs to ensure the clock domain and power domain are enabled
15972ef5e52SMauro Carvalho Chehab	  properly, please refer Documentation/trace/coresight/coresight-cpu-debug.rst
1602227b7c7SLeo Yan	  for detailed description and the example for usage.
1612227b7c7SLeo Yan
16232a14ad5STingwei Zhang	  To compile this driver as a module, choose M here: the
16332a14ad5STingwei Zhang	  module will be called coresight-cpu-debug.
16432a14ad5STingwei Zhang
165204879e6SBrian Norrisconfig CORESIGHT_CPU_DEBUG_DEFAULT_ON
166204879e6SBrian Norris	bool "Enable CoreSight CPU Debug by default"
167204879e6SBrian Norris	depends on CORESIGHT_CPU_DEBUG
168204879e6SBrian Norris	help
169204879e6SBrian Norris	  Say Y here to enable the CoreSight Debug panic-debug by default. This
170204879e6SBrian Norris	  can also be enabled via debugfs, but this ensures the debug feature
171204879e6SBrian Norris	  is enabled as early as possible.
172204879e6SBrian Norris
173204879e6SBrian Norris	  Has the same effect as setting coresight_cpu_debug.enable=1 on the
174204879e6SBrian Norris	  kernel command line.
175204879e6SBrian Norris
176204879e6SBrian Norris	  Say N if unsure.
177204879e6SBrian Norris
178835d722bSMike Leachconfig CORESIGHT_CTI
1793c3fd1a1STingwei Zhang	tristate "CoreSight Cross Trigger Interface (CTI) driver"
180835d722bSMike Leach	depends on ARM || ARM64
181835d722bSMike Leach	help
182835d722bSMike Leach	  This driver provides support for CoreSight CTI and CTM components.
183835d722bSMike Leach	  These provide hardware triggering events between CoreSight trace
184835d722bSMike Leach	  source and sink components. These can be used to halt trace or
185835d722bSMike Leach	  inject events into the trace stream. CTI also provides a software
186835d722bSMike Leach	  control to trigger the same halt events. This can provide fast trace
187835d722bSMike Leach	  halt compared to disabling sources and sinks normally in driver
188835d722bSMike Leach	  software.
189835d722bSMike Leach
1903c3fd1a1STingwei Zhang	  To compile this driver as a module, choose M here: the
1913c3fd1a1STingwei Zhang	  module will be called coresight-cti.
1923c3fd1a1STingwei Zhang
193b5213376SMike Leachconfig CORESIGHT_CTI_INTEGRATION_REGS
194b5213376SMike Leach	bool "Access CTI CoreSight Integration Registers"
195b5213376SMike Leach	depends on CORESIGHT_CTI
196b5213376SMike Leach	help
197b5213376SMike Leach	  This option adds support for the CoreSight integration registers on
198b5213376SMike Leach	  this device. The integration registers allow the exploration of the
199b5213376SMike Leach	  CTI trigger connections between this and other devices.These
200b5213376SMike Leach	  registers are not used in normal operation and can leave devices in
201b5213376SMike Leach	  an inconsistent state.
2023fbf7f01SAnshuman Khandual
2033fbf7f01SAnshuman Khandualconfig CORESIGHT_TRBE
2043fbf7f01SAnshuman Khandual	tristate "Trace Buffer Extension (TRBE) driver"
2053fbf7f01SAnshuman Khandual	depends on ARM64 && CORESIGHT_SOURCE_ETM4X
2063fbf7f01SAnshuman Khandual	help
2073fbf7f01SAnshuman Khandual	  This driver provides support for percpu Trace Buffer Extension (TRBE).
2088c6989e5SRandy Dunlap	  TRBE always needs to be used along with its corresponding percpu ETE
2093fbf7f01SAnshuman Khandual	  component. ETE generates trace data which is then captured with TRBE.
2103fbf7f01SAnshuman Khandual	  Unlike traditional sink devices, TRBE is a CPU feature accessible via
2118c6989e5SRandy Dunlap	  system registers. But its explicit dependency with trace unit (ETE)
2123fbf7f01SAnshuman Khandual	  requires it to be plugged in as a coresight sink device.
2133fbf7f01SAnshuman Khandual
2143fbf7f01SAnshuman Khandual	  To compile this driver as a module, choose M here: the module will be
2153fbf7f01SAnshuman Khandual	  called coresight-trbe.
21606f5c292SQi Liu
21706f5c292SQi Liuconfig ULTRASOC_SMB
21806f5c292SQi Liu	tristate "Ultrasoc system memory buffer drivers"
21906f5c292SQi Liu	depends on ACPI || COMPILE_TEST
22006f5c292SQi Liu	depends on ARM64 && CORESIGHT_LINKS_AND_SINKS
22106f5c292SQi Liu	help
22206f5c292SQi Liu	  This driver provides support for the Ultrasoc system memory buffer (SMB).
22306f5c292SQi Liu	  SMB is responsible for receiving the trace data from Coresight ETM devices
22406f5c292SQi Liu	  and storing them to a system buffer.
22506f5c292SQi Liu
22606f5c292SQi Liu	  To compile this driver as a module, choose M here: the module will be
22706f5c292SQi Liu	  called ultrasoc-smb.
228b3c71626SMao Jinlong
229b3c71626SMao Jinlongconfig CORESIGHT_TPDM
230b3c71626SMao Jinlong	tristate "CoreSight Trace, Profiling & Diagnostics Monitor driver"
231b3c71626SMao Jinlong	select CORESIGHT_LINKS_AND_SINKS
2325b791662SMao Jinlong	select CORESIGHT_TPDA
233b3c71626SMao Jinlong	help
234b3c71626SMao Jinlong	  This driver provides support for configuring monitor. Monitors are
235b3c71626SMao Jinlong	  primarily responsible for data set collection and support the
236b3c71626SMao Jinlong	  ability to collect any permutation of data set types.
237b3c71626SMao Jinlong
238b3c71626SMao Jinlong	  To compile this driver as a module, choose M here: the module will be
239b3c71626SMao Jinlong	  called coresight-tpdm.
240b3c71626SMao Jinlong
2415b791662SMao Jinlongconfig CORESIGHT_TPDA
2425b791662SMao Jinlong	tristate "CoreSight Trace, Profiling & Diagnostics Aggregator driver"
2435b791662SMao Jinlong	help
2445b791662SMao Jinlong	  This driver provides support for configuring aggregator. This is
2455b791662SMao Jinlong	  primarily useful for pulling the data sets from one or more
2465b791662SMao Jinlong	  attached monitors and pushing the resultant data out. Multiple
2475b791662SMao Jinlong	  monitors are connected on different input ports of TPDA.
2485b791662SMao Jinlong
2495b791662SMao Jinlong	  To compile this driver as a module, choose M here: the module will be
2505b791662SMao Jinlong	  called coresight-tpda.
2519d3ba0b6SHao Zhang
2529d3ba0b6SHao Zhangconfig CORESIGHT_DUMMY
2539d3ba0b6SHao Zhang	tristate "Dummy driver support"
2549d3ba0b6SHao Zhang	help
2559d3ba0b6SHao Zhang	  Enables support for dummy driver. Dummy driver can be used for
2569d3ba0b6SHao Zhang	  CoreSight sources/sinks that are owned and configured by some
2579d3ba0b6SHao Zhang	  other subsystem and use Linux drivers to configure rest of trace
2589d3ba0b6SHao Zhang	  path.
2599d3ba0b6SHao Zhang
2609d3ba0b6SHao Zhang	  To compile this driver as a module, choose M here: the module will be
2619d3ba0b6SHao Zhang	  called coresight-dummy.
262*b104a941SJames Clark
263*b104a941SJames Clarkconfig CORESIGHT_KUNIT_TESTS
264*b104a941SJames Clark	  tristate "Enable Coresight unit tests"
265*b104a941SJames Clark	  depends on KUNIT
266*b104a941SJames Clark	  default KUNIT_ALL_TESTS
267*b104a941SJames Clark	  help
268*b104a941SJames Clark	    Enable Coresight unit tests. Only useful for development and not
269*b104a941SJames Clark	    intended for production.
270*b104a941SJames Clark
27101081f5aSMathieu Poirierendif
272