Had a question regarding usage of callback objects to communicate between two drivers . I have driver A and B , and A needs to notify B of some event during boot up and resume from hibernate .
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-excreatecallback
What we do is both drivers call ExCreateCallback on same device object name during boot once and driver A notifies driver B as part of its D0Entry .
I wanted to ask what the behavior would be in below scenario.
- Driver A and Driver B both are in hibernate (D3 state)
- Driver A resumes from hibernate first ,gets D0 entry and notifies all registered clients for the callback object by calling ExNotifyCallback within its D0entry routine.
Driver B still is in D3 right now, hasn’t begun resume process . - Driver B gets its D0 entry now.
Had two question in this scenarios
A . Are these callback routine dependent on driver D0 states , what I mean to ask is will Driver B have its registered callback routine invoked if Driver A notifies even before driver B has
moved to D0 state?
B . If the answer to above is yes then will driver B “miss” processing the notification from driver A since even though its callback was invoked it wasn’t in D0 state when this happened.