



How to return from l.sys exception
by Unknown on Feb 20, 2004 |
Not available! | ||
Hello,
I compiled the source code with "mmap" function to assembly code. I found that the assembly code has "l.sys" (the system function call exception), To return from such exception , the assembly code should have "l.rfe". But I can't find the instruction "l.rfe". Is my concept about l.sys right ? Or the OS will give interrupt to openrisc processor to return from the system call exception ? Thank you very much ! Regards, Yu Chi Wai |
How to return from l.sys exception
by Unknown on Feb 20, 2004 |
Not available! | ||
* y_chi_wai2003@yahoo.com.hk (y_chi_wai2003@yahoo.com.hk) wrote:
Hello,
I compiled the source code with "mmap" function to assembly code. I found that the assembly code has "l.sys" (the system function call exception), To return from such exception , the assembly code should have "l.rfe". But I can't find the instruction "l.rfe". Is my concept about l.sys right ? Or the OS will give interrupt to openrisc processor to return from the system call exception ? ok it goes like this. userspace code requests system call via l.sys instruction. in linux you pass the syscall number in r11 register (which is basicaly offset in the syscall table). l.sys triggers an 0xc00 exception, layout is aprox. like this: syscall entry (0xc00) r11 is syscall number & offset into syscall table l.jal requested syscall l.nop l.j ret_from_syscall where ret_from_syscall does some linux housekeeping and then restores context and returns to userspace via l.rfe. regards, p. |
How to return from l.sys exception
by Unknown on Feb 23, 2004 |
Not available! | ||
Hi,
Thank you very much for your answer !
However, I still have one point don't understand.
Since the OS will carry out the system service, the time for service
may not predictable (such memory allocation may take a long time or
very short time). Can we just give the l.rfe instruction in syscall table
after some number of l.nop?
Regards,
Yu Chi Wai
----- Original Message -----
From: Matjaz Breskvarphoenix@o...>
To:
Date: Fri Feb 20 14:47:28 CET 2004
Subject: [openrisc] How to return from l.sys exception
* y_chi_wai2003@y... (y_chi_wai2003@y...) wrote:
> Hello,
> I compiled the source code with "mmap" function to assembly code. I
> found that the assembly code has "l.sys" (the system
function call
> exception), To return from such exception , the assembly code
should
> have "l.rfe". But I can't find the instruction
"l.rfe".
>
> Is my concept about l.sys right ? Or the OS will give interrupt to
> openrisc processor to return from the system call exception ?
ok it goes like this. userspace code requests system call via l.sys instruction. in linux you pass the syscall number in r11 register (which is basicaly offset in the syscall table). l.sys triggers an 0xc00 exception, layout is aprox. like this: syscall entry (0xc00) r11 is syscall number & offset into syscall table l.jal requested syscall l.nop l.j ret_from_syscall where ret_from_syscall does some linux housekeeping and then restores context and returns to userspace via l.rfe. regards, p. |



