When to download firmware and run POST

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

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

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

Thank you, Pavel and Peter!

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

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

Yes! Excellent advice. Thanks Doron for chiming in.

Peter