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