[BACK]Return to locore.S CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / i386

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/i386/i386/locore.S between version 1.13 and 1.20

version 1.13, 2003/08/08 20:14:06 version 1.20, 2003/11/04 10:33:15
Line 70 
Line 70 
  *      @(#)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.
  */   */
Line 718  NENTRY(sigcode)
Line 719  NENTRY(sigcode)
         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
   #if defined(SYS_compat_16___sigreturn14)
           movl    $SYS_compat_16___sigreturn14,%eax
   #elif defined(SYS___sigreturn14)
         movl    $SYS___sigreturn14,%eax          movl    $SYS___sigreturn14,%eax
   #else
           #error "no sigreturn14 syscall"
   #endif
         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
   
 /*****************************************************************************/  /*****************************************************************************/
   
Line 1796  idle_start: 
Line 1804  idle_start: 
         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
Line 1942  switch_restored:
Line 1951  switch_restored:
  */   */
         movl    CPUVAR(CURLWP),%edi          movl    CPUVAR(CURLWP),%edi
         movl    L_PROC(%edi),%esi          movl    L_PROC(%edi),%esi
         cmpl    $0,P_NRAS(%esi)          cmpl    $0,P_RASLIST(%esi)
         je      1f          jne     2f
         movl    L_MD_REGS(%edi),%ebx  
         movl    TF_EIP(%ebx),%eax  
         pushl   %eax  
         pushl   %esi  
         call    _C_LABEL(ras_lookup)  
         addl    $8,%esp  
         cmpl    $-1,%eax  
         je      1f  
         movl    %eax,TF_EIP(%ebx)  
 1:  1:
         movl    $1,%ebx          movl    $1,%ebx
   
Line 1972  switch_return:
Line 1972  switch_return:
         popl    %ebx          popl    %ebx
         ret          ret
   
   2:                                      # check RAS list
           movl    L_MD_REGS(%edi),%ebx
           movl    TF_EIP(%ebx),%eax
           pushl   %eax
           pushl   %esi
           call    _C_LABEL(ras_lookup)
           addl    $8,%esp
           cmpl    $-1,%eax
           je      1b
           movl    %eax,TF_EIP(%ebx)
           jmp     1b
   
 /*  /*
  * void cpu_switchto(struct lwp *current, struct lwp *next)   * void cpu_switchto(struct lwp *current, struct lwp *next)
  * Switch to the specified next LWP.   * Switch to the specified next LWP.
Line 2142  syscall1:
Line 2154  syscall1:
         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)
Line 2151  syscall1:
Line 2165  syscall1:
         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

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.20

CVSweb <webmaster@jp.NetBSD.org>