diff options
author | kato <kato@FreeBSD.org> | 1998-05-16 14:44:11 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1998-05-16 14:44:11 +0000 |
commit | ec73ba31eccce73750a0a22f0e5e382d6feb53d3 (patch) | |
tree | 1c9e4c5af4a8e4c8c43bfc4e2a953aa0a5c97326 | |
parent | 25a6c2ae414c7fea74d1708ce98637e020fbff96 (diff) | |
download | FreeBSD-src-ec73ba31eccce73750a0a22f0e5e382d6feb53d3.zip FreeBSD-src-ec73ba31eccce73750a0a22f0e5e382d6feb53d3.tar.gz |
Some of newer PC-98 may cause "Windows Protection Fault" when booting
Windows 95 after rebooting FreeBSD without power off. In PC-98
system, reboot mode is set via I/O port 0x37 in cpu_reset(), and
accessing of this port is the reason of the problem. To avnoid the
fault, current status of reboot mode should be checked before
accessing the I/O port.
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 8 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index b157bb6..78f16ae 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.104 1998/03/17 09:10:05 kato Exp $ + * $Id: vm_machdep.c,v 1.105 1998/03/23 19:52:42 jlemon Exp $ */ #include "npx.h" @@ -847,8 +847,10 @@ cpu_reset() * Attempt to do a CPU reset via CPU reset port. */ disable_intr(); - outb(0x37, 0x0f); /* SHUT0 = 0. */ - outb(0x37, 0x0b); /* SHUT1 = 0. */ + if ((inb(0x35) & 0xa0) != 0xa0) { + outb(0x37, 0x0f); /* SHUT0 = 0. */ + outb(0x37, 0x0b); /* SHUT1 = 0. */ + } outb(0xf0, 0x00); /* Reset. */ #else /* diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index b157bb6..78f16ae 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.104 1998/03/17 09:10:05 kato Exp $ + * $Id: vm_machdep.c,v 1.105 1998/03/23 19:52:42 jlemon Exp $ */ #include "npx.h" @@ -847,8 +847,10 @@ cpu_reset() * Attempt to do a CPU reset via CPU reset port. */ disable_intr(); - outb(0x37, 0x0f); /* SHUT0 = 0. */ - outb(0x37, 0x0b); /* SHUT1 = 0. */ + if ((inb(0x35) & 0xa0) != 0xa0) { + outb(0x37, 0x0f); /* SHUT0 = 0. */ + outb(0x37, 0x0b); /* SHUT1 = 0. */ + } outb(0xf0, 0x00); /* Reset. */ #else /* |