Which EntryPoint to use ?

Hello,

To test my Win2K Bus Driver, I need my dummy Function Driver (based on the
DDK Toaster Function Driver sample) to continuously write some known values
to the memory-mapped Register Space of each of the “toaster” devices
periodically (maybe after a few milli-seconds interval or so). I want the
Function Driver to keep doing this indefinitely i.e. until it is
unloaded.

Which entry-point or routine can I do this in, since there is nothing to
trigger this (i.e. no user application or anything) ?

Any ideas how things like these are accomplished ?

Thanks much in advance!

Puja

When the function driver loads (DriverEntry()), start your own system
thread and return. In the new thread, run your test code as long as
you like.


Dave Cox
Hewlett-Packard Co.
HPSO/SSMO (Santa Barbara)
https://ecardfile.com/id/Dave+Cox

-----Original Message-----
From: xxxxx@usa.net [mailto:xxxxx@usa.net]
Sent: Thursday, May 11, 2000 6:19 AM
To: NT Developers Interest List
Subject: [ntdev] Which EntryPoint to use ?

Hello,

To test my Win2K Bus Driver, I need my dummy Function Driver (based on the
DDK Toaster Function Driver sample) to continuously write some known values
to the memory-mapped Register Space of each of the “toaster” devices
periodically (maybe after a few milli-seconds interval or so). I want the
Function Driver to keep doing this indefinitely i.e. until it is
unloaded.

Which entry-point or routine can I do this in, since there is nothing to
trigger this (i.e. no user application or anything) ?

Any ideas how things like these are accomplished ?

Thanks much in advance!

Puja


You are currently subscribed to ntdev as: david_cox2@hp.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Maybe use a system thread.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@usa.net
Sent: Thursday, May 11, 2000 1:19 PM
To: NT Developers Interest List
Subject: [ntdev] Which EntryPoint to use ?

Hello,

To test my Win2K Bus Driver, I need my dummy Function Driver
(based on the
DDK Toaster Function Driver sample) to continuously write some
known values
to the memory-mapped Register Space of each of the “toaster” devices
periodically (maybe after a few milli-seconds interval or so). I
want the
Function Driver to keep doing this indefinitely i.e. until it is
unloaded.

Which entry-point or routine can I do this in, since there is nothing to
trigger this (i.e. no user application or anything) ?

Any ideas how things like these are accomplished ?

Thanks much in advance!

Puja


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

May be I do not understand exactly what you need, and also have never worked
on W2K, but here is my idea. I would start a driver thread
PsCreateSystemThread(), and let it do all the stuff. Now there is no need to
“trigger” any thing. You may also consider creating more than one thread,
and blah blah…

Shweta.

Hello,

To test my Win2K Bus Driver, I need my dummy Function Driver (based on the
DDK Toaster Function Driver sample) to continuously write some known values
to the memory-mapped Register Space of each of the “toaster” devices
periodically (maybe after a few milli-seconds interval or so). I want the
Function Driver to keep doing this indefinitely i.e. until it is
unloaded.

Which entry-point or routine can I do this in, since there is nothing to
trigger this (i.e. no user application or anything) ?

Any ideas how things like these are accomplished ?

Thanks much in advance!

Puja


You are currently subscribed to ntdev as: xxxxx@techie.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup

  1. Do I need to have one thread PER device (Max # devices on Bus = 8) ?

Or

Can I have just a SINGLE thread in my Function Driver which writes to
the Register Spaces of all the Devices ? [Please see #3 below, as I’m not
sure how this is possible]

  1. Which is better and why i.e. is it bad to have so many threads ??

  2. How can I pass the FDO of each device (as and when it appears in the
    system) to my thread (if I use the SINGLE thread approach) ?

[Assuming I create a thread in my DriverEntry() routine, this thread would
need to access the FDO of EACH device in order to write into its Register
Space (because the BaseAddress of the device obtained from MmMapIoSpace()
is stored in the FDO, when my driver gets IRP_MN_START_DEVICE)]

Please advise.

Thank you so much!
Puja

On 05/11/00, ““COX,DAVID (HP-Roseville,ex1)” <david_cox2>” wrote:
> When the function driver loads (DriverEntry()), start your own system
> thread and return. In the new thread, run your test code as long as
> you like.
>
> -----------------------------------------------------------------------
> Dave Cox
> Hewlett-Packard Co.
> HPSO/SSMO (Santa Barbara)
> https://ecardfile.com/id/Dave+Cox
>
>
> -----Original Message-----
> From: xxxxx@usa.net [mailto:xxxxx@usa.net]
> Sent: Thursday, May 11, 2000 6:19 AM
> To: NT Developers Interest List
> Subject: [ntdev] Which EntryPoint to use ?
>
>
> Hello,
>
> To test my Win2K Bus Driver, I need my dummy Function Driver (based on the
> DDK Toaster Function Driver sample) to continuously write some known values
> to the memory-mapped Register Space of each of the “toaster” devices
> periodically (maybe after a few milli-seconds interval or so). I want the
> Function Driver to keep doing this indefinitely i.e. until it is
> unloaded.
>
> Which entry-point or routine can I do this in, since there is nothing to
> trigger this (i.e. no user application or anything) ?
>
> Any ideas how things like these are accomplished ?
>
> Thanks much in advance!
>
> Puja
>
> —
> You are currently subscribed to ntdev as: david_cox2@hp.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)</david_cox2>

> Can I have just a SINGLE thread in my Function Driver which

writes to the Register Spaces of all the Devices ?

System address space is shared by all threads (when they’re running in
kernel-mode), so you have lots of options. Simplest might be to have
an array of 8 FDO pointers, initialized with NULLs. When your device
“appears” put it in the next empty slot in the array. As your single
thread loops, if a pointer in the array is non-NULL, it’s a valid device
to test.


Dave Cox
Hewlett-Packard Co.
HPSO/SSMO (Santa Barbara)
https://ecardfile.com/id/Dave+Cox

-----Original Message-----
From: xxxxx@usa.net [mailto:xxxxx@usa.net]
Sent: Thursday, May 11, 2000 7:37 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Which EntryPoint to use ?

  1. Do I need to have one thread PER device (Max # devices on Bus = 8) ?

Or

Can I have just a SINGLE thread in my Function Driver which writes to
the Register Spaces of all the Devices ? [Please see #3 below, as I’m not
sure how this is possible]

  1. Which is better and why i.e. is it bad to have so many threads ??

  2. How can I pass the FDO of each device (as and when it appears in the
    system) to my thread (if I use the SINGLE thread approach) ?

[Assuming I create a thread in my DriverEntry() routine, this thread would
need to access the FDO of EACH device in order to write into its Register
Space (because the BaseAddress of the device obtained from MmMapIoSpace()
is stored in the FDO, when my driver gets IRP_MN_START_DEVICE)]

Please advise.

Thank you so much!
Puja

On 05/11/00, ““COX,DAVID (HP-Roseville,ex1)” <david_cox2>” wrote:
> When the function driver loads (DriverEntry()), start your own system
> thread and return. In the new thread, run your test code as long as
> you like.
>
> -----------------------------------------------------------------------
> Dave Cox
> Hewlett-Packard Co.
> HPSO/SSMO (Santa Barbara)
> https://ecardfile.com/id/Dave+Cox
>
>
> -----Original Message-----
> From: xxxxx@usa.net [mailto:xxxxx@usa.net]
> Sent: Thursday, May 11, 2000 6:19 AM
> To: NT Developers Interest List
> Subject: [ntdev] Which EntryPoint to use ?
>
>
> Hello,
>
> To test my Win2K Bus Driver, I need my dummy Function Driver (based on the
> DDK Toaster Function Driver sample) to continuously write some known
values
> to the memory-mapped Register Space of each of the “toaster” devices
> periodically (maybe after a few milli-seconds interval or so). I want the
> Function Driver to keep doing this indefinitely i.e. until it is
> unloaded.
>
> Which entry-point or routine can I do this in, since there is nothing to
> trigger this (i.e. no user application or anything) ?
>
> Any ideas how things like these are accomplished ?
>
> Thanks much in advance!
>
> Puja
>
> —
> You are currently subscribed to ntdev as: david_cox2@hp.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: david_cox2@hp.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)</david_cox2>