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/


How to make sure driver install doesn't require restart

aditya_guptaaditya_gupta Member Posts: 3

Hi,
I have a driver for Serial Attached SCSI HBA, which sometimes asks for system restart upon installation on a default windows driver. The system asks for restart sometimes but not always, but when it does, I see a event logged in windows event viewer
" The start type of the service was changed from demand start to boot start".
I have mentioned start type in my INF as "SERVICE_BOOT_START". Is there a possibility that default windows driver (lsi_sas3i.sys) has start type mentioned as "SEVICE_DEMAND_START" and that is why windows is asking me to reboot the system?

Comments

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,048

    The start type of the service was changed from demand start to boot start

    Because.... the driver you're supporting contains the boot volume?? That's a guess/question.

    Is there a possibility that default windows driver (lsi_sas3i.sys) has start type mentioned as "SEVICE_DEMAND_START" and that is why windows is asking me to reboot the system?

    No. The start type of any OTHER driver in the systems doesn't affect the start type of YOUR driver.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,602

    Are you using the same service name as the default driver?

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • anton_bassovanton_bassov Member MODERATED Posts: 5,174

    Peter,

    No. The start type of any OTHER driver in the systems doesn't affect the start type of YOUR driver.

    What about the situation when a driver X somehow depends on the driver Y? For example, consider the scenario when the driver Y is a driver library (like, for example, NDIS.SYS), and your driver X imports from it. In this case your driver cannot get loaded before the driver Y, right. How is the system going to handle the case if a driver X is, say, a boot driver, and some particular driver Y that it depends on is a demand-start one?

    Anton Bassov

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,048

    How is the system going to handle the case if a driver X is, say, a boot driver, and some particular driver Y that it depends on is a demand-start one?

    IIRC, the required dependency gets loaded automatically when the first referencing driver gets loaded. It is, after all, just a DLL.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • anton_bassovanton_bassov Member MODERATED Posts: 5,174

    IIRC, the required dependency gets loaded automatically when the first referencing driver gets loaded. It is, after all, just a DLL.

    The problem is that certain functionalities that a demand-start driver library may depend upon may be still unavailable at the early stages of the boot process. To make it even worse, in some cases it may be impossible to know it at the time when a driver gets loaded, so that it may get discovered only at the runtime. For example, IIRC, only parts of the Registry are available to boot drivers, so that a demand-start driver
    library may not, probably, get all the info that it expects to find in the Registry if you try to initialise it at some earlier stage of the boot process.

    Certainly, we can logically conclude that the scenario of a boot-time driver being dependent on some demand-start driver library is
    a classical example of a faulty design. Therefore, my question can be rephrased simply as "will the system catch this inconsistency right at the installation time?" After all, the only thing that it has to do is to check driver dependencies and their load order during the installation process.

    Anton Bassov

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!
Internals & Software Drivers 30 Nov 2020 LIVE ONLINE
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Developing Minifilters Early 2021 LIVE ONLINE