-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I am attempting very simple mmio.To accomplish this I map the desired
physical address with MmMapIoSpace. Works fine in winxp x86. However,
when I try to access the virtual address I got via MmMapIoSpace in
win7 x64 my driver hangs (just the driver).
* {Have you googled?} I have ducked ( maybe not enough )
* {Are you stupid?} I hope not but this is still my first driver
* {You are sick!} This ain’t my idea (
http://www.osronline.com/showThread.cfm?link=243489 ). Doing it for lulz.
btw do you know a convenient way to test drivers for win7?
I am talking about driver signatures. I have tried bcdedit and registry.
The only thing that works for me (SP1) is F8 boot menu.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSc+gtAAoJEK64IL1uI2hadQEIAI1W10Eas04wUcImkz0VnSdE
g3yIatZnmwwmqUYkJFSOxolSbnzn7Tx5tYi+g82kcI9IFo5vFUS6sKRgvQSK9Kp4
lVS7Bp1rT61CKRDG/5aLNxNgdb54JHYOarjnJtXWBw/DDWFz1pc2niZ4rJYV118E
/wT7eWr+sq/GRJctVOKuukzZes7ZL9tFP66uRWzsm4BqOR2euh+CJCZR5SEtOvVm
ZiaIN/PW80cr/lUx0rvhV8jZ+56tf4R/KZyh34nqYA4IuE8FI+F7hBdClNru5cF0
ZkNCYA1KE457R4C/J2V0mJ+QG3W/QOV1WjeMQ6RpKxIYee3Q23gXoBLoNCNWG7Q=
=ZR1O
-----END PGP SIGNATURE-----
So how do you call MmMapIoSpace and accessing the VA? Show the actual code.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/01/13 21:54, xxxxx@broadcom.com wrote:
So how do you call MmMapIoSpace and accessing the VA? Show the
actual code.
paddr.QuadPart = FBPhysAddr; //physical address
vaddr = MmMapIoSpace(paddr, FBSz, MmNonCached);
…
RtlMoveMemory(pBuffer, vaddr, size);
where size <= FBSZ, usually more than 1 kilobyte
I have also tried
char *c ;
c = (char *) vaddr;
somebuff[6] = c[6];
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSc+xsAAoJEK64IL1uI2haWF4H/RQmxYqYQuDO/pL8CmKyTo+b
4PgjXJsMh4gdzDImqOUhaFM9gMa4FkCGtQilzNPDMK2H4piL2wFKKx/PUA5GLhFO
bLU1rfvd1LCSdltLfCuwFd2aVN+wcrWZjVOt01iP7+cIU3MFAypvnflYvPMqK19k
ErjRBGddRlIaDXzG8tUWymYO2H63m8RxUbCRfYq0ZCbX0oJAnx7VJdzKmAsBQ272
X7m8AVemqCswy/DzbtmwQztjSoBKRrdHJzT0/To7SPWhrD0rFt5BAhR9Z2P8dTZ4
nVLlGWQZKNhsn4rmkJQQE6vKMOTXS9tFrlzoYbZkz+vE7F9tP9BgWJiV6W6vsLQ=
=cGe9
-----END PGP SIGNATURE-----
On Fri, Nov 1, 2013 at 5:43 PM, the wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
> I am attempting very simple mmio.To accomplish this I map the desired
> physical address with MmMapIoSpace. Works fine in winxp x86. However,
> when I try to access the virtual address I got via MmMapIoSpace in
> win7 x64 my driver hangs (just the driver).
>
> * {Have you googled?} I have ducked ( maybe not enough )
> * {Are you stupid?} I hope not but this is still my first driver
> * {You are sick!} This ain’t my idea (
> http://www.osronline.com/showThread.cfm?link=243489 ). Doing it for lulz.
>
> btw do you know a convenient way to test drivers for win7?
> I am talking about driver signatures. I have tried bcdedit and registry.
> The only thing that works for me (SP1) is F8 boot menu.
Have kernel debugger attached, it disables KMCS.
Kris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.20 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJSc+gtAAoJEK64IL1uI2hadQEIAI1W10Eas04wUcImkz0VnSdE
> g3yIatZnmwwmqUYkJFSOxolSbnzn7Tx5tYi+g82kcI9IFo5vFUS6sKRgvQSK9Kp4
> lVS7Bp1rT61CKRDG/5aLNxNgdb54JHYOarjnJtXWBw/DDWFz1pc2niZ4rJYV118E
> /wT7eWr+sq/GRJctVOKuukzZes7ZL9tFP66uRWzsm4BqOR2euh+CJCZR5SEtOvVm
> ZiaIN/PW80cr/lUx0rvhV8jZ+56tf4R/KZyh34nqYA4IuE8FI+F7hBdClNru5cF0
> ZkNCYA1KE457R4C/J2V0mJ+QG3W/QOV1WjeMQ6RpKxIYee3Q23gXoBLoNCNWG7Q=
> =ZR1O
> -----END PGP SIGNATURE-----
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
–
Kris
I think we should have a new required convention here at NTDEV. People who are doing things for LULZ have to prefix their posts with (LULZ). People who are asking for some school assignment need to prefix their posts with (SCHOOL).
Thank you, Mr. Guard, for having the courtesy to note that this question grew out of a project for person inquiry, not a work situation. I for one certainly appreciate you noting that.
Peter
OSR
Where did you obtain the physical address? Is it a device address or on-board RAM? Did MmMapIoSpace actually return a non-NULL address?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/02/13 01:07, xxxxx@osr.com wrote:
I think we should have a new required convention here at NTDEV.
People who are doing things for LULZ have to prefix their posts
with (LULZ). People who are asking for some school assignment need
to prefix their posts with (SCHOOL).
I have specified this because when I posted on ntdev the last time I
got ot posts like “your boss is fighting windmills”. Just wanted to
prevent ot stuff, apparently I have failed. Idk if the convention
proposed by you will be useful for the most users here, but I think I
have a more constructive idea. New convention should state: “on-topic
posts only”.
Thank you, Mr. Guard, for having the courtesy to note that this
question grew out of a project for person inquiry, not a work
situation. I for one certainly appreciate you noting that.
Anything for you, Peter!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSdI4aAAoJEK64IL1uI2haJSIH/1/krb15V+bdPsC0SSq+GmZP
vEkicZVZa1UtHOxSvCmSJAn73Hg+PIxZ5NTwk8nwQGUpJVo00WCx7PbGrsdywdqX
XFTvWNvr8yWH8N1iCqSPoMfWsz+Mn/Up/2fBw8ZXJIsZVAeBF0Hq6acI7gBLl3aE
MRRqDr+CmfN+QRQSLwt+iZ7Va7sVkb5CCiqsGvqwer1uG2P/38p5Jm1OpotOgSzt
eB3DwS+maEjXS/R2T/prze4uwtTkgbeoeICE/h2H9TxMmf9V+268vi4gWIN+LXty
vuQFjEZzL2qd8ZGvU7RGH+s1F/es9ml9gpcHirEpwcyRTowcAifFij/AQIpWx7M=
=mnBM
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/02/13 02:56, xxxxx@broadcom.com wrote:
Where did you obtain the physical address?
I have used this suggestion:
" You use the SetupDi interfaces to find your graphics device. There
are good example on the web on how to do that. Once you have a devnode
handle, you can use something like CM_Get_Next_Res_Des and
CM_Get_Res_Des_Data to get the resource descriptors for that device –
the same descriptors it was handed at AddDevice time. One of those
resources will be a large chunk of memory. Odds are, that’s the frame
buffer."
from http://www.osronline.com/showThread.cfm?link=243489
I try to map an address obtained this way and read from it.
Did MmMapIoSpace actually return a non-NULL address?
yes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSdJCdAAoJEK64IL1uI2haS6gH/Rc+vzNjAe97j8c16nEyRDzF
goBQceiTY6NFEFHCExqcLBmZ6S/gNHHHgvb2HzSGrAORC8rpMp8e1/9y7KPheyfV
NS8uZvmnUv6wr3EVG9+zrZTtMov5XAXa2ykbnOzI7T1NJ72iuvWYwtKgdAn/mpDS
9q09ALNH5myBsz+HWWlkIdfCqR/9QkiaODv6X+56YtMjOhDYYT08ybRG2WWI5SNF
AQ53nGmscUFiAKIOMjTucjTq684l7ibJ4i4d+iarMLNeRc0ljbQJuCYTNm/NyAeM
bQzwMO0kjLV8mj58LrxPwyZkq2B9JzNi/u5oQgTJa3ER7jjh1Ofyp7vvw7JpcA4=
=wis4
-----END PGP SIGNATURE-----
The frame buffer was most likely originally mapped with MmWriteCombined. Other mappings should use the same.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/02/13 23:50, xxxxx@broadcom.com wrote:
The frame buffer was most likely originally mapped with
MmWriteCombined. Other mappings should use the same.
I have tried all 7 types of caching - nothing works.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSdiFUAAoJEK64IL1uI2haYHgH/2oGLEJo21350mo2HB45xwAm
xuNQAnBYTAunVzkM0AkHYX63DaiAGj1/GUe65oO/RVqK8NF8fyQSJl5bFtXP1jvz
QG7cNeDgoFJ12khlKaCMqtZAidgAf63nbCVtsDomJHmND11KQ+IBqUGURmBFc6+Q
FK4ioyQG7FoQznkeH2jsVowzsQeljvK7h9WorJHGKRCWEjyeAddTWRYT65pmH3yw
XXse+F2LehveFs1YL9bQ+E+SrTcdC4pZUXI293F/Yv4A3wSuqvX5uU7u9gMgBxYu
Pj4ysfDfPEWNhgcdQvISQDPn/V4PWmJTb/3nFNKda8eG6YtIfJba3ui3bl3IitM=
=yvYe
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/03/13 14:11, the wrote:
On 11/02/13 23:50, xxxxx@broadcom.com wrote:
> The frame buffer was most likely originally mapped with
> MmWriteCombined. Other mappings should use the same.
I have tried all 7 types of caching - nothing works.
So there’s something else wrong.
Also this doesn’t seem to be a hardware issue unlike
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/f9794203-c2a0-468a-8e6b-6d2d4e06a873/read-from-memory-mapped-through-mmmapiospace-hangs-the-system?forum=wdk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSgJOUAAoJEK64IL1uI2haTlkH+wcSjgCgn53YyvqEqKGUO2MK
2R72UXPCEtwMClN9oEQNOmwN0wOefEoXtyi3ECehg3iSBKlY6DGmgA3pxkkTefuh
sqBwf4tvTAkqSpz+wJnumvIeAmeerD53A35KbMPE7n7S4zoSZFoxaW/opYQimU4i
W5GYsYp0xEYumXRMZO7sss6kPwws7zEk6k83IsgMAx/pQiEzKvTCGMHMohPT7y1o
EcL9cSU1MRBBdEBsmkz2da++PZUC5KPoidaf4LOEYDXaWSEbw9B6gZUUQLhiA2i6
IoIl9ejsUJey+33DOkg9GXfF4tZGCvByCbIDH51SZVkFbWcaT5tZ5tHiaavSFrw=
=OX2k
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/11/13 12:21, the wrote:
On 11/03/13 14:11, the wrote:
> On 11/02/13 23:50, xxxxx@broadcom.com wrote:
>> The frame buffer was most likely originally mapped with
>> MmWriteCombined. Other mappings should use the same.
> I have tried all 7 types of caching - nothing works.
So there’s something else wrong. Also this doesn’t seem to be a
hardware issue unlike
I have tried to map n read 0xA0000 and it worked.
I was using MmWriteCombined. Seems strange to me.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSgjFTAAoJEK64IL1uI2hadA4IAIqET4UTtD3OpmC2dEKPjFMd
5BeyxNj2T17z54SeVd6k1dp3IHH1aTscy7xuaM5j/IHyJsEPSbpeS/g5kX7Mj/rs
3SlZi3C29Yn3IamB02Wt4qQ++SgewYlqsWG5d1KRotRQBR7w0gtyiRJQePq+tWeg
qYBBs6PtyjMMPgYb6IjCORK9aYoEdvFv8ueiBAOnS3Ivk4uIuTTZbJqruqTzGZAA
Wbxm1QOpULhE9zMyWKJTzvVWrl4PUl3soE7zwLEuynDCgtgnTATUORvN3lu3qKRM
0UDagIoUFs2VCjaPuulVXrPrkV5dKuFEkRbr6BLbJAWTKxvf4PGxaaU3EnDa2io=
=q/ua
-----END PGP SIGNATURE-----