l4linux2.4 System Call Emulation question
Adam Lackorzynski
adam at os.inf.tu-dresden.de
Tue Jun 7 08:48:12 CEST 2005
On Mon Jun 06, 2005 at 15:05:44 -0400, Andrew Davenport wrote:
> where in l4 does an exception (int 0x80) get trapped and turned into an
> appropriate l4 ipc and sent to l4linux? for instance:
>
> if (from an l4linux program), i do a system call like this (in assembly)
>
>
> mov bx, 0x20
> mov ax, 0x10
> int 0x80
>
> where will i see 0x10 and 0x20 (the syscall parameters) inside the l4 IPC ??
Depending on the mechanism used, one will either see it in a thing
called UTCB in the exception handler (l4linux2.6 or l4linux-2.4-x2), or
in a data structure shared between the Linux server and the Linux
process (l4linux-2.4-v2, l4linux-2.2). In the latter case some emulation
code in the address space of the process is called when an exception
(int $0x80) happens. This code saves all state in the shared data
structure and sends an IPC to the Linux server. The Linux server can
then extract the register values from the shared data structure. After
replying to the IPC the emulation code restores the (new) state and
continues after the exception.
Adam
--
Adam adam at os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
More information about the l4-hackers
mailing list