A power point presentation on the topic “Device Driver” with a total of 21 slides.










































Device Drivers
What is a Device?
A device is a piece of hardware that you can program via registers inside the device so the device can perform the specific functionality that you need in your system.
What is a Device Driver?
A device driver contains all the software routines that are needed to be able to use the device. Typically a device driver contains a number of main routines like a initialization routine, that is used to setup the device, a reading routine that is used to be able to read data from the device, and a write routine to be able to write data to the device.
The device driver may be either interrupt driven or just used as a polling routine. Device drivers are the software libraries that initialize the hardware and manage access to the hardware by higher layers of software Device drivers are the liaison between the hardware and the operating system, middleware, and application layers.
Why there is Need of different Device Drivers?
Different types of hardware will have different device driver requirements that need to be met.
Even the same type of hardware, such as Flash memory, that are created by different manufacturers can require substantially different device driver software libraries to support within the embedded device.
Types of Device Drivers
Device drivers are typically considered either architecture-specific or generic-specific.
A device driver that is architecture-specific manages the hardware that is integrated into the master processor. Examples of architecture-specific drivers that initialize and enable components within a master processor include on-chip memory, integrated memory managers (memory management units (MMUs)), and floating-point hardware.
A device driver that is generic-specific manages hardware that is located on the board and not integrated onto the master processor.
A generic driver can be configured to run on a variety of architectures that contain the related board hardware for which the driver is written.
Generic drivers include code that initializes and manages access to the remaining major components of the board, including board buses, off-chip memory (controllers, level 2+ cache, Flash, etc.), and off-chip I/O (Ethernet, RS-232, display, mouse, etc.)
Important Functions of Device Drivers
- Manage Power requirements : Drivers can enter low-power states as part of entering system-wide low-power states like “suspend” (also known as “suspend-to-RAM”), or (mostly for systems with disks) “hibernation” (also known as “suspend-to-disk”).
- Control the device by issuing a sequence of commands such as create ( ), open ( ), connect ( ), listen ( ), accept ( ), read ( ), write ( ), close ( ), delete ( )
- Check input parameters if they are valid
- Check the device if it is in use
- Manage log events
Operating Modes
Depending on the master processor, different types of software can execute most commonly in two modes
- Supervisory or Kernal mode
- User mode
Supervisor Mode
Supervisor mode or privileged mode is a computer system mode in which all instructions such as privileged instructions can be performed by the processor. Some of these privileged instructions are interrupt instructions, input output management etc.
User Mode
The User mode is normal mode where the process has limited access. The transition from user mode to kernel mode occurs when the application requests the help of operating system or an interrupt or a system call occurs.
Need of Dual Mode
- Prevent Accidental wipe out of operating system data
- Prevent data Overriding
Conclusion
- Application of device driver
- Types of Device Drivers
- Architecture-specific
- Generic-specific
- Functions of Device Drivers
- Operating modes
- Supervisor Mode
- User Mode