lkml.org 
[lkml]   [2006]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access
On 5/4/06, Peter Jones <pjones@redhat.com> wrote:
> On Thu, 2006-05-04 at 17:18 -0400, Jon Smirl wrote:
> > On 5/4/06, Peter Jones <pjones@redhat.com> wrote:
>
> > > It doesn't matter -- you can accomplish the same thing with e.g.
> > > libx86emu and simply mapping the option rom to 0xc0000. But you want to
> > > do that in userland, not in the kernel.
> >
> > It is much more complicated than than you describe.
>
> I didn't really feel like explaining the parts we both already know.
> I'll try to remember to do so in the future.
>
> > Go look at the ROM code already checked in. Laptop video ROMs are not
> > simple PCI devices that can be mapped around. They are stored in
> > compressed form inside the system ROM and expanded at boot.
>
> Yes, and this format is documented, too. But right now there's no way
> to get access to it with tools to actually do anything.
>
> > If you lose the shadow copy in RAM there is no API for getting it back.
>
> Except to enable the BAR and read it from the assigned address...

Let me be clear here. A lot of laptop video hardware does not have a
video ROM. Therefore you can not enable the BAR and read it from an
assigned address since there is no ROM to be read. Instead the video
ROM images are compressed and stored inside the system BIOS ROM. The
location of the image is not a public thing. At boot time the
compressed video ROM is expanded out of the system ROM into shadow RAM
at C000:0. There is no real ROM there, it is only a copy in RAM. If
you lose that copy the only way to get it back is to reset the
machine. The ROM code already in the kernel knows about these shadow
copies and won't mess them up.


> > These compressed ROMs are the source of a lot of laptop user's
> > problems with suspend/resume on Linux.
>
> Absolutely. That's why I want a method to access them, which this
> "enable" file provides.
>
> > VGA support for multiple cards is a very complicated problem.
>
> Please quit jumping up and down in the bicycle path telling everybody
> how hard it is to ride a bike.
>
> --
> Peter
>
>


--
Jon Smirl
jonsmirl@gmail.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-04 23:50    [from the cache]
©2003-2011 Jasper Spaans