diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:20:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:20:36 -0700 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/sparc/kernel/sunos_asm.S |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/sparc/kernel/sunos_asm.S')
-rw-r--r-- | arch/sparc/kernel/sunos_asm.S | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/arch/sparc/kernel/sunos_asm.S b/arch/sparc/kernel/sunos_asm.S new file mode 100644 index 00000000000..07fe86014fb --- /dev/null +++ b/arch/sparc/kernel/sunos_asm.S @@ -0,0 +1,67 @@ +/* $Id: sunos_asm.S,v 1.15 2000/01/11 17:33:21 jj Exp $ + * sunos_asm.S: SunOS system calls which must have a low-level + * entry point to operate correctly. + * + * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * + * Based upon preliminary work which is: + * + * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) + */ + +#include <asm/ptrace.h> + + .text + .align 4 + + /* When calling ret_sys_call, %o0 should contain the same + * value as in [%sp + STACKFRAME_SZ + PT_I0] */ + + /* SunOS getpid() returns pid in %o0 and ppid in %o1 */ + .globl sunos_getpid +sunos_getpid: + call sys_getppid + nop + + call sys_getpid + st %o0, [%sp + STACKFRAME_SZ + PT_I1] + + b ret_sys_call + st %o0, [%sp + STACKFRAME_SZ + PT_I0] + + /* SunOS getuid() returns uid in %o0 and euid in %o1 */ + .globl sunos_getuid +sunos_getuid: + call sys_geteuid16 + nop + + call sys_getuid16 + st %o0, [%sp + STACKFRAME_SZ + PT_I1] + + b ret_sys_call + st %o0, [%sp + STACKFRAME_SZ + PT_I0] + + /* SunOS getgid() returns gid in %o0 and egid in %o1 */ + .globl sunos_getgid +sunos_getgid: + call sys_getegid16 + nop + + call sys_getgid16 + st %o0, [%sp + STACKFRAME_SZ + PT_I1] + + b ret_sys_call + st %o0, [%sp + STACKFRAME_SZ + PT_I0] + + /* SunOS's execv() call only specifies the argv argument, the + * environment settings are the same as the calling processes. + */ + .globl sunos_execv +sunos_execv: + st %g0, [%sp + STACKFRAME_SZ + PT_I2] + + call sparc_execve + add %sp, STACKFRAME_SZ, %o0 + + b ret_sys_call + ld [%sp + STACKFRAME_SZ + PT_I0], %o0 |