Re: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/4/06, Peter Jones <[email protected]> wrote:
On Thu, 2006-05-04 at 17:18 -0400, Jon Smirl wrote:
> On 5/4/06, Peter Jones <[email protected]> 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
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux