version 1.67, 2008/03/11 02:24:43 |
version 1.68, 2008/04/27 22:40:09 |
Line 816 NENTRY(lgdt_finish) |
|
Line 816 NENTRY(lgdt_finish) |
|
* NOTE: This function does not have a normal calling sequence! |
* NOTE: This function does not have a normal calling sequence! |
*/ |
*/ |
NENTRY(lwp_trampoline) |
NENTRY(lwp_trampoline) |
pushl %ebp |
movl %ebp,%edi /* for .Lsyscall_checkast */ |
xorl %ebp,%ebp |
xorl %ebp,%ebp |
|
pushl %edi |
pushl %eax |
pushl %eax |
call _C_LABEL(lwp_startup) |
call _C_LABEL(lwp_startup) |
addl $8,%esp |
addl $8,%esp |
pushl %ebx |
pushl %ebx |
call *%esi |
call *%esi |
addl $4,%esp |
addl $4,%esp |
DO_DEFERRED_SWITCH |
jmp .Lsyscall_checkast |
INTRFASTEXIT |
|
/* NOTREACHED */ |
/* NOTREACHED */ |
|
|
/* |
/* |
Line 1070 IDTVEC(syscall) |
|
Line 1070 IDTVEC(syscall) |
|
syscall1: |
syscall1: |
pushl $T_ASTFLT # trap # for doing ASTs |
pushl $T_ASTFLT # trap # for doing ASTs |
INTRENTRY |
INTRENTRY |
|
|
#ifdef DIAGNOSTIC |
#ifdef DIAGNOSTIC |
cmpl $0, CPUVAR(WANT_PMAPLOAD) |
|
jz 1f |
|
pushl $6f |
|
call _C_LABEL(printf) |
|
addl $4, %esp |
|
1: |
|
movl CPUVAR(ILEVEL),%ebx |
movl CPUVAR(ILEVEL),%ebx |
testl %ebx,%ebx |
testl %ebx,%ebx |
jz 1f |
jz 1f |
|
|
#endif |
#endif |
1: |
1: |
#endif /* DIAGNOSTIC */ |
#endif /* DIAGNOSTIC */ |
movl CPUVAR(CURLWP),%edx |
|
incl CPUVAR(NSYSCALL) # count it atomically |
incl CPUVAR(NSYSCALL) # count it atomically |
movl %esp,L_MD_REGS(%edx) # save pointer to frame |
movl CPUVAR(CURLWP),%edi |
movl L_PROC(%edx),%edx |
movl L_PROC(%edi),%edx |
|
movl %esp,L_MD_REGS(%edi) # save pointer to frame |
pushl %esp |
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 |
addl $4,%esp |
.Lsyscall_checkast: |
.Lsyscall_checkast: |
/* Check for ASTs on exit to user mode. */ |
/* Check for ASTs on exit to user mode. */ |
CLI(%eax) |
CLI(%eax) |
CHECK_ASTPENDING(%eax) |
movl L_MD_ASTPENDING(%edi), %eax |
je 1f |
orl CPUVAR(WANT_PMAPLOAD), %eax |
/* Always returning to user mode here. */ |
|
CLEAR_ASTPENDING(%eax) |
|
STI(%eax) |
|
/* Pushed T_ASTFLT into tf_trapno on entry. */ |
|
pushl %esp |
|
call _C_LABEL(trap) |
|
addl $4,%esp |
|
jmp .Lsyscall_checkast /* re-check ASTs */ |
|
1: CHECK_DEFERRED_SWITCH |
|
jnz 9f |
jnz 9f |
#ifdef XEN |
#ifdef XEN |
STIC(%eax) |
STIC(%eax) |
|
|
jmp .Lsyscall_checkast |
jmp .Lsyscall_checkast |
4: .asciz "WARNING: SPL NOT LOWERED ON SYSCALL EXIT\n" |
4: .asciz "WARNING: SPL NOT LOWERED ON SYSCALL EXIT\n" |
5: .asciz "WARNING: SPL NOT ZERO ON SYSCALL ENTRY\n" |
5: .asciz "WARNING: SPL NOT ZERO ON SYSCALL ENTRY\n" |
6: .asciz "WARNING: WANT PMAPLOAD ON SYSCALL ENTRY\n" |
|
#endif /* DIAGNOSTIC */ |
#endif /* DIAGNOSTIC */ |
9: STI(%eax) |
9: |
|
cmpl $0, CPUVAR(WANT_PMAPLOAD) |
|
jz 10f |
|
STI(%eax) |
call _C_LABEL(pmap_load) |
call _C_LABEL(pmap_load) |
jmp .Lsyscall_checkast /* re-check ASTs */ |
jmp .Lsyscall_checkast /* re-check ASTs */ |
|
10: |
|
/* Always returning to user mode here. */ |
|
movl $0, L_MD_ASTPENDING(%edi) |
|
STI(%eax) |
|
/* Pushed T_ASTFLT into tf_trapno on entry. */ |
|
pushl %esp |
|
call _C_LABEL(trap) |
|
addl $4,%esp |
|
jmp .Lsyscall_checkast /* re-check ASTs */ |
|
|
#if NNPX > 0 |
#if NNPX > 0 |
/* |
/* |