Using TraceView to observe the Windows PCIe driver loading and unloading process

Source: Internet
Author: User

In this paper, we mainly introduce the loading and unloading process of a typical kmdf driver with the TraceView.exe tool. The related theory mainly comes from "Win7 Device driver Program development" book. For the use of TraceView.exe, please refer to my previous blog: Click to open the link.

First, start and load order

In section 7.2 of Win7 device driver development, "enumeration and startup of devices", it is mentioned that in order to prepare the device, Kmdf invokes the driver's callback routine in a fixed order. Where the FDO or filter do callback process is as follows: (bottom-up, starting from the insertion device)



Second, unloading sequence

Turn off FDO or filter do power and the sequence of callback function calls involved in removing the FDO or filter do procedure.



Third, actual device loading and unloading event tracking

Below I show the actual process with the TraceView trace information of Microsoft's PLX9X5X driver sample program's loading and unloading process.



It is generally possible to see:

1, loading process: Plxevtdeviceadd, Adddevicepdo, Plxevtdevicepreparehardware, other initialization

2, uninstall process: Plxshutdown, Plxevtdevicepreparehardware, Plxevtdrivercontextcleanup

Using TraceView to observe the Windows PCIe driver loading and unloading process

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.