version 1.67.4.3, 2009/05/16 10:41:14 |
version 1.81, 2008/11/19 18:35:58 |
|
|
|
|
|
|
/*- |
/*- |
* Copyright (c) 1998, 2000, 2004, 2006, 2007, 2009 The NetBSD Foundation, Inc. |
* Copyright (c) 1998, 2000, 2004, 2006, 2007 The NetBSD Foundation, Inc. |
* All rights reserved. |
* All rights reserved. |
* |
* |
* This code is derived from software contributed to The NetBSD Foundation |
* This code is derived from software contributed to The NetBSD Foundation |
* by Charles M. Hannum, and by Andrew Doran. |
* by Charles M. Hannum. |
* |
* |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* modification, are permitted provided that the following conditions |
Line 138 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 138 __KERNEL_RCSID(0, "$NetBSD$"); |
|
|
|
#include "opt_compat_oldboot.h" |
#include "opt_compat_oldboot.h" |
#include "opt_ddb.h" |
#include "opt_ddb.h" |
#include "opt_modular.h" |
|
#include "opt_multiboot.h" |
#include "opt_multiboot.h" |
#include "opt_realmem.h" |
#include "opt_realmem.h" |
#include "opt_vm86.h" |
#include "opt_vm86.h" |
Line 1047 ENTRY(cpu_switchto) |
|
Line 1046 ENTRY(cpu_switchto) |
|
|
|
.Lcopy_iobitmap: |
.Lcopy_iobitmap: |
/* Copy I/O bitmap. */ |
/* Copy I/O bitmap. */ |
incl _C_LABEL(pmap_iobmp_evcnt)+EV_COUNT |
|
movl $(IOMAPSIZE/4),%ecx |
movl $(IOMAPSIZE/4),%ecx |
pushl %esi |
pushl %esi |
pushl %edi |
pushl %edi |
|
|
* Old call gate entry for syscall |
* Old call gate entry for syscall |
*/ |
*/ |
IDTVEC(osyscall) |
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 |
pushfl # set eflags in trap frame |
popl 8(%esp) |
popl 8(%esp) |
orl $PSL_I,(%esp) # re-enable ints on return to user |
|
pushl $7 # size of instruction for restart |
pushl $7 # size of instruction for restart |
jmp syscall1 |
jmp syscall1 |
IDTVEC_END(osyscall) |
IDTVEC_END(osyscall) |
Line 1101 IDTVEC(syscall) |
|
Line 1094 IDTVEC(syscall) |
|
syscall1: |
syscall1: |
pushl $T_ASTFLT # trap # for doing ASTs |
pushl $T_ASTFLT # trap # for doing ASTs |
INTRENTRY |
INTRENTRY |
STI(%eax) |
|
#ifdef DIAGNOSTIC |
#ifdef DIAGNOSTIC |
movl CPUVAR(ILEVEL),%ebx |
movl CPUVAR(ILEVEL),%ebx |
testl %ebx,%ebx |
testl %ebx,%ebx |
jz 1f |
jz 1f |
pushl $5f |
pushl $5f |
call _C_LABEL(panic) |
call _C_LABEL(printf) |
addl $4,%esp |
addl $4,%esp |
#ifdef DDB |
#ifdef DDB |
int $3 |
int $3 |
|
|
INTRFASTEXIT |
INTRFASTEXIT |
3: STI(%eax) |
3: STI(%eax) |
pushl $4f |
pushl $4f |
call _C_LABEL(panic) |
call _C_LABEL(printf) |
addl $4,%esp |
addl $4,%esp |
pushl $IPL_NONE |
pushl $IPL_NONE |
call _C_LABEL(spllower) |
call _C_LABEL(spllower) |
addl $4,%esp |
addl $4,%esp |
jmp .Lsyscall_checkast |
jmp .Lsyscall_checkast |
4: .asciz "SPL NOT LOWERED ON SYSCALL EXIT\n" |
4: .asciz "WARNING: SPL NOT LOWERED ON SYSCALL EXIT\n" |
5: .asciz "SPL NOT ZERO ON SYSCALL ENTRY\n" |
5: .asciz "WARNING: SPL NOT ZERO ON SYSCALL ENTRY\n" |
#endif /* DIAGNOSTIC */ |
#endif /* DIAGNOSTIC */ |
9: |
9: |
cmpl $0, CPUVAR(WANT_PMAPLOAD) |
cmpl $0, CPUVAR(WANT_PMAPLOAD) |
Line 1188 IDTVEC(svr4_fasttrap) |
|
Line 1180 IDTVEC(svr4_fasttrap) |
|
pushl $2 # size of instruction for restart |
pushl $2 # size of instruction for restart |
pushl $T_ASTFLT # trap # for doing ASTs |
pushl $T_ASTFLT # trap # for doing ASTs |
INTRENTRY |
INTRENTRY |
STI(%eax) |
|
pushl $RW_READER |
pushl $RW_READER |
pushl $_C_LABEL(svr4_fasttrap_lock) |
pushl $_C_LABEL(svr4_fasttrap_lock) |
call _C_LABEL(rw_enter) |
call _C_LABEL(rw_enter) |
Line 1281 ENTRY(sse2_idlezero_page) |
|
Line 1272 ENTRY(sse2_idlezero_page) |
|
xorl %eax, %eax |
xorl %eax, %eax |
.align 16 |
.align 16 |
1: |
1: |
testl $RESCHED_KPREEMPT, CPUVAR(RESCHED) |
cmpl $0, CPUVAR(RESCHED) |
jnz 2f |
jnz 2f |
movnti %eax, 0(%edx) |
movnti %eax, 0(%edx) |
movnti %eax, 4(%edx) |
movnti %eax, 4(%edx) |