[okl4-developer] Adding another L4 system call
Ben Leslie
benno at ok-labs.com
Thu Sep 20 16:32:42 EST 2007
On Tue Sep 11, 2007 at 23:05:52 +0930, Peter Nguyen wrote:
>Hi,
>
>- I have not made the size of the KIP larger in trying to add the
>system call as I have replaced one of the existing kip elements. In
>this case, i replaced an entry that was stated as being unused in the
>block of declarations for the system calls.
This should be fine.
>- I'm also doing this assuming that the system calls can actually be
>used directly in iguana ie. if i, for instance, add a threadcontrol
>call in the naming example, i was thinking that this should be fine
>(obviously it's better to use the iguana functionality for creating
>threads). Of course, i am bound to be incorrect on this so
>clarification on this would be great.
I'm not quite sure what you mean here. You probably want to add
a new system call rather than modifying ThreadControl.
>At this point, i have a couple of questions, mainly in reference to
>certain parts of the code:
>
>- In syscalls.h (libs/l4/arch/ia32/include/syscalls.h), the asm for
>these system calls have this common pattern:
>
> __asm__(
> "mov $8, %%eax\n"
> "int $0x30\n" -> I'm assuming here that this represents
>a jump to the given system call.
> : : :"eax");
>
>Although the value after '$' is different for all the system calls.
>What is the purpose of (what seems to be) moving the immediate value
>to the given register?
This is how the particular system call identified when the kernel.
>- The code above is common in the system call implementation in the
>#ifdef in relation to a certain mode (X86_64_COMPATIBILITY_MODE).
>What the difference between the code within the #ifdef and the
>"standard" code ie. the implementation in the #else component?
The else component uses the KIP syscall mechanism to call the kernel.
Here, rather than the kernel entry being directly coded in the stubs,
it is provided by the kernel in the KIP code. This lets the kernel
provide the most appropriate (i.e: fastest), mechanism for entering
the kernel.
>- With regards to iguana functionality, does invoking the creation
>function via iguana ultimately invoke ThreadControl?
I'm not quite sure what you mean here.
Cheers,
Benno
More information about the Developer
mailing list