svn commit: r215135 - head/sys/compat/ndis

Paul B Mahol onemda at gmail.com
Fri Nov 12 09:17:25 UTC 2010


On 11/12/10, Alan Cox <alc at rice.edu> wrote:
> Bernhard Schmidt wrote:
>> Author: bschmidt
>> Date: Thu Nov 11 18:43:31 2010
>> New Revision: 215135
>> URL: http://svn.freebsd.org/changeset/base/215135
>>
>> Log:
>>   According to specs for MmAllocateContiguousMemorySpecifyCache()
>> physically
>>   contiguous memory with requested restrictions must be allocated.
>>
>>
>
> It appears to me that these functions should be using
> kmem_alloc_contig() and kmem_free() instead of contigmalloc() and
> contigfree(). Then, the "cachetype" parameter could be correctly
> implemented rather than ignored.  It just requires mapping the cachetype
> values to their corresponding vm_memattr_t values.

Well, even if mapping is possible, I can't recognize every type in Windows,
some of them are not documented:

0 MmNonCached
1 MmCached
2 MmWriteCombined
3 MmHardwareCoherentCached
4 MmNonCachedUnordered
5 MmUSWCCached

0 UNCACHEABLE
1 WRITE_COMBINING
2 WRITE_THROUGH
3 WRITE_PROTECTED
4 WRITE_BACK
5 UNCACHED


More information about the svn-src-head mailing list