RE: [uClinux-dev] About system call code in arm-uclinux, Aplio version

From: Zhu, Yaozong (zyz@chinadigipro.com)
Date: Sun Jan 21 2001 - 21:24:30 EST


Hi Joe,
	To put my question in another way: can system calls( swi intructions indeed ) be called by kernel code? It seems that SWI handling code are written to service USER mode calls.  The init may run in USER mode. But clone system calls must be called from kernel mode code(in start_kernel) to make init run.

-----Original Message-----
From: owner-uclinux-dev@uClinux.org
[mailto:owner-uclinux-dev@uClinux.org]On Behalf Of Joe deBlaquiere
Sent: Sunday, January 21, 2001 11:30 PM
To: uclinux-dev@uClinux.org
Subject: Re: [uClinux-dev] About system call code in arm-uclinux, Aplio
version


I'm not entirely sure about this, but I think the answer to this is that
the kernel_thread() call creates a thread which runs as a user mode
process (using the clone call). Therefore init() is not being run in SVC
mode.

Zhu, Yaozong wrote:

> Hi all,
> 	It seems that start_kernel(init/main.c) runs in SVC mode.  And in start_kernel, kernel_thread(init, NULL, 0) is called which does two swi's .   My humble question is ,  when doing system calls from SVC mode, vector_swi(arch/armnommu/kernel/entry-armv.S) saves and restores USER mode registers, and _ret_from_sys_call does restore sp_SVC and spsr_SVC, but lr_SVC is lost, isn't this a problem,  or I am wrong?
> 
> 
> 
> 
> This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


-- 
Joe deBlaquiere
Red Hat, Inc.
307 Wynn Drive
Huntsville AL, 35805
voice : (256)-704-9200
fax   : (256)-837-3839

This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/
This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:19:27 EDT