Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2007 12:04:34 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        freebsd-current@freebsd.org
Subject:   PAT_WRITE_COMBINING: how to use?
Message-ID:  <18012.20265.657576.944142@grasshopper.cs.duke.edu>

next in thread | raw e-mail | index | archive | help

I would very much like to obtain a write-combine mapping of PCIe
device memory for mxge(4) without depending on the flakiness of MTRRs.
I currently use bus_alloc_resource() to map my device's memory space,
and then use mem_range_attr_set() to attempt to change the memory to
be write-combine. 

I recently noticed that pmap_mapdev_attr() function on amd64 & i386,
but it looks like nexus_activate_resource() just calls pmap_mapdev(),
which defaults to PAT_UNCACHEABLE.  Would it be possible to add a
flag which could tell the bus_* functions to map the memory
write-combine?

Or should I avoid bus_alloc_resource(), and map my device myself with
pmap_mapdev_attr()?   

Or should I replace my call to mem_range_attr_set() with a call to
pmap_change_attr?

Thanks,

Drew




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