You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test validates the basic toggle functionality of the Coresight Cross Trigger Interface (CTI) drivers. It ensures that every CTI device exposed in sysfs can be turned on and off without errors.
5
+
6
+
## Execution Logic
7
+
1.**Preparation**:
8
+
* Disables `stm0`, `tmc_etr0`, and `tmc_etf0` to ensure a clean state.
9
+
* Enables `tmc_etf0` (Embedded Trace FIFO) as a sink, as some CTI configurations may require an active sink.
10
+
2.**Discovery**: Scans `/sys/bus/coresight/devices/` for any directory containing `cti`.
11
+
3.**Iteration**: For each CTI device:
12
+
***Enable**: Writes `1` to the `enable` file.
13
+
***Verify**: Reads the `enable` file; expects `1`.
14
+
***Disable**: Writes `0` to the `enable` file.
15
+
***Verify**: Reads the `enable` file; expects `0`.
16
+
4.**Cleanup**: Resets all devices to disabled state.
17
+
18
+
## Output
19
+
* Logs for every device toggle attempt.
20
+
*`CTI-Enable-Disable.res` containing the final Pass/Fail status.
This test verifies the functionality of the Coresight CTI (Cross Trigger Interface) driver. It ensures that hardware triggers can be successfully mapped (attached) to CTI channels and subsequently unmapped (detached).
5
+
6
+
## Execution Logic
7
+
1.**Sleep Disable**: Temporarily prevents the device from entering low-power modes (`/sys/module/lpm_levels/parameters/sleep_disabled`) to ensure CTI registers are accessible.
8
+
2.**Discovery**: Finds all CTI devices in `/sys/bus/coresight/devices/`.
9
+
3.**Mode Detection**: Checks for the existence of `enable` sysfs node to determine if the driver uses the Modern or Legacy sysfs interface.
10
+
4.**Configuration Parsing**: Reads the `devid` (Modern) or `show_info` (Legacy) to calculate the maximum number of triggers and channels supported by the hardware.
11
+
5.**Test Loop**:
12
+
* Iterates through a subset of triggers (randomized within valid range).
13
+
* Iterates through valid channels.
14
+
***Attach**: writes `channel trigger` to `trigin_attach` / `trigout_attach`.
15
+
***Verify**: Reads back via `chan_xtrigs_sel` and `chan_xtrigs_in`/`out` to confirm mapping.
16
+
***Detach**: Unmaps the trigger and confirms the entry is cleared.
17
+
6.**Cleanup**: Restores the original LPM sleep setting.
18
+
19
+
## Output
20
+
* Logs identifying which CTI device, trigger, and channel are being tested.
21
+
*`CTI-Trigger-Map.res` containing the final Pass/Fail status.
0 commit comments