version 1.13, 2003/08/08 20:14:06 |
version 1.18, 2003/09/12 12:39:59 |
|
|
* @(#)locore.s 7.3 (Berkeley) 5/13/91 |
* @(#)locore.s 7.3 (Berkeley) 5/13/91 |
*/ |
*/ |
|
|
|
#include "opt_compat_netbsd.h" |
|
#include "opt_compat_oldboot.h" |
#include "opt_cputype.h" |
#include "opt_cputype.h" |
#include "opt_ddb.h" |
#include "opt_ddb.h" |
#include "opt_ipkdb.h" |
|
#include "opt_vm86.h" |
|
#include "opt_user_ldt.h" |
|
#include "opt_dummy_nops.h" |
#include "opt_dummy_nops.h" |
#include "opt_compat_oldboot.h" |
#include "opt_ipkdb.h" |
#include "opt_multiprocessor.h" |
|
#include "opt_lockdebug.h" |
#include "opt_lockdebug.h" |
|
#include "opt_multiprocessor.h" |
#include "opt_realmem.h" |
#include "opt_realmem.h" |
|
#include "opt_user_ldt.h" |
|
#include "opt_vm86.h" |
|
|
#include "npx.h" |
#include "npx.h" |
#include "assym.h" |
#include "assym.h" |
Line 705 NENTRY(proc_trampoline) |
|
Line 706 NENTRY(proc_trampoline) |
|
/* NOTREACHED */ |
/* NOTREACHED */ |
|
|
/*****************************************************************************/ |
/*****************************************************************************/ |
|
#ifdef COMPAT_16 |
/* |
/* |
* Signal trampoline; copied to top of user stack. |
* Signal trampoline; copied to top of user stack. |
*/ |
*/ |
|
|
leal 12(%esp),%eax # get pointer to sigcontext |
leal 12(%esp),%eax # get pointer to sigcontext |
movl %eax,4(%esp) # put it in the argument slot |
movl %eax,4(%esp) # put it in the argument slot |
# fake return address already there |
# fake return address already there |
movl $SYS___sigreturn14,%eax |
movl $SYS_compat_16___sigreturn14,%eax |
int $0x80 # enter kernel with args on stack |
int $0x80 # enter kernel with args on stack |
movl $SYS_exit,%eax |
movl $SYS_exit,%eax |
int $0x80 # exit if sigreturn fails |
int $0x80 # exit if sigreturn fails |
.globl _C_LABEL(esigcode) |
.globl _C_LABEL(esigcode) |
_C_LABEL(esigcode): |
_C_LABEL(esigcode): |
|
#endif |
|
|
/*****************************************************************************/ |
/*****************************************************************************/ |
|
|
|
|
jz idle_loop |
jz idle_loop |
idle_exit: |
idle_exit: |
movl $IPL_HIGH,CPUVAR(ILEVEL) # splhigh |
movl $IPL_HIGH,CPUVAR(ILEVEL) # splhigh |
|
sti |
#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) |
#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) |
call _C_LABEL(sched_lock_idle) |
call _C_LABEL(sched_lock_idle) |
#endif |
#endif |
|
|
movl CPUVAR(CURLWP),%edx |
movl CPUVAR(CURLWP),%edx |
movl %esp,L_MD_REGS(%edx) # save pointer to frame |
movl %esp,L_MD_REGS(%edx) # save pointer to frame |
movl L_PROC(%edx),%edx |
movl L_PROC(%edx),%edx |
|
pushl %esp |
call *P_MD_SYSCALL(%edx) # get pointer to syscall() function |
call *P_MD_SYSCALL(%edx) # get pointer to syscall() function |
|
addl $4,%esp |
2: /* Check for ASTs on exit to user mode. */ |
2: /* Check for ASTs on exit to user mode. */ |
cli |
cli |
CHECK_ASTPENDING(%eax) |
CHECK_ASTPENDING(%eax) |
|
|
CLEAR_ASTPENDING(%eax) |
CLEAR_ASTPENDING(%eax) |
sti |
sti |
/* Pushed T_ASTFLT into tf_trapno on entry. */ |
/* Pushed T_ASTFLT into tf_trapno on entry. */ |
|
pushl %esp |
call _C_LABEL(trap) |
call _C_LABEL(trap) |
|
addl $4,%esp |
jmp 2b |
jmp 2b |
#ifndef DIAGNOSTIC |
#ifndef DIAGNOSTIC |
1: INTRFASTEXIT |
1: INTRFASTEXIT |