[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.120 and 1.121

version 1.120, 2016/05/14 08:39:41 version 1.121, 2016/05/14 08:49:16
Line 684  no_NOX:
Line 684  no_NOX:
          */           */
         leal    (PROC0_PTP1_OFF)(%esi),%ebx          leal    (PROC0_PTP1_OFF)(%esi),%ebx
   
         /* Compute &__rodata_start - KERNBASE. */  
         movl    $RELOC(__rodata_start),%edx  
         andl    $~PGOFSET,%edx  
   
         /* Skip the first MB. */          /* Skip the first MB. */
         movl    $(KERNTEXTOFF - KERNBASE),%eax          movl    $(KERNTEXTOFF - KERNBASE),%eax
         movl    %eax,%ecx          movl    %eax,%ecx
Line 697  no_NOX:
Line 693  no_NOX:
 #endif  #endif
         addl    %ecx,%ebx          addl    %ecx,%ebx
   
         /* Map the kernel text read-only. */          /* Map the kernel text RX. */
         movl    %edx,%ecx          movl    $RELOC(__rodata_start),%ecx
         subl    %eax,%ecx          subl    %eax,%ecx
         shrl    $PGSHIFT,%ecx          shrl    $PGSHIFT,%ecx
         orl     $(PG_V|PG_KR),%eax          orl     $(PG_V|PG_KR),%eax
         fillkpt          fillkpt
   
         /* Map the data, BSS, and bootstrap tables read-write. */          /* Map the kernel rodata R. */
         leal    (PG_V|PG_KW)(%edx),%eax          movl    $RELOC(__rodata_start),%eax
         movl    RELOC(tablesize),%ecx          movl    $RELOC(__data_start),%ecx
         addl    %esi,%ecx                       /* end of tables */          subl    %eax,%ecx
         subl    %edx,%ecx                       /* subtract end of text */          shrl    $PGSHIFT,%ecx
           orl     $(PG_V|PG_KR),%eax
           fillkpt_nox
   
           /* Map the kernel data+bss RW. */
           movl    $RELOC(__data_start),%eax
           movl    $RELOC(__kernel_end),%ecx
           subl    %eax,%ecx
         shrl    $PGSHIFT,%ecx          shrl    $PGSHIFT,%ecx
           orl     $(PG_V|PG_KW),%eax
           fillkpt_nox
   
           /*
            * We actually have to be careful here. The memory layout is as
            * follows:
            *    +----------+---------------------+------------------+
            *    | DATA+BSS < [PRELOADED MODULES] | BOOTSTRAP TABLES >
            *    +----------+---------------------+------------------+
            * We just map everything from < to > with RWX rights.
            */
           movl    $RELOC(__kernel_end),%eax
           movl    %esi,%ecx               /* start of BOOTSTRAP TABLES */
           addl    RELOC(tablesize),%ecx   /* end of BOOTSTRAP TABLES */
           subl    %eax,%ecx               /* subtract end of kernel image */
           shrl    $PGSHIFT,%ecx
           orl     $(PG_V|PG_KW),%eax
         fillkpt          fillkpt
   
         /* Map ISA I/O mem (later atdevbase) */          /* Map ISA I/O mem (later atdevbase) */

Legend:
Removed from v.1.120  
changed lines
  Added in v.1.121

CVSweb <webmaster@jp.NetBSD.org>