[Kernel-Application communication]

Hello , I am working on sending some data via dma to fpga , my issue is
that i wanted to directly communicate via deviceiocontrol function , i have
almost no experience on this topic , Please any help or info is good .

problem is when i send data i do like this :

DeviceIoControl (hDMADevice, ISTART_TEST_SMUX, DataToSend,
sizeof(TestCmdSMUX), NULL, 0, &bytes, &os))
where DataToSend is pointer to structure i send , with size
= sizeof(TestCmdSMUX).

How can i decode this data in driver itself ? what i did so far is :

case ISTART_TEST_SMUX:
{
TestCmdSMUX * pTC;
if (InputBufferLength >= sizeof(TestCmdSMUX))
{

status = WdfRequestRetrieveInputBuffer(Request, sizeof(TestCmdSMUX),
&pTC, NULL);
if (status == STATUS_SUCCESS)
{
status = SetTestModesmux(pDevExt, pTC );
}
}
}

*DataToSend *is ptr to structure like this :
typedef struct {
int Engine; /**< Engine Number */
unsigned int TestMode; /**< Test Mode - Enable TX, Enable loopback */
unsigned int MinPktSize; /**< Min packet size */
unsigned int MaxPktSize; /**< Max packet size */
UCHAR buffer[1];

} TestCmdSMUX *DataToSend **

*UCHAR buffer[1];* –> this is pointer to first element of my data i want
to send to kernel .

so it isn’t working properly , and i don’t know why ! , few questions i
have here :
1 - is WdfRequestRetrieveInputBuffer right to use ? and can i in this way
use members of pTC structure ?
2 - what is diffrence between *WdfRequestRetrieveInputBuffer *and
*Irp->AssociatedIrp.SystemBuffer
,when to use them?*
3 - how can i actually recieve the array data i am passing with
deviceiocontrol datatosend structure ?
4 - what is type of my IOCode in this usecase , Method_In_Direct OR
MethodBuffered ?
5 - suppose i want to address in driver the 3rd element data of array
passed , how i do that in driver ?

Thanks so much

–
Mohamed Abdel Rauof.
communication and electronics Engineer Cairo University BSc. 2011.

What is this DMA thing of which you speak :slight_smile:

Seriously, you’d be better off asking in NTDEV where the hardwary-types hang
out…

/Rod

what i mean by dma is sending data to dma* driver* with *deviceiocontrol*.
it has nothing geenrally with hardware

thanks

On Thu, Feb 2, 2017 at 2:45 PM, Rod Widdowson
wrote:

> What is this DMA thing of which you speak :slight_smile:
>
> Seriously, you’d be better off asking in NTDEV where the hardwary-types
> hang out…
>
> /Rod
>
>
> —
> NTFSD is sponsored by OSR
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
>

–
Mohamed Abdel Rauof.
communication and electronics Engineer Cairo University BSc. 2011.</http:>

Rod is still correct, this is an NTDEV topic, not NTFSD.

Don Burn

Windows Driver Consulting

Website: http: http://www.windrvr.com

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of mohamed rauof
Sent: Thursday, February 02, 2017 7:49 AM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] [Kernel-Application communication]

what i mean by dma is sending data to dma driver with deviceiocontrol.

it has nothing geenrally with hardware

thanks

On Thu, Feb 2, 2017 at 2:45 PM, Rod Widdowson > wrote:

What is this DMA thing of which you speak :slight_smile:

Seriously, you’d be better off asking in NTDEV where the hardwary-types hang out…

/Rod

—
NTFSD is sponsored by OSR

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:

–

Mohamed Abdel Rauof.
communication and electronics Engineer Cairo University BSc. 2011.

— NTFSD is sponsored by OSR MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at To unsubscribe, visit the List Server section of OSR Online at</http:></http:></http:>