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 Thu, 2006-05-04 at 16:40 -0400, Jon Smirl wrote:
> On 5/4/06, Matthew Garrett <[email protected]> wrote:
> > Bjorn Helgaas <[email protected]> wrote:
> >
> > > There's already a "rom" file in sysfs.  Could vbetool and friends
> > > use that?
> >
> > Not if you have multiple graphics cards.
> 
> Not true, the rom attribute maps the ROM into PCI space where ever the
> kernel tells it to and reads it from there. It is the PCI VGA
> emulation feature that forces the ROM to appear at C000:0. You can
> have the ROM mapped and VGA emulation turned off.

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.

> This brings up another major point. X changes the PCI VGA emulation
> routing from user space, another thing that it should not be doing. I
> have posted patches before providing a sysfs VGA attribute on class
> VGA devices. By setting the attribute to 1 you can control the active
> VGA emulation device.
> 
> This is yet another way that user space can mess up the kernel. If VGA
> routing is changes under fbdev (my attribute notifies fbdev, the fbdev
> code for processing the notification did get checked in) then the
> console will screw up.

And this change allows userland to avoid doing that.

> The usual screw up is that the console goes
> blank because hardware fonts are not setup correctly on the new
> console.

And that's completely unrelated to this problem.

-- 
  Peter

-
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