diff options
| author | Bruce Evans <bde@FreeBSD.org> | 1997-05-11 12:39:43 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 1997-05-11 12:39:43 +0000 |
| commit | b8dbeb6b4d6ae047219da98bd727686b87f769be (patch) | |
| tree | b470c5ba814d236acb5dc4640a533bccc2399be9 | |
| parent | 0d13363288f50c9ae5acd17816d9ca83623bc5a7 (diff) | |
Notes
| -rw-r--r-- | sys/amd64/amd64/machdep.c | 12 | ||||
| -rw-r--r-- | sys/i386/i386/machdep.c | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index c56b58ee60a4..1b1078cb1d94 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.239 1997/04/26 11:45:10 peter Exp $ + * $Id: machdep.c,v 1.240 1997/05/07 20:12:47 peter Exp $ */ #include "npx.h" @@ -1048,7 +1048,12 @@ init386(first) */ gdt_segs[GCODE_SEL].ssd_limit = i386_btop(0) - 1; gdt_segs[GDATA_SEL].ssd_limit = i386_btop(0) - 1; - for (x = 0; x < NGDT; x++) +#ifdef BDE_DEBUGGER +#define NGDT1 8 /* avoid overwriting db entries with APM ones */ +#else +#define NGDT1 (sizeof gdt_segs / sizeof gdt_segs[0]) +#endif + for (x = 0; x < NGDT1; x++) ssdtosd(&gdt_segs[x], &gdt[x].sd); #ifdef SMP @@ -1084,8 +1089,7 @@ init386(first) #define VM_END_USER_R_ADDRESS (VM_END_USER_RW_ADDRESS + UPAGES * PAGE_SIZE) ldt_segs[LUCODE_SEL].ssd_limit = i386_btop(VM_END_USER_R_ADDRESS) - 1; ldt_segs[LUDATA_SEL].ssd_limit = i386_btop(VM_END_USER_RW_ADDRESS) - 1; - /* Note. eventually want private ldts per process */ - for (x = 0; x < NLDT; x++) + for (x = 0; x < sizeof ldt_segs / sizeof ldt_segs[0]; x++) ssdtosd(&ldt_segs[x], &ldt[x].sd); /* exceptions */ diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index c56b58ee60a4..1b1078cb1d94 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.239 1997/04/26 11:45:10 peter Exp $ + * $Id: machdep.c,v 1.240 1997/05/07 20:12:47 peter Exp $ */ #include "npx.h" @@ -1048,7 +1048,12 @@ init386(first) */ gdt_segs[GCODE_SEL].ssd_limit = i386_btop(0) - 1; gdt_segs[GDATA_SEL].ssd_limit = i386_btop(0) - 1; - for (x = 0; x < NGDT; x++) +#ifdef BDE_DEBUGGER +#define NGDT1 8 /* avoid overwriting db entries with APM ones */ +#else +#define NGDT1 (sizeof gdt_segs / sizeof gdt_segs[0]) +#endif + for (x = 0; x < NGDT1; x++) ssdtosd(&gdt_segs[x], &gdt[x].sd); #ifdef SMP @@ -1084,8 +1089,7 @@ init386(first) #define VM_END_USER_R_ADDRESS (VM_END_USER_RW_ADDRESS + UPAGES * PAGE_SIZE) ldt_segs[LUCODE_SEL].ssd_limit = i386_btop(VM_END_USER_R_ADDRESS) - 1; ldt_segs[LUDATA_SEL].ssd_limit = i386_btop(VM_END_USER_RW_ADDRESS) - 1; - /* Note. eventually want private ldts per process */ - for (x = 0; x < NLDT; x++) + for (x = 0; x < sizeof ldt_segs / sizeof ldt_segs[0]; x++) ssdtosd(&ldt_segs[x], &ldt[x].sd); /* exceptions */ |
