[okl4-developer] KernelInterface syscall on ia32

Harry Vennik htvennik at zonnet.nl
Tue Feb 12 08:18:58 EST 2008


Hi,

I wonder how the KernelInterface syscall actually works for ia32.

In arch/ia32/libs/l4/include/syscall.h the KernelInterface syscall  
stub is implemented as:

INLINE void *
L4_KernelInterface(L4_Word_t *ApiVersion,
                    L4_Word_t *ApiFlags, L4_Word_t *KernelId)
{
     void *base_address;

     __asm__ __volatile__("/* L4_KernelInterface()  
*/                    \n"
                          "   lock; nop                                
\n"
                          :    /* outputs */
                          "=a"(base_address),
                          "=c"(*ApiVersion), "=d"(*ApiFlags),  
"=S"(*KernelId)

                          /*
                           * no inputs
                           */
                          /*
                           * no clobbers
                           */
         );

     return base_address;
}

This looks like a 'nop' instruction is doing the work, which can't be  
true because a 'nop' does nothing...
So how do those output registers get their values?

Btw: is there an ABI doc anywhere for OKL4 on ia32? The progmanual  
only includes the ABI for ARM...

Regards,

Harry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080211/efc7bc3f/attachment.html 


More information about the Developer mailing list