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.141 retrieving revision 1.144 diff -u -p -r1.141 -r1.144 --- src/sys/arch/i386/i386/locore.S 2016/11/25 14:12:55 1.141 +++ src/sys/arch/i386/i386/locore.S 2017/01/06 08:36:56 1.144 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.141 2016/11/25 14:12:55 maxv Exp $ */ +/* $NetBSD: locore.S,v 1.144 2017/01/06 08:36:56 maxv Exp $ */ /* * Copyright-o-rama! @@ -128,7 +128,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.141 2016/11/25 14:12:55 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.144 2017/01/06 08:36:56 maxv Exp $"); #include "opt_compat_oldboot.h" #include "opt_copy_symtab.h" @@ -601,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). */ @@ -633,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 */ @@ -643,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 @@ -918,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