[OpenBIOS] sparc32 trap recovery
breuerr at mc.net
Sat Jun 15 19:50:50 CEST 2013
I'm aiming for a cpeek that catches the data faults on sparc32, so I've
coded up the attached test code.
The fault handler here is almost trivially simple: set a new instruction
pointer and return to it. All the magic is done in push_trap_handler
and do_trap_handler, and they act similar to setjmp/longjmp. Nesting is
allowed, so it should be possible to use this at the top level for
printing out pretty error messages for any fault just like OBP.
I'm looking for any comments and suggestions. This proof of concept
only handles mmu data faults, but is extendable. Example tests:
returns false (0),
returns true (-1) and the value at 0x10000
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the OpenBIOS