xref: /OK3568_Linux_fs/kernel/drivers/hwtracing/coresight/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# Coresight configuration
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyunmenuconfig CORESIGHT
6*4882a593Smuzhiyun	tristate "CoreSight Tracing Support"
7*4882a593Smuzhiyun	depends on ARM || ARM64
8*4882a593Smuzhiyun	depends on OF || ACPI
9*4882a593Smuzhiyun	select ARM_AMBA
10*4882a593Smuzhiyun	select PERF_EVENTS
11*4882a593Smuzhiyun	help
12*4882a593Smuzhiyun	  This framework provides a kernel interface for the CoreSight debug
13*4882a593Smuzhiyun	  and trace drivers to register themselves with. It's intended to build
14*4882a593Smuzhiyun	  a topological view of the CoreSight components based on a DT
15*4882a593Smuzhiyun	  specification and configure the right series of components when a
16*4882a593Smuzhiyun	  trace source gets enabled.
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
19*4882a593Smuzhiyun	  module will be called coresight.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunif CORESIGHT
22*4882a593Smuzhiyunconfig CORESIGHT_LINKS_AND_SINKS
23*4882a593Smuzhiyun	tristate "CoreSight Link and Sink drivers"
24*4882a593Smuzhiyun	help
25*4882a593Smuzhiyun	  This enables support for CoreSight link and sink drivers that are
26*4882a593Smuzhiyun	  responsible for transporting and collecting the trace data
27*4882a593Smuzhiyun	  respectively.  Link and sinks are dynamically aggregated with a trace
28*4882a593Smuzhiyun	  entity at run time to form a complete trace path.
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun	  To compile these drivers as modules, choose M here: the
31*4882a593Smuzhiyun	  modules will be called coresight-funnel and coresight-replicator.
32*4882a593Smuzhiyun
33*4882a593Smuzhiyunconfig CORESIGHT_LINK_AND_SINK_TMC
34*4882a593Smuzhiyun	tristate "Coresight generic TMC driver"
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun	depends on CORESIGHT_LINKS_AND_SINKS
37*4882a593Smuzhiyun	help
38*4882a593Smuzhiyun	  This enables support for the Trace Memory Controller driver.
39*4882a593Smuzhiyun	  Depending on its configuration the device can act as a link (embedded
40*4882a593Smuzhiyun	  trace router - ETR) or sink (embedded trace FIFO).  The driver
41*4882a593Smuzhiyun	  complies with the generic implementation of the component without
42*4882a593Smuzhiyun	  special enhancement or added features.
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
45*4882a593Smuzhiyun	  module will be called coresight-tmc.
46*4882a593Smuzhiyun
47*4882a593Smuzhiyunconfig CORESIGHT_CATU
48*4882a593Smuzhiyun	tristate "Coresight Address Translation Unit (CATU) driver"
49*4882a593Smuzhiyun	depends on CORESIGHT_LINK_AND_SINK_TMC
50*4882a593Smuzhiyun	help
51*4882a593Smuzhiyun	   Enable support for the Coresight Address Translation Unit (CATU).
52*4882a593Smuzhiyun	   CATU supports a scatter gather table of 4K pages, with forward/backward
53*4882a593Smuzhiyun	   lookup. CATU helps TMC ETR to use a large physically non-contiguous trace
54*4882a593Smuzhiyun	   buffer by translating the addresses used by ETR to the physical address
55*4882a593Smuzhiyun	   by looking up the provided table. CATU can also be used in pass-through
56*4882a593Smuzhiyun	   mode where the address is not translated.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun	   To compile this driver as a module, choose M here: the
59*4882a593Smuzhiyun	   module will be called coresight-catu.
60*4882a593Smuzhiyun
61*4882a593Smuzhiyunconfig CORESIGHT_SINK_TPIU
62*4882a593Smuzhiyun	tristate "Coresight generic TPIU driver"
63*4882a593Smuzhiyun	depends on CORESIGHT_LINKS_AND_SINKS
64*4882a593Smuzhiyun	help
65*4882a593Smuzhiyun	  This enables support for the Trace Port Interface Unit driver,
66*4882a593Smuzhiyun	  responsible for bridging the gap between the on-chip coresight
67*4882a593Smuzhiyun	  components and a trace for bridging the gap between the on-chip
68*4882a593Smuzhiyun	  coresight components and a trace port collection engine, typically
69*4882a593Smuzhiyun	  connected to an external host for use case capturing more traces than
70*4882a593Smuzhiyun	  the on-board coresight memory can handle.
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
73*4882a593Smuzhiyun	  module will be called coresight-tpiu.
74*4882a593Smuzhiyun
75*4882a593Smuzhiyunconfig CORESIGHT_SINK_ETBV10
76*4882a593Smuzhiyun	tristate "Coresight ETBv1.0 driver"
77*4882a593Smuzhiyun	depends on CORESIGHT_LINKS_AND_SINKS
78*4882a593Smuzhiyun	help
79*4882a593Smuzhiyun	  This enables support for the Embedded Trace Buffer version 1.0 driver
80*4882a593Smuzhiyun	  that complies with the generic implementation of the component without
81*4882a593Smuzhiyun	  special enhancement or added features.
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
84*4882a593Smuzhiyun	  module will be called coresight-etb10.
85*4882a593Smuzhiyun
86*4882a593Smuzhiyunconfig CORESIGHT_SOURCE_ETM3X
87*4882a593Smuzhiyun	tristate "CoreSight Embedded Trace Macrocell 3.x driver"
88*4882a593Smuzhiyun	depends on !ARM64
89*4882a593Smuzhiyun	select CORESIGHT_LINKS_AND_SINKS
90*4882a593Smuzhiyun	help
91*4882a593Smuzhiyun	  This driver provides support for processor ETM3.x and PTM1.x modules,
92*4882a593Smuzhiyun	  which allows tracing the instructions that a processor is executing
93*4882a593Smuzhiyun	  This is primarily useful for instruction level tracing.  Depending
94*4882a593Smuzhiyun	  the ETM version data tracing may also be available.
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
97*4882a593Smuzhiyun	  module will be called coresight-etm3x.
98*4882a593Smuzhiyun
99*4882a593Smuzhiyunconfig CORESIGHT_SOURCE_ETM4X
100*4882a593Smuzhiyun	tristate "CoreSight ETMv4.x / ETE driver"
101*4882a593Smuzhiyun	depends on ARM64
102*4882a593Smuzhiyun	select CORESIGHT_LINKS_AND_SINKS
103*4882a593Smuzhiyun	select PID_IN_CONTEXTIDR
104*4882a593Smuzhiyun	help
105*4882a593Smuzhiyun	  This driver provides support for the CoreSight Embedded Trace Macrocell
106*4882a593Smuzhiyun	  version 4.x and the Embedded Trace Extensions (ETE). Both are CPU tracer
107*4882a593Smuzhiyun	  modules, tracing the instructions that a processor is executing. This is
108*4882a593Smuzhiyun	  primarily useful for instruction level tracing.
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
111*4882a593Smuzhiyun	  module will be called coresight-etm4x.
112*4882a593Smuzhiyun
113*4882a593Smuzhiyunconfig ETM4X_IMPDEF_FEATURE
114*4882a593Smuzhiyun	bool "Control implementation defined overflow support in ETM 4.x driver"
115*4882a593Smuzhiyun	depends on CORESIGHT_SOURCE_ETM4X
116*4882a593Smuzhiyun	help
117*4882a593Smuzhiyun	  This control provides implementation define control for CoreSight
118*4882a593Smuzhiyun	  ETM 4.x tracer module that can't reduce commit rate automatically.
119*4882a593Smuzhiyun	  This avoids overflow between the ETM tracer module and the cpu core.
120*4882a593Smuzhiyun
121*4882a593Smuzhiyunconfig CORESIGHT_STM
122*4882a593Smuzhiyun	tristate "CoreSight System Trace Macrocell driver"
123*4882a593Smuzhiyun	depends on (ARM && !(CPU_32v3 || CPU_32v4 || CPU_32v4T)) || ARM64
124*4882a593Smuzhiyun	select CORESIGHT_LINKS_AND_SINKS
125*4882a593Smuzhiyun	select STM
126*4882a593Smuzhiyun	help
127*4882a593Smuzhiyun	  This driver provides support for hardware assisted software
128*4882a593Smuzhiyun	  instrumentation based tracing. This is primarily used for
129*4882a593Smuzhiyun	  logging useful software events or data coming from various entities
130*4882a593Smuzhiyun	  in the system, possibly running different OSs
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
133*4882a593Smuzhiyun	  module will be called coresight-stm.
134*4882a593Smuzhiyun
135*4882a593Smuzhiyunconfig CORESIGHT_CPU_DEBUG
136*4882a593Smuzhiyun	tristate "CoreSight CPU Debug driver"
137*4882a593Smuzhiyun	depends on ARM || ARM64
138*4882a593Smuzhiyun	depends on DEBUG_FS
139*4882a593Smuzhiyun	help
140*4882a593Smuzhiyun	  This driver provides support for coresight debugging module. This
141*4882a593Smuzhiyun	  is primarily used to dump sample-based profiling registers when
142*4882a593Smuzhiyun	  system triggers panic, the driver will parse context registers so
143*4882a593Smuzhiyun	  can quickly get to know program counter (PC), secure state,
144*4882a593Smuzhiyun	  exception level, etc. Before use debugging functionality, platform
145*4882a593Smuzhiyun	  needs to ensure the clock domain and power domain are enabled
146*4882a593Smuzhiyun	  properly, please refer Documentation/trace/coresight/coresight-cpu-debug.rst
147*4882a593Smuzhiyun	  for detailed description and the example for usage.
148*4882a593Smuzhiyun
149*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
150*4882a593Smuzhiyun	  module will be called coresight-cpu-debug.
151*4882a593Smuzhiyun
152*4882a593Smuzhiyunconfig CORESIGHT_CTI
153*4882a593Smuzhiyun	tristate "CoreSight Cross Trigger Interface (CTI) driver"
154*4882a593Smuzhiyun	depends on ARM || ARM64
155*4882a593Smuzhiyun	help
156*4882a593Smuzhiyun	  This driver provides support for CoreSight CTI and CTM components.
157*4882a593Smuzhiyun	  These provide hardware triggering events between CoreSight trace
158*4882a593Smuzhiyun	  source and sink components. These can be used to halt trace or
159*4882a593Smuzhiyun	  inject events into the trace stream. CTI also provides a software
160*4882a593Smuzhiyun	  control to trigger the same halt events. This can provide fast trace
161*4882a593Smuzhiyun	  halt compared to disabling sources and sinks normally in driver
162*4882a593Smuzhiyun	  software.
163*4882a593Smuzhiyun
164*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
165*4882a593Smuzhiyun	  module will be called coresight-cti.
166*4882a593Smuzhiyun
167*4882a593Smuzhiyunconfig CORESIGHT_CTI_INTEGRATION_REGS
168*4882a593Smuzhiyun	bool "Access CTI CoreSight Integration Registers"
169*4882a593Smuzhiyun	depends on CORESIGHT_CTI
170*4882a593Smuzhiyun	help
171*4882a593Smuzhiyun	  This option adds support for the CoreSight integration registers on
172*4882a593Smuzhiyun	  this device. The integration registers allow the exploration of the
173*4882a593Smuzhiyun	  CTI trigger connections between this and other devices.These
174*4882a593Smuzhiyun	  registers are not used in normal operation and can leave devices in
175*4882a593Smuzhiyun	  an inconsistent state.
176*4882a593Smuzhiyun
177*4882a593Smuzhiyunconfig CORESIGHT_TRBE
178*4882a593Smuzhiyun	tristate "Trace Buffer Extension (TRBE) driver"
179*4882a593Smuzhiyun	depends on ARM64 && CORESIGHT_SOURCE_ETM4X
180*4882a593Smuzhiyun	help
181*4882a593Smuzhiyun	  This driver provides support for percpu Trace Buffer Extension (TRBE).
182*4882a593Smuzhiyun	  TRBE always needs to be used along with it's corresponding percpu ETE
183*4882a593Smuzhiyun	  component. ETE generates trace data which is then captured with TRBE.
184*4882a593Smuzhiyun	  Unlike traditional sink devices, TRBE is a CPU feature accessible via
185*4882a593Smuzhiyun	  system registers. But it's explicit dependency with trace unit (ETE)
186*4882a593Smuzhiyun	  requires it to be plugged in as a coresight sink device.
187*4882a593Smuzhiyun
188*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the module will be
189*4882a593Smuzhiyun	  called coresight-trbe.
190*4882a593Smuzhiyunendif
191