Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Oct 1997 09:53:49 +0930
From:      Mike Smith <mike@smith.net.au>
To:        "Fred L. Templin" <templin@erg.sri.com>
Cc:        Mike Smith <mike@smith.net.au>, freebsd-hackers@freebsd.org
Subject:   Re: pccard driver questions (FreeBSD 2.2.2-RELEASE + PAO-970616) 
Message-ID:  <199710150023.JAA00500@word.smith.net.au>
In-Reply-To: Your message of "Tue, 14 Oct 1997 09:58:58 MST." <199710141659.JAA03886@grayling.erg.sri.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710150023.JAA00500>