Hi everyone!
I want to set and then trap EL1 hardware breakpoints to EL2. I didn't perfectly understand if such an action is possible at all. In some places the documentation said that MDCR_EL2.TDE enables *Software Breakpoints* trapping to EL2, but on other places it showed that Hardware Breakpoints were part of the exceptions being trapped as well.Anyway, to achieve that, I 've done the following:
* Enabling and setting EL1 hardware breakpoint:MDSCR_EL1 = MDE | KDEPSTATE.D = 0DBGBCR_EL1 = E | HMC | PMC.EL2DBGBVR_EL1[48:2] = <instruction_address_to_catch>[48:2]
* Enabling trapping of breakpoints to EL2MDCR_EL2 = TDE
When testing it, I can see that EL1 registers accesses are trapped to EL2, but there doesn't seem to be any hardware breakpoint exception when the desired address is executed - so I guess I'm configuring my breakpoint wrong. But I can't seem to find how...
Can somebody shed some light?Thank you!