Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


When to download firmware and run POST

tbptbp Member Posts: 2

Hello,

I'm developing a Windows driver for proprietary hardware that needs to program a DSP.

My current approach is to program the DSP in the EvtDeviceD0Entry() PnP callback. Additionally, in that callback, I also wait for the DSP to perform a self-test, and once that completes the driver performs an additional validation of the DSP (primarily testing the DSP DDR3).

The problem is that this process takes too much time and increases the system start-up time. Is the EvtDeviceD0Entry() callback the proper place for this functionality? If not, when should these actions be performed?

Thanks,
Brad

Comments

  • Pavel_APavel_A Member Posts: 2,708

    The problem is that this process takes too much time and increases the system start-up time

    Of course.
    You can schedule work items or create a thread to delay the work.

    -- pa

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,802

    Exactly. Typically, you would start this thread from in EvtDeviceD0EntryPostInterruptsEnabled ... because when D0Entry runs, your interrupts aren't enabled yet (and that's usually helpful, if not for downloading the firmware then for running your tests).

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • tbptbp Member Posts: 2

    Thank you, Pavel and Peter!

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,490
    via Email
    And if you need to gate incoming IO requests until your hardware is ready, your top level dispatch WDFQUEUE should not be power managed, you should pause the queue before your start initializing the hardware and then re-start the queue when the hardware is ready.

    d
    d
  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,802

    And if you need to gate incoming IO requests until your hardware is ready...

    Yes! Excellent advice. Thanks Doron for chiming in.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA