Accessing a user's large buffer using DO_DIRECT_IO mode

I have allocated a large (32MB) buffer during device initialization
and need to copy the data from the buffer to the user’s buffer
during a read operation. Can I assume that this buffer is contiguous in
physical memory?

The problem is when the user passes a buffer to the driver,
the call to pBufIO = MmGetSystemAddressForMdl( pMDL ) fails for buffers
than 4MB! Anything under this limit has no problem.

My question is how do I access the user’s buffer for large requests? I have
a valid MDL which
return the buffer size properly by cannot use MmGetSystemAddressForMdl() to
obtain a pointer
which I can use to copy the buffer memory to the user.

I am running in a Win98 WDM driver mode.
I know that there is a tunable parameter called IoPageLockLimit that can
increase the size
of the number of mapping registers but I don’t have that as an option.