Re: CE device driver help, virtual memory and physical memory
- From: voidcoder <voidcoder@xxxxxxxxx>
- Date: Tue, 26 Sep 2006 09:13:17 +0200
It should work the way you are describing. It is probably
a mistake somewhere with the Virtualxxx flags. Personally
I'm using MmMapIoSpace/MmUnmapIoSpace instead of
VirtualAlloc/Copy (it should be no difference) for the same
purposes with no issues when releasing the memory.
On Mon, 25 Sep 2006 22:37:05 +0200, Andy Purcell <Andy_Purcell@xxxxxxxxxxx> wrote:
Hello,
At startup, my driver needs to allocate some memory for DMA purposes. I
currently use HalAllocateCommonBuffer() for this. I use this because it
gives me a physical address (needed for DMA).
I would like to make this memory available to the application for R/W. This
is because after the DMA is done, the app needs to see the content of the
memory. I am currently doing this with VirtualAlloc() and VirtualCopy() up
in user space. This all seems to work fine.
However, the problem is that when I close down the app and the driver, if I
try to do a VirtualFree() followed by a HalFreeCommonBuffer(), I hit a
DEBUGCHK() in the CE memory code.
Any thoughts about how best to
1) allocate some physical memory for DMA
2) make it available up in user space for R/W
3) free the memory when the app closes (user space actions and kernel driver
actions)
would be greatly appreciated.
Thanks in advance,
Andy
.
- References:
- CE device driver help, virtual memory and physical memory
- From: Andy Purcell
- CE device driver help, virtual memory and physical memory
- Prev by Date: Re: File system is not working in Retail Version in WinCE 5.0
- Next by Date: Re: File system is not working in Retail Version in WinCE 5.0
- Previous by thread: CE device driver help, virtual memory and physical memory
- Next by thread: Re: CE device driver help, virtual memory and physical memory
- Index(es):
Relevant Pages
|