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

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

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,680

    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,339

    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,435
    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,339

    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
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA