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 verifies the stability and write-access of the **ETM (Embedded Trace Macrocell)**`mode` attribute. It sets the mode to `0XFFFFFFF` (enabling various mode bits like cycle-accurate tracing, etc., depending on the hardware revision) and attempts to enable the ETM sources.
5
+
6
+
## Execution
7
+
1.**Discovery**: Scans `/sys/bus/coresight/devices/` for ETM devices (`etm*` or `coresight-etm*`).
8
+
2.**Setup**:
9
+
* Resets all Coresight sources and sinks.
10
+
* Enables `tmc_etr0` as the trace sink.
11
+
3.**Test**:
12
+
* Iterates through all detected ETM devices.
13
+
* Writes `0XFFFFFFF` to the `mode` sysfs attribute.
14
+
* Enables the ETM source.
15
+
4.**Teardown**:
16
+
* Writes `0x0` to the `mode` sysfs attribute (restoring defaults).
17
+
* Disables all sources and sinks.
18
+
19
+
## Output
20
+
* Console logs showing detection and configuration of each core.
21
+
*`ETM-Test-Mode.res` containing the final Pass/Fail status.
This test validates the reliability of the ETM (Embedded Trace Macrocell) drivers by repeatedly enabling and disabling trace sources and verifying that data is successfully written to the sinks.
5
+
6
+
## Execution Logic
7
+
The test iterates through **every available sink** (excluding `tmc_etf1`) and **every available ETM source**.
8
+
9
+
For each Sink $\leftrightarrow$ Source pair, it performs `N` iterations (default: 2):
10
+
1.**Reset**: Disable all Coresight devices.
11
+
2.**Enable Sink**: Activate the current sink (e.g., `tmc_etr0`).
12
+
3.**Enable Source**: Activate the current ETM (e.g., `etm0`).
13
+
4.**Capture**: Sleep for 3 seconds to generate trace data, then dump the content of `/dev/<sink_name>` to a temporary binary file.
14
+
5.**Verify**:
15
+
* Check if the captured binary file size is $\ge$ 64 bytes.
16
+
* Check if the source disabled correctly.
17
+
18
+
## Usage
19
+
Run the script directly or via the runner.
20
+
Optional argument: Number of iterations per device pair.
21
+
```
22
+
./run.sh 5
23
+
```
24
+
25
+
## Output
26
+
* Console logs for each iteration.
27
+
*`ETM-Trace.res` containing the final Pass/Fail status.
0 commit comments