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
Hi, I wonder if it would be useful if we could add some mechanism for users to register their custom interrupt handlers?
Current implementation has no such flexibility and it only implements interrupt handler for illegal instruction emulation. If users want to add other handlers they will have to touch the perch code, or they will have to rewrite the entire code again.
Maybe we can do the following extension: we add an array of function pointers for different causes of interrupt. They can initially point to some default handler, for example unhandled_trap. The illegal instruction emulation interrupt handler that is already in the repo can continue to be the default handler for the illegal instruction exception.
At least in my use case, I will need both the emulation code already in perch and my own custom S-mode interrupt handler for the Ethernet thing.
Thanks!
The text was updated successfully, but these errors were encountered:
Sounds good to me. At some level, this is better left to something like OpenSBI. But an array of weak handlers initially pointing to unhandled_exception is pretty flexible.
Hi, I wonder if it would be useful if we could add some mechanism for users to register their custom interrupt handlers?
Current implementation has no such flexibility and it only implements interrupt handler for illegal instruction emulation. If users want to add other handlers they will have to touch the perch code, or they will have to rewrite the entire code again.
Maybe we can do the following extension: we add an array of function pointers for different causes of interrupt. They can initially point to some default handler, for example unhandled_trap. The illegal instruction emulation interrupt handler that is already in the repo can continue to be the default handler for the illegal instruction exception.
At least in my use case, I will need both the emulation code already in perch and my own custom S-mode interrupt handler for the Ethernet thing.
Thanks!
The text was updated successfully, but these errors were encountered: