Is it possible to allocate a common buffer using WdfCommonBufferCreate from physical memory that has been held from the OS using the “burnmemory” or “removememory” boot parameters?
I’m writing a device driver (my first) for a piece of hardware that has requirements:
-Physically (logically) contiguous DMA memory
-needs to support DMA transfers of several hundred MBs
-packet based DMA
The driver is not intended for general release, meaning that it is only used on systems that we’re building in house so we control the PC hardware. Currently we’re working with 32 bit platforms, but moving shortly to 64bits.
I’m trying to stay in scope of WDF / KMDF, but I don’t see how I can safely accomplish this. Any advice on how to approach this?
Thanks!
xxxxx@gmail.com wrote:
Is it possible to allocate a common buffer using WdfCommonBufferCreate from physical memory that has been held from the OS using the “burnmemory” or “removememory” boot parameters?
No.
I’m writing a device driver (my first) for a piece of hardware that has requirements:
-Physically (logically) contiguous DMA memory
-needs to support DMA transfers of several hundred MBs
-packet based DMA
It is a poor design to have hardware that needs hundreds of megabytes
but cannot do scatter/gather.
You have to treat the “burnmemory” memory as device memory. So, you
have to map it in yourself using MmMapIoSpace. That means you have to
figure out the physical address of that memory yourself. It isn’t
impossible, but it isn’t obvious either. Also, it’s not safe, because
there’s no way to reserve that memory. Another driver might assume that
IT can use the space.
Good luck…
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.