0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 ===================
0004 MIPI SyS-T over STP
0005 ===================
0006
0007 The MIPI SyS-T protocol driver can be used with STM class devices to
0008 generate standardized trace stream. Aside from being a standard, it
0009 provides better trace source identification and timestamp correlation.
0010
0011 In order to use the MIPI SyS-T protocol driver with your STM device,
0012 first, you'll need CONFIG_STM_PROTO_SYS_T.
0013
0014 Now, you can select which protocol driver you want to use when you create
0015 a policy for your STM device, by specifying it in the policy name:
0016
0017 # mkdir /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/
0018
0019 In other words, the policy name format is extended like this:
0020
0021 <device_name>:<protocol_name>.<policy_name>
0022
0023 With Intel TH, therefore it can look like "0-sth:p_sys-t.my-policy".
0024
0025 If the protocol name is omitted, the STM class will chose whichever
0026 protocol driver was loaded first.
0027
0028 You can also double check that everything is working as expected by
0029
0030 # cat /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/protocol
0031 p_sys-t
0032
0033 Now, with the MIPI SyS-T protocol driver, each policy node in the
0034 configfs gets a few additional attributes, which determine per-source
0035 parameters specific to the protocol:
0036
0037 # mkdir /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/default
0038 # ls /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/default
0039 channels
0040 clocksync_interval
0041 do_len
0042 masters
0043 ts_interval
0044 uuid
0045
0046 The most important one here is the "uuid", which determines the UUID
0047 that will be used to tag all data coming from this source. It is
0048 automatically generated when a new node is created, but it is likely
0049 that you would want to change it.
0050
0051 do_len switches on/off the additional "payload length" field in the
0052 MIPI SyS-T message header. It is off by default as the STP already
0053 marks message boundaries.
0054
0055 ts_interval and clocksync_interval determine how much time in milliseconds
0056 can pass before we need to include a protocol (not transport, aka STP)
0057 timestamp in a message header or send a CLOCKSYNC packet, respectively.
0058
0059 See Documentation/ABI/testing/configfs-stp-policy-p_sys-t for more
0060 details.
0061
0062 * [1] https://www.mipi.org/specifications/sys-t