Packaging and Deploying KMDF and UMDF Drivers

Slides:



Advertisements
Similar presentations
Optimizing Device Drivers For Terminal Servers Plug And Play Device Redirection Framework Gaurav Daga Program Manager Windows Terminal Server Microsoft.
Advertisements

Module 3 Configuring Hardware on a Computer Running Windows XP Professional.
Windows XP System Restore July 22 nd, 2006 CAEUG Meeting.
Introduction of ZTE Handset Online Upgrade tool V1.1 version
Lesson 9 Computer Troubleshooting
NetAcumen ActiveX Download Instructions
Installing SAS 9.3 Raymond R. Balise Health Research and Policy.
Installing SAS 9.3 Raymond R. Balise Health Research and Policy.
1 Distributed File System, and Disk Quotas (Week 7, Thursday 2/21/2007) © Abdou Illia, Spring 2007.
11 INSTALLING WINDOWS XP Chapter 2. Chapter 2: Installing Windows XP2 INSTALLING WINDOWS XP  Prepare a computer for the installation of Microsoft Windows.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
A+ Guide to Software, 4e Chapter 5 Troubleshooting Windows 2000/XP Startup.
Hands-On Microsoft Windows Server 2003 Chapter 2 Installing Windows Server 2003, Standard Edition.
 Contents 1.Introduction about operating system. 2. What is 32 bit and 64 bit operating system. 3. File systems. 4. Minimum requirement for Windows 7.
How To Keep Up With Security Patches Eric Schultze Security Strategies Microsoft.
WDK Driver Test Manager. Outline HCT and the history of driver testing Problems to solve Goals of the WDK Driver Test Manager (DTM) Automated Deployment.
Getting a Logo for Your Windows Driver Framework Driver
Distributing Drivers on Windows Update
VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
Plug and Play Key Concepts Jim Cavalaris Lead Software Design Engineer George Roussos Senior Program Manager Device Foundation Platform Team, Device.
NetAcumen ActiveX Install Instructions. Requirements: Administrator: User must be logged in as Administrator of the machine. If you are not the administrator,
Best Practices for Developing Printer Drivers Justin Hutchings Program Manager Microsoft Corporation Shawn Maloney Program Manager Microsoft Corporation.
CONTENTS:-  What is Event Log Service ?  Types of event logs and their purpose.  How and when the Event Log is useful?  What is Event Viewer?  Briefing.
NovaBACKUP 10 xSP Technical Training By: Nathan Fouarge
Module 16: Software Maintenance Using Windows Server Update Services.
Choose and Book Installing Security Broker (IA) client.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
System Resources INFO1119 (Fall 2012).
Introduction to SharePoint Development with VS2010 Paul Yuknewicz Lead Program Manager
Windows Server MIS 424 Professor Sandvig. Overview Role of servers Performance Requirements Server Hardware Software Windows Server IIS.
Administering Windows 7 Lesson 11. Objectives Troubleshoot Windows 7 Use remote access technologies Troubleshoot installation and startup issues Understand.
Hands-On Microsoft Windows Server 2008
MetaMorph Installation. 2 MetaMorph Overview Imaging Toolbox What MetaMorph can do oAcquisition oDevice Control oVisualization oProcessing oAnalysis oPresentation.
Chapter 7 Microsoft Windows XP. Windows XP Versions XP Home XP Home XP Professional XP Professional XP Professional 64-Bit XP Professional 64-Bit XP Media.
Tutorial 11 Installing, Updating, and Configuring Software
IT Essentials 1 v4.0 Chapters 4 & 5 JEOPARDY RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands.
ITE 1 Chapter 5. Chapter 5 is a Large Chapter It has a great deal of useful information about operating systems. You will find this VERY helpful when.
Hands-On Microsoft Windows Server 2003 Administration Chapter 2 Managing Windows Server 2003 Hardware and Software.
Learningcomputer.com SQL Server 2008 – Installation of SQL Server 2008.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 5 Windows XP Professional McGraw-Hill.
Module 13: Maintaining Software by Using Windows Server Update Services.
CN1176 Computer Support Kemtis Kunanuraksapong MSIS with Distinction MCT, MCTS, MCDST, MCP, A+
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 13 Understanding and Installing Windows 2000 and Windows NT.
Supporting Windows 9x Chapter 12 Key Terms By Bill Ward.
11 INSTALLING AND MANAGING HARDWARE Chapter 6. Chapter 6: Installing and Managing Hardware2 INSTALLING AND MANAGING HARDWARE  Install hardware in a Microsoft.
Week #2 Objectives Upgrade and Migrating to Windows 7 Image-Based Installation of Windows 7 Application Compatibility.
Microsoft Management Seminar Series SMS 2003 Change Management.
IT1001 – Personal Computer Hardware & System Operations Week5- Installation and configuration of driver software.
Installation of Storage Foundation for Windows High Availability 5.1 SP2 1 Daniel Schnack Principle Technical Support Engineer.
I T Essentials I Chapter 5 JEOPARDY Installing & UpgradingComputerBasicsErrorsServicePotpourri
CSC190 Introduction to Computing Operating Systems and Utility Programs.
DEVICE DRIVERS Presented by: Group 7. What are Device Drivers? Device driver or hardware driver is a program that manages the system’s interaction with.
Overview of Windows Driver Development Reference: us/gstart/hh/gstart/gs_intro_031j.asp.
Automating Installations by Using the Microsoft Windows 2000 Setup Manager Create setup scripts simply and easily. Create and modify answer files and UDFs.
Virtual Machines Module 2. Objectives Define virtual machine Define common terminology Identify advantages and disadvantages Determine what software is.
© ExplorNet’s Centers for Quality Teaching and Learning 1 Explain the importance of routine backup and maintenance. Objective Course Weight 4%
John Samuels October, Why Now?  Vista Problems  New Features  >4GB Memory Support  Experience.
Third-Party Patch Management using SCCM 2012 R2 SP1, SCUP 2011, and iExpress Chris Nienaber.
CACI Proprietary Information | Date 1 PD² SR13 Client Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8, 2011.
Windows Vista Configuration MCTS : Installing and Upgrading.
Troubleshooting Dashhawk Issues. Here's what you have to do to have the DashHawk run properly Go to the ACTUAL PROGRAM file (not the short cut)
ICAICT201A USE COMPUTER OPERATING SYSTEM. USING THE CONTROL PANEL The Control Panel contains many options for configuring your computer, including: adding.
Create setup scripts simply and easily.
Chapter Objectives In this chapter, you will learn:
Computer troubleshooting
CONFIGURING HARDWARE DEVICE & START UP PROCESS
Building Deployable Device Driver Packages
5 SYSTEM SOFTWARE CHAPTER
Computer troubleshooting
Presentation transcript:

Packaging and Deploying KMDF and UMDF Drivers Ilias Tsigkogiannis Software Development Engineer Windows Driver Framework iliast@microsoft.com Bob Kjelgaard Senior Software Development Engineer in Test Windows Driver Framework robertkj@microsoft.com

Agenda Driver Installation 101 FAQ regarding WDF co-installers Contents of WDF co-installers WDF driver installation steps How to debug WDF installation problems

Device Installation in a Nutshell Class Co-installer(s) SetupDiCallClassInstaller(DIF_a,…) Device Installation Action new device arrival, user-initiated action Device Installation Components Device-specific Co-installer(s), e.g. WDF PNP Manager. SetupAPI Class Installer “post-processing” required SetupAPI Default Action

FAQ regarding WDF co-installers What do they do? Why do we need them? Many WDM drivers work without them. Why are they so big? (1-1.5 MB in size, comparable to driver size) How about other solutions? MSI Windows Update

What do WDF co-installers do? Update the framework, if needed (UMDF+KMDF) Support downlevel OS versions, where WDF is not inbox Fix broken installations Create marker files (empty files at %windir%\system32\drivers\*.wdf, used by OCA to identify WDF drivers that are installed in the system) Possibly prompt for reboot Configure the device node (UMDF only) Parse the INF (DDInstall.Wdf section) and create registry entries

Why do WDF drivers need co-installers? Many WDM drivers don’t. Co-installers provide downlevel support for many OS versions KMDF: Windows 2000 SP4+, XP SP2+, 2003 SP1+, Vista RTM+, 2008, Windows 7 (inbox) UMDF: Windows XP SP2+, 2003 SP1+, Vista RTM+, 2008, Windows 7 (inbox) However, there are cases where you can avoid using the co-installer You must be 100% sure that your WDF 1.x driver needs to run only in an OS in which WDF 1.x is ALREADY installed (e.g. inbox) KMDF: remove all KMDF co-installer references from INF UMDF: refer to config co-installer (wudfcoinstaller.dll, which is installed as part of UMDF) in your INF, instead of WUDFUpdate_0100x.dll NOTE: The benefit of not using a co-installer is just size reduction, but you risk failures while your driver is loading if WDF is not already installed in the system

Why are the WDF co-installers so big? Code Update packages Total size UMDF 1.9 (x86fre) 80 KB 1.34 MB 1.42 MB KMDF 1.9 (x86fre) 70 KB 1.06 MB 1.13 MB

How about other solutions? (MSI, Windows Update?) Two ways to install a driver+device Hardware-first installation: Plug in the device, point the Add New Hardware wizard to the INF and install the driver Software-first installation: Install the driver, then plug in the device Use of co-installer allows both types of installations Integrated into INFs (most popular driver installation mechanism) Windows Update and MSI allow only software-first installation If the update package is not installed before the driver is loaded, then the driver will fail to load -> device will not work This works for APPLICATIONS (which can have Windows Update packages as prerequisites), but not for DRIVERS (especially for mouse, keyboard, network card)

KMDF 1.9 co-installer contents Wdfldr.sys + Wdf01000.sys Wdfldr.sys + Wdf01000.sys Microsoft Kernel-Mode Driver Framework-v1.9-Vista.msu Microsoft Kernel-Mode Driver Framework-v1.9-Win2k-WinXP-Win2K3.exe WDF.CAB (WDFCAB_RESOURCE) WdfCoinstaller01009.dll The MSU, EXE and CAB files in the diagram are compressed

UMDF 1.9 co-installer contents UMDF Binaries UMDF Binaries Microsoft User-Mode Driver Framework-v1. 9-Vista.msu (WUDF_UPDATE_VISTA-RTM) Microsoft User-Mode Driver Framework-v1.9-WinXP-Win2K3.exe (WUDF_UPDATE_XP-SRV03) WUDFUpdate01009.dll UMDF binaries: wudfhost.exe, wudfsvc.dll, wudfx.dll, wudfcoinstaller.dll, wudfplatform.dll, wudfrd.sys, wudfpf.sys The EXE and MSU files in the diagram are compressed

KMDF 1.9 co-installer installation steps DIF_INSTALLDEVICE, PreDeviceInstall Check for supported OS version (Windows 2000 or higher) Find KmdfLibraryVersion in INF and check if it is supported Check if system needs to be updated (Vista SP1/2008 or lower) On-disk version of wdf01000.sys < co-installer version OR On-disk version of wdf01000.sys == co-installer version AND damaged installation (ARP registry entry missing OR KMDF service cannot be opened using SCM APIs) Check if reboot is required KMDF service is running AND KMDF in-memory < co-installer version

KMDF 1.9 co-installer installation steps (contd.) Extract WDFCAB_RESOURCE to temporary folder Call MSU or update.exe package to update system Possible that the update package asks for reboot, because files were marked for replacement after reboot Create marker file for the framework (e.g. %windir%\system32\drivers\MsftWdf_Kernel_01009_Coinstaller_Critical.Wdf) The PNP manager proceeds with the installation (file copy, registry entries, etc)

KMDF 1.9 co-installer installation steps (contd.) DIF_INSTALLDEVICE, PostDeviceInstall If driver is marked as bootstart, then KMDF service is set to bootstart Create marker file for the driver (e.g. %windir%\system32\drivers\Msft_Kernel_WdfRamdisk_01009.Wdf) If reboot is required, then the PNP manager prompts the user for reboot End of device installation

UMDF 1.9 co-installer installation steps DIF_INSTALLDEVICE, PreDeviceInstall (UMDF update co-installer) Check for supported OS version (XP SP2+, 2003 SP1+, Vista RTM+, 2008, 7) Check status of current installation Read version information for all UMDF binaries If max on-disk file version > co-installer -> NO UPDATE If max on-disk file version == co-installer BUT mismatched versions found (or missing files)-> damaged installation -> UPDATE If all on-disk file versions == co-installer AND>= 1 UMDF service cannot be opened (wudfsvc, wudfrd, wudfpf) -> UPDATE If all on-disk file versions < co-installer -> UPDATE Extract MSU or update.exe package to temporary folder

UMDF 1.9 co-installer installation steps (contd.) Call MSU or update.exe package to update system The update package creates marker file for the framework (e.g. %windir%\system32\drivers\MsftWdf_user_01_09_00.Wdf) Possible that the update package asks for reboot, because files were marked for replacement after reboot If reboot is needed, then the installation stops and will be restarted after the reboot Load the UMDF 1.9 config co-installer (%windir%\system32\wudfcoinstaller.dll) Parse and validate INF (DDInstall.WDF section) Create UMDF registry keys based on INF: impersonation level, kernel-mode client support, I/O dispatcher, host timeout, etc. Start Device Manager (wudfsvc) The PNP manager proceeds with installation (file copy, registry entries, etc.)

UMDF 1.9 co-installer installation steps (contd.) DIF_INSTALLDEVICE, PostDeviceInstall UMDF config co-installer creates marker file for the driver (e.g. %windir%\system32\drivers\Msft_User_WUDFEchoDriver_01_09_00.Wdf) End of device installation

UMDF 1.9 co-installer timing measurements System: P4/2.4GHz (no HT), 768MB RAM, 120GB disk, Vista RTM 32-bit No framework update (10 sec total) DIF_INSTALLDEVICE, PreDeviceProcessing: 3 sec PNP manager: ~7 sec DIF_INSTALLDEVICE, PostDeviceProcessing: 0.2 sec With framework update (70 sec total) DIF_INSTALLDEVICE, PreDeviceProcessing: 63 sec Framework update (MSU package): 60 sec

What’s new in WDF co-installers (1.5 to 1.7) Philosophy change: If something is broken (e.g. missing registry entries) then reinstall vs. stop the installation Prompt user for reboot if necessary. In WDF 1.5 the device would just be marked with a “!” in Device Manager Support for Vista: different update mechanism than other OS versions Decrease (~50%) in KMDF co-installer size because of 1 multi-OS package instead of 3 OS-specific packages Many fixes that make the co-installers more robust: better INF parsing, allow text-mode setup (KMDF), fixed corner cases, etc. Fixed all known issues that were reported by users

What’s new in WDF co-installers (1.7 to 1.9) Much more extensive and descriptive logging to %windir%\setupact.log Fixed bug that caused unprompted reboots in XP+2003, when UMDF is updated, if a UMDF file is in use Added performance tracking using Xperf to UMDF co-installer Co-installers handle NULL driver scenarios

WDF installation log files PNP manager log file %windir%\setupapi.log (XP) and %windir%\inf\setupapi.dev.log (Vista , 7) Co-installer log file %windir%\setupact.log WudfUpdate == UMDF Update co-installer WudfCoInstaller == UMDF Config co-installer WdfCoInstaller == KMDF co-installer Update process log file XP: %windir%\Wdf01007Inst.log (KMDF) + %windir%\temp\wudf_update.log (UMDF) Vista + Windows 7: %windir%\windowsupdate.log (http://support.microsoft.com/kb/902093) + %windir%\logs\CBS\CBS.log : update process log file

Debugging WDF Installation Problems Bob Kjelgaard Senior Software Development Engineer in Test Windows Driver Framework robertkj@microsoft.com

Triaging Installation Failures- General Approach Understand how device installation works Understand what the WDF co-installer really does A resource site has been built to help you follow this approach Link is on our final slide Understand the user’s initial environment Examine the final state of the failed installation Your knowledge is your guide Ascertain what worked and what did not Seek further information as necessary

Understand the initial environment Was WDF already present? OS and processor architecture? Previous installation problems on same machine? Gather information of this sort before reproducing failure if you can On pre-Vista OS, turn up Setupapi logging level before reproducing See my site for details on answering these questions

Determining the state of the failed installation Do you have the right files afterward? Are all services needed registered properly? This batch file collects this info [for KMDF] into a log file: reg export hklm\System\CurrentControlSet\Services\wdf01000 Service.Prt reg export hklm\System\CurrentControlSet\Control\wdf Loader.Prt Dir %windir%\system32\wdf* > CoinstallerFiles.Prt Dir %windir%\system32\drivers\wdf* > RuntimeFiles.Prt copy *.prt InstallationStatus.Log del *.prt

Problems you may find in the wild Unexpected interference in updates by 3rd party software Unexpected rollback to last known good (undoing a successful install) Both fixed or made more robust in WDF 1.7 and up Corrupted file systems blocking any installations Can’t give a complete list Observed rates seem to be low, and trend is good We can usually provide effective workarounds to you

When all else fails Get the information (logs, etc) first Use developer community resources Use Microsoft technical support channels

Call to Action Read Developing Drivers with the Windows Driver Foundation http://www.microsoft.com/MSPress/books/10512.aspx Test your UMDF and KMDF drivers with WDF 1.9 immediately Ship your driver with the RTM versions of the co-installers Write your next driver with UMDF or KMDF Let us know about unsolved installation issues Your input has affected and does affect our future plans Send us your feedback wdfinfo@microsoft.com

Additional Resources WDF on the WHDC Web site Blogs WDF mailing list Windows Driver Foundation: http://go.microsoft.com/fwlink/?LinkID=79335 Installation and Driver Signing: http://go.microsoft.com/fwlink/?LinkID=79354 Blogs http://blogs.msdn.com/doronh (A Hole In My Head) http://blogs.msdn.com/peterwie (Pointless Blathering) http://blogs.msdn.com/iliast (driver writing != bus driving) http://blogs.msdn.com/bobkjelgaard (Trouble Ahead - Trouble Behind) http://blogs.msdn.com/888_umdf_4_you (My Travels with WDF) WDF mailing list wdfinfo@microsoft.com Bob’s one-stop WDF installation troubleshooting resource shop: http://blogs.msdn.com/bobkjelgaard/pages/Resources-For-Installation-Problems.aspx

Related Sessions Session Day / Time Extending Device Installation by Using Co-installers Mon. 4-5 and Wed. 1:30-2:30 Diagnosing Common Driver Installation Errors Mon. 11-12 Debugging Device Installation Mon. 5:15-6:15 and Wed. 2:45-3:45 Ask the Experts Table Tues. evening

Backup Slides

KMDF 1.5 co-installer contents Wdfldr.sys + Wdf01000.sys Wdfldr.sys + Wdf01000.sys Wdfldr.sys + Wdf01000.sys Microsoft Kernel-Mode Driver Framework-v1.5-Win2k.exe Microsoft Kernel-Mode Driver Framework-v1.5-WinXP.exe Microsoft Kernel-Mode Driver Framework-v1.5-Win2K3.exe WDF.CAB (WDFCAB_RESOURCE) WdfCoinstaller01005.dll The exe and cab files in the diagram are compressed

UMDF 1.5 co-installer contents UMDF Binaries Microsoft User-Mode Driver Framework-v1.5-WinXP.exe (WUDF_UPDATE_XP-SRV03) WudfUpdate_01005.dll UMDF binaries: wudfhost.exe, wudfsvc.dll, wudfx.dll, wudfcoinstaller.dll, wudfplatform.dll, wudfrd.sys, wudfpf.sys The exe file in the diagram is compressed