summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mp_machdep.c
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-05-14 22:24:09 +0000
committerneel <neel@FreeBSD.org>2014-05-14 22:24:09 +0000
commit5df866f4b184bed9ee5696646c5f344532ca9194 (patch)
tree398b47711331c96a2e9d3e3eddbe70ee15fcf641 /sys/amd64/amd64/mp_machdep.c
parent10498d9298eec5778c1af445b70a940b4a61f5b8 (diff)
downloadFreeBSD-src-5df866f4b184bed9ee5696646c5f344532ca9194.zip
FreeBSD-src-5df866f4b184bed9ee5696646c5f344532ca9194.tar.gz
Increase the TSS limit by one byte. The processor requires an additional byte
with all bits set to 1 beyond the I/O permission bitmap. Prior to this change accessing I/O ports [0xFFF8-0xFFFF] would trigger a #GP fault even though the I/O bitmap allowed access to those ports. For more details see section "I/O Permission Bit Map" in the Intel SDM, Vol 1. Reviewed by: kib
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-rw-r--r--sys/amd64/amd64/mp_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 484fc06..6e59645 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -637,7 +637,7 @@ init_secondary(void)
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) +
- IOPAGES * PAGE_SIZE;
+ IOPERM_BITMAP_SIZE;
common_tss[cpu].tss_ist1 = (long)&doublefault_stack[PAGE_SIZE];
/* The NMI stack runs on IST2. */
OpenPOWER on IntegriCloud