Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 1995 12:11:50 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        hackers@FreeBSD.org, jhay@mikom.csir.co.za, sos@FreeBSD.org
Subject:   Re: syscons probe function
Message-ID:  <199504240211.MAA14777@godzilla.zeta.org.au>

next 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.

I suspect that the crash is due to a missing video BIOS.  syscons gropes
in the video BIOS memory for `video_mode_ptr' iff the card appears to be
an SVGA.  The pointers are supposed to be checked with the ISMAPPED()
macro.  However, video mode data isn't checked.

Perhaps the main thing wrong is the SVGA test:

	outb(crtc_addr, 7);
	if (inb(crtc_addr) == 7)
		svga = TRUE;

If there is no device at crtc_addr, then the inb() will return a garbage
value which will often be the value just written.  The test should be
at least as complicated as:

	outb(crtc_addr, 7);
	outb(harmless_port, value_other_than_7);
	if (inb(crtc_addr) == 7)
		svga = TRUE;

Bruce



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