brintos

brintos / linux-shallow public Read only

0
0
Text · 2.1 KiB · 3d8eb92 Raw
63 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3===================4MIPI SyS-T over STP5===================6 7The MIPI SyS-T protocol driver can be used with STM class devices to8generate standardized trace stream. Aside from being a standard, it9provides better trace source identification and timestamp correlation.10 11In order to use the MIPI SyS-T protocol driver with your STM device,12first, you'll need CONFIG_STM_PROTO_SYS_T.13 14Now, you can select which protocol driver you want to use when you create15a policy for your STM device, by specifying it in the policy name:16 17# mkdir /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/18 19In other words, the policy name format is extended like this:20 21  <device_name>:<protocol_name>.<policy_name>22 23With Intel TH, therefore it can look like "0-sth:p_sys-t.my-policy".24 25If the protocol name is omitted, the STM class will chose whichever26protocol driver was loaded first.27 28You can also double check that everything is working as expected by29 30# cat /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/protocol31p_sys-t32 33Now, with the MIPI SyS-T protocol driver, each policy node in the34configfs gets a few additional attributes, which determine per-source35parameters specific to the protocol:36 37# mkdir /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/default38# ls /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/default39channels40clocksync_interval41do_len42masters43ts_interval44uuid45 46The most important one here is the "uuid", which determines the UUID47that will be used to tag all data coming from this source. It is48automatically generated when a new node is created, but it is likely49that you would want to change it.50 51do_len switches on/off the additional "payload length" field in the52MIPI SyS-T message header. It is off by default as the STP already53marks message boundaries.54 55ts_interval and clocksync_interval determine how much time in milliseconds56can pass before we need to include a protocol (not transport, aka STP)57timestamp in a message header or send a CLOCKSYNC packet, respectively.58 59See Documentation/ABI/testing/configfs-stp-policy-p_sys-t for more60details.61 62* [1] https://www.mipi.org/specifications/sys-t63