Now we are researching watch point function on A53. We simply write a driver, hook debug exception handler aml_watchpoint_handler instead of default watch point handler.
In our watch point handler, we first disabled watch point control, then handle debug exception, after handler finished, we re-enable this watch point control and exit exception.
Theoretically when we trigger a watch point event once, watch point exception should taken once. but we found if we re-enable watch point at the end of handler, A53 CPU re-entered this exception again and again and this event will last a long time, some times it will not end. If we don't re-enable watch point in exception handler but re-enable it in a work_struct after a short time sleeping(1ms is enough), then this exception can only take once. But this method may cause lost of watch point event during disable period.
We don't know the detailed behavior of watch point exception and why watch point exception will enter again and again and how to exit watch point handler safely. Who can help us for this issue?