From c300b7b6c12fd0667ea80cb7529221a36d4fda25 Mon Sep 17 00:00:00 2001 From: Luoqi Chen Date: Thu, 6 May 1999 00:54:54 +0000 Subject: [PATCH] Initialize dblfault_tss.tss_fs to the per-cpu private data segment selector. --- sys/amd64/amd64/machdep.c | 5 +++-- sys/i386/i386/machdep.c | 5 +++-- sys/pc98/i386/machdep.c | 5 +++-- sys/pc98/pc98/machdep.c | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 151423fd3a79..c8ca257ed2ed 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.332 1999/04/28 01:03:21 luoqi Exp $ + * $Id: machdep.c,v 1.333 1999/05/06 00:38:41 luoqi Exp $ */ #include "apm.h" @@ -1307,8 +1307,9 @@ init386(first) dblfault_tss.tss_cr3 = (int)IdlePTD; dblfault_tss.tss_eip = (int) dblfault_handler; dblfault_tss.tss_eflags = PSL_KERNEL; - dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_fs = + dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_gs = GSEL(GDATA_SEL, SEL_KPL); + dblfault_tss.tss_fs = GSEL(GPRIV_SEL, SEL_KPL); dblfault_tss.tss_cs = GSEL(GCODE_SEL, SEL_KPL); dblfault_tss.tss_ldt = GSEL(GLDT_SEL, SEL_KPL); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 151423fd3a79..c8ca257ed2ed 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.332 1999/04/28 01:03:21 luoqi Exp $ + * $Id: machdep.c,v 1.333 1999/05/06 00:38:41 luoqi Exp $ */ #include "apm.h" @@ -1307,8 +1307,9 @@ init386(first) dblfault_tss.tss_cr3 = (int)IdlePTD; dblfault_tss.tss_eip = (int) dblfault_handler; dblfault_tss.tss_eflags = PSL_KERNEL; - dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_fs = + dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_gs = GSEL(GDATA_SEL, SEL_KPL); + dblfault_tss.tss_fs = GSEL(GPRIV_SEL, SEL_KPL); dblfault_tss.tss_cs = GSEL(GCODE_SEL, SEL_KPL); dblfault_tss.tss_ldt = GSEL(GLDT_SEL, SEL_KPL); diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 759681e89e69..4befffd92798 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.114 1999/04/28 08:03:54 kato Exp $ + * $Id: machdep.c,v 1.115 1999/05/06 00:39:00 luoqi Exp $ */ #include "apm.h" @@ -1327,8 +1327,9 @@ init386(first) dblfault_tss.tss_cr3 = (int)IdlePTD; dblfault_tss.tss_eip = (int) dblfault_handler; dblfault_tss.tss_eflags = PSL_KERNEL; - dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_fs = + dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_gs = GSEL(GDATA_SEL, SEL_KPL); + dblfault_tss.tss_fs = GSEL(GPRIV_SEL, SEL_KPL); dblfault_tss.tss_cs = GSEL(GCODE_SEL, SEL_KPL); dblfault_tss.tss_ldt = GSEL(GLDT_SEL, SEL_KPL); diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 759681e89e69..4befffd92798 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.114 1999/04/28 08:03:54 kato Exp $ + * $Id: machdep.c,v 1.115 1999/05/06 00:39:00 luoqi Exp $ */ #include "apm.h" @@ -1327,8 +1327,9 @@ init386(first) dblfault_tss.tss_cr3 = (int)IdlePTD; dblfault_tss.tss_eip = (int) dblfault_handler; dblfault_tss.tss_eflags = PSL_KERNEL; - dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_fs = + dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_gs = GSEL(GDATA_SEL, SEL_KPL); + dblfault_tss.tss_fs = GSEL(GPRIV_SEL, SEL_KPL); dblfault_tss.tss_cs = GSEL(GCODE_SEL, SEL_KPL); dblfault_tss.tss_ldt = GSEL(GLDT_SEL, SEL_KPL);