summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_tireg.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-07-27 03:54:48 +0000
committerwpaul <wpaul@FreeBSD.org>1999-07-27 03:54:48 +0000
commit59d886ea36d01bc356084ffc456561f7b6083efa (patch)
tree189721804bfb31caaf356c392f4180a560001c20 /sys/pci/if_tireg.h
parent7d55c9782194733d45645a1af63a8f7c703fa7fb (diff)
downloadFreeBSD-src-59d886ea36d01bc356084ffc456561f7b6083efa.zip
FreeBSD-src-59d886ea36d01bc356084ffc456561f7b6083efa.tar.gz
On FreeBSD/i386, when you use the SYS_RES_MEMORY resource to allocate
a PCI memory mapped region, rman_get_bushandle() returns what happens to be a kernel virtual address pointing to the base of the PCI shared memory window. However this is not the behavior on all platforms: the only thing you should do with the bushandle is pass it to the bus_spare_read()/bus_space_write() routines. If you actually do want the kernel virtual address of the base of the PCI memory window, you need to use rman_get_virtual(). The problem is that at the moment, rman_get_virtual() returns a physical address, which is bad. In order to get the kernel virtual address we need, we have to play with it a little. Presumeably this behavior will be changed, but in the meantime the Tigon driver won't work. So for the moment, I'm adding a kludge to make things happy on the alpha: the correct kernel virtual address is calculated from the value returned by rman_get_virtual(). This should be removed once rman_get_virtual() starts doing the right thing. This should make the Tigon actuall work on the alpha now.
Diffstat (limited to 'sys/pci/if_tireg.h')
-rw-r--r--sys/pci/if_tireg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/pci/if_tireg.h b/sys/pci/if_tireg.h
index 65483a2..09b1982 100644
--- a/sys/pci/if_tireg.h
+++ b/sys/pci/if_tireg.h
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_tireg.h,v 1.7 1999/07/23 02:17:59 wpaul Exp $
+ * $Id: if_tireg.h,v 1.8 1999/07/23 18:46:24 wpaul Exp $
*/
/*
@@ -1107,6 +1107,7 @@ struct ti_jpool_entry {
struct ti_softc {
struct arpcom arpcom; /* interface info */
bus_space_handle_t ti_bhandle;
+ vm_offset_t ti_vhandle;
bus_space_tag_t ti_btag;
void *ti_intrhand;
struct resource *ti_irq;
OpenPOWER on IntegriCloud