Date: Tue, 18 Apr 1995 17:29:49 -0700 (PDT) From: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com> To: current@FreeBSD.org Subject: Fix for motherboards that don't reboot. Message-ID: <199504190029.RAA00537@gndrsh.aac.dev.com>
next in thread | raw e-mail | index | archive | help
I spent some time talking with a BIOS engineer today about the problem
of FreeBSD not rebooting on some motherboards and have come up with
the following patch that fixes the problem on the board I have here.
Could others who are having this problem please apply this patch and
let me know if it fixes your problem too?
I am also interested in other boards that don't have this problem if
you can see if it ever does the ``Keyboard reset did not work'' thing.
If we can't produce that message on any board we have probably fixed
this problem once and for all.
The BIOS engineer I was working with claims that this should work for
all BIOS's include MCA machines.
Index: vm_machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/vm_machdep.c,v
retrieving revision 1.35
diff -c -r1.35 vm_machdep.c
*** 1.35 1995/03/19 14:28:41
--- vm_machdep.c 1995/04/18 22:44:31
***************
*** 50,61 ****
--- 50,64 ----
#include <sys/vnode.h>
#include <sys/user.h>
+ #include <machine/clock.h>
#include <machine/cpu.h>
#include <machine/md_var.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
+ #include <i386/isa/isa.h>
+
#ifdef BOUNCE_BUFFERS
vm_map_t io_map;
volatile int kvasfreecnt;
***************
*** 803,808 ****
--- 806,817 ----
*/
void
cpu_reset() {
+
+ /* Attempt to do a CPU reset via the keyboard controller */
+ outb(IO_KBD + 4, 0xFE);
+ DELAY(500000); /* wait 0.5 sec to see if that did it */
+ printf("Keyboard reset did not work, attempting CPU shutdown\n");
+ DELAY(1000000); /* wait 1 sec for printf to complete */
/* force a shutdown by unmapping entire address space ! */
bzero((caddr_t) PTD, NBPG);
--
Rod Grimes rgrimes@gndrsh.aac.dev.com
Accurate Automation Company Custom computers for FreeBSD
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504190029.RAA00537>
