Hello Nathan,
On Wed, Mar 06, 2024 at 21:15:47 CET, nsf@ksu.edu wrote:
I was working on a project and noticed that the only kernel fault core allows a component to handle is a page fault. Is there a particular reason that core only allows page faults to be handled and not all kernel faults? If there is a problem with receiving all faults I would love to know the issue! thanks in advance for all your help.
A feature to monitor CPU exceptions is existent but quite underused in Genode beyond the GDB monitor AFAIK.
The CPU session [1] permits to set an exception handler (signal capability) for one or all threads of the session [2] [3]. The thread's state can then be requested from components possessing the thread capability via 'Thread_state Cpu_thread::state()' and contains the current exception in 'Cpu_state::trapno' for x86 [5], 'Cpu_state::cpu_exception' for arm v6/v7 [6], and seems to be missing for arm v8.
To control how the thread that triggered the exception should proceed, the handler may use `Cpu_thread::state(Thread_state const &)`.
[1] https://genode.org/documentation/genode-foundations/23.05/functional_specifi... [2] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290... [3] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290... [4] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290... [5] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290... [6] https://github.com/genodelabs/genode/blob/716579b12f9c3425cd8533cc61d1af3290...
Regards