[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: Legacy IO spaces (was Re: [RFC] Reliable video POSTing on resume)
From:       Jesse Barnes <jbarnes () engr ! sgi ! com>
Date:       2005-02-04 23:34:02
Message-ID: 200502041534.03004.jbarnes () engr ! sgi ! com
[Download RAW message or body]

On Friday, February 4, 2005 2:59 pm, Jon Smirl wrote:
> Can you build a no-op version of these that will run on the x86? That
> would allow a single user space API for x86, ia64. Maybe the ppc
> people will join too.

Shouldn't be too hard I think.

> Why does this appear in /sys/class/pci_bus/0000:17/? For example on my
> x86 system I have a single legacy space but if I do a dir of
> /sys/class/pci_bus I show three buses. You wouldn't want the
> legacy_io/mem attributes on each of these three buses since that
> implies three independent address spaces.
>
> [jonsmirl@jonsmirl pci_bus]$ ls /sys/class/pci_bus
> 0000:00  0000:01  0000:02

In that case they'll all point to the same memory and I/O space.  On the 
machines I coded it on, each bus has its own space.

> How would things be sorted out so that legacy_io/mem attributes only
> appear on my root bridge chip 0000:00 and not on the child buses. I
> guess this also means the user space app has to search through the bus
> entries.

We might have to add more arch code in that case, but I thought it might be 
easiest for apps if they could just open the space for the bus they're 
interested in and it would be routed correctly.  I think that'll be ok so 
long as two apps aren't trying to do stuff on the bus at the same time.

> In order to know how many VGA many simultaneous VGA devices you can
> have there needs to be some way to count the number of legacy address
> spaces. Maybe there should be a /sys/class/legacy to describe the
> legacy spaces. Is it possible to have the same legacy space aliased at
> two different addresses depending on which root bus is used to get to
> it?
>
> I need to know how to answer these questions:
> 1) how many legacy spaces are there

Depends on your platform.

> 2) how many VGA devices are in each space

Ditto since the number of spaces depends on the platform.

> 3) how do I do VGA bus routing to access the VGA device

This interface just deals with the whole legacy ISA space, not just VGA ports.  
I guess some chipsets will do VGA only or split them up?

> 4) how do I address each of the devices.

Jesse
-
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/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic