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.95.10.3 retrieving revision 1.99 diff -u -p -r1.95.10.3 -r1.99 --- src/sys/arch/i386/i386/locore.S 2012/10/31 17:19:49 1.95.10.3 +++ src/sys/arch/i386/i386/locore.S 2012/04/19 18:07:05 1.99 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.95.10.3 2012/10/31 17:19:49 riz Exp $ */ +/* $NetBSD: locore.S,v 1.99 2012/04/19 18:07:05 jym Exp $ */ /* * Copyright-o-rama! @@ -129,7 +129,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.95.10.3 2012/10/31 17:19:49 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.99 2012/04/19 18:07:05 jym Exp $"); #include "opt_compat_oldboot.h" #include "opt_ddb.h" @@ -238,7 +238,12 @@ _C_LABEL(tablesize): .long 0 .space 512 tmpstk: - +#ifdef XEN + .align PAGE_SIZE, 0x0 # Align on page boundary +_C_LABEL(tmpgdt): + .space PAGE_SIZE # Xen expects a page +#endif /* XEN */ + .globl tmpgdt #ifndef XEN #define _RELOC(x) ((x) - KERNBASE) #else @@ -677,7 +682,7 @@ try586: /* Use the `cpuid' instruction. */ movl %cr0,%eax # get control word # enable paging & NPX emulation - orl $(CR0_PE|CR0_PG|CR0_NE|CR0_TS|CR0_EM|CR0_MP|CR0_AM),%eax + orl $(CR0_PE|CR0_PG|CR0_NE|CR0_TS|CR0_EM|CR0_MP|CR0_WP|CR0_AM),%eax movl %eax,%cr0 # and page NOW! pushl $begin # jump to high mem @@ -787,6 +792,15 @@ start: cpuid movl %eax,RELOC(cpuid_level) + /* + * Use a temp page. We'll re- add it to uvm(9) once we're + * done using it. + */ + movl $RELOC(tmpgdt), %eax + pushl %eax # start of temporary gdt + call _C_LABEL(initgdt) + addl $4,%esp + call xen_pmap_bootstrap /* @@ -1123,7 +1137,7 @@ IDTVEC(osyscall) #endif pushfl # set eflags in trap frame popl 8(%esp) - orl $PSL_I,8(%esp) # re-enable ints on return to user + orl $PSL_I,(%esp) # re-enable ints on return to user pushl $7 # size of instruction for restart jmp syscall1 IDTVEC_END(osyscall)