public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Peter Jones <pjones@redhat.com>
Cc: Martin Mares <mj@ucw.cz>, Jon Smirl <jonsmirl@gmail.com>,
	Matthew Garrett <mgarrett@chiark.greenend.org.uk>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	linux-pci@atrey.karlin.mff.cuni.cz,
	Dave Airlie <airlied@linux.ie>, Andrew Morton <akpm@osdl.org>,
	greg@kroah.com, linux-kernel@vger.kernel.org,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access
Date: Sun, 14 May 2006 10:29:31 +1000	[thread overview]
Message-ID: <1147566572.21291.30.camel@localhost.localdomain> (raw)
In-Reply-To: <1146778197.27727.26.camel@localhost.localdomain>


> By allowing tools to read the rom from the pci device itself, instead of
> whichever device's rom happens to be at 0xC0000.  libx86emul allows you
> to define routines that it uses for memory access, so you can copy the
> ROM out to normal memory, and map that memory to the appropriate address
> that way.  X and vbetool both already have to do this, but without
> copying the firmware image, to do DDC probing on x86_64.
> 
> > I agree with Arjan that the attribute could be useful for some special
> > tools, but using it in X is likely to be utterly wrong.
> 
> I'm actually talking about vbetool here, though X could use these
> methods.  Indeed, libx86emul comes from X itself.

There are reasons why you may have to read the image at c0000... There's
a bunch of laptops where it's in fact the only way to get to the video
BIOS as it doesn't have a ROM attached to the video chip (it's burried
in the main BIOS which thankfully copied it to c0000 when running it).
In some cases, the BISO ROM self-modifies it's c0000 and it's that
modified copy that the X (or fbdev) driver should get. Remeber that
drivers needs access to the ROM for more than just POSTing the chip...

In addition, we need to centralize VGA routing mecanism in the kernel
for other reasons. For example, because it might imply disabling MMIO or
IO access to other cards (currently, we have to disable _all_ other
cards on the same bus segment that claim to be VGA since we have no way
to know which ones might be able to simply be configured not to decode
legacy VGA accesses, though an appropriate arbiter ABI would allow to
handle that too). Thus am fbdev or X server currently running on another
card would explode in flames while something like vbetool is re-routing
VGA access to a card for POST'ing or other things vbetool can do.

It's a shitty problem, it's complicated, but there is no easy way out
thanks to PC manufacturers and Intel keeping absolutely disgusting VGA
"legacy" crap part of the PCI standard for so long.

Note that I posted various prototypes of what a VGA abiter could look
like a while ago. I have no time to resume work on that and my
prototypes weren't perfect, but that's something one interested party
could probably use as a starting point to a more complete solution.
 
Ben.


  parent reply	other threads:[~2006-05-14  0:30 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-29  8:46 Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access Arjan van de Ven
2006-04-29  8:51 ` Andrew Morton
2006-04-29  8:59   ` Arjan van de Ven
2006-04-29  9:04     ` Dave Airlie
2006-05-02 16:14       ` Bjorn Helgaas
2006-05-02 16:21         ` Greg KH
2006-05-02 16:51           ` Jesse Barnes
2006-05-04 19:09       ` Bjorn Helgaas
2006-05-04 19:11         ` Arjan van de Ven
2006-05-04 19:26           ` Bjorn Helgaas
2006-05-04 19:42             ` Matthew Garrett
2006-05-04 20:40               ` Jon Smirl
2006-05-04 21:05                 ` Peter Jones
2006-05-04 21:17                   ` Martin Mares
2006-05-04 21:29                     ` Peter Jones
2006-05-04 21:37                       ` Martin Mares
2006-05-04 21:38                       ` Jon Smirl
2006-05-04 23:22                         ` Peter Jones
2006-05-05 19:20                           ` Ian Romanick
2006-05-05 20:14                             ` Jon Smirl
2006-05-05 20:26                               ` Greg KH
2006-05-05 20:35                                 ` Jon Smirl
2006-05-05 20:43                                   ` Jon Smirl
2006-05-05 21:10                                     ` Greg KH
2006-05-05 21:06                                   ` Greg KH
2006-05-05 21:15                                     ` Jon Smirl
2006-05-05 22:27                                       ` Greg KH
2006-05-06  0:05                                         ` Jon Smirl
2006-05-06  1:57                                           ` Dave Airlie
2006-05-06  3:39                                             ` Jon Smirl
2006-05-06 12:42                                               ` Krzysztof Halasa
2006-05-06 13:08                                                 ` Jon Smirl
2006-05-06 18:10                                                   ` Krzysztof Halasa
2006-05-06 18:24                                                     ` Jon Smirl
2006-05-06 23:16                                                       ` Krzysztof Halasa
2006-05-07  5:56                                                         ` Kyle Moffett
2006-05-07 12:05                                                           ` Krzysztof Halasa
2006-05-07 19:07                                                             ` Kyle Moffett
2006-05-08  0:03                                                               ` Krzysztof Halasa
2006-05-07 13:12                                             ` Pavel Machek
2006-05-08 14:26                                               ` Kyle Moffett
2006-05-08 14:54                                                 ` Arjan van de Ven
2006-05-08  4:06                                           ` Dave Airlie
2006-05-08  5:27                                             ` Jon Smirl
2006-05-07  8:54                                 ` Adam Belay
2006-05-14  0:29                       ` Benjamin Herrenschmidt [this message]
2006-05-14  0:56                         ` Jon Smirl
2006-05-14 23:57                           ` Benjamin Herrenschmidt
2006-05-15  0:14                             ` Jon Smirl
2006-05-14  0:57                         ` Patrick McFarland
2006-05-14  1:11                           ` Jon Smirl
2006-05-04 21:18                   ` Jon Smirl
2006-05-04 21:38                     ` Peter Jones
2006-05-04 21:48                       ` Jon Smirl
2006-05-04 21:57                         ` Peter Jones
2006-05-04 22:05                           ` Jon Smirl
2006-05-04 19:49             ` Arjan van de Ven
2006-05-15  2:10     ` Eric W. Biederman
2006-05-02 16:38 ` Jon Smirl
2006-05-02 16:45   ` Arjan van de Ven
2006-05-02 16:59     ` Jon Smirl
2006-05-02 17:00       ` Arjan van de Ven
2006-05-02 17:13         ` Jon Smirl
2006-05-02 18:27           ` Arjan van de Ven
2006-05-02 19:00             ` Jon Smirl
2006-05-02 19:29               ` Peter Jones
2006-05-02 21:40               ` Dave Airlie
2006-05-02 21:52                 ` Jon Smirl
2006-05-02 23:36                   ` Dave Airlie
2006-05-03  0:19                   ` Matthew Wilcox
2006-05-03  0:26                     ` Valdis.Kletnieks
2006-05-03  1:24                     ` Jon Smirl
2006-05-03  1:30                       ` Dave Airlie
2006-05-03  6:02                   ` Arjan van de Ven
2006-05-03 13:23                     ` Jon Smirl

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=1147566572.21291.30.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=airlied@linux.ie \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=greg@kroah.com \
    --cc=jonsmirl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=mgarrett@chiark.greenend.org.uk \
    --cc=mj@ucw.cz \
    --cc=pjones@redhat.com \
    /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