Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 1995 07:55:48 +0200 (SAT)
From:      John Hay <jhay@mikom.csir.co.za>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        hackers@FreeBSD.org, jhay@mikom.csir.co.za, sos@FreeBSD.org
Subject:   Re: syscons probe function
Message-ID:  <199504240555.HAA02863@zibbi.mikom.csir.co.za>
In-Reply-To: <199504240211.MAA14777@godzilla.zeta.org.au> from "Bruce Evans" at Apr 24, 95 12:11:50 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> >The changes to syscons.c in the last month or so panic my machines that do
> >not have a screen but have syscons in the kernel (they only have a serial
> >terminal). It happens somewhere in the attach routine during a bcopy.
> 
> >This led me to look through the the syscons.c file. One thing that bothers me
> >is that the probe can never fail. It assumes that there is a screen. In the
> >attach routine it will check if it is a colour screen otherwise it reverts
> >to monochrome.
> 
> >Shouldn't the probe determine if there is a screen and fail if there isn't?
> 
> Yes, but scinit() needs to decide before the probe is even called.
> 
Well just to get my machines working with a new kernel and not exclude syscons
I made the following change to the syscons probe routine. It just fail the
probe if the keyboard isn't there. NOTE that I don't think this is the right
or best way I just wanted to get going again.


*** syscons.c.v2.10.org	Wed Apr 19 21:09:18 1995
--- syscons.c	Wed Apr 19 21:14:23 1995
***************
*** 173,181 ****
  	}
      }
  gotres:
!     if (!retries)
  	printf("scprobe: keyboard won't accept RESET command\n");
!     else {
  gotack:
  	DELAY(10);
  	while ((inb(KB_STAT) & KB_BUF_FULL) == 0) DELAY(10);
--- 173,182 ----
  	}
      }
  gotres:
!     if (!retries) {
  	printf("scprobe: keyboard won't accept RESET command\n");
! 	return 0;
!     } else {
  gotack:
  	DELAY(10);
  	while ((inb(KB_STAT) & KB_BUF_FULL) == 0) DELAY(10);
***************
*** 183,190 ****
  	val = inb(KB_DATA);
  	if (val == KB_ACK)
  	    goto gotack;
! 	if (val != KB_RESET_DONE) 
  	    printf("scprobe: keyboard RESET failed %02x\n", val);
      }
  #ifdef XT_KEYBOARD
      kbd_wait();
--- 184,193 ----
  	val = inb(KB_DATA);
  	if (val == KB_ACK)
  	    goto gotack;
! 	if (val != KB_RESET_DONE) {
  	    printf("scprobe: keyboard RESET failed %02x\n", val);
+ 	    return 0;
+ 	}
      }
  #ifdef XT_KEYBOARD
      kbd_wait();
-- 
John Hay -- jhay@mikom.csir.co.za



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504240555.HAA02863>