Date: Thu, 12 Oct 95 08:38 WET DST From: uhclem%nemesis@fw.ast.com (Frank Durda IV) To: hackers@freebsd.org Subject: I/O port 0 == autoconfig? Message-ID: <m0t3Nqa-000IuWC@nemesis.lonestar.org>
next in thread | raw e-mail | index | archive | help
Jordon suggested mentioning this here for feedback. In the more recent releases, a "visual" mode has been added to the kernel -c feature. In case you haven't played around with it, one of the things it does is only offer the user a limited number of choices for what settings can be altered on a given device. "Visual" (for lack of a better name) decides values can't be changed by seeing if the kernel config value for a given parameter was -1. If it's something else, it lets you change it. If it was -1, you can't. At least one place where this strategy has conflicted is the matcd driver. It used -1 for the I/O port to signify that it would probe a list of "known" locations for that hardware, rather than requiring the user to know. (On some SoundBlaster cards, it is difficult for the user to determine what I/O addresses the card is using because Creative Labs didn't write the information down anywhere and the DOS drivers only list the base address for the audio sections of the card.) Clearly, this means that the "visual" mode is unable to change the setting for the I/O port (because it is -1), but the old-style config utility can. Mike Smith has proposed changing the use of "-1" by matcd to "0", arguing that I/O port is legal, "but nobody uses it". Actually I/O port 0 is used by the DMA hardware, but not as a base address you would assign a device driver to. On the other hand, I proposed making "-1" an exception for I/O ports, since all drivers I know require at least one I/O port, so the field can never be set to "no ports needed". Mike indicates that dealing with a negative number in "visual" would be nasty and that this wasn't really an option. I haven't had time to look at his code, so I don't know one way or the other. Since we seem to be limited to the first choice (unless you have a better idea that doesn't eliminate the autoconfiguration capability), and so the question is, does anybody see any near-term problems with a change like this: Change "visual" to treat "0" as an autoconfiguring I/O port parameter (can't be done for DMA or IRQs since 0 is legal for both) Change the matcd driver and any other drivers doing similar things to use "0" as the key for autoconfiguring the I/O port it uses. Please send any comments on this back ASAP. Thanks. Frank Durda IV uhclem%nemesis@fw.ast.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0t3Nqa-000IuWC>