From owner-freebsd-current Sun Jun 25 16:12:20 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id QAA11901 for current-outgoing; Sun, 25 Jun 1995 16:12:20 -0700 Received: from haywire.DIALix.COM (peter@haywire.DIALix.COM [192.203.228.65]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id QAA11894 for ; Sun, 25 Jun 1995 16:12:16 -0700 Received: (from peter@localhost) by haywire.DIALix.COM (8.6.12/8.6.12/DIALix) id HAA24996; Mon, 26 Jun 1995 07:11:42 +0800 Date: Mon, 26 Jun 1995 07:11:40 +0800 (WST) From: Peter Wemm To: Bruce Evans cc: current@freebsd.org Subject: Re: i386/563: isa conflict detection cannot handle ioaddr 0x0 In-Reply-To: <199506252216.IAA08228@godzilla.zeta.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: current-owner@freebsd.org Precedence: bulk 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 " ?" == "" is a step in the wrong direction as it is a slight loss of existing (albeit inconsistant) functionality. Cheers, -Peter