From owner-freebsd-current Fri Sep 8 08:14:12 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id IAA11147 for current-outgoing; Fri, 8 Sep 1995 08:14:12 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id IAA11137 for ; Fri, 8 Sep 1995 08:14:05 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id BAA20724; Sat, 9 Sep 1995 01:10:11 +1000 Date: Sat, 9 Sep 1995 01:10:11 +1000 From: Bruce Evans Message-Id: <199509081510.BAA20724@godzilla.zeta.org.au> To: bde@zeta.org.au, current@freebsd.org, deischen@iworks.InterWorks.org Subject: Re: Getting around conflicts for a driver w/out base address Sender: current-owner@freebsd.org Precedence: bulk >It sounds like you want some sort of sorted linked list of port >addresses and ranges hanging off the isa_device structure. If this >kind of what you're thinking and there aren't enough horses to >implement it, then I'll volunteer to help out. >As to config, someone else would probably have to do that. I'm not >sure I understand the rules and yacc well enough to hack config. I don't want to change config very much now. It can already sort of handle lists of ports by duplicating entries, e.g.: device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr # usual device sc0 at isa? port 0x3b4 iomem 0xb0000 iosiz 0x8000 # portsize 0xc # mda device sc0 at isa? port 0x3c0 iomem 0xa0000 iosiz 0x10000 # portsize 0x10 # vga device sc0 at isa? port 0x3d4 iomem 0xb8000 iosiz 0x8000 # portsize 0xc # cga This gives 4 fairly usable entries in ioconf.c. An array format is probably better than a linked list format in all stages until the tables are actually used. There are a couple of external representations and the linked list would have to be linearized for each. It would be useful to have some routines for hanging all the info for each device off a single isa_device structure (so that every driver doesn't have to search all the devtabs for info about itself). There might be complications for overlapped ranges. E.g., vga memory isn't as shown above - it overlaps mda and cga memory. Ports such as the PPI only have conflicts at the bit level. Bruce