diff options
author | Brandon Creighton <bjc@cvs.openbsd.org> | 2000-05-24 21:07:52 +0000 |
---|---|---|
committer | Brandon Creighton <bjc@cvs.openbsd.org> | 2000-05-24 21:07:52 +0000 |
commit | be24cbfc00d62806f996840dbb3fd18aadb718da (patch) | |
tree | 6eae3b4e829656e233365cb8394124d0a38732d4 /sys/arch | |
parent | b64eadb92db024b091b5aadf4f34ce55e5bdc7ae (diff) |
Add an extra byte to the end of struct pcb and make sure that it is set to
0xff. Intel (vol1 section 9.5.2) says that there must be a byte inside the
TSS after the iomap because it always reads two bytes when checking
permissions for io accesses. before this, bits 1016-1023 were ignored.
This means that the entire pcb_iomap (and i386_*_ioperm) are accurate;
pr#1190 fixed
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 3 | ||||
-rw-r--r-- | sys/arch/i386/include/pcb.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index cb58ba9e593..36a586fe985 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.132 2000/05/15 06:14:25 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.133 2000/05/24 21:07:51 bjc Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -429,6 +429,7 @@ cpu_startup() ((caddr_t)pcb->pcb_iomap - (caddr_t)&pcb->pcb_tss) << 16; for (x = 0; x < sizeof(pcb->pcb_iomap) / 4; x++) pcb->pcb_iomap[x] = 0xffffffff; + pcb->pcb_iomap_pad = 0xff; pcb->pcb_ldt_sel = GSEL(GLDT_SEL, SEL_KPL); pcb->pcb_cr0 = rcr0(); diff --git a/sys/arch/i386/include/pcb.h b/sys/arch/i386/include/pcb.h index 33ea0e21661..63b24e9127d 100644 --- a/sys/arch/i386/include/pcb.h +++ b/sys/arch/i386/include/pcb.h @@ -79,6 +79,7 @@ struct pcb { int vm86_flagmask; /* flag mask for vm86 mode */ void *vm86_userp; /* XXX performance hack */ u_long pcb_iomap[NIOPORTS/32]; /* I/O bitmap */ + u_char pcb_iomap_pad; /* required; must be 0xff, says intel */ }; /* |