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/include/segments.h | |
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/include/segments.h')
-rw-r--r-- | sys/i386/include/segments.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/sys/i386/include/segments.h b/sys/i386/include/segments.h index 674b0f3..eaecfa3 100644 --- a/sys/i386/include/segments.h +++ b/sys/i386/include/segments.h @@ -35,12 +35,14 @@ * SUCH DAMAGE. * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 - * $Id: segments.h,v 1.17 1997/08/21 06:32:49 charnier Exp $ + * $Id: segments.h,v 1.18 1999/01/28 11:45:49 newton Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ #define _MACHINE_SEGMENTS_H_ +#include <machine/globals.h> + /* * 386 Segmentation Data Structures and definitions * William F. Jolitz (william@ernie.berkeley.edu) 6/20/1989 @@ -207,19 +209,20 @@ struct region_descriptor { #define GNULL_SEL 0 /* Null Descriptor */ #define GCODE_SEL 1 /* Kernel Code Descriptor */ #define GDATA_SEL 2 /* Kernel Data Descriptor */ -#define GLDT_SEL 3 /* LDT - eventually one per process */ -#define GTGATE_SEL 4 /* Process task switch gate */ -#define GPANIC_SEL 5 /* Task state to consider panic from */ -#define GPROC0_SEL 6 /* Task state process slot zero and up */ -#define GUSERLDT_SEL 7 /* User LDT */ -#define GAPMCODE32_SEL 8 /* APM BIOS 32-bit interface (32bit Code) */ -#define GAPMCODE16_SEL 9 /* APM BIOS 32-bit interface (16bit Code) */ -#define GAPMDATA_SEL 10 /* APM BIOS 32-bit interface (Data) */ +#define GPRIV_SEL 3 /* SMP Per-Processor Private Data */ +#define GPROC0_SEL 4 /* Task state process slot zero and up */ +#define GLDT_SEL 5 /* LDT - eventually one per process */ +#define GUSERLDT_SEL 6 /* User LDT */ +#define GTGATE_SEL 7 /* Process task switch gate */ +#define GPANIC_SEL 8 /* Task state to consider panic from */ +#define GAPMCODE32_SEL 9 /* APM BIOS 32-bit interface (32bit Code) */ +#define GAPMCODE16_SEL 10 /* APM BIOS 32-bit interface (16bit Code) */ +#define GAPMDATA_SEL 11 /* APM BIOS 32-bit interface (Data) */ #ifdef BDE_DEBUGGER #define NGDT 18 /* some of 11-17 are reserved for debugger */ #else -#define NGDT (GAPMDATA_SEL + 1) +#define NGDT 12 #endif /* @@ -237,7 +240,9 @@ struct region_descriptor { #define NLDT (LBSDICALLS_SEL + 1) #ifdef KERNEL +#ifndef currentldt extern int currentldt; +#endif extern int _default_ldt; extern union descriptor gdt[]; extern struct soft_segment_descriptor gdt_segs[]; |