Hi Wim, Wim Vandamme wrote:
I'm rather new to uclinux, but I'm currently working on a port to a custom arm based board. uclinux is alread booting, but the /bin/init process fails. I have tracked the problem down to vfork.If you take a look at the following file: file: uClinux-dist/uClibc/libc/sysdeps/linux/arm/vfork.S ... vfork: #ifdef __NR_vfork swi __NR_vfork cmn r0, #4096 movcc pc, lr /* Check if vfork even exists. */ ldr r1, =-ENOSYS teq r0, r1 bne __syscall_error #endif ... When vfork() is called, I'm still in SVC mode. This means that the call to swi, will overwrite "lr" and this make the "movcc pc, lr" instruction fail. If I was in USR mode, the above code would be ok, because "lr" is banked. Question: Is this a bug? Or should I always call vfork() in USR mode. If this is the case, then were would be a good place to change from SVC to USR in uclinux bootup. I tried to look at other ports, but did not find any switch to USR mode during boot. Maybe I overlooked it.
This particular code, in uClibc, can only be called from user space. You can call system calls within the kernel, but you won't be using the uClibc linkage code above in that case. Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Dude EMAIL: [EMAIL PROTECTED] Secure Computing Corporation PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
