PCI Dma Driver in NT

Hello,

I’m writing PCI Busmaster Dma driver in Win Nt. I’m using
HalAllocateCommonBuffer
for Dma operation.

HalAllocateCommonBuffer returns both physical and virtual address. Now
my question is

Q1 .Can we use this virtual address at the application level to fill
this buffer (allocated using HalAllocateCommonBuffer) and pass it to the
driver??
(Presently we are allocating the common buffer at the DriverEntry, and
the application is getting those virtual addresses of the common buffer
using IOCTL. But when the application is trying to fill this buffer,
then it is giving access violation error.)

Waiting for reply,
Thanks!
regards,
Sunil sahu

Sunil Kumar Sahu.
System Development Group.
TATA ELXSI Ltd.
Whitefield Road, B’lore.
Ph No :- 8410148 /49 /50(ext 256)

******Engineering the Information Revolution******


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

On 02/14/01, “Sunil Kumar Sahu ” wrote:
> I’m writing PCI Busmaster Dma driver in Win Nt. I’m using
> HalAllocateCommonBuffer
> for Dma operation.
>
> HalAllocateCommonBuffer returns both physical and virtual address. Now
> my question is
>
> Q1 .Can we use this virtual address at the application level to fill
> this buffer (allocated using HalAllocateCommonBuffer) and pass it to the
> driver??
> (Presently we are allocating the common buffer at the DriverEntry, and
> the application is getting those virtual addresses of the common buffer
> using IOCTL. But when the application is trying to fill this buffer,
> then it is giving access violation error.)

Nope, you can’t use it in your application.
The March-April 2000 edition of the NT Insider has a helpful article
on sharing memory between drivers and applications.

Chuck


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com