diff options
author | luoqi <luoqi@FreeBSD.org> | 1999-04-28 01:04:33 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1999-04-28 01:04:33 +0000 |
commit | af7e9be5cce9a2ceb819f00b3f58014d23ab57cd (patch) | |
tree | 0e70c0e764f072d43041acca8ac52e30616dced3 /sys/i386/isa/ipl.s | |
parent | 0f4a245030e7f1acb03f8de0822a58b188fc0d28 (diff) | |
download | FreeBSD-src-af7e9be5cce9a2ceb819f00b3f58014d23ab57cd.zip FreeBSD-src-af7e9be5cce9a2ceb819f00b3f58014d23ab57cd.tar.gz |
Enable vmspace sharing on SMP. Major changes are,
- %fs register is added to trapframe and saved/restored upon kernel entry/exit.
- Per-cpu pages are no longer mapped at the same virtual address.
- Each cpu now has a separate gdt selector table. A new segment selector
is added to point to per-cpu pages, per-cpu global variables are now
accessed through this new selector (%fs). The selectors in gdt table are
rearranged for cache line optimization.
- fask_vfork is now on as default for both UP and SMP.
- Some aio code cleanup.
Reviewed by: Alan Cox <alc@cs.rice.edu>
John Dyson <dyson@iquest.net>
Julian Elischer <julian@whistel.com>
Bruce Evans <bde@zeta.org.au>
David Greenman <dg@root.com>
Diffstat (limited to 'sys/i386/isa/ipl.s')
-rw-r--r-- | sys/i386/isa/ipl.s | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/i386/isa/ipl.s b/sys/i386/isa/ipl.s index 9863617..502a759 100644 --- a/sys/i386/isa/ipl.s +++ b/sys/i386/isa/ipl.s @@ -36,7 +36,7 @@ * * @(#)ipl.s * - * $Id: ipl.s,v 1.24 1998/08/11 17:01:32 bde Exp $ + * $Id: ipl.s,v 1.25 1999/04/11 15:51:15 peter Exp $ */ @@ -173,7 +173,7 @@ doreti_exit: je 1f testl $PSL_VM,TF_EFLAGS(%esp) /* going to VM86 mode? */ jne doreti_stop - testb $SEL_RPL_MASK,TRAPF_CS_OFF(%esp) /* to user mode? */ + testb $SEL_RPL_MASK,TF_CS(%esp) /* to user mode? */ je 1f doreti_stop: movl $0,_cpl @@ -192,6 +192,9 @@ doreti_stop: add $4, %esp #endif /* SMP */ + .globl doreti_popl_fs +doreti_popl_fs: + popl %fs .globl doreti_popl_es doreti_popl_es: popl %es @@ -215,8 +218,11 @@ doreti_popl_ds_fault: pushl %es .globl doreti_popl_es_fault doreti_popl_es_fault: - movl $0,4+4+32+4(%esp) /* XXX should be the error code */ - movl $T_PROTFLT,4+4+32+0(%esp) + pushl %fs + .globl doreti_popl_fs_fault +doreti_popl_fs_fault: + movl $0,TF_ERR(%esp) /* XXX should be the error code */ + movl $T_PROTFLT,TF_TRAPNO(%esp) jmp alltraps_with_regs_pushed ALIGN_TEXT @@ -343,10 +349,10 @@ swi_ast: cmpl $1,_in_vm86call je 1f /* stay in kernel mode */ #endif - testb $SEL_RPL_MASK,TRAPF_CS_OFF(%esp) + testb $SEL_RPL_MASK,TF_CS(%esp) je swi_ast_phantom swi_ast_user: - movl $T_ASTFLT,(2+8+0)*4(%esp) + movl $T_ASTFLT,TF_TRAPNO(%esp) movb $0,_intr_nesting_level /* finish becoming a trap handler */ call _trap subl %eax,%eax /* recover cpl|cml */ |