PAT_WRITE_COMBINING: how to use?

From: Andrew Gallatin <gallatin_at_cs.duke.edu>
Date: Tue, 29 May 2007 12:04:34 -0400 (EDT)
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
Received on Tue May 29 2007 - 14:05:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:11 UTC