From ec73ba31eccce73750a0a22f0e5e382d6feb53d3 Mon Sep 17 00:00:00 2001 From: kato Date: Sat, 16 May 1998 14:44:11 +0000 Subject: 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. --- sys/amd64/amd64/vm_machdep.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/amd64/amd64/vm_machdep.c') 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 /* -- cgit v1.1