[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.58.6.2 and 1.58.6.3

version 1.58.6.2, 2008/01/06 18:29:43 version 1.58.6.3, 2008/01/08 22:10:00
Line 919  ENTRY(cpu_switchto)
Line 919  ENTRY(cpu_switchto)
         testl   %edx,%edx          testl   %edx,%edx
         jnz     4f          jnz     4f
   
         /* Switch TSS.  Reset "task busy" flag before loading. */  
 #ifdef XEN  #ifdef XEN
         pushl   %ebx          pushl   %edi
         call    _C_LABEL(i386_switch_context)          call    _C_LABEL(i386_switch_context)
         addl    $4,%esp          addl    $4,%esp
 #else /* XEN */  #else /* XEN */
         movl    %cr3,%eax          /* Switch ring0 esp */
         movl    %eax,PCB_CR3(%ebx)      # for TSS gates          movl    PCB_ESP0(%ebx),%eax
         movl    CPUVAR(GDT),%ecx          movl    %eax,CPUVAR(ESP0)
         movl    L_MD_TSS_SEL(%edi),%edx  
         andl    $~0x0200,4(%ecx,%edx, 1)  
         ltr     %dx  
   
         /* Don't bother with the rest if switching to a system process. */          /* Don't bother with the rest if switching to a system process. */
         testl   $LW_SYSTEM,L_FLAG(%edi)          testl   $LW_SYSTEM,L_FLAG(%edi)
         jnz     4f          jnz     4f
   
         /* Restore thread-private %fs/%gs descriptors. */          /* Restore thread-private %fs/%gs descriptors. */
           movl    CPUVAR(GDT),%ecx
         movl    PCB_FSD(%ebx), %eax          movl    PCB_FSD(%ebx), %eax
         movl    PCB_FSD+4(%ebx), %edx          movl    PCB_FSD+4(%ebx), %edx
         movl    %eax, (GUFS_SEL*8)(%ecx)          movl    %eax, (GUFS_SEL*8)(%ecx)
Line 947  ENTRY(cpu_switchto)
Line 944  ENTRY(cpu_switchto)
         movl    %edx, (GUGS_SEL*8+4)(%ecx)          movl    %edx, (GUGS_SEL*8+4)(%ecx)
 #endif /* XEN */  #endif /* XEN */
   
           /* Switch I/O bitmap */
           movl    PCB_IOMAP(%ebx),%eax
           orl     %eax,%eax
           jnz,pn  .Lcopy_iobitmap
           movl    $(IOMAP_INVALOFF << 16),CPUVAR(IOBASE)
   .Liobitmap_done:
   
         /* Is this process using RAS (restartable atomic sequences)? */          /* Is this process using RAS (restartable atomic sequences)? */
         movl    L_PROC(%edi),%eax          movl    L_PROC(%edi),%eax
         cmpl    $0,P_RASLIST(%eax)          cmpl    $0,P_RASLIST(%eax)
Line 997  ENTRY(cpu_switchto)
Line 1001  ENTRY(cpu_switchto)
         movl    %eax,TF_EIP(%ecx)          movl    %eax,TF_EIP(%ecx)
         jmp     2b          jmp     2b
   
   .Lcopy_iobitmap:
           /* Copy I/O bitmap. */
           movl    $(IOMAPSIZE/4),%ecx
           pushl   %esi
           pushl   %edi
           movl    %eax,%esi               /* pcb_iomap */
           movl    CPUVAR(SELF),%edi
           leal    CPU_INFO_IOMAP(%edi),%edi
           rep
           movsl
           popl    %edi
           popl    %esi
           movl    $((CPU_INFO_IOMAP - CPU_INFO_TSS) << 16),CPUVAR(IOBASE)
           jmp     .Liobitmap_done
   
 /*  /*
  * void savectx(struct pcb *pcb);   * void savectx(struct pcb *pcb);
  *   *

Legend:
Removed from v.1.58.6.2  
changed lines
  Added in v.1.58.6.3

CVSweb <webmaster@jp.NetBSD.org>