Hi all,
I am currently facing a problem about manually flushing traces.
The traced user application runs on a Linux distribution with an FPGA Board based on a Zynq-7000 SoC.
I am setting up coresight components for tracing only the user application PID and his address space, and I exclude tracing kernel.
All traces are exported to a monitor present in the FPGA. The flow of the traces:
————————————— ——————— —————————
| | | | | |
| ARM Cortex A9 (Core 0) | ==> | TPIU | ==> | FPGA Monitor |
| / PTM | | | | |
————————————— ——————— —————————
When there is a syscall on the user application, I have the traces below:
…
16274 (a waypoint update packet)
ffff0008 (the exception branch address)
16278
..
The relative addresses/assembly instructions extracted from the ELF file are :
16270: e89c0078 ldm ip, {r3, r4, r5, r6}
16274: ef000000 svc 0x00000000
16278: e8bd00f0 pop {r4, r5, r6, r7}
During the execution of the syscall (on the Kernel side), the kernel needs to receive a response from the FPGA Monitor and wait actively for it.
This response depends on calculations relative to all PTM traces before the syscall (SVC instruction at 16274).
That’s why I need to flush all traces during the syscall, I tried to flush traces by setting the FOnMan_W of the Formatter and Flush Control Register (FFCR) into coresight-tpiu.c but that’s not working.
Do you have an idea of how correctly flushing all traces to the FPGA Monitor on the kernel?
Best regards,
Mounir