public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	Jon Smirl <jonsmirl@yahoo.com>
Subject: Re: pci_fixup_video() bogosity
Date: Tue, 08 Mar 2005 18:17:45 +1100	[thread overview]
Message-ID: <1110266266.13607.264.camel@gaston> (raw)
In-Reply-To: <9e473391050307215776f5c06@mail.gmail.com>

On Tue, 2005-03-08 at 00:57 -0500, Jon Smirl wrote:
> On Tue, 08 Mar 2005 15:38:29 +1100, Benjamin Herrenschmidt
> <benh@kernel.crashing.org> wrote:
> > Hi !
> > 
> > While working on writing a VGA access arbiter for kernel & userland,
> > I wondered how to properly get my "initial" state at boot. For that,
> > I looked at how the new PCI ROM stuff does to find out who owns the
> > memory shadow at c0000, and found it quite bogus.
> > 
> > >From what I see, the code is only based on looking at what bridges
> > have VGA forwarding enabled. It doesn't test the actual IO and Memory
> > enable bits of the VGA cards themselves.
> 
> Let's fix it up and make it more robust. I was playing with checking
> IO/mem enable and forgot to finish it.

Ok, have a look at my prototype VGA arbiter. I need something similar to
spot the "default" VGA device at boot, maybe your stuff could be moved
completely to the arbiter ?
> 
> > What if you have 2 cards under the same bridge ?
> 
> I believe the default on x86 is to pick the one in the lowest slot
> number. What happens on PPC?

What I mean is your code won't work afaik, you should check the one
which has MEM/IO enabled. On PPC, I don't know, depends on the firmware,
pretty much all pmac cards come with the legacy decoding disabled anyway
(they are fully posted in "native" mode by the firmware).

Some PPC's have x86 emulators and/or some VGA capabilities, but then, I
expect only one of them to be left enabled by the firmware.
 
Ben.



  reply	other threads:[~2005-03-08  7:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-08  4:38 pci_fixup_video() bogosity Benjamin Herrenschmidt
2005-03-08  5:57 ` Jon Smirl
2005-03-08  7:17   ` Benjamin Herrenschmidt [this message]
2005-03-11  3:39     ` Jon Smirl
2005-03-11  3:42       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1110266266.13607.264.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=jonsmirl@gmail.com \
    --cc=jonsmirl@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox