hi all,
'had already posted a mail to Ntdev regarding my problem…now i sorted out
a bit => but still running into problems…
While trying to map device mem to user space…
I get system virtual addr with mmMapIoSpace()
Then I call IoAllocateMdl()
Following this I call MmBuildMdlForNonPagedPool()
Now when I call MmMapLockedPages(mdl,usermode) => I get assertion failure
on my debugger window as follows…
*** Assertion failed: *Page <= MmHighestPhysicalPage
*** Source File: F:\nt\private\ntos\mm\iosup.c, line 3022
waiting for a reply…
thanx,
SP.
“Shailesh” wrote in message news:xxxxx@ntdev…
>
> While trying to map device mem to user space…
> I get system virtual addr with mmMapIoSpace()
> Then I call IoAllocateMdl()
> Following this I call MmBuildMdlForNonPagedPool()
>
> Now when I call MmMapLockedPages(mdl,usermode) => I get assertion failure
> on my debugger window as follows…
>
> *Assertion failed: Page <= MmHighestPhysicalPage
> Source File: F:\nt\private\ntos\mm\iosup.c, line 3022
>
>
Looks like you’re trying to map device memory back into user space… I’ve
actually had limited luck doing this. The assert you’re seeing indicates
that the page you’re trying to map is not within main memory…
Peter
OSR
yes…
'am trying to map device memory to user space…
but how can this be done… can u suggest any link … or just anything
I desperately need to do that.
thanx
SP.
> Looks like you’re trying to map device memory back into user
space… I’ve
actually had limited luck doing this.
Nevertheless, DirectDraw code in VideoPort (“map memory” IOCTL) does
this OK, IIRC by using \Device\PhysicalMemory.
Max
maxim,
Could u kindly elaborate… which code u r talking 'bout… If the doc is
online 'll very glad if u could send me the link
thanx
SP.
Call ZwOpenSection on \Device\PhysicalMemory, and then
ZwMapViewOfSection on it.
Max
----- Original Message -----
From: “Shailesh”
To: “NT Developers Interest List”
Sent: Thursday, May 30, 2002 11:19 PM
Subject: [ntdev] Re: Problem mapping device memory to user space!!!
> maxim,
>
> Could u kindly elaborate… which code u r talking 'bout… If the
doc is
> online 'll very glad if u could send me the link
>
> thanx
>
> SP.
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
Ignore the assert. Its telling you that the ram you are mapping is not in
system memory. Duh, it sure isn’t. I have only seen this assert on checked
builds of the OS. Also, I don’t get this assert on XP checked or not. What
OS are you on?
–
Bill McKenzie
“Shailesh” wrote in message news:xxxxx@ntdev…
>
> hi all,
>
> 'had already posted a mail to Ntdev regarding my problem…now i sorted out
> a bit => but still running into problems…
>
> While trying to map device mem to user space…
> I get system virtual addr with mmMapIoSpace()
> Then I call IoAllocateMdl()
> Following this I call MmBuildMdlForNonPagedPool()
>
> Now when I call MmMapLockedPages(mdl,usermode) => I get assertion failure
> on my debugger window as follows…
>
> *Assertion failed: Page <= MmHighestPhysicalPage
> Source File: F:\nt\private\ntos\mm\iosup.c, line 3022
>
>
> waiting for a reply…
>
> thanx,
>
> SP.
>
>
yup , thought the same & ignored the assert but then MmMapLockedPages()
hanged the system & gave BSOD… so it’s of much concern…
I am on Win2k(checked build)
thanx.
SP.