I have a driver that uses MmMapLockedMdlSpecifyCache, and
all works fine. The driver uses this to make shared memory
segments between the smart board and the host application.
But Mdls can only describe 64Meg of memory, and I have customers
who want bigger memory frames. My first idea is to chain the
Mdl structures using their next pointer, and pass the head of
the list to MmMapLockedMdlSpecifyCache and expect it to follow
the links and make a contiguous map. Will this work?
Steve Williams "The woods are lovely, dark and deep.
steve at XXXXXXXXXX But I have promises to keep,
http://www.XXXXXXXXXX and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
Stephen Williams wrote:
My first idea is to chain the
Mdl structures using their next pointer, and pass the head of
the list to MmMapLockedMdlSpecifyCache and expect it to follow
the links and make a contiguous map. Will this work?
Not to the best of my knowledge.
As people have written many times, support for Mdl->Next is pretty
sporadic, and when it IS there, it’s really there to allow you to
combine separate buffers into one overall “address list”, as in the
networking stack.
Peter
OSR
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
PeterGV PeterGV-at-osr.com |ntdev/1.0-Allow| wrote:
| Stephen Williams wrote:
|
|> My first idea is to chain the
|> Mdl structures using their next pointer, and pass the head of
|> the list to MmMapLockedMdlSpecifyCache and expect it to follow
|> the links and make a contiguous map. Will this work?
|
|
| Not to the best of my knowledge.
|
| As people have written many times, support for Mdl->Next is pretty
| sporadic, and when it IS there, it’s really there to allow you to
| combine separate buffers into one overall “address list”, as in the
| networking stack.
Which leads to the next obvious question, how *does* one make and
map a region of memory that is bigger then 64Meg? I seem to have
no trouble getting the memory from the O/S, but I can’t make a
single MDL big enough to hold it. I can’t make multiple calls to
MmMapLockedMdlSpecifyCache as the O/S will put the region where
it will, and I apparently can’t pass multiple Mdls to the function
either.
Piffle!
Steve Williams “The woods are lovely, dark and deep.
steve at XXXXXXXXXX But I have promises to keep,
http://www.XXXXXXXXXX and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFA/TRZrPt1Sc2b3ikRAmLCAKCY/KFfaaTafkKJiaInop5vvxcM2wCgiD3m
NIj9sMijaGk0PNQd/UpFm7U=
=9ofR
-----END PGP SIGNATURE-----