aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2005-04-06 01:44:36 +0000
committerPeter Wemm <peter@FreeBSD.org>2005-04-06 01:44:36 +0000
commita9404446014d69966b0129b217bec7f159212470 (patch)
tree74ace61aeee8f66078433348812ce07da80600bd
parenta225d5f34ed645a69572be3a65f04dbc58a84a48 (diff)
downloadsrc-a9404446014d69966b0129b217bec7f159212470.tar.gz
src-a9404446014d69966b0129b217bec7f159212470.zip
MFC: initialize the tss iobase properly
Approved by: so (cperciva)
Notes
Notes: svn path=/releng/5.2/; revision=144700
-rw-r--r--sys/amd64/amd64/machdep.c3
-rw-r--r--sys/amd64/amd64/mp_machdep.c1
-rw-r--r--sys/amd64/include/tss.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 0662e944691b..31625ca09e03 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1210,6 +1210,9 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
/* doublefault stack space, runs on ist1 */
common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)];
+ /* Set the IO permission bitmap (empty due to tss seg limit) */
+ common_tss[0].tss_iobase = sizeof(struct amd64tss);
+
gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
ltr(gsel_tss);
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 0d4ddf8e553e..4474ff1f41b3 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -335,6 +335,7 @@ init_secondary(void)
/* Init tss */
common_tss[cpu] = common_tss[0];
common_tss[cpu].tss_rsp0 = 0; /* not used until after switch */
+ common_tss[cpu].tss_iobase = sizeof(struct amd64tss);
gdt_segs[GPROC0_SEL].ssd_base = (long) &common_tss[cpu];
ssdtosyssd(&gdt_segs[GPROC0_SEL],
diff --git a/sys/amd64/include/tss.h b/sys/amd64/include/tss.h
index 24d31b391298..0cbbe81f97ec 100644
--- a/sys/amd64/include/tss.h
+++ b/sys/amd64/include/tss.h
@@ -54,7 +54,6 @@ struct amd64tss {
u_int64_t tss_rsp2 __packed; /* kernel stack pointer ring 2 */
u_int32_t tss_rsvd1;
u_int32_t tss_rsvd2;
- u_int32_t tss_rsvd3;
u_int64_t tss_ist1 __packed; /* Interrupt stack table 1 */
u_int64_t tss_ist2 __packed; /* Interrupt stack table 2 */
u_int64_t tss_ist3 __packed; /* Interrupt stack table 3 */