sys-t.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ===================
  3. MIPI SyS-T over STP
  4. ===================
  5. The MIPI SyS-T protocol driver can be used with STM class devices to
  6. generate standardized trace stream. Aside from being a standard, it
  7. provides better trace source identification and timestamp correlation.
  8. In order to use the MIPI SyS-T protocol driver with your STM device,
  9. first, you'll need CONFIG_STM_PROTO_SYS_T.
  10. Now, you can select which protocol driver you want to use when you create
  11. a policy for your STM device, by specifying it in the policy name:
  12. # mkdir /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/
  13. In other words, the policy name format is extended like this:
  14. <device_name>:<protocol_name>.<policy_name>
  15. With Intel TH, therefore it can look like "0-sth:p_sys-t.my-policy".
  16. If the protocol name is omitted, the STM class will chose whichever
  17. protocol driver was loaded first.
  18. You can also double check that everything is working as expected by
  19. # cat /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/protocol
  20. p_sys-t
  21. Now, with the MIPI SyS-T protocol driver, each policy node in the
  22. configfs gets a few additional attributes, which determine per-source
  23. parameters specific to the protocol:
  24. # mkdir /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/default
  25. # ls /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/default
  26. channels
  27. clocksync_interval
  28. do_len
  29. masters
  30. ts_interval
  31. uuid
  32. The most important one here is the "uuid", which determines the UUID
  33. that will be used to tag all data coming from this source. It is
  34. automatically generated when a new node is created, but it is likely
  35. that you would want to change it.
  36. do_len switches on/off the additional "payload length" field in the
  37. MIPI SyS-T message header. It is off by default as the STP already
  38. marks message boundaries.
  39. ts_interval and clocksync_interval determine how much time in milliseconds
  40. can pass before we need to include a protocol (not transport, aka STP)
  41. timestamp in a message header or send a CLOCKSYNC packet, respectively.
  42. See Documentation/ABI/testing/configfs-stp-policy-p_sys-t for more
  43. details.
  44. * [1] https://www.mipi.org/specifications/sys-t