*BSD News Article 4783


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!spool.mu.edu!sol.ctr.columbia.edu!ucselx!crash!fpm
From: fpm@crash.cts.com (Frank Maclachlan)
Subject: Fix for 386BSD 0.1 BOOT009 bug
Organization: CTS Network Services (crash, ctsnet), El Cajon, CA
Date: 09 Sep 92 13:55:13 PDT
Message-ID: <1992Sep09.135513.18978@crash>
Followup-To: comp.unix.bsd
Summary: Boot hangup w/ OPTi chipset MB fixed
Keywords: OPTi,BOOT009,bug
Lines: 36

I encountered the BOOT009 bug (buglist 2) when I replaced the mother-
board in my 386BSD 0.1 system with an OPTi chipset based clone 386/40
clone board.  The copyright notice appeared and the system hung w/
no further activity.

I fixed the problem by adding a delay in the probe routine in
'/sys/i386/isa/pccons.c' just before the keyboard controller is reset.
Apparently the keyboard controller reset was falling through the cracks
because of insufficient delay between the output to KBOUTP and the call
to kbd_cmd() on the next line and the test for an ack from the keyboard
controller was looping endlessly.  I am enclosing a context diff of the
changes I made.


*** pccons.c.ORIG	Tue Aug 11 17:08:53 1992
--- pccons.c	Sat Aug 22 14:16:26 1992
***************
*** 173,182 ****
--- 173,184 ----
  	outb(KBOUTP, CMDBYTE);
  
  	/* Start keyboard stuff RESET */
+ 	DELAY(1000);
  	kbd_cmd(KBC_RESET);
  	while((c = inb(KBDATAP)) != KBR_ACK) {
  		if ((c == KBR_RESEND) ||  (c == KBR_OVERRUN)) {
  			if(!again)printf("KEYBOARD disconnected: RECONNECT \n");
+ 			DELAY(1000);		/* just in case */
  			kbd_cmd(KBC_RESET);
  			again = 1;
  		}

--
UUCP: {hplabs!hp-sdd ucsd nosc}!crash!fpm
ARPA: crash!fpm@nosc.mil
INET: fpm@crash.cts.com