diff options
author | dg <dg@FreeBSD.org> | 1994-01-31 10:27:13 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-01-31 10:27:13 +0000 |
commit | 8df5d2c1f8c514a14d5728e5a9f9e30e48ae90eb (patch) | |
tree | 3f282f48fea85301258a9cb32507359b11f365f7 /sys/i386/include | |
parent | 805b2d4d90c77f94e31f786f0afbd08f5fd8e1cb (diff) | |
download | FreeBSD-src-8df5d2c1f8c514a14d5728e5a9f9e30e48ae90eb.zip FreeBSD-src-8df5d2c1f8c514a14d5728e5a9f9e30e48ae90eb.tar.gz |
WINE/user LDT support from John Brezak, ported to FreeBSD by Jeffrey Hsu
<hsu@soda.berkeley.edu>.
Diffstat (limited to 'sys/i386/include')
-rw-r--r-- | sys/i386/include/frame.h | 5 | ||||
-rw-r--r-- | sys/i386/include/reg.h | 4 | ||||
-rw-r--r-- | sys/i386/include/segments.h | 42 |
3 files changed, 41 insertions, 10 deletions
diff --git a/sys/i386/include/frame.h b/sys/i386/include/frame.h index b36c141..05bf265 100644 --- a/sys/i386/include/frame.h +++ b/sys/i386/include/frame.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)frame.h 5.2 (Berkeley) 1/18/91 - * $Id: frame.h,v 1.6 1993/12/19 00:50:15 wollman Exp $ + * $Id: frame.h,v 1.7 1994/01/03 07:55:32 davidg Exp $ */ #ifndef _MACHINE_FRAME_H_ @@ -109,9 +109,6 @@ struct sigframe { struct sigcontext *sf_scp; char *sf_addr; sig_t sf_handler; - int sf_eax; - int sf_edx; - int sf_ecx; struct sigcontext sf_sc; }; #endif /* _MACHINE_FRAME_H_ */ diff --git a/sys/i386/include/reg.h b/sys/i386/include/reg.h index 4cefae0..d20f8d0 100644 --- a/sys/i386/include/reg.h +++ b/sys/i386/include/reg.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $Id: reg.h,v 1.5 1993/12/03 05:10:08 alm Exp $ + * $Id: reg.h,v 1.6 1994/01/03 07:55:34 davidg Exp $ */ #ifndef _MACHINE_REG_H_ @@ -54,7 +54,7 @@ #define tEDI (2) #define tESI (3) #define tEBP (4) - +#define tISP (5) #define tEBX (6) #define tEDX (7) #define tECX (8) diff --git a/sys/i386/include/segments.h b/sys/i386/include/segments.h index a7ed234..023a0cf 100644 --- a/sys/i386/include/segments.h +++ b/sys/i386/include/segments.h @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 - * $Id: segments.h,v 1.2 1993/10/16 14:39:30 rgrimes Exp $ + * $Id: segments.h,v 1.3 1993/11/07 17:43:08 wollman Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ @@ -64,7 +64,8 @@ */ struct segment_descriptor { unsigned sd_lolimit:16 ; /* segment extent (lsb) */ - unsigned sd_lobase:24 ; /* segment base address (lsb) */ + unsigned sd_lobase:24 __attribute__ ((packed)); + /* segment base address (lsb) */ unsigned sd_type:5 ; /* segment type */ unsigned sd_dpl:2 ; /* segment descriptor priority level */ unsigned sd_p:1 ; /* segment descriptor present */ @@ -178,8 +179,8 @@ extern sdtossd() ; /* to encode a sd */ * region descriptors, used to load gdt/idt tables before segments yet exist. */ struct region_descriptor { - unsigned rd_limit:16; /* segment extent */ - unsigned rd_base:32; /* base address */ + unsigned rd_limit:16; /* segment extent */ + unsigned rd_base:32 __attribute__ ((packed)); /* base address */ }; /* @@ -198,4 +199,37 @@ struct region_descriptor { #define NIDT 256 #define NRSVIDT 32 /* reserved entries for cpu exceptions */ + +/* + * Entries in the Global Descriptor Table (GDT) + */ +#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 NGDT GUSERLDT_SEL+1 + +/* + * Entries in the Local Descriptor Table (LDT) + */ +#define LSYS5CALLS_SEL 0 /* forced by intel BCS */ +#define LSYS5SIGR_SEL 1 +#define L43BSDCALLS_SEL 2 /* notyet */ +#define LUCODE_SEL 3 +#define LUDATA_SEL 4 +/* seperate stack, es,fs,gs sels ? */ +/* #define LPOSIXCALLS_SEL 5*/ /* notyet */ +#define NLDT LUDATA_SEL+1 + +#ifdef KERNEL +extern int currentldt; +extern union descriptor gdt[NGDT]; +extern union descriptor ldt[NLDT]; +extern struct soft_segment_descriptor gdt_segs[]; +#endif + #endif /* _MACHINE_SEGMENTS_H_ */ |