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/icu_vector.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/icu_vector.s')
-rw-r--r-- | sys/i386/isa/icu_vector.s | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/i386/isa/icu_vector.s b/sys/i386/isa/icu_vector.s index 2dcda02..4460303 100644 --- a/sys/i386/isa/icu_vector.s +++ b/sys/i386/isa/icu_vector.s @@ -1,6 +1,6 @@ /* * from: vector.s, 386BSD 0.1 unknown origin - * $Id: icu_vector.s,v 1.9 1998/08/11 17:01:32 bde Exp $ + * $Id: icu_vector.s,v 1.10 1999/04/14 14:26:36 bde Exp $ */ /* @@ -94,11 +94,13 @@ IDTVEC(vec_name) ; \ pushal ; /* build fat frame (grrr) ... */ \ pushl %ecx ; /* ... actually %ds ... */ \ pushl %es ; \ + pushl %fs ; \ movl $KDSEL,%eax ; \ movl %ax,%es ; \ - movl (2+8+0)*4(%esp),%ecx ; /* ... %ecx from thin frame ... */ \ - movl %ecx,(2+6)*4(%esp) ; /* ... to fat frame ... */ \ - movl (2+8+1)*4(%esp),%eax ; /* ... cpl from thin frame */ \ + movl %ax,%fs ; \ + movl (3+8+0)*4(%esp),%ecx ; /* ... %ecx from thin frame ... */ \ + movl %ecx,(3+6)*4(%esp) ; /* ... to fat frame ... */ \ + movl (3+8+1)*4(%esp),%eax ; /* ... cpl from thin frame */ \ pushl %eax ; \ subl $4,%esp ; /* junk for unit number */ \ MEXITCOUNT ; \ @@ -113,9 +115,11 @@ IDTVEC(vec_name) ; \ pushal ; \ pushl %ds ; /* save our data and extra segments ... */ \ pushl %es ; \ + pushl %fs ; \ movl $KDSEL,%eax ; /* ... and reload with kernel's own ... */ \ movl %ax,%ds ; /* ... early for obsolete reasons */ \ movl %ax,%es ; \ + movl %ax,%fs ; \ movb _imen + IRQ_BYTE(irq_num),%al ; \ orb $IRQ_BIT(irq_num),%al ; \ movb %al,_imen + IRQ_BYTE(irq_num) ; \ @@ -126,7 +130,7 @@ IDTVEC(vec_name) ; \ jne 2f ; \ incb _intr_nesting_level ; \ __CONCAT(Xresume,irq_num): ; \ - FAKE_MCOUNT(12*4(%esp)) ; /* XXX late to avoid double count */ \ + FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \ incl _cnt+V_INTR ; /* tally interrupts */ \ movl _intr_countp + (irq_num) * 4,%eax ; \ incl (%eax) ; \ @@ -152,6 +156,7 @@ __CONCAT(Xresume,irq_num): ; \ 2: ; \ /* XXX skip mcounting here to avoid double count */ \ orb $IRQ_BIT(irq_num),_ipending + IRQ_BYTE(irq_num) ; \ + popl %fs ; \ popl %es ; \ popl %ds ; \ popal ; \ |