[okl4-developer] example of "System call exception "
Gernot Heiser
gernot at ok-labs.com
Wed Oct 1 15:14:27 EST 2008
>>>>> On Tue, 30 Sep 2008 11:16:09 +0100, David Given <dg at cowlark.com> said:
DG> uf65ca wrote:
>> Can someone explain a bit more about "System call exception"? what would
>> cause this kind of exception? an example would be appreciated. TIA.
DG> When a thread makes a system call, it gets halted and its pager gets
DG> sent a message that allows it to perform some action. Once finished, the
DG> pager can restart the thread, after possibly tinkering with its registers.
The exception IPC goes to the exception handler, not the pager. That's
exactly what the exception handler is there for.
A system-call exception is one that is triggered by the
(architecture-specific) system-call invocation mechanism (SWI on ARM)
in cases that aren't recognised as a valid OKL4 system call. This is
typically the case if an application binary attempts to invoke a
system call to the OS for which it was built (eg a Linux binary
running on OKL4). The kernel delivers this as an exception to the
exception handler, which can then use this to emulate the (Linux)
system call. This is how virtualization works.
See "System Call Emulation" in Part C of the OKL4 manual.
Gernot
More information about the Developer
mailing list