From owner-freebsd-current Tue Apr 18 17:32:28 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id RAA28571 for current-outgoing; Tue, 18 Apr 1995 17:32:28 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id RAA28562 for ; Tue, 18 Apr 1995 17:32:24 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id RAA00537 for current@freebsd.org; Tue, 18 Apr 1995 17:29:50 -0700 From: "Rodney W. Grimes" Message-Id: <199504190029.RAA00537@gndrsh.aac.dev.com> Subject: Fix for motherboards that don't reboot. To: current@FreeBSD.org Date: Tue, 18 Apr 1995 17:29:49 -0700 (PDT) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1876 Sender: current-owner@FreeBSD.org Precedence: bulk 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 #include + #include #include #include #include #include + #include + #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