Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/i386/i386/locore.S,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/i386/i386/locore.S,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.139 retrieving revision 1.145.6.1 diff -u -p -r1.139 -r1.145.6.1 --- src/sys/arch/i386/i386/locore.S 2016/11/11 11:00:38 1.139 +++ src/sys/arch/i386/i386/locore.S 2017/07/05 19:59:29 1.145.6.1 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.139 2016/11/11 11:00:38 maxv Exp $ */ +/* $NetBSD: locore.S,v 1.145.6.1 2017/07/05 19:59:29 snj Exp $ */ /* * Copyright-o-rama! @@ -128,7 +128,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.139 2016/11/11 11:00:38 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.145.6.1 2017/07/05 19:59:29 snj Exp $"); #include "opt_compat_oldboot.h" #include "opt_copy_symtab.h" @@ -270,16 +270,6 @@ __KERNEL_RCSID(0, "$NetBSD: locore.S,v 1 */ .data -#if NLAPIC > 0 - .align PAGE_SIZE - .globl _C_LABEL(local_apic) - - .type _C_LABEL(local_apic), @object -LABEL(local_apic) - .space PAGE_SIZE -END(local_apic) -#endif - .globl _C_LABEL(tablesize) .globl _C_LABEL(nox_flag) .globl _C_LABEL(cputype) @@ -611,7 +601,7 @@ no_NOX: */ /* Find end of kernel image; brings us on (1). */ - movl $RELOC(end),%edi + movl $RELOC(__kernel_end),%edi #if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(makeoptions_COPY_SYMTAB) /* Save the symbols (if loaded); brinds us on (2). */ @@ -643,7 +633,7 @@ no_NOX: incl %eax /* one more PTP for VAs stolen by bootstrap */ 1: movl %eax,RELOC(nkptp)+1*4 - /* tablesize = (PDP_SIZE + UPAGES + nkptp) << PGSHIFT; */ + /* tablesize = (PDP_SIZE + UPAGES + nkptp[1]) << PGSHIFT; */ addl $(PDP_SIZE+UPAGES),%eax #ifdef PAE incl %eax /* one more page for L3 */ @@ -653,7 +643,8 @@ no_NOX: #endif movl %eax,RELOC(tablesize) - /* Ensure that nkptp covers BOOTSTRAP TABLES. */ + /* Ensure that nkptp[1] covers BOOTSTRAP TABLES, ie: + * (esi + tablesize) >> L2_SHIFT + 1 < nkptp[1] */ addl %esi,%eax addl $~L2_FRAME,%eax shrl $L2_SHIFT,%eax @@ -680,7 +671,7 @@ no_NOX: */ leal (PROC0_PTP1_OFF)(%esi),%ebx - /* Skip the first MB. */ + /* Skip the area below the kernel text. */ movl $(KERNTEXTOFF - KERNBASE),%ecx shrl $PGSHIFT,%ecx fillkpt_blank @@ -917,10 +908,10 @@ begin: call _C_LABEL(initgdt) addl $4,%esp - call xen_pmap_bootstrap + call xen_locore /* - * The first VA available is returned by xen_pmap_bootstrap in %eax. We + * The first VA available is returned by xen_locore in %eax. We * use it as the UAREA, and set up the stack here. */ movl %eax,%esi @@ -928,8 +919,8 @@ begin: leal (USPACE-FRAMESIZE)(%eax),%esp xorl %ebp,%ebp /* mark end of frames */ - /* Set first_avail after the UAREA. */ - addl $USPACE,%esi + /* Set first_avail after the DUMMY PAGE (see xen_locore). */ + addl $(USPACE+PAGE_SIZE),%esi subl $KERNBASE,%esi /* init386 wants a physical address */ #ifdef PAE @@ -1248,30 +1239,12 @@ ENTRY(savectx) END(savectx) /* - * osyscall() - * - * Old call gate entry for syscall - */ -IDTVEC(osyscall) -#ifndef XEN - /* XXX we are in trouble! interrupts be off here. */ - cli /* must be first instruction */ -#endif - pushfl /* set eflags in trap frame */ - popl 8(%esp) - orl $PSL_I,8(%esp) /* re-enable ints on return to user */ - pushl $7 /* size of instruction for restart */ - jmp syscall1 -IDTVEC_END(osyscall) - -/* * syscall() * * Trap gate entry for syscall */ IDTVEC(syscall) pushl $2 /* size of instruction for restart */ -syscall1: pushl $T_ASTFLT /* trap # for doing ASTs */ INTRENTRY STI(%eax)