HalAllocateCommonBuffer & MmMapIoSpace problem
- From: max <mzennaro@xxxxxxx>
- Date: Thu, 16 Oct 2008 05:37:51 -0700 (PDT)
Hello to you,
I need help with a problem in ce 5.0 + pxa270
I wrote a driver which uses dma, so it calls HalAllocateCommonBuffer
to get a suitable address.
An application that opens the driver calls a DeviceIoControl to get
the physical address of the buffer and then MmMapIoSpace to read the
When the application calls MmUnmapIoSpace, I get the message:
..... NK Kernel: DEBUGCHK failed in file d:\macallan\private\winceos
\coreos\nk\kernel\physmem.c at line 907
VirtualAlloc / VirtualCopy shows the same error
If I add MmMapIoSpace in the driver, the problem moves to the time
when the application closes the driver and it calls MmUnmapIoSpace,
that is, the first invocation of MmUnmapIoSpace (made by the
application) succeeds but the second fails (the driver calls
MmUnmapIoSpace before calling HalFreeCommonBuffer, to reverse the
ordering the calls).
Can you give me an advice about this?
Thank you very much
- Prev by Date: Re: Why does hive-base registry couse the default power status failed?
- Next by Date: LocalAlloc is it cached?
- Previous by thread: How to add a timer interrupt service routine?
- Next by thread: Re: HalAllocateCommonBuffer & MmMapIoSpace problem