Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2002 17:31:49 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Karl Dunn <k.l.dunn@ieee.org>
Cc:        freebsd-alpha@freebsd.org
Subject:   Re: Multia: syscons does not find PCI vga card
Message-ID:  <3DD2FD05.882412E3@mindspring.com>
References:  <Pine.OSF.4.44.0211131303490.445128-100000@fly.hiwaay.net>

next in thread | previous in thread | raw e-mail | index | archive | help
"Karl L. Dunn" wrote:
> I have a Multia/UDB (alpha) to which I added a Diamond VGA card in the
> internal PCI slot.  This has a S3 Trio64V+ chip.  The intent is to be able
> to run X over FreeBSD 4.6.2.
[ ... ]
> The problem is that syscons can't find the S3 VGA (see the verbose dmesg
> output below).  Maybe this is related to what the SRM leaves behind, but I
> doubt it.  The kernel here is the GENERIC that came on the 4.6.2 CD I got
> from the BSD mall.
[ ... ]
>  pci0: <S3 Trio graphics accelerator> (vendor=0x5333, dev=0x8811) at 12.0 irq 15
[ ... ]
>  sc0: no video adapter found.
>  sc0: <System console> failed to probe on isa0

OK.  Probably it's because the syscons code forces vid_register()
in the case that it's possible to use it as a console, and that
calls probe_adapters(), which ends up returning noting, because
the PCI bus hasn't been probed yet, and there's no BIOS knowledge
of an adapter.  Basically, this means that "vga_init_done" is true,
and so it doesn't get reprobed later.

The fix is to make the syscons driver inelegible as a console
device, which should avoid the early probe, at which point the
later probe should find it successfully, since it doesn't have
a failed probe that won't be repeated.

Alternately, you can hack probe_agapters() in /sys/dev/fb/vga.c:

#if !defined(VGS_NO_BIOS)
    /* do this test only once */
    if (vga_init_done)
        return biosadapters;
#endif

and this will probably work for your case, but is not something
that can be committed because it would screw up part of the time.

If you want a permanent fix, you'll want to only set vgs_init_done
to TRUE in the case that it's found.  This *might* work satisfactorily
(it doesn't puke out my x86 box):

    /* do this test only once */
    if (vga_init_done && biosadapters > 0)
        return biosadapters;

...it causes the probe to repeat, even if it was attempted previously,
so long as it failed previously.  IT's ugly, but if you have no console,
you probably don't care.

Really, the console code wants to be able to be attached at any
point in the boot process, so that your console messages end up
going to "the no place", until the console is attached to syscons.

That's a lot of work, and it would be very hard to get past an
x86-centric commit review, so I don't recommend it.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DD2FD05.882412E3>