Re: Read_***_ulong
- From: Mark Roddy <markr@xxxxxxxxxxxxxx>
- Date: Mon, 17 Apr 2006 07:43:10 -0400
On Mon, 17 Apr 2006 02:48:21 -0500, Markus09
<Markus09.26ehtq@xxxxxxxxxxxxxxxxxxxxx> wrote:
I treid READ_REGISTER_ULONG(mappedAddress + offset).
But when I set offset to a high value (e.g. 0x8004360) the driver
bugchecks with a "STOP":
(Edit: It also bug-checks with offset=0x0)
Bugcheck: 0x8E
Arg1: c0000005, The exception code that was not handled
Arg2: a7fb29ec, The address that the exception occurred at
Arg3: a7f09b2c, Trap Frame
Arg4: 00000000
Is the maximum of mapped Memory with 256 MB (Win XP) reached?
No you have a bug in your code. Did you map your memory resource into
a system virtual address using MmMapIoSpace? That either worked or it
didn't work and if it worked the returned value is what you should be
passing into READ_REGISTER, not the PHYSICAL_ADDRESS handed to you in
StartDevice.
Also note that to read large buffers you should be using the
READ_REGISTER_BUFFER_* methods rather than calling READ_REGISTER_ULONG
in a loop.
Maxim S. Shatskih wrote:
*> I got the Memory-Resource from the PnP Manager and mapped 256 MB
with
MmMapIoSpace(...).
But how should I access this "area"?
Should I use READ_REGISTER_ULONG(adr) or READ_PORT_ULONG(adr)?
For memory resource, you must use READ_REGISTER_ULONG.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
[url]http://www.storagecraft.com[/url] *
=====================
Mark Roddy DDK MVP
Windows Vista/2003/XP/2000 Consulting
Device and Filesystem Drivers
Hollis Technology Solutions 603-321-1032
www.hollistech.com
.
- References:
- Read_***_ulong
- From: Markus09
- Read_***_ulong
- Prev by Date: PCI card transfer with DMA/ busmastering
- Next by Date: Re: PCI card transfer with DMA/ busmastering
- Previous by thread: Read_***_ulong
- Next by thread: Re: Read_***_ulong
- Index(es):
Relevant Pages
|
Loading