狠狠撸

狠狠撸Share a Scribd company logo
Agenda :
? User Mode & Kernel Mode
? Device driver
? How a Device is installed while connecting to a system
? Components of Driver package
? BIOS & USB interaction
Communication between User-mode and kernel-mode components
? A processor in a computer running Windows has two different modes: user
mode and kernel mode
? The processor switches between the two modes depending on what type of code is
running on the processor
? Applications run in user mode, and core operating system components run in kernel mode.
? If a kernel-mode driver crashes, the entire operating system crashes.
Kernel Mode
? In the kernel mode the code is complete and uninterrupted access to all the
hardware components .
? The kernel mode driver can execute any instruction it needs on the CPU
without waiting, and can reference any memory address that is available.
? Kernel mode is generally reserved for the lowest-level, most trusted functions
of the operating system.
? Crashes in kernel mode are catastrophic; they will halt the entire PC
? In User mode, the executing code has no ability to directly access hardware
or reference memory.
? Code running in user mode must delegate to system APIs to access hardware
or memory.
? It uses private address space in memory .
? Each application runs in isolation, and if an application crashes, the crash is
limited to that one application. Other applications and the operating system
are not affected by the crash.
User Mode The green line is total CPU time; the red line is Kernel time.
The gap between the two is User time.
1. The kernel performs its tasks, such as running processes and handling interrupts,
in kernel space
2. The kernel is a computer program that is the core of a computer's operating system,
with complete control over everything in the system.
3. For example, to show the user something on the screen, an application would
make a request to the kernel, which would forward the request to its display driver,
which is then responsible for actually plotting the character/pixel.
4. If a kernel-mode driver crashes, the entire operating system crashes.
More about – Kernel Mode
What is driver?
? In the most fundamental sense, a driver is a software component that lets the operating
system and a device communicate with each other.
? Without the required device driver, the corresponding hardware device fails to work.
? A device driver acts as a translator between the hardware device and the programs or
operating systems that use it.
? A device driver may also be called a software driver.
? For a given I/O request (like reading data from a device), there are often several drivers,
layered in a stack, that participate in the request
? The one driver in the stack that communicates directly with the device is called the function
driver.
? The drivers that perform auxiliary processing are called filter drivers.
? Certain filter drivers act as verifiers to make sure the other drivers in the stack are handling
the I/O request correctly.
What happened when we connect a new device in Windows?
Step 1: The New Device is Identified
? The bus or hub driver to which the device is connected assigns a hardware identifier (ID) (Vendor
Defined Identification String)
? Windows uses hardware IDs to find the closest match between a device and a driver package.
For example, when a user plugs a wireless local area network (WLAN) adapter into the port of a USB hub
that is attached to the computer, the following steps occur:
The device is detected by the USB hub driver. Based on information that it queries from the adapter, the hub
driver creates a hardware ID for the device.
For example, the USB hub driver could create a hardware ID of USBVID_1234&PID_5678&REV_0001 for
the WLAN adapter, where:
? VID_1234 is the identifier of the vendor.
? PID_5678 is the product, or model, identifier of the device.
? REV_0001 is the revision identifier of the device.
? The USB hub driver notifies the Plug and Play (PnP) manager that a
new device was detected.
? The PnP manager queries the hub driver for all of the device's hardware
IDs. The hub driver can create multiple hardware IDs for the same
device.
? The PnP manager notifies Windows that a new device needs to be
installed. As part of this notification, Windows is provided with the list of
hardware IDs.
? Windows starts a search for a driver package that matches one of the
device's hardware IDs. If Windows cannot find a matching hardware ID,
it searches for a driver package that has a matching compatible ID for
the device.
Step 2: A Driver for the Device is Selected
Searching for the Driver Package
Using the hardware identifier (ID) that is reported by the bus or hub driver, Windows searches for driver packages that match a device.
A driver package matches a device if the hardware ID matches a hardware ID or compatible ID in an INF Models section entry of the driver package's INF file.
Driver Store :
? The process of copying a driver package to the driver store is called staging
? The driver store is a trusted collection of inbox and third-party driver packages.
? The operating system maintains this collection in a secure location on the local hard disk
Search phase Windows 7
Windows 8 and later versions of
Windows
Before a driver is installed
DevicePath
Windows Update
Driver store
Driver store
After initial driver is selected Not applicable
Device Path
Windows Update
Selecting the Driver
Components of a Driver Package
Typically, a driver package contains the following components:
? Driver files
? Installation files
? Other files
Driver Files :
? The driver is the part of the package that provides the I/O interface for a device
? Typically, a driver is a dynamic-link library (DLL) with the .sys file name extension
? When a device is installed, Windows copies the .sys file to the %SystemRoot%system32drivers directory
? The software depends on the features of the device and the bus or port to which it connects.
? Microsoft ships drivers for many common devices and nearly all buses with the operating system.
Function driver - It is the main driver for a device
Mini Driver - Provided by individual HW vendor . The drivers that handle device-specific tasks.
Class Driver - a simple interface between a vendor-written minidriver and the operating system.
Filter Driver - It is a driver or program or module that is inserted into the existing Driver Stack to perform some specific function
For example, an ACPI bus filter is added to support power management for each device.
Installation Files
INF File :
? An INF file or Setup Information file is a plain-text file used by Microsoft Windows for the installation of software and drivers
? It is an ASCII or Unicode text file that provides device and driver information, including the driver files, registry entries, device IDs, catalog files, and version
information that is required to install the device or driver
? Windows copies this file to the %SystemRoot%inf directory when it installs the device
catalog (.cat) file:
A driver catalog file contains a cryptographic hash of each file in the driver package.
Windows uses these hashes to verify that the package was not altered after it was published.
To ensure that the catalog file is not altered, it should be digitally signed.
Other Files
A driver package can also contain other files, such as a device installation application, a device icon, device property pages, and so forth.
Does BIOS plays a role in USB ?
? If the PC's BIOS supports booting from a USB device, then that means that the BIOS has embedded firmware that includes a USB
protocol stack, and can control a target device like a flash drive over the Universal Serial Bus.
? After the USB handshake protocol is established between the USB host (the PC that needs to boot) and the USB gadget (the flash
drive), the control and data mechanism provided by USB can be abstracted away, and upper layers of the BIOS boot code can treat the
flash drive just like a HDD.
? That is, the first sector of the "disk drive" has to be read in order to obtain its Master Boot Record (MBR)
Prabu , UST Global
Ad

Recommended

Selecting and Installing Operating System
Selecting and Installing Operating System
Amir Villas
?
Introduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmware
definecareer
?
Operating system concepts
Operating system concepts
Vaibhav Khanna
?
Components in computers
Components in computers
ShehanMeenu
?
Fundamental
Fundamental
MAQ Institute
?
Operating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / Output
Peter Tr?ger
?
Working with Applications
Working with Applications
Amir Villas
?
Ch1 introduction
Ch1 introduction
Welly Dian Astika
?
Operating System Case Study and I/O System
Operating System Case Study and I/O System
prakash ganesan
?
System software
System software
Bushra M
?
Operating Systems 1 (2/12) - Hardware Basics
Operating Systems 1 (2/12) - Hardware Basics
Peter Tr?ger
?
Kernel I/O Subsystem
Kernel I/O Subsystem
Sushil Ale
?
Enhanced Embedded Linux Board Support Package Field Upgrade – A Cost Effectiv...
Enhanced Embedded Linux Board Support Package Field Upgrade – A Cost Effectiv...
ijesajournal
?
Operating system
Operating system
Haripritha
?
Plug and play services
Plug and play services
Mohammed abdelwhab
?
Os
Os
Agnas Jasmine
?
I/O Management
I/O Management
Keyur Vadodariya
?
Linux for embedded_systems
Linux for embedded_systems
Vandana Salve
?
Chapter11 new
Chapter11 new
vmummaneni
?
Week 6
Week 6
Joey Pierce
?
Quarter 2_W2_D5_CSS.pptx
Quarter 2_W2_D5_CSS.pptx
KurtGardy
?
Quarter 2_W2_D5_CSS.pptx
Quarter 2_W2_D5_CSS.pptx
KurtGardy
?
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
Sam Bowne
?
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Sam Bowne
?
Device drivers and their applications
Device drivers and their applications
AliddekiBryan
?
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
Sam Bowne
?
The Basic Computer Configuration Setup.pptx
The Basic Computer Configuration Setup.pptx
hannahlagria1
?
BASIC COMPUTER CONFIGURATIONS SETUP.pptx
BASIC COMPUTER CONFIGURATIONS SETUP.pptx
shanlybeatrizpalmito
?
Computer System Servicing NC2 - Device Drivers for All Junior and Senior High...
Computer System Servicing NC2 - Device Drivers for All Junior and Senior High...
RGSMags
?
WDM - Windows Driver Model overview
WDM - Windows Driver Model overview
Prasad Talekar
?

More Related Content

What's hot (12)

Operating System Case Study and I/O System
Operating System Case Study and I/O System
prakash ganesan
?
System software
System software
Bushra M
?
Operating Systems 1 (2/12) - Hardware Basics
Operating Systems 1 (2/12) - Hardware Basics
Peter Tr?ger
?
Kernel I/O Subsystem
Kernel I/O Subsystem
Sushil Ale
?
Enhanced Embedded Linux Board Support Package Field Upgrade – A Cost Effectiv...
Enhanced Embedded Linux Board Support Package Field Upgrade – A Cost Effectiv...
ijesajournal
?
Operating system
Operating system
Haripritha
?
Plug and play services
Plug and play services
Mohammed abdelwhab
?
Os
Os
Agnas Jasmine
?
I/O Management
I/O Management
Keyur Vadodariya
?
Linux for embedded_systems
Linux for embedded_systems
Vandana Salve
?
Chapter11 new
Chapter11 new
vmummaneni
?
Week 6
Week 6
Joey Pierce
?
Operating System Case Study and I/O System
Operating System Case Study and I/O System
prakash ganesan
?
System software
System software
Bushra M
?
Operating Systems 1 (2/12) - Hardware Basics
Operating Systems 1 (2/12) - Hardware Basics
Peter Tr?ger
?
Kernel I/O Subsystem
Kernel I/O Subsystem
Sushil Ale
?
Enhanced Embedded Linux Board Support Package Field Upgrade – A Cost Effectiv...
Enhanced Embedded Linux Board Support Package Field Upgrade – A Cost Effectiv...
ijesajournal
?
Linux for embedded_systems
Linux for embedded_systems
Vandana Salve
?

Similar to Device drivers by prabu m (20)

Quarter 2_W2_D5_CSS.pptx
Quarter 2_W2_D5_CSS.pptx
KurtGardy
?
Quarter 2_W2_D5_CSS.pptx
Quarter 2_W2_D5_CSS.pptx
KurtGardy
?
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
Sam Bowne
?
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Sam Bowne
?
Device drivers and their applications
Device drivers and their applications
AliddekiBryan
?
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
Sam Bowne
?
The Basic Computer Configuration Setup.pptx
The Basic Computer Configuration Setup.pptx
hannahlagria1
?
BASIC COMPUTER CONFIGURATIONS SETUP.pptx
BASIC COMPUTER CONFIGURATIONS SETUP.pptx
shanlybeatrizpalmito
?
Computer System Servicing NC2 - Device Drivers for All Junior and Senior High...
Computer System Servicing NC2 - Device Drivers for All Junior and Senior High...
RGSMags
?
WDM - Windows Driver Model overview
WDM - Windows Driver Model overview
Prasad Talekar
?
BASIC COMPUTER CONFIGURATION TLE G9SETUP.pptx
BASIC COMPUTER CONFIGURATION TLE G9SETUP.pptx
ROMULOOPEDA
?
Device driver FOR HARDWAARE COMPUTER .pptx
Device driver FOR HARDWAARE COMPUTER .pptx
DianarraVergara2
?
Installing driver
Installing driver
Online
?
WinCE
WinCE
xonicx
?
Device Drivers and Running Modules
Device Drivers and Running Modules
YourHelper1
?
Copy of LESSON 9 - INSTALLING DEVICE DRIVER.pptx
Copy of LESSON 9 - INSTALLING DEVICE DRIVER.pptx
JeirahTigas
?
Device Drivers
Device Drivers
Kushal Modi
?
DeviceDriverNov18.ppt
DeviceDriverNov18.ppt
TerrenceRamirez1
?
IGCSE_ICT_Chapter 1.pptx
IGCSE_ICT_Chapter 1.pptx
FatimaWaheed30
?
Configuring Devices in Windows
Configuring Devices in Windows
Amir Villas
?
Quarter 2_W2_D5_CSS.pptx
Quarter 2_W2_D5_CSS.pptx
KurtGardy
?
Quarter 2_W2_D5_CSS.pptx
Quarter 2_W2_D5_CSS.pptx
KurtGardy
?
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
Sam Bowne
?
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Sam Bowne
?
Device drivers and their applications
Device drivers and their applications
AliddekiBryan
?
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 126: 10: Kernel Debugging with WinDbg
Sam Bowne
?
The Basic Computer Configuration Setup.pptx
The Basic Computer Configuration Setup.pptx
hannahlagria1
?
BASIC COMPUTER CONFIGURATIONS SETUP.pptx
BASIC COMPUTER CONFIGURATIONS SETUP.pptx
shanlybeatrizpalmito
?
Computer System Servicing NC2 - Device Drivers for All Junior and Senior High...
Computer System Servicing NC2 - Device Drivers for All Junior and Senior High...
RGSMags
?
WDM - Windows Driver Model overview
WDM - Windows Driver Model overview
Prasad Talekar
?
BASIC COMPUTER CONFIGURATION TLE G9SETUP.pptx
BASIC COMPUTER CONFIGURATION TLE G9SETUP.pptx
ROMULOOPEDA
?
Device driver FOR HARDWAARE COMPUTER .pptx
Device driver FOR HARDWAARE COMPUTER .pptx
DianarraVergara2
?
Installing driver
Installing driver
Online
?
Device Drivers and Running Modules
Device Drivers and Running Modules
YourHelper1
?
Copy of LESSON 9 - INSTALLING DEVICE DRIVER.pptx
Copy of LESSON 9 - INSTALLING DEVICE DRIVER.pptx
JeirahTigas
?
Configuring Devices in Windows
Configuring Devices in Windows
Amir Villas
?
Ad

Recently uploaded (20)

Questions on Respiratory system..docxnnn
Questions on Respiratory system..docxnnn
medapatiramakrishnar
?
最新版美国杜比克大学毕业证(鲍顿毕业证书)原版定制
最新版美国杜比克大学毕业证(鲍顿毕业证书)原版定制
taqyea
?
ECE_Embeded_Systems_Lecture_Notes of .pdf
ECE_Embeded_Systems_Lecture_Notes of .pdf
sudheerkurakula1218
?
最新版德国不来梅艺术学院毕业证(贬蹿碍毕业证书)原版定制
最新版德国不来梅艺术学院毕业证(贬蹿碍毕业证书)原版定制
Taqyea
?
Computer project for ai and non ai robot
Computer project for ai and non ai robot
shivaniarora32567
?
Basic Computer system servicing grade 7-12.pptx
Basic Computer system servicing grade 7-12.pptx
grendel3
?
Max Power products list 2024 compone.pdf
Max Power products list 2024 compone.pdf
jmglpa
?
最新版西班牙梅南德斯·佩拉尤国际大学毕业证(鲍滨惭笔毕业证书)原版定制
最新版西班牙梅南德斯·佩拉尤国际大学毕业证(鲍滨惭笔毕业证书)原版定制
Taqyea
?
miiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirs.pptx
miiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirs.pptx
ChandanKumarMajhi4
?
最新版美国北西雅图学院毕业证(狈厂颁颁毕业证书)原版定制
最新版美国北西雅图学院毕业证(狈厂颁颁毕业证书)原版定制
Taqyea
?
How_Volcanshgsgsgsgsgsgsgsggsoes_Work.pptx
How_Volcanshgsgsgsgsgsgsgsggsoes_Work.pptx
zyx10283746
?
Custom Hardware design for image processing.pptx
Custom Hardware design for image processing.pptx
DevanshuGaur5
?
OB_ICF_PPT.pdf nsnsnsnnsnnsnennenenneennenenne
OB_ICF_PPT.pdf nsnsnsnnsnnsnennenenneennenenne
dibaynlucero
?
Windows Cleaner Software By Yamicsoft.pptx
Windows Cleaner Software By Yamicsoft.pptx
yamicsoft458
?
最新版德国弗赖堡音乐学院毕业证(贵谤别颈产耻谤驳毕业证书)原版定制
最新版德国弗赖堡音乐学院毕业证(贵谤别颈产耻谤驳毕业证书)原版定制
Taqyea
?
Muscular_System_Scaffold_Presentation.pptx
Muscular_System_Scaffold_Presentation.pptx
Manikantan70
?
artifical intelligence and its usage in biology
artifical intelligence and its usage in biology
chaned5
?
DS.pptx for study for a long ghuiiiiijjj
DS.pptx for study for a long ghuiiiiijjj
losbandidis55
?
[Back2School] Timing Checks- Chapter 5.pdf
[Back2School] Timing Checks- Chapter 5.pdf
Ahmed Abdelazeem
?
Automatic plant watering system using GSM and moisture sensors.
Automatic plant watering system using GSM and moisture sensors.
asmarajput51
?
Questions on Respiratory system..docxnnn
Questions on Respiratory system..docxnnn
medapatiramakrishnar
?
最新版美国杜比克大学毕业证(鲍顿毕业证书)原版定制
最新版美国杜比克大学毕业证(鲍顿毕业证书)原版定制
taqyea
?
ECE_Embeded_Systems_Lecture_Notes of .pdf
ECE_Embeded_Systems_Lecture_Notes of .pdf
sudheerkurakula1218
?
最新版德国不来梅艺术学院毕业证(贬蹿碍毕业证书)原版定制
最新版德国不来梅艺术学院毕业证(贬蹿碍毕业证书)原版定制
Taqyea
?
Computer project for ai and non ai robot
Computer project for ai and non ai robot
shivaniarora32567
?
Basic Computer system servicing grade 7-12.pptx
Basic Computer system servicing grade 7-12.pptx
grendel3
?
Max Power products list 2024 compone.pdf
Max Power products list 2024 compone.pdf
jmglpa
?
最新版西班牙梅南德斯·佩拉尤国际大学毕业证(鲍滨惭笔毕业证书)原版定制
最新版西班牙梅南德斯·佩拉尤国际大学毕业证(鲍滨惭笔毕业证书)原版定制
Taqyea
?
miiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirs.pptx
miiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiirs.pptx
ChandanKumarMajhi4
?
最新版美国北西雅图学院毕业证(狈厂颁颁毕业证书)原版定制
最新版美国北西雅图学院毕业证(狈厂颁颁毕业证书)原版定制
Taqyea
?
How_Volcanshgsgsgsgsgsgsgsggsoes_Work.pptx
How_Volcanshgsgsgsgsgsgsgsggsoes_Work.pptx
zyx10283746
?
Custom Hardware design for image processing.pptx
Custom Hardware design for image processing.pptx
DevanshuGaur5
?
OB_ICF_PPT.pdf nsnsnsnnsnnsnennenenneennenenne
OB_ICF_PPT.pdf nsnsnsnnsnnsnennenenneennenenne
dibaynlucero
?
Windows Cleaner Software By Yamicsoft.pptx
Windows Cleaner Software By Yamicsoft.pptx
yamicsoft458
?
最新版德国弗赖堡音乐学院毕业证(贵谤别颈产耻谤驳毕业证书)原版定制
最新版德国弗赖堡音乐学院毕业证(贵谤别颈产耻谤驳毕业证书)原版定制
Taqyea
?
Muscular_System_Scaffold_Presentation.pptx
Muscular_System_Scaffold_Presentation.pptx
Manikantan70
?
artifical intelligence and its usage in biology
artifical intelligence and its usage in biology
chaned5
?
DS.pptx for study for a long ghuiiiiijjj
DS.pptx for study for a long ghuiiiiijjj
losbandidis55
?
[Back2School] Timing Checks- Chapter 5.pdf
[Back2School] Timing Checks- Chapter 5.pdf
Ahmed Abdelazeem
?
Automatic plant watering system using GSM and moisture sensors.
Automatic plant watering system using GSM and moisture sensors.
asmarajput51
?
Ad

Device drivers by prabu m

  • 1. Agenda : ? User Mode & Kernel Mode ? Device driver ? How a Device is installed while connecting to a system ? Components of Driver package ? BIOS & USB interaction
  • 2. Communication between User-mode and kernel-mode components ? A processor in a computer running Windows has two different modes: user mode and kernel mode ? The processor switches between the two modes depending on what type of code is running on the processor ? Applications run in user mode, and core operating system components run in kernel mode. ? If a kernel-mode driver crashes, the entire operating system crashes.
  • 3. Kernel Mode ? In the kernel mode the code is complete and uninterrupted access to all the hardware components . ? The kernel mode driver can execute any instruction it needs on the CPU without waiting, and can reference any memory address that is available. ? Kernel mode is generally reserved for the lowest-level, most trusted functions of the operating system. ? Crashes in kernel mode are catastrophic; they will halt the entire PC ? In User mode, the executing code has no ability to directly access hardware or reference memory. ? Code running in user mode must delegate to system APIs to access hardware or memory. ? It uses private address space in memory . ? Each application runs in isolation, and if an application crashes, the crash is limited to that one application. Other applications and the operating system are not affected by the crash. User Mode The green line is total CPU time; the red line is Kernel time. The gap between the two is User time.
  • 4. 1. The kernel performs its tasks, such as running processes and handling interrupts, in kernel space 2. The kernel is a computer program that is the core of a computer's operating system, with complete control over everything in the system. 3. For example, to show the user something on the screen, an application would make a request to the kernel, which would forward the request to its display driver, which is then responsible for actually plotting the character/pixel. 4. If a kernel-mode driver crashes, the entire operating system crashes. More about – Kernel Mode
  • 5. What is driver? ? In the most fundamental sense, a driver is a software component that lets the operating system and a device communicate with each other. ? Without the required device driver, the corresponding hardware device fails to work. ? A device driver acts as a translator between the hardware device and the programs or operating systems that use it. ? A device driver may also be called a software driver. ? For a given I/O request (like reading data from a device), there are often several drivers, layered in a stack, that participate in the request ? The one driver in the stack that communicates directly with the device is called the function driver. ? The drivers that perform auxiliary processing are called filter drivers. ? Certain filter drivers act as verifiers to make sure the other drivers in the stack are handling the I/O request correctly.
  • 6. What happened when we connect a new device in Windows? Step 1: The New Device is Identified ? The bus or hub driver to which the device is connected assigns a hardware identifier (ID) (Vendor Defined Identification String) ? Windows uses hardware IDs to find the closest match between a device and a driver package. For example, when a user plugs a wireless local area network (WLAN) adapter into the port of a USB hub that is attached to the computer, the following steps occur: The device is detected by the USB hub driver. Based on information that it queries from the adapter, the hub driver creates a hardware ID for the device. For example, the USB hub driver could create a hardware ID of USBVID_1234&PID_5678&REV_0001 for the WLAN adapter, where: ? VID_1234 is the identifier of the vendor. ? PID_5678 is the product, or model, identifier of the device. ? REV_0001 is the revision identifier of the device.
  • 7. ? The USB hub driver notifies the Plug and Play (PnP) manager that a new device was detected. ? The PnP manager queries the hub driver for all of the device's hardware IDs. The hub driver can create multiple hardware IDs for the same device. ? The PnP manager notifies Windows that a new device needs to be installed. As part of this notification, Windows is provided with the list of hardware IDs. ? Windows starts a search for a driver package that matches one of the device's hardware IDs. If Windows cannot find a matching hardware ID, it searches for a driver package that has a matching compatible ID for the device.
  • 8. Step 2: A Driver for the Device is Selected Searching for the Driver Package Using the hardware identifier (ID) that is reported by the bus or hub driver, Windows searches for driver packages that match a device. A driver package matches a device if the hardware ID matches a hardware ID or compatible ID in an INF Models section entry of the driver package's INF file. Driver Store : ? The process of copying a driver package to the driver store is called staging ? The driver store is a trusted collection of inbox and third-party driver packages. ? The operating system maintains this collection in a secure location on the local hard disk Search phase Windows 7 Windows 8 and later versions of Windows Before a driver is installed DevicePath Windows Update Driver store Driver store After initial driver is selected Not applicable Device Path Windows Update
  • 10. Components of a Driver Package Typically, a driver package contains the following components: ? Driver files ? Installation files ? Other files Driver Files : ? The driver is the part of the package that provides the I/O interface for a device ? Typically, a driver is a dynamic-link library (DLL) with the .sys file name extension ? When a device is installed, Windows copies the .sys file to the %SystemRoot%system32drivers directory ? The software depends on the features of the device and the bus or port to which it connects. ? Microsoft ships drivers for many common devices and nearly all buses with the operating system. Function driver - It is the main driver for a device Mini Driver - Provided by individual HW vendor . The drivers that handle device-specific tasks. Class Driver - a simple interface between a vendor-written minidriver and the operating system. Filter Driver - It is a driver or program or module that is inserted into the existing Driver Stack to perform some specific function For example, an ACPI bus filter is added to support power management for each device.
  • 11. Installation Files INF File : ? An INF file or Setup Information file is a plain-text file used by Microsoft Windows for the installation of software and drivers ? It is an ASCII or Unicode text file that provides device and driver information, including the driver files, registry entries, device IDs, catalog files, and version information that is required to install the device or driver ? Windows copies this file to the %SystemRoot%inf directory when it installs the device catalog (.cat) file: A driver catalog file contains a cryptographic hash of each file in the driver package. Windows uses these hashes to verify that the package was not altered after it was published. To ensure that the catalog file is not altered, it should be digitally signed. Other Files A driver package can also contain other files, such as a device installation application, a device icon, device property pages, and so forth.
  • 12. Does BIOS plays a role in USB ? ? If the PC's BIOS supports booting from a USB device, then that means that the BIOS has embedded firmware that includes a USB protocol stack, and can control a target device like a flash drive over the Universal Serial Bus. ? After the USB handshake protocol is established between the USB host (the PC that needs to boot) and the USB gadget (the flash drive), the control and data mechanism provided by USB can be abstracted away, and upper layers of the BIOS boot code can treat the flash drive just like a HDD. ? That is, the first sector of the "disk drive" has to be read in order to obtain its Master Boot Record (MBR)
  • 13. Prabu , UST Global