This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

About watch point debug excption on Cortex-A53

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?

Parents
  • In previous architecture versions there were different behaviors depending on version and implementation choice, meaning this was explicitly called out in the Architecture Reference Manual. For ARMv8 this was made consistent, and the description of the differences removed. If you know where to find it (and there's no reason you should!) you can find this still in section D1.13 -- Watchpoints are synchronous exceptions and synchronous exceptions have this property. You can also infer it if you follow through the pseudocode description. But I will raise a ticket to see how this might be made clearer.
Reply
  • In previous architecture versions there were different behaviors depending on version and implementation choice, meaning this was explicitly called out in the Architecture Reference Manual. For ARMv8 this was made consistent, and the description of the differences removed. If you know where to find it (and there's no reason you should!) you can find this still in section D1.13 -- Watchpoints are synchronous exceptions and synchronous exceptions have this property. You can also infer it if you follow through the pseudocode description. But I will raise a ticket to see how this might be made clearer.
Children
No data