Hello All,
I was just wondering what is the cache type used by the NdisMMapIoSpace for the mapped memory.
I see that MmMapIoSpace has a CacheType argument which the caller can configure and hope NdisMMapIoSpace uses the same internally. It is important for me as I need a non-cached device memory in my NDIS driver.
Also is there any way to change the cache type of a already mapped memory?
Thanks for your help.
Regards,
Gaurav
A simple dissassembly on W8 x64 shows the following code:
ndis!NdisMMapIoSpace:
…
fffff88001b4bff9 488b4c2430 mov rcx,qword ptr [rsp+30h] fffff880
01b4bffe 488bd6 mov rdx,rsi
*fffff880`01b4c001 4533c0 xor r8d,r8d*
*fffff88001b4c004 ff15fec3fcff call qword ptr [ndis!_imp_MmMapIoSpace (fffff880
01b18408)]*
In x64 mode the r8 register holds the 3rd function argument and in this
case it is 0. Looking at the MEMORY_CACHING_TYPE enum on MSDN we can see
that 0 represents MmNonCached memory type.
This is the caching type probably used by all OS’es when calling
NdisMMapIoSpace.
On 8 September 2015 at 11:12, wrote:
> Hello All,
>
> I was just wondering what is the cache type used by the NdisMMapIoSpace
> for the mapped memory.
>
> I see that MmMapIoSpace has a CacheType argument which the caller can
> configure and hope NdisMMapIoSpace uses the same internally. It is
> important for me as I need a non-cached device memory in my NDIS driver.
>
> Also is there any way to change the cache type of a already mapped memory?
>
> Thanks for your help.
>
> Regards,
> Gaurav
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>