[okl4-developer] new Wombat syscall and others

Jorge Torres jorge.torres.maldonado at gmail.com
Wed Jun 20 01:00:30 EST 2007


Hi okl4.org,

About adding syscalls to the base ABI:
On 6/12/07, Carl van Schaik <carl at ok-labs.com> wrote:

> Alternatively, you can add extra syscalls to the base ABI. The base ABI
> depends on the architecture, eg ARM L4 uses ARM compatible syscalls.

I decided to add a new syscall to the base ABI, to test a proxy by syscall,
not by module. I compiled and it all went OK, but when I try to call it from
a Wombat's user application  I get:
----------------
/home/jetorres/cool/okl4_release_1.4.1.1/linux/apps/busybox/coreutils/yes.c:57:
error: `__NR_testcall_register' undeclared (first use in this function)
/home/jetorres/cool/okl4_release_1.4.1.1/linux/apps/busybox/coreutils/yes.c:57:
error: (Each undeclared identifier is reported only once
/home/jetorres/cool/okl4_release_1.4.1.1/linux/apps/busybox/coreutils/yes.c:57:
error: for each function it appears in.)
make[1]: ***
-----------------
Im trying to call it with:
syscall(__NR_testcall_register,0,0,0);
and headers #include <unistd.h>, #include <sys/syscall.h>
I've also tried with syscall(SYS_testcall_register,0,0,0); or
syscall(testcall_register,0,0,0); or
_syscall3(int,testcall_register,int,0,int,0,int,0);

But I get the same error,  Does somebody knows why is that?

Extra information:
To add the syscall I've modified:

linux/kernel/include/linux/syscalls.h:
+ asmlinkage long sys_testcall_register(int , int , int);

linux/kernel/include/asm-l4/syscalls.h:
+ #define    __L4_sys_testcall_register    226
* #define __L4_sys_main_end    227

linux/kernel/arch/l4/sys-i386/syscalls.c:
+ [__NR_testcall_register    - __NR_Linux] = { __L4_sys_testcall_register },

linux/kernel/arch/l4/kernel/syscalls.c:
+ extern l4_syscall_handler_t    sys_testcall_register;
+ [__L4_sys_testcall_register    ]   = { sys_testcall_register,    {{ .args
= 3, .flags = 0, .ret_type = L4_RET_TYPE_LONG }} },

linux/kernel/include/asm-386/unistd.h:
+ #define __NR_testcall_register    289
* #define NR_syscalls 290

linux/kernel/arch/i386/kernel/entry.S:
+    .long sys_testcall_register

linux/kernel/kernel/sched.c (just to define the syscall somewhere):
+asmlinkage long sys_testcall_register(int c, int b, int a)
+{
+   printk("called\n");
+    return 0;
+}

Thank you very much,

Jorge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20070619/d105d8d8/attachment.htm 


More information about the Developer mailing list