xref: /openbmc/linux/drivers/hwtracing/coresight/Kconfig (revision 2612e3bbc0386368a850140a6c9b990cd496a5ec)
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
1362227b7c7SLeo Yanconfig CORESIGHT_CPU_DEBUG
1372227b7c7SLeo Yan	tristate "CoreSight CPU Debug driver"
1382227b7c7SLeo Yan	depends on ARM || ARM64
1392227b7c7SLeo Yan	depends on DEBUG_FS
1402227b7c7SLeo Yan	help
1412227b7c7SLeo Yan	  This driver provides support for coresight debugging module. This
1422227b7c7SLeo Yan	  is primarily used to dump sample-based profiling registers when
1432227b7c7SLeo Yan	  system triggers panic, the driver will parse context registers so
1442227b7c7SLeo Yan	  can quickly get to know program counter (PC), secure state,
1452227b7c7SLeo Yan	  exception level, etc. Before use debugging functionality, platform
1462227b7c7SLeo Yan	  needs to ensure the clock domain and power domain are enabled
14772ef5e52SMauro Carvalho Chehab	  properly, please refer Documentation/trace/coresight/coresight-cpu-debug.rst
1482227b7c7SLeo Yan	  for detailed description and the example for usage.
1492227b7c7SLeo Yan
15032a14ad5STingwei Zhang	  To compile this driver as a module, choose M here: the
15132a14ad5STingwei Zhang	  module will be called coresight-cpu-debug.
15232a14ad5STingwei Zhang
153204879e6SBrian Norrisconfig CORESIGHT_CPU_DEBUG_DEFAULT_ON
154204879e6SBrian Norris	bool "Enable CoreSight CPU Debug by default"
155204879e6SBrian Norris	depends on CORESIGHT_CPU_DEBUG
156204879e6SBrian Norris	help
157204879e6SBrian Norris	  Say Y here to enable the CoreSight Debug panic-debug by default. This
158204879e6SBrian Norris	  can also be enabled via debugfs, but this ensures the debug feature
159204879e6SBrian Norris	  is enabled as early as possible.
160204879e6SBrian Norris
161204879e6SBrian Norris	  Has the same effect as setting coresight_cpu_debug.enable=1 on the
162204879e6SBrian Norris	  kernel command line.
163204879e6SBrian Norris
164204879e6SBrian Norris	  Say N if unsure.
165204879e6SBrian Norris
166835d722bSMike Leachconfig CORESIGHT_CTI
1673c3fd1a1STingwei Zhang	tristate "CoreSight Cross Trigger Interface (CTI) driver"
168835d722bSMike Leach	depends on ARM || ARM64
169835d722bSMike Leach	help
170835d722bSMike Leach	  This driver provides support for CoreSight CTI and CTM components.
171835d722bSMike Leach	  These provide hardware triggering events between CoreSight trace
172835d722bSMike Leach	  source and sink components. These can be used to halt trace or
173835d722bSMike Leach	  inject events into the trace stream. CTI also provides a software
174835d722bSMike Leach	  control to trigger the same halt events. This can provide fast trace
175835d722bSMike Leach	  halt compared to disabling sources and sinks normally in driver
176835d722bSMike Leach	  software.
177835d722bSMike Leach
1783c3fd1a1STingwei Zhang	  To compile this driver as a module, choose M here: the
1793c3fd1a1STingwei Zhang	  module will be called coresight-cti.
1803c3fd1a1STingwei Zhang
181b5213376SMike Leachconfig CORESIGHT_CTI_INTEGRATION_REGS
182b5213376SMike Leach	bool "Access CTI CoreSight Integration Registers"
183b5213376SMike Leach	depends on CORESIGHT_CTI
184b5213376SMike Leach	help
185b5213376SMike Leach	  This option adds support for the CoreSight integration registers on
186b5213376SMike Leach	  this device. The integration registers allow the exploration of the
187b5213376SMike Leach	  CTI trigger connections between this and other devices.These
188b5213376SMike Leach	  registers are not used in normal operation and can leave devices in
189b5213376SMike Leach	  an inconsistent state.
1903fbf7f01SAnshuman Khandual
1913fbf7f01SAnshuman Khandualconfig CORESIGHT_TRBE
1923fbf7f01SAnshuman Khandual	tristate "Trace Buffer Extension (TRBE) driver"
1933fbf7f01SAnshuman Khandual	depends on ARM64 && CORESIGHT_SOURCE_ETM4X
1943fbf7f01SAnshuman Khandual	help
1953fbf7f01SAnshuman Khandual	  This driver provides support for percpu Trace Buffer Extension (TRBE).
1968c6989e5SRandy Dunlap	  TRBE always needs to be used along with its corresponding percpu ETE
1973fbf7f01SAnshuman Khandual	  component. ETE generates trace data which is then captured with TRBE.
1983fbf7f01SAnshuman Khandual	  Unlike traditional sink devices, TRBE is a CPU feature accessible via
1998c6989e5SRandy Dunlap	  system registers. But its explicit dependency with trace unit (ETE)
2003fbf7f01SAnshuman Khandual	  requires it to be plugged in as a coresight sink device.
2013fbf7f01SAnshuman Khandual
2023fbf7f01SAnshuman Khandual	  To compile this driver as a module, choose M here: the module will be
2033fbf7f01SAnshuman Khandual	  called coresight-trbe.
20406f5c292SQi Liu
20506f5c292SQi Liuconfig ULTRASOC_SMB
20606f5c292SQi Liu	tristate "Ultrasoc system memory buffer drivers"
20706f5c292SQi Liu	depends on ACPI || COMPILE_TEST
20806f5c292SQi Liu	depends on ARM64 && CORESIGHT_LINKS_AND_SINKS
20906f5c292SQi Liu	help
21006f5c292SQi Liu	  This driver provides support for the Ultrasoc system memory buffer (SMB).
21106f5c292SQi Liu	  SMB is responsible for receiving the trace data from Coresight ETM devices
21206f5c292SQi Liu	  and storing them to a system buffer.
21306f5c292SQi Liu
21406f5c292SQi Liu	  To compile this driver as a module, choose M here: the module will be
21506f5c292SQi Liu	  called ultrasoc-smb.
216b3c71626SMao Jinlong
217b3c71626SMao Jinlongconfig CORESIGHT_TPDM
218b3c71626SMao Jinlong	tristate "CoreSight Trace, Profiling & Diagnostics Monitor driver"
219b3c71626SMao Jinlong	select CORESIGHT_LINKS_AND_SINKS
2205b791662SMao Jinlong	select CORESIGHT_TPDA
221b3c71626SMao Jinlong	help
222b3c71626SMao Jinlong	  This driver provides support for configuring monitor. Monitors are
223b3c71626SMao Jinlong	  primarily responsible for data set collection and support the
224b3c71626SMao Jinlong	  ability to collect any permutation of data set types.
225b3c71626SMao Jinlong
226b3c71626SMao Jinlong	  To compile this driver as a module, choose M here: the module will be
227b3c71626SMao Jinlong	  called coresight-tpdm.
228b3c71626SMao Jinlong
2295b791662SMao Jinlongconfig CORESIGHT_TPDA
2305b791662SMao Jinlong	tristate "CoreSight Trace, Profiling & Diagnostics Aggregator driver"
2315b791662SMao Jinlong	help
2325b791662SMao Jinlong	  This driver provides support for configuring aggregator. This is
2335b791662SMao Jinlong	  primarily useful for pulling the data sets from one or more
2345b791662SMao Jinlong	  attached monitors and pushing the resultant data out. Multiple
2355b791662SMao Jinlong	  monitors are connected on different input ports of TPDA.
2365b791662SMao Jinlong
2375b791662SMao Jinlong	  To compile this driver as a module, choose M here: the module will be
2385b791662SMao Jinlong	  called coresight-tpda.
239*9d3ba0b6SHao Zhang
240*9d3ba0b6SHao Zhangconfig CORESIGHT_DUMMY
241*9d3ba0b6SHao Zhang	tristate "Dummy driver support"
242*9d3ba0b6SHao Zhang	help
243*9d3ba0b6SHao Zhang	  Enables support for dummy driver. Dummy driver can be used for
244*9d3ba0b6SHao Zhang	  CoreSight sources/sinks that are owned and configured by some
245*9d3ba0b6SHao Zhang	  other subsystem and use Linux drivers to configure rest of trace
246*9d3ba0b6SHao Zhang	  path.
247*9d3ba0b6SHao Zhang
248*9d3ba0b6SHao Zhang	  To compile this driver as a module, choose M here: the module will be
249*9d3ba0b6SHao Zhang	  called coresight-dummy.
25001081f5aSMathieu Poirierendif
251