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.78.2.2 retrieving revision 1.82.4.3 diff -u -p -r1.78.2.2 -r1.82.4.3 --- src/sys/arch/i386/i386/locore.S 2009/03/03 18:28:59 1.78.2.2 +++ src/sys/arch/i386/i386/locore.S 2011/03/28 23:04:40 1.82.4.3 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.78.2.2 2009/03/03 18:28:59 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.82.4.3 2011/03/28 23:04:40 jym Exp $ */ /* * Copyright-o-rama! @@ -15,11 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Manuel Bouyer. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -71,11 +66,11 @@ /*- - * Copyright (c) 1998, 2000, 2004, 2006, 2007 The NetBSD Foundation, Inc. + * Copyright (c) 1998, 2000, 2004, 2006, 2007, 2009 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by Charles M. Hannum. + * by Charles M. Hannum, and by Andrew Doran. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -134,7 +129,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.78.2.2 2009/03/03 18:28:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.82.4.3 2011/03/28 23:04:40 jym Exp $"); #include "opt_compat_oldboot.h" #include "opt_ddb.h" @@ -173,7 +168,6 @@ __KERNEL_RCSID(0, "$NetBSD: locore.S,v 1 * Xen guest identifier and loader selection */ .section __xen_guest -#ifdef XEN3 .ascii "GUEST_OS=netbsd,GUEST_VER=3.0,XEN_VER=xen-3.0" #if defined(DOM0OPS) || !defined(XEN_COMPAT_030001) .ascii ",VIRT_BASE=0xc0000000" /* KERNBASE */ @@ -190,9 +184,6 @@ __KERNEL_RCSID(0, "$NetBSD: locore.S,v 1 #ifdef PAE .ascii ",PAE=yes[extended-cr3]" #endif -#else /* !XEN3 */ - .ascii "GUEST_OS=netbsd,GUEST_VER=2.0,XEN_VER=2.0" -#endif /* XEN3 */ .ascii ",LOADER=generic" #if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(SYMTAB_SPACE) .ascii ",BSD_SYMTAB=yes" @@ -727,11 +718,7 @@ start: popfl cld -#ifdef XEN3 movl %esp, %ebx # save start of available space -#else - movl %esi,%ebx # save start_info pointer -#endif movl $_RELOC(tmpstk),%esp # bootstrap stack end location /* Clear BSS first so that there are no surprises... */ @@ -779,13 +766,13 @@ start: addl $4,%esp call _C_LABEL(main) -#if defined(XEN3) && !defined(XEN_COMPAT_030001) +#if defined(XEN) && !defined(XEN_COMPAT_030001) /* space for the hypercall call page */ #define HYPERCALL_PAGE_OFFSET 0x1000 .org HYPERCALL_PAGE_OFFSET ENTRY(hypercall_page) .skip 0x1000 -#endif /* defined(XEN3) && !defined(XEN_COMPAT_030001) */ +#endif /* defined(XEN) && !defined(XEN_COMPAT_030001) */ /* * void lgdt_finish(void); @@ -992,7 +979,7 @@ ENTRY(cpu_switchto) /* Switch I/O bitmap */ movl PCB_IOMAP(%ebx),%eax orl %eax,%eax - jnz,pn .Lcopy_iobitmap + jnz .Lcopy_iobitmap movl $(IOMAP_INVALOFF << 16),CPUVAR(IOBASE) .Liobitmap_done: @@ -1047,6 +1034,7 @@ ENTRY(cpu_switchto) .Lcopy_iobitmap: /* Copy I/O bitmap. */ + incl _C_LABEL(pmap_iobmp_evcnt)+EV_COUNT movl $(IOMAPSIZE/4),%ecx pushl %esi pushl %edi @@ -1079,8 +1067,13 @@ END(savectx) * 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,(%esp) # re-enable ints on return to user pushl $7 # size of instruction for restart jmp syscall1 IDTVEC_END(osyscall) @@ -1095,12 +1088,13 @@ IDTVEC(syscall) syscall1: pushl $T_ASTFLT # trap # for doing ASTs INTRENTRY + STI(%eax) #ifdef DIAGNOSTIC movl CPUVAR(ILEVEL),%ebx testl %ebx,%ebx jz 1f pushl $5f - call _C_LABEL(printf) + call _C_LABEL(panic) addl $4,%esp #ifdef DDB int $3 @@ -1151,14 +1145,14 @@ syscall1: INTRFASTEXIT 3: STI(%eax) pushl $4f - call _C_LABEL(printf) + call _C_LABEL(panic) addl $4,%esp pushl $IPL_NONE call _C_LABEL(spllower) addl $4,%esp jmp .Lsyscall_checkast -4: .asciz "WARNING: SPL NOT LOWERED ON SYSCALL EXIT\n" -5: .asciz "WARNING: SPL NOT ZERO ON SYSCALL ENTRY\n" +4: .asciz "SPL NOT LOWERED ON SYSCALL EXIT\n" +5: .asciz "SPL NOT ZERO ON SYSCALL ENTRY\n" #endif /* DIAGNOSTIC */ 9: cmpl $0, CPUVAR(WANT_PMAPLOAD) @@ -1181,6 +1175,7 @@ IDTVEC(svr4_fasttrap) pushl $2 # size of instruction for restart pushl $T_ASTFLT # trap # for doing ASTs INTRENTRY + STI(%eax) pushl $RW_READER pushl $_C_LABEL(svr4_fasttrap_lock) call _C_LABEL(rw_enter)