Jeremy Jackson <[EMAIL PROTECTED]> writes:
> "Eric W. Biederman" wrote:
>
> > Jeremy Jackson <[EMAIL PROTECTED]> writes:
> >
> > > "Eric W. Biederman" wrote:
> > >
> > > why does xfree86 use the video bios for multi-headed initialization?
> > Beats the heck out of me. It may have been a reasonable bang for
> > the buck compromise to support every card at once. But I wouldn't
> > without knowing why it is safe, trust the normal BIOS to initialize a
> > second head if it didn't do it during the boot up sequence. There are
>
> pc's can only init one card via BIOS. you can set the io permission
> bitmap and page protections /segment registers to protect anything
> but what the video bios extension is supposed to touch (ie vid card)
Video cards have i/o ports all over the map. I've played that game
with dosemu too many times to know that it is very tricky to predict
where a video card lives. Besides the iopermission bitmap doesn't
cover everything.
> > too many legacy i/o ports that overlap on every video card.
>
> no only one card actually emulates an ibm VGA adapter's
> registers. it's a pci config regster bit. the rest are (or all
> if you clear the vga-enable bit) mapped like any other
> PCI device.
I'm suprised you can turn off the legacy/conflicting ports with just
a single bit. I know it at least felt much worse.
> > > I don't think this is trivial,
> > > since video card register specs seem to be hard to get (NDA) in many cases
> > > and/or the init sequence is complicated.
> >
> > It may not be quite trivial, but it is the direction the kernel is
> > heading in. I can name at least 3 framebuffer drivers that do
> > complete video card setup. And there are probably more.
>
> I agree that's the way it *should* go.
And it is the way that it is going. The cyrusfb driver is a decent
case. When we started it did not know how to setup the bare card.
Now it only needs a bit set. Now that we finally have a kernel
interface for dealing with video cards the drivers are actually being
written.
When I went to bring up the DS10 the promedia2fb was already and it
already worked well enough I don't have to do a thing, except compile
it in.
> But some cards must have
> NDA or complexity issues (just inferring here) that's why XF86
> uses the real-mode bios to init the card.
Maybe.
> Since it appears it's
> possible ( == XF86 4.0 work on *my* 3 headed machine),
> kernel could use all cards with fb driver immediately with such
> a technique.
>
> I forget now why this all was so important...?
The question came up could linuxBIOS do the video card init by
running the onboard ROM. If you want to you can do it in linux. From
where I'm sitting enough video cards are already supported in the
kernel, that it I have no interest in doing this in linuxBIOS.
Someone with different priorities can of course do something
different. If I have problems I'd rather fix a specific framebuffer
driver though.
Eric