lkml.org 
[lkml]   [1998]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: proper ioport space allocation
On Thu, 17 Dec 1998, Kurt Garloff wrote:

> On Thu, Dec 17, 1998 at 10:22:18AM -0600, Bob McElrath wrote:
> > I've been playing with the pas2 (sound) module on my Alpha (because it works
> > on Intel, but not Alpha), and have discovered that this module never
> > allocates any portspace. (i.e. cat /proc/ioports shows no mention of the
> > PAS16 driver). Now in looking through the developer's kit and such I have
> > discovered that this card uses an absolute boatload of portspace. It starts
> > at 0x388 and uses harmonics (of 0x400) above that, as well as one other
> > random port. (List below)
>
> 2^10 = 0x400.
> Old ISA cards only used 10bits for decoding the address, so they felt
> addressed even when their address + 0x400 ... was used. I will call this
> ISA aliasing for now.
> I think your PAS card knows how to decode all 16 bits of the ISA bus. Just
> the driver checks, that there are no other cards having allocated aliases of
> the requested address, assuming the other card might be stupid enough to
> only decode 10bits.
> It should be fine to check for the aliases and printk a warning, or abort
> with an error message, if the PAS only uses 10bits. Does anybody know this?

I think you're right. Each of the 2-bit ranges seems to have a specific
function. For instance, Mixer functions are at 0x788 (+4), PCM control is
at 0xF88 (+4). It couldn't distinguish 0x788 from 0x388 unless it decoded
all 16 bits. So it actually *uses* all the higher harmonics. I suspect
that harmonics that don't have definitions in my developer's kit might map
to ports on the board's ASIC, and have some (undocumented) function, and
thus it would be bad if another driver/app tried to use them.

> In any case, I would only register one address and not all the aliases.

Why? It seems to me that the only way to avoid conflict of devices is to
register *all* the harmonics. Perhaps the holder of /proc/ioports
information (whatever it is...) should define a 0x400+ harmonic method of
allocation, so that you don't have to individually register each harmonic,
and so that the output of /proc/ioports is less than 50 pages.

Does anyone know if the PCI-ISA bridge blocks addresses with something other
than zero in the high word from reaching the ISA devices? (I assume PCI I/O
ports are 32-bits)

-- Bob

Bob McElrath (mcelrath@draal.physics.wisc.edu) Univ. of Wisconsin at Madison


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.069 / U:1.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site