OpenCloudOS-Kernel/drivers/hwtracing/stm/Kconfig

84 lines
2.6 KiB
Plaintext
Raw Normal View History

# SPDX-License-Identifier: GPL-2.0-only
stm class: Introduce an abstraction for System Trace Module devices A System Trace Module (STM) is a device exporting data in System Trace Protocol (STP) format as defined by MIPI STP standards. Examples of such devices are Intel(R) Trace Hub and Coresight STM. This abstraction provides a unified interface for software trace sources to send their data over an STM device to a debug host. In order to do that, such a trace source needs to be assigned a pair of master/channel identifiers that all the data from this source will be tagged with. The STP decoder on the debug host side will use these master/channel tags to distinguish different trace streams from one another inside one STP stream. This abstraction provides a configfs-based policy management mechanism for dynamic allocation of these master/channel pairs based on trace source-supplied string identifier. It has the flexibility of being defined at runtime and at the same time (provided that the policy definition is aligned with the decoding end) consistency. For userspace trace sources, this abstraction provides write()-based and mmap()-based (if the underlying stm device allows this) output mechanism. For kernel-side trace sources, we provide "stm_source" device class that can be connected to an stm device at run time. Cc: linux-api@vger.kernel.org Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-22 20:47:10 +08:00
config STM
tristate "System Trace Module devices"
select CONFIGFS_FS
select SRCU
stm class: Introduce an abstraction for System Trace Module devices A System Trace Module (STM) is a device exporting data in System Trace Protocol (STP) format as defined by MIPI STP standards. Examples of such devices are Intel(R) Trace Hub and Coresight STM. This abstraction provides a unified interface for software trace sources to send their data over an STM device to a debug host. In order to do that, such a trace source needs to be assigned a pair of master/channel identifiers that all the data from this source will be tagged with. The STP decoder on the debug host side will use these master/channel tags to distinguish different trace streams from one another inside one STP stream. This abstraction provides a configfs-based policy management mechanism for dynamic allocation of these master/channel pairs based on trace source-supplied string identifier. It has the flexibility of being defined at runtime and at the same time (provided that the policy definition is aligned with the decoding end) consistency. For userspace trace sources, this abstraction provides write()-based and mmap()-based (if the underlying stm device allows this) output mechanism. For kernel-side trace sources, we provide "stm_source" device class that can be connected to an stm device at run time. Cc: linux-api@vger.kernel.org Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-22 20:47:10 +08:00
help
A System Trace Module (STM) is a device exporting data in System
Trace Protocol (STP) format as defined by MIPI STP standards.
Examples of such devices are Intel(R) Trace Hub and Coresight STM.
Say Y here to enable System Trace Module device support.
if STM
config STM_PROTO_BASIC
tristate "Basic STM framing protocol driver"
default CONFIG_STM
help
This is a simple framing protocol for sending data over STM
devices. This was the protocol that the STM framework used
exclusively until the MIPI SyS-T support was added. Use this
driver for compatibility with your existing STM setup.
The receiving side only needs to be able to decode the MIPI
STP protocol in order to extract the data.
If you want to be able to use the basic protocol or want the
backwards compatibility for your existing setup, say Y.
config STM_PROTO_SYS_T
tristate "MIPI SyS-T STM framing protocol driver"
default CONFIG_STM
help
This is an implementation of MIPI SyS-T protocol to be used
over the STP transport. In addition to the data payload, it
also carries additional metadata for time correlation, better
means of trace source identification, etc.
The receiving side must be able to decode this protocol in
addition to the MIPI STP, in order to extract the data.
If you don't know what this is, say N.
config STM_DUMMY
tristate "Dummy STM driver"
help
This is a simple dummy device that pretends to be an stm device
and discards your data. Use for stm class testing.
If you don't know what this is, say N.
config STM_SOURCE_CONSOLE
tristate "Kernel console over STM devices"
help
This is a kernel space trace source that sends kernel log
messages to trace hosts over STM devices.
If you want to send kernel console messages over STM devices,
say Y.
config STM_SOURCE_HEARTBEAT
tristate "Heartbeat over STM devices"
help
This is a kernel space trace source that sends periodic
heartbeat messages to trace hosts over STM devices. It is
also useful for testing stm class drivers and the stm class
framework itself.
If you want to send heartbeat messages over STM devices,
say Y.
config STM_SOURCE_FTRACE
tristate "Copy the output from kernel Ftrace to STM engine"
depends on FUNCTION_TRACER
help
This option can be used to copy the output from kernel Ftrace
to STM engine. Enabling this option will introduce a slight
timing effect.
If you want to send kernel Ftrace messages over STM devices,
say Y.
endif