PAT_WRITE_COMBINING: how to use?




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

_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages