aboutsummaryrefslogtreecommitdiff
path: root/sys/pc98
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>2001-01-07 07:59:19 +0000
committerKATO Takenori <kato@FreeBSD.org>2001-01-07 07:59:19 +0000
commite93f5a3faada79935f1ca9edbdd14f18cb3fc029 (patch)
tree4495e17519f6fad0574029bab617ed90dad0a799 /sys/pc98
parent005b575313d24b74b2089b7635d867bd812a1c4a (diff)
Notes
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/i386/machdep.c13
-rw-r--r--sys/pc98/pc98/machdep.c13
2 files changed, 20 insertions, 6 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 9b1938b4d08d..9adcb30696ec 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -258,6 +258,9 @@ static vm_offset_t buffer_sva, buffer_eva;
vm_offset_t clean_sva, clean_eva;
static vm_offset_t pager_sva, pager_eva;
static struct trapframe proc0_tf;
+#ifndef SMP
+static struct globaldata __globaldata;
+#endif
struct cpuhead cpuhead;
@@ -2160,10 +2163,14 @@ init386(first)
gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[0];
gdt_segs[GPROC0_SEL].ssd_base =
(int) &SMP_prvspace[0].globaldata.gd_common_tss;
- SMP_prvspace[0].globaldata.gd_prvspace = &SMP_prvspace[0];
+ SMP_prvspace[0].globaldata.gd_prvspace = &SMP_prvspace[0].globaldata;
#else
- gdt_segs[GPRIV_SEL].ssd_limit = i386_btop(0) - 1;
- gdt_segs[GPROC0_SEL].ssd_base = (int) &common_tss;
+ gdt_segs[GPRIV_SEL].ssd_limit =
+ i386_btop(sizeof(struct globaldata)) - 1;
+ gdt_segs[GPRIV_SEL].ssd_base = (int) &__globaldata;
+ gdt_segs[GPROC0_SEL].ssd_base =
+ (int) &__globaldata.gd_common_tss;
+ __globaldata.gd_prvspace = &__globaldata;
#endif
for (x = 0; x < NGDT; x++) {
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 9b1938b4d08d..9adcb30696ec 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -258,6 +258,9 @@ static vm_offset_t buffer_sva, buffer_eva;
vm_offset_t clean_sva, clean_eva;
static vm_offset_t pager_sva, pager_eva;
static struct trapframe proc0_tf;
+#ifndef SMP
+static struct globaldata __globaldata;
+#endif
struct cpuhead cpuhead;
@@ -2160,10 +2163,14 @@ init386(first)
gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[0];
gdt_segs[GPROC0_SEL].ssd_base =
(int) &SMP_prvspace[0].globaldata.gd_common_tss;
- SMP_prvspace[0].globaldata.gd_prvspace = &SMP_prvspace[0];
+ SMP_prvspace[0].globaldata.gd_prvspace = &SMP_prvspace[0].globaldata;
#else
- gdt_segs[GPRIV_SEL].ssd_limit = i386_btop(0) - 1;
- gdt_segs[GPROC0_SEL].ssd_base = (int) &common_tss;
+ gdt_segs[GPRIV_SEL].ssd_limit =
+ i386_btop(sizeof(struct globaldata)) - 1;
+ gdt_segs[GPRIV_SEL].ssd_base = (int) &__globaldata;
+ gdt_segs[GPROC0_SEL].ssd_base =
+ (int) &__globaldata.gd_common_tss;
+ __globaldata.gd_prvspace = &__globaldata;
#endif
for (x = 0; x < NGDT; x++) {