Re: mapping physical Ram addresses (MmMapIoSpace)
- From: summjim555@xxxxxxxxx
- Date: Thu, 1 May 2008 07:17:46 -0700 (PDT)
On 30 אפריל, 09:12, Tim Roberts <t...@xxxxxxxxx> wrote:
summjim...@xxxxxxxxx wrote:
Im trying to map the physical Ram address to logical address in order
to read\write from it.
I have a driver that needs to read from the physical Ram address 0
(needs to read the first sector).
Huh? RAM does not have "sectors". If you want to read the first sector of
your hard disk, it's possible to do that, but that doesn't have anything to
do with physical RAM addresses.
There's nothing particularly interesting at physical address 0. What are
you really trying to do?
My code goes like this : (i found few samples that where pretty
similar)
baseAddress = MmMapIoSpace(MmGetPhysicalAddress((void*)0, 512, 0);
MmGetPhysicalAddress returns the physical address corresponding to a
virtual address. Windows XP does not put anything at virtual address 0, so
the code you have above will always fail.
You can try MmMapIoSpace on physical address 0, but you will need to make
sure the cache type matches whatever mapping might already exist.
I assume I get the virtual address that I am looking for , that I can
read the sector from it. (I actually get something, but its hard to
tell if its what I wanted)
I doubt it.
--
Tim Roberts, t...@xxxxxxxxx
Providenza & Boekelheide, Inc.
hey , and thanks for trying to help me BZ
to make things short , i need to map the ram in my kernel mode driver.
the way i need to do it is by starting with a physical address X,
mapping / converting it to a logical address, and reading from the
represented logical address.
i found the upper sample and thought it might be a fine start point,
but it isnt.
.
- Follow-Ups:
- Re: mapping physical Ram addresses (MmMapIoSpace)
- From: Tim Roberts
- Re: mapping physical Ram addresses (MmMapIoSpace)
- Prev by Date: Re: Why does my workingsetsize always equal 0?
- Next by Date: Re: Why does my workingsetsize always equal 0?
- Previous by thread: Re: Why does my workingsetsize always equal 0?
- Next by thread: Re: mapping physical Ram addresses (MmMapIoSpace)
- Index(es):
Relevant Pages
|