From owner-freebsd-hackers Mon Sep 25 07:32:06 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id HAA12341 for hackers-outgoing; Mon, 25 Sep 1995 07:32:06 -0700 Received: from etinc.com (etinc-gw.new-york.net [165.254.13.209]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id HAA12328 for ; Mon, 25 Sep 1995 07:31:56 -0700 Received: from trumpet.etnet.com (trumpet.etnet.com [129.45.17.35]) by etinc.com (8.6.11/8.6.9) with SMTP id KAA29509; Mon, 25 Sep 1995 10:39:25 -0400 Date: Mon, 25 Sep 1995 10:39:25 -0400 Message-Id: <199509251439.KAA29509@etinc.com> X-Sender: dennis@etinc.com X-Mailer: Windows Eudora Version 2.0.3 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Poul-Henning Kamp From: dennis@etinc.com (dennis) Subject: Re: LKM: how to fiddle in interrupt routine ptrs ? Cc: hackers@freebsd.org Sender: owner-hackers@freebsd.org Precedence: bulk >I guess, that you have noticed that pccard is doing this kind of stuff today, >and isn't doing it particular well, since nobody knows what to do :-( > >It seems to me that we have several kinds of devices: > >1. things which say: give me 0x200-0x21f, (similar for iomem, irq & dma). >2. things which say: give me one of {0x200-0x21f,0x300-0x31f,0x320-0x33f} > (similar for iomem, irq & dma). >3. things which say: give me 0x20 ioaddresses. (similar for iomem, irq & dma) > >Now, we need to cater for all of these one way or another, and it doesn't >get any easier when some pieces of HW use method 2 for port, 1 for irq and >3 for iomem. > >Anybody thought about this from scratch ? > Linux uses a check_region(), request_region() and release_region() approach, although I don't think there is a giveme_a_region_please(). Memory is a little tricky because many cards don't initalize the memory until they are started, which may not be at device load time. We don't initialize our card with the device specified location, which gives you the flexibility to move it around (in case of confict) without changing the kernel. Dennis ---------------------------------------------------------------------------- Emerging Technologies, Inc. http://www.etinc.com Synchronous Communications Cards and Routers For Discriminating Tastes. 56k to T1 and beyond. Frame Relay, PPP, HDLC, and X.25