Gennady Sharapov | 4abfbf4 | 2006-01-18 17:42:44 -0800 | [diff] [blame^] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
| 3 | * Licensed under the GPL |
| 4 | */ |
| 5 | |
| 6 | #ifndef __SKAS_H |
| 7 | #define __SKAS_H |
| 8 | |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 9 | #include "mm_id.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #include "sysdep/ptrace.h" |
| 11 | |
| 12 | extern int userspace_pid[]; |
Bodo Stroesser | 858259c | 2005-11-07 00:58:55 -0800 | [diff] [blame] | 13 | extern int proc_mm, ptrace_faultinfo, ptrace_ldt; |
| 14 | extern int skas_needs_stub; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
| 16 | extern void switch_threads(void *me, void *next); |
| 17 | extern void thread_wait(void *sw, void *fb); |
| 18 | extern void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, |
Gennady Sharapov | 4abfbf4 | 2006-01-18 17:42:44 -0800 | [diff] [blame^] | 19 | void (*handler)(int)); |
| 20 | extern int start_idle_thread(void *stack, void *switch_buf_ptr, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | void **fork_buf_ptr); |
| 22 | extern int user_thread(unsigned long stack, int flags); |
| 23 | extern void userspace(union uml_pt_regs *regs); |
| 24 | extern void new_thread_proc(void *stack, void (*handler)(int sig)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | extern void new_thread_handler(int sig); |
| 26 | extern void handle_syscall(union uml_pt_regs *regs); |
Bodo Stroesser | 07bf731 | 2005-09-03 15:57:50 -0700 | [diff] [blame] | 27 | extern int map(struct mm_id * mm_idp, unsigned long virt, |
| 28 | unsigned long len, int r, int w, int x, int phys_fd, |
| 29 | unsigned long long offset, int done, void **data); |
| 30 | extern int unmap(struct mm_id * mm_idp, void *addr, unsigned long len, |
| 31 | int done, void **data); |
| 32 | extern int protect(struct mm_id * mm_idp, unsigned long addr, |
| 33 | unsigned long len, int r, int w, int x, int done, |
| 34 | void **data); |
Bodo Stroesser | c578455 | 2005-05-05 16:15:31 -0700 | [diff] [blame] | 35 | extern void user_signal(int sig, union uml_pt_regs *regs, int pid); |
Bodo Stroesser | 12919aa | 2006-01-18 17:42:39 -0800 | [diff] [blame] | 36 | extern int new_mm(unsigned long stack); |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 37 | extern int start_userspace(unsigned long stub_stack); |
Bodo Stroesser | 9786a8f | 2005-07-07 17:56:50 -0700 | [diff] [blame] | 38 | extern int copy_context_skas0(unsigned long stack, int pid); |
Bodo Stroesser | c578455 | 2005-05-05 16:15:31 -0700 | [diff] [blame] | 39 | extern void get_skas_faultinfo(int pid, struct faultinfo * fi); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | extern long execute_syscall_skas(void *r); |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 41 | extern unsigned long current_stub_stack(void); |
Bodo Stroesser | 07bf731 | 2005-09-03 15:57:50 -0700 | [diff] [blame] | 42 | extern long run_syscall_stub(struct mm_id * mm_idp, |
Gennady Sharapov | 4abfbf4 | 2006-01-18 17:42:44 -0800 | [diff] [blame^] | 43 | int syscall, unsigned long *args, long expected, |
| 44 | void **addr, int done); |
Bodo Stroesser | 07bf731 | 2005-09-03 15:57:50 -0700 | [diff] [blame] | 45 | extern long syscall_stub_data(struct mm_id * mm_idp, |
Gennady Sharapov | 4abfbf4 | 2006-01-18 17:42:44 -0800 | [diff] [blame^] | 46 | unsigned long *data, int data_count, |
| 47 | void **addr, void **stub_addr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | |
| 49 | #endif |