svn commit: r309531 - head/sys/arm/include

John Baldwin jhb at freebsd.org
Mon Dec 5 19:11:01 UTC 2016


On Sunday, December 04, 2016 03:55:14 PM Ian Lepore wrote:
> On Sun, 2016-12-04 at 13:43 -0800, John Baldwin wrote:
> > On Sunday, December 04, 2016 03:27:39 PM Michal Meloun wrote:
> > > 
> > > Author: mmel
> > > Date: Sun Dec  4 15:27:39 2016
> > > New Revision: 309531
> > > URL: https://svnweb.freebsd.org/changeset/base/309531
> > > 
> > > Log:
> > >   Implement fake pmap_mapdev_attr() for ARMv6.
> > >   This function is referenced, but never called from DRM2 code.
> > > Also,
> > >   real behavior of pmap_mapdev_attr() in ARM world is unclear as we
> > > don't
> > >   have any additional attribute for a device memory type.
> > You have VM_MEMATTR constants on ARM though.  Some devices might want
> > a
> > WB mapping (e.g. for a prefetchable memory BAR) rather than UC.
> > 
> 
> On ARM, 'DEVICE' memory is its own type/attribute and it can't usefully
> be changed (if you were to change it, it would no longer be device
> memory, it would be some other type).  If this function is being used
> to map main memory just because that memory happens to be used in some
> device driver, then that's a usage model that just doesn't map usefully
> to arm memory semantics.

Ah, no.  It is used for things like BARs, etc.  It is fine if devices are
always mapped uncacheable.  The requests for write-combining are performance
hints, but devices should still function correctly.  For example, on i386
without PAT we will map WC requests to UC.

-- 
John Baldwin


More information about the svn-src-head mailing list