From owner-freebsd-hackers Tue Oct 14 17:27:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA29581 for hackers-outgoing; Tue, 14 Oct 1997 17:27:11 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from word.smith.net.au (vh1.gsoft.com.au [203.38.152.122]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA29566 for ; Tue, 14 Oct 1997 17:26:57 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost.gsoft.com.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id JAA00500; Wed, 15 Oct 1997 09:53:51 +0930 (CST) Message-Id: <199710150023.JAA00500@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: "Fred L. Templin" cc: Mike Smith , freebsd-hackers@freebsd.org Subject: Re: pccard driver questions (FreeBSD 2.2.2-RELEASE + PAO-970616) In-reply-to: Your message of "Tue, 14 Oct 1997 09:58:58 MST." <199710141659.JAA03886@grayling.erg.sri.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 15 Oct 1997 09:53:49 +0930 From: Mike Smith Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > You could map a larger window; that'd certainly be better. TBH I > > haven't checked to see if there is a limitation that would prevent you > > from having a 96kB window for your card. > > This would be nice, but I'm somewhat skeptical it will be possible. I'll > certainly check into it with an optimistic viewpoint, however. If the PCIC will let you map the larger region, and there's somwhere you can put it, you win. Failing that, we will need to provide a mechanism for a driver to manipulate its mapping. > > So you are guaranteed notification (at splhigh()) of card removal > > before your mapping is revoked. > > By "guaranteed", I assume you mean guaranteed within the context of how > today's code works. That's good, but this seems like something I would > need to keep a close eye on should the architecture change at some point > in the future. (Yes, I know - there are numerous other portions of the > kernel to which this same statement would apply! :^} ) Basically, if you lock out interrupts during your transactions with the card, you should be fine; the mapping is unlikely to ever be revoked except under interrupt. eg. s = splhigh(); if (sc->mapping_base == NULL) { splx(s); return(ECARDREMOVED); } ... do stuff to card ... splx(s); Whilst the card may be removed in the 'do stuff' region, your mapping will not be invalidated, and you won't be able to kill the kernel. > Thanks for checking into this stuff, No sweat; you could say it's my job. 8) mike