Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 1995 07:11:40 +0800 (WST)
From:      Peter Wemm <peter@haywire.DIALix.COM>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@freebsd.org
Subject:   Re: i386/563: isa conflict detection cannot handle ioaddr 0x0
Message-ID:  <Pine.SV4.3.91.950626064610.82G-100000@haywire.DIALix.COM>
In-Reply-To: <199506252216.IAA08228@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Jun 1995, Bruce Evans wrote:
> 
> >The conflict detection code does not allow for the possibility that
> >a device does not have an IO address.
> 
> 0 is a valid io address.  I think the bug is actually that config
> generates address 0 instead of an out of bounds address for devices that
> don't have an io address.  The out of bounds address should probably be
> -2.  -1 is used for address `?'.  However, Config fails to distinguish
> between `?' and `none' for other items, and isa.c only knows that -1 is
> special, so the out of bounds address should be -1 for now.
> 
> Bruce

But isn't the DMA1 controller at IO address 0x0 -> 0x1F?  IMHO, that 
makes it just about as invalid a choice for an expansion card as one can 
get.. :-)

Hmm.  There appears to be a sort-of convention with the existing code..  
if you dont specify a maddr, config sets it to zero.  isa.c knows that 
"maddr 0" is disabled.

Same goes for the irq - it appears to be set to 0 if it's not specified 
in the config line, and the isa code disables conflict testing.  As far 
as I can see, there _is_ an IRQ0 in the system (at least there are 
vectors in isa.c), but I think it's permanently wired to a timer or 
something.

On the other hand, drq appears to be -1 for being "not specified", to blow 
away my argument above. :-)

My preference would be that "port ?" is different to "" (none).  Indeed, 
I have a use for this in the slxos driver - I need a way to specify to 
either use a configured irq (ie: "irq 14"), or to probe for settings or 
use the first available (ie: "irq ?"), or to run in polled mode with no 
irq handlers (ie: "" (no setting)).

For now, I'd plead for making the io port conflict detection consistant 
with the memory address conflict detection.. ie: "0" == no setting.  
It'll at least make the current code that's "out there" work.

If somebody wants to go through and sort out "config" and isa.c and the 
drivers to use -2 as "no setting", that would be a "Good Thing".  IMHO, 
making "<setting> ?" == "" is a step in the wrong direction as it is a 
slight loss of existing (albeit inconsistant) functionality.

Cheers,
-Peter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.91.950626064610.82G-100000>