سؤال

I've taken over the maintenance job of a device driver from another guy recently.

The driver works with a pci-e board. when the system starts up, the driver will allocate a 128Mb memory, and then set some registers on the board to pass the information about the allocated memory. Later when the board is working, it will write some data to the memory and some other application will access those data through the driver.

The board is powered by a standalone adapter (not powered by pci-e slot, it's a demo or development board). So when sometimes the fpga program in the board goes wrong, we will re-powered on the board (this is fast) and restarted the pc also (this is slow, otherwise the board will know nothing about the driver-allocated memory).

Here comes my problem: is it possbile for driver to know the board has been re-powered on? if it can detect the event and do something like those done when the system starts up, it will save us much time.

I haven't got much knowledge about driver development before, it would be helpful if there is any not-too-complicated tutorial/article for this kind of job. Or maybe I must find some thick books to learn from scratch?

Hope I've made myself understood and any suggestions would be greatly appreciated:-)

هل كانت مفيدة؟

المحلول

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top