Hi There,
I would like to be able to walk through memory at
arbitrary physical memory addresses and read the
memory. I have been using MmMapIoSpace and the
respective UnMap function. My test case start as
physical address zero and works up from there. It
isn’t long before the OS complains with a blue screen.
This is running at Passive. My guess is I am
conflicting with an existing mapping. Unfortunately I
can’t specify read only in the mapping.
basically the algorithm goes:
start with base address 0
loop:
map 10k into memory starting at Base Address
read the contents of that memory from the return
system virtual address
unmap the memory
add 10k to the Base Address
goto loop.
Is this the correct approach or should I be using
another? Can anyone help?
Thanx
Dave
Post your free ad now! http://personals.yahoo.ca
Well you should realize that memory is not contiguous, get the registry
entries
at HKLM\HARDWARE\RESOURCEMAP\System Resources\Physical Memory
and only map those sections of memory.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
----- Original Message -----
From: “Dave B. Sharp”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, December 31, 2003 1:36 PM
Subject: [ntdev] MmMapIoSpace
> Hi There,
> I would like to be able to walk through memory at
> arbitrary physical memory addresses and read the
> memory. I have been using MmMapIoSpace and the
> respective UnMap function. My test case start as
> physical address zero and works up from there. It
> isn’t long before the OS complains with a blue screen.
> This is running at Passive. My guess is I am
> conflicting with an existing mapping. Unfortunately I
> can’t specify read only in the mapping.
>
> basically the algorithm goes:
>
> start with base address 0
>
> loop:
> map 10k into memory starting at Base Address
> read the contents of that memory from the return
> system virtual address
> unmap the memory
> add 10k to the Base Address
> goto loop.
>
> Is this the correct approach or should I be using
> another? Can anyone help?
> Thanx
> Dave
>
> ______________________________________________________________________
> Post your free ad now! http://personals.yahoo.ca
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@acm.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Thanx Don,
I realize that the virtual memory is not physically
contiguous but thought I could map in the actual
phyical contiguous memory (i.e. if I had 2M of phyical
memory it might relate to many different pieces of
virutual memory). Thus if I had 512M of memory I could
walk from address 0 to 512M. More importantly, I may
not nescesarlily be able to trust the registry.
Not sure if this is clear. Appreciate the help!
Cheers
Dave
— Don Burn wrote: > Well you should
realize that memory is not
> contiguous, get the registry
> entries
> at HKLM\HARDWARE\RESOURCEMAP\System
> Resources\Physical Memory
> and only map those sections of memory.
>
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>
> ----- Original Message -----
> From: “Dave B. Sharp”
> To: “Windows System Software Devs Interest List”
>
> Sent: Wednesday, December 31, 2003 1:36 PM
> Subject: [ntdev] MmMapIoSpace
>
>
> > Hi There,
> > I would like to be able to walk through memory
> at
> > arbitrary physical memory addresses and read the
> > memory. I have been using MmMapIoSpace and the
> > respective UnMap function. My test case start as
> > physical address zero and works up from there. It
> > isn’t long before the OS complains with a blue
> screen.
> > This is running at Passive. My guess is I am
> > conflicting with an existing mapping.
> Unfortunately I
> > can’t specify read only in the mapping.
> >
> > basically the algorithm goes:
> >
> > start with base address 0
> >
> > loop:
> > map 10k into memory starting at Base Address
> > read the contents of that memory from the return
> > system virtual address
> > unmap the memory
> > add 10k to the Base Address
> > goto loop.
> >
> > Is this the correct approach or should I be using
> > another? Can anyone help?
> > Thanx
> > Dave
> >
> >
>
> > Post your free ad now! http://personals.yahoo.ca
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> xxxxx@acm.org
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.ca
> To unsubscribe send a blank email to
xxxxx@lists.osr.com
Post your free ad now! http://personals.yahoo.ca
Physical memory isn’t contiguous either, except in some RISC machines.
With that said, your biggest problem is probably a lack of consistency with
the caching attributes of the other mappings for the pages that you’re
stomping across.
As is usual, it would be much easier for the people here to help you if you
tell us what you’re actually trying to accomplish, rather than asking us to
tell you how to get over your most current hurdle.
–
Jake Oshins
Windows Base Kernel Team
This posting is provided “AS IS” with no warranties, and confers no rights.
“Dave B. Sharp” wrote in message news:xxxxx@ntdev…
> Thanx Don,
> I realize that the virtual memory is not physically
> contiguous but thought I could map in the actual
> phyical contiguous memory (i.e. if I had 2M of phyical
> memory it might relate to many different pieces of
> virutual memory). Thus if I had 512M of memory I could
> walk from address 0 to 512M. More importantly, I may
> not nescesarlily be able to trust the registry.
> Not sure if this is clear. Appreciate the help!
>
> Cheers
> Dave
>
>
> — Don Burn wrote: > Well you should
> realize that memory is not
> > contiguous, get the registry
> > entries
> > at HKLM\HARDWARE\RESOURCEMAP\System
> > Resources\Physical Memory
> > and only map those sections of memory.
> >
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >
> > ----- Original Message -----
> > From: “Dave B. Sharp”
> > To: “Windows System Software Devs Interest List”
> >
> > Sent: Wednesday, December 31, 2003 1:36 PM
> > Subject: [ntdev] MmMapIoSpace
> >
> >
> > > Hi There,
> > > I would like to be able to walk through memory
> > at
> > > arbitrary physical memory addresses and read the
> > > memory. I have been using MmMapIoSpace and the
> > > respective UnMap function. My test case start as
> > > physical address zero and works up from there. It
> > > isn’t long before the OS complains with a blue
> > screen.
> > > This is running at Passive. My guess is I am
> > > conflicting with an existing mapping.
> > Unfortunately I
> > > can’t specify read only in the mapping.
> > >
> > > basically the algorithm goes:
> > >
> > > start with base address 0
> > >
> > > loop:
> > > map 10k into memory starting at Base Address
> > > read the contents of that memory from the return
> > > system virtual address
> > > unmap the memory
> > > add 10k to the Base Address
> > > goto loop.
> > >
> > > Is this the correct approach or should I be using
> > > another? Can anyone help?
> > > Thanx
> > > Dave
> > >
> > >
> >
>
> > > Post your free ad now! http://personals.yahoo.ca
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as:
> > xxxxx@acm.org
> > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> > xxxxx@yahoo.ca
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
> Post your free ad now! http://personals.yahoo.ca
>
No, physical memory isn’t presented contiguous either, I wrote a driver
years ago that did you memory walk algorithm and hit a BSOD early till I
realized and did it by physical memory sections.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
----- Original Message -----
From: “Dave B. Sharp”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, December 31, 2003 2:08 PM
Subject: Re: [ntdev] MmMapIoSpace
> Thanx Don,
> I realize that the virtual memory is not physically
> contiguous but thought I could map in the actual
> phyical contiguous memory (i.e. if I had 2M of phyical
> memory it might relate to many different pieces of
> virutual memory). Thus if I had 512M of memory I could
> walk from address 0 to 512M. More importantly, I may
> not nescesarlily be able to trust the registry.
> Not sure if this is clear. Appreciate the help!
>
> Cheers
> Dave
>
>
> — Don Burn wrote: > Well you should
> realize that memory is not
> > contiguous, get the registry
> > entries
> > at HKLM\HARDWARE\RESOURCEMAP\System
> > Resources\Physical Memory
> > and only map those sections of memory.
> >
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >
> > ----- Original Message -----
> > From: “Dave B. Sharp”
> > To: “Windows System Software Devs Interest List”
> >
> > Sent: Wednesday, December 31, 2003 1:36 PM
> > Subject: [ntdev] MmMapIoSpace
> >
> >
> > > Hi There,
> > > I would like to be able to walk through memory
> > at
> > > arbitrary physical memory addresses and read the
> > > memory. I have been using MmMapIoSpace and the
> > > respective UnMap function. My test case start as
> > > physical address zero and works up from there. It
> > > isn’t long before the OS complains with a blue
> > screen.
> > > This is running at Passive. My guess is I am
> > > conflicting with an existing mapping.
> > Unfortunately I
> > > can’t specify read only in the mapping.
> > >
> > > basically the algorithm goes:
> > >
> > > start with base address 0
> > >
> > > loop:
> > > map 10k into memory starting at Base Address
> > > read the contents of that memory from the return
> > > system virtual address
> > > unmap the memory
> > > add 10k to the Base Address
> > > goto loop.
> > >
> > > Is this the correct approach or should I be using
> > > another? Can anyone help?
> > > Thanx
> > > Dave
> > >
> > >
> >
>
> > > Post your free ad now! http://personals.yahoo.ca
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as:
> > xxxxx@acm.org
> > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> > xxxxx@yahoo.ca
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
> Post your free ad now! http://personals.yahoo.ca
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@acm.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Thanks Jake,
I really do want to be able to walk from the bottom
of physical memory to the top and read their contents.
I am a bit restricted (by others) from saying why,
however. I have speced non cache.
Thanx
Dave
— Jake Oshins wrote:
> Physical memory isn’t contiguous either, except in
> some RISC machines.
>
> With that said, your biggest problem is probably a
> lack of consistency with
> the caching attributes of the other mappings for the
> pages that you’re
> stomping across.
>
> As is usual, it would be much easier for the people
> here to help you if you
> tell us what you’re actually trying to accomplish,
> rather than asking us to
> tell you how to get over your most current hurdle.
>
> –
> Jake Oshins
> Windows Base Kernel Team
>
> This posting is provided “AS IS” with no warranties,
> and confers no rights.
>
> “Dave B. Sharp” wrote in
> message news:xxxxx@ntdev…
> > Thanx Don,
> > I realize that the virtual memory is not
> physically
> > contiguous but thought I could map in the actual
> > phyical contiguous memory (i.e. if I had 2M of
> phyical
> > memory it might relate to many different pieces of
> > virutual memory). Thus if I had 512M of memory I
> could
> > walk from address 0 to 512M. More importantly, I
> may
> > not nescesarlily be able to trust the registry.
> > Not sure if this is clear. Appreciate the help!
> >
> > Cheers
> > Dave
> >
> >
> > — Don Burn wrote: > Well you
> should
> > realize that memory is not
> > > contiguous, get the registry
> > > entries
> > > at HKLM\HARDWARE\RESOURCEMAP\System
> > > Resources\Physical Memory
> > > and only map those sections of memory.
> > >
> > > Don Burn (MVP, Windows DDK)
> > > Windows 2k/XP/2k3 Filesystem and Driver
> Consulting
> > >
> > > ----- Original Message -----
> > > From: “Dave B. Sharp”
> > > To: “Windows System Software Devs Interest List”
> > >
> > > Sent: Wednesday, December 31, 2003 1:36 PM
> > > Subject: [ntdev] MmMapIoSpace
> > >
> > >
> > > > Hi There,
> > > > I would like to be able to walk through
> memory
> > > at
> > > > arbitrary physical memory addresses and read
> the
> > > > memory. I have been using MmMapIoSpace and the
> > > > respective UnMap function. My test case start
> as
> > > > physical address zero and works up from there.
> It
> > > > isn’t long before the OS complains with a blue
> > > screen.
> > > > This is running at Passive. My guess is I am
> > > > conflicting with an existing mapping.
> > > Unfortunately I
> > > > can’t specify read only in the mapping.
> > > >
> > > > basically the algorithm goes:
> > > >
> > > > start with base address 0
> > > >
> > > > loop:
> > > > map 10k into memory starting at Base Address
> > > > read the contents of that memory from the
> return
> > > > system virtual address
> > > > unmap the memory
> > > > add 10k to the Base Address
> > > > goto loop.
> > > >
> > > > Is this the correct approach or should I be
> using
> > > > another? Can anyone help?
> > > > Thanx
> > > > Dave
> > > >
> > > >
> > >
> >
>
> > > > Post your free ad now!
> http://personals.yahoo.ca
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ
> at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as:
> > > xxxxx@acm.org
> > > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as:
> > > xxxxx@yahoo.ca
> > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
> >
>
> > Post your free ad now! http://personals.yahoo.ca
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.ca
> To unsubscribe send a blank email to
xxxxx@lists.osr.com
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca