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

From: Jon Smirl
Date: Sun May 14 2006 - 20:13:33 EST


On 5/14/06, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote:
On Sat, 2006-05-13 at 20:56 -0400, Jon Smirl wrote:
> On 5/13/06, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote:
> > 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...
>
> Whenever klibc gets merged it would probably be good to add a
> libemu86. Did you get one put together that you're happy with?

No, not so far yet. Haven't had much time though. Did some expriments
based on what you sent me back then, got it to work with loads of hacks,
but I never properly cleaned it up.

> Between the ROM attribute, klibc and libemu86 there will then be
> enough support to write a tiny POST program that POSTs secondary and
> non-x86 primary cards at boot. It will still need a little support in
> sysfs for PCI bus VGA routing but we're almost there.

And we need to "capture" the resulting BIOS image after POST and have a
away to give that to the drivers as it will contain useful tables that
the driver will need as well...

The ROM API already has support it in for storing a RAM based copy. I
believe it works but no one is using it so it is not well tested.
Something will need to be hooked up to get the copy from user space
back into the kernel. At one point I was working on generalizing
request_firmware to make it handle more that firmware downloads.


Ben.





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