[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.40.2.1 and 1.43.4.9

version 1.40.2.1, 2006/07/13 17:48:53 version 1.43.4.9, 2007/01/30 11:45:27
Line 215  start: movw $0x1234,0x472   # warm boot
Line 215  start: movw $0x1234,0x472   # warm boot
         .align  4          .align  4
         .globl  Multiboot_Header          .globl  Multiboot_Header
 _C_LABEL(Multiboot_Header):  _C_LABEL(Multiboot_Header):
 #define MULTIBOOT_HEADER_FLAGS  (MULTIBOOT_HEADER_WANT_MEMORY | \  #define MULTIBOOT_HEADER_FLAGS  (MULTIBOOT_HEADER_WANT_MEMORY)
                                  MULTIBOOT_HEADER_HAS_ADDR)  
         .long   MULTIBOOT_HEADER_MAGIC          .long   MULTIBOOT_HEADER_MAGIC
         .long   MULTIBOOT_HEADER_FLAGS          .long   MULTIBOOT_HEADER_FLAGS
         .long   -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)          .long   -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
         .long   RELOC(Multiboot_Header)  
         .long   RELOC(start)  
         .long   RELOC(_edata)  
         .long   RELOC(_end) + MULTIBOOT_SYMTAB_SPACE  
         .long   RELOC(start)  
   
 1:  1:
         /* Check if we are being executed by a Multiboot-compliant boot          /* Check if we are being executed by a Multiboot-compliant boot
Line 232  _C_LABEL(Multiboot_Header):
Line 226  _C_LABEL(Multiboot_Header):
         cmpl    $MULTIBOOT_INFO_MAGIC,%eax          cmpl    $MULTIBOOT_INFO_MAGIC,%eax
         jne     1f          jne     1f
   
         /* Indeed, a multiboot-compliat boot loader executed us.  We copy          /*
            * Indeed, a multiboot-compliant boot loader executed us.  We copy
          * the received Multiboot information structure into kernel's data           * the received Multiboot information structure into kernel's data
          * space to process it later -- after we are relocated.  It will           * space to process it later -- after we are relocated.  It will
          * be safer to run complex C code than doing it at this point. */           * be safer to run complex C code than doing it at this point.
            */
         pushl   %ebx            # Address of Multiboot information          pushl   %ebx            # Address of Multiboot information
         call    _C_LABEL(multiboot_pre_reloc)          call    _C_LABEL(multiboot_pre_reloc)
         addl    $4,%esp          addl    $4,%esp
Line 724  NENTRY(lgdt)
Line 720  NENTRY(lgdt)
         pushl   %eax          pushl   %eax
         lret          lret
   
   NENTRY(x86_flush)
           /* Reload code selector by doing intersegment return. */
           popl    %eax
           pushl   $GSEL(GCODE_SEL, SEL_KPL)
           pushl   %eax
           lret
   
 /*****************************************************************************/  /*****************************************************************************/
   
 /*  /*
Line 883  ENTRY(cpu_switch)
Line 886  ENTRY(cpu_switch)
         xorl    %esi,%esi          xorl    %esi,%esi
         sti          sti
 idle_unlock:  idle_unlock:
 #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)  
         call    _C_LABEL(sched_unlock_idle)          call    _C_LABEL(sched_unlock_idle)
 #endif  
         /* Interrupts are okay again. */          /* Interrupts are okay again. */
         pushl   $IPL_NONE               # spl0()          pushl   $IPL_NONE               # spl0()
         call    _C_LABEL(Xspllower)     # process pending interrupts          call    _C_LABEL(Xspllower)     # process pending interrupts
Line 912  idle_start:
Line 913  idle_start:
 idle_exit:  idle_exit:
         movl    $IPL_HIGH,CPUVAR(ILEVEL)                # splhigh          movl    $IPL_HIGH,CPUVAR(ILEVEL)                # splhigh
         sti          sti
 #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)  
         call    _C_LABEL(sched_lock_idle)          call    _C_LABEL(sched_lock_idle)
 #endif  
         movl    _C_LABEL(sched_whichqs),%ecx          movl    _C_LABEL(sched_whichqs),%ecx
         bsfl    %ecx,%ebx          bsfl    %ecx,%ebx
         jz      idle_unlock          jz      idle_unlock
Line 1066  switch_restored:
Line 1065  switch_restored:
         movl    $1,%ebx          movl    $1,%ebx
   
 switch_return:  switch_return:
 #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)  
         call    _C_LABEL(sched_unlock_idle)          call    _C_LABEL(sched_unlock_idle)
 #endif  
         cmpl    $0,CPUVAR(IPENDING)          cmpl    $0,CPUVAR(IPENDING)
         jz      3f          jz      3f
         pushl   $IPL_NONE               # spl0()          pushl   $IPL_NONE               # spl0()
Line 1159  ENTRY(cpu_exit)
Line 1156  ENTRY(cpu_exit)
         movl    CPUVAR(IDLE_PCB),%esi          movl    CPUVAR(IDLE_PCB),%esi
         movl    CPUVAR(IDLE_TSS_SEL),%edx          movl    CPUVAR(IDLE_TSS_SEL),%edx
 #endif  #endif
         /* In case we fault... */  
         movl    $0,CPUVAR(CURLWP)  
   
         /* Restore the idle context. */          /* Restore the idle context. */
         cli          cli
Line 1191  ENTRY(cpu_exit)
Line 1186  ENTRY(cpu_exit)
         /* Record new pcb. */          /* Record new pcb. */
         SET_CURPCB(%esi)          SET_CURPCB(%esi)
   
           /* Now off the CPU. */
           movl    $0,CPUVAR(CURLWP)
   
         /* Interrupts are okay again. */          /* Interrupts are okay again. */
         sti          sti
   
         /*  
          * Schedule the dead LWP's stack to be freed.  
          */  
         pushl   %edi  
         call    _C_LABEL(lwp_exit2)  
         addl    $4,%esp  
   
         /* Jump into cpu_switch() with the right state. */          /* Jump into cpu_switch() with the right state. */
         xorl    %esi,%esi          xorl    %esi,%esi
         movl    %esi,CPUVAR(CURLWP)  
         jmp     idle_start          jmp     idle_start
   
 /*  /*

Legend:
Removed from v.1.40.2.1  
changed lines
  Added in v.1.43.4.9

CVSweb <webmaster@jp.NetBSD.org>