SVC: Difference between revisions
No edit summary |
No edit summary |
||
Line 660: | Line 660: | ||
|} | |} | ||
=Exception | = Exception handling = | ||
There | There is userland code for handling exceptions, however this doesn't seem to be executed on retail mode. | ||
When a usermode exception occurs, it jumps to the main code binary entrypoint (main_binary_address + 0 == '''_start'''). | |||
During normal boot '''_start''' is invoked with X0=0 and X1=main_thread_handle (triggering normal crt0 setup). | |||
During an usermode exception '''_start''' is invoked with X0=exception_info0_ptr and X1=exception_info1_ptr instead. | |||
The '''_start''' method determines whether to boot normally or handle an exception if X0 is set to 0 or not. |