Questions tagged [device-driver]

A device driver is a specialized software component (usually considered "system software") which allows a system to interact with a particular type or class of hardware device, such as a keyboard, serial port, disk drive, video display, memory controller, or other peripheral.

A device driver performs translation between logical operations from the operating system or application and physical actions of a hardware device. If the hardware device supports interrupts, the device driver fields and processes its interrupts, possibly arranging for the requesting application to sleep as appropriate.

Device drivers developed since the 1980s are usually written in a high level language, most often C. They usually execute in the most trusted CPU context of the operating system (variously called "kernel mode", "ring 0", "executive mode", etc.) and so have significant restrictions on what actions they can perform. In particular, they usually lack access to a runtime library; often they cannot perform floating point operations within interrupt context.

A Virtual Device Driver is a special flavor where the driver emulates a hardware device, particularly in virtualization environments. There is also the which play a special role in the Linux kernel.

1090 questions
54
votes
3 answers

I/O completion port's advantages and disadvantages

Why do many people say I/O completion port is fast and nice model? What is the I/O completion port's advantages and disadvantages? I want to know some points which make faster IOCP than other model. If you can explain it comparing other…
Benjamin
  • 8,715
  • 14
  • 72
  • 121
37
votes
1 answer

Android USB host mode "soft-mode" drivers for standard class-compliant USB devices

Now that the Android APIs support working directly with USB devices (since 3.1), I am curious if there has been any work to create "soft-mode" drivers for some of the more popular class-compliant devices (such as audio or HID). In other words, are…
Brad
  • 146,404
  • 44
  • 300
  • 476
33
votes
6 answers

Iphone device token - NSData or NSString

I am receiving iPhone device token in the form of NSData object. When I tested my notifications script function, I have only copied that object from log and the notifications went fine. However when I try now to automatically do it, I am sending…
Mladen
  • 24,320
  • 11
  • 36
  • 47
33
votes
6 answers

BSP vs Device-Drivers

While understanding each by itself (or maybe not), looks like I'm far from understanding the practical differences between the two. Per my understanding, a BSP is a package of drivers and configuration settings that allows a kernel image to boot up…
EdwardH
  • 1,473
  • 2
  • 11
  • 20
30
votes
3 answers

Memory mapped IO - how is it done?

I've read about the difference between port mapped IO and memory mapped IO, but I can't figure out how memory mapped Io is implemented in modern operating systems (windows or linux) What I know is that a part of the physical memory is reserved to…
paulAl
  • 899
  • 2
  • 10
  • 16
26
votes
2 answers

How to Install Driver with a cat file?

I have kernel driver. When installing on 32 bit systems and Windows XP and below, I had no problem and used SetupCopyOEMInf, but 64 bit drivers are required to be signed. I have signed it and I need to have a cat file with the driver copied…
SurDin
  • 3,003
  • 4
  • 24
  • 28
24
votes
4 answers

Extending Functionality of Magic Mouse: Do I Need a kext?

I recently purchased a Magic Mouse. It is fantastic and full of potential. Unfortunately, it is seriously hindered by the software support. I want to fix that. I have done quite a lot of research and these are my findings regarding the event chain…
Tyler
  • 1,563
  • 10
  • 20
23
votes
13 answers

Is it possible to code a device driver in Java?

Introduction I heard something about writing device drivers in Java (heard as in "with my ears", not from the internet) and was wondering... I always thought device drivers operated on an operating system level and thus must be written in the same…
Philip Stark
  • 478
  • 1
  • 3
  • 11
22
votes
2 answers

cache - flush and invalidate operation

I have some questions on cache synchronization operations. Invalidate: Before cpu tries to read a portion of memory updated by a device, the corresponding memory needs to be invalidated. Flush: Before the device read a portion of memory updated by…
kumar
  • 2,245
  • 4
  • 31
  • 54
22
votes
1 answer

Device driver API match error

I've installed cyanogenmod on my galaxy 3. When developing in Eclipse, most apps seem to work okay. However, I've written an app that needs to access the gallery and every time I try to access it the app crashes with this at log cat: 02-03…
Nadav
  • 495
  • 2
  • 8
  • 19
21
votes
2 answers

What is the difference between devm_kzalloc() and kzalloc() in linux driver programming

I have found devm_kzalloc() and kzalloc() in device driver programmong. But I don't know when/where to use these functions. Can anyone please specify the importance of these functions and their usage.
RajKumar Rampelli
  • 972
  • 2
  • 10
  • 21
20
votes
2 answers

Virtual Webcam Driver

I want to develop a virtual webcam driver which from User mode I'll pass image to it and it will display as webcam output. I don't want to use DirectX filter and CSourceStream etc. Because they don't work on some programs which doesn't use DirectX…
Franklin
  • 289
  • 2
  • 3
  • 5
20
votes
2 answers

Raw PDO to send IOCTL to upper filter driver (kbfiltr/moufiltr) to enable/disable device

I am quite new to driver development and trying to write a simple filter driver that will enable or disable a keyboard or mouse device. If I can make it work, I want to use it to disable the touchpad on my laptop when a mouse is plugged in. I…
Dale
  • 12,505
  • 8
  • 49
  • 83
20
votes
4 answers

Where can I systematically study how to write Mac OS X device drivers?

I'm looking for an exhaustive, university-level book or guide to study in order to gain the ability of writing Mac OS X device drivers. I'm totally ignorant on this OS, but I'm already skilled on Linux. Is there any Mac OS X counterpart for book…
drAlberT
  • 18,939
  • 5
  • 29
  • 36
19
votes
2 answers

Storage & Network device drivers source code for Nexus 6 and Samsung Galaxy S6

For university research purposes, I am searching for a specific part of Nexus 6, and Samsung Galaxy S6 source code. Particularly, I am interested in "network" & "storage" driver source codes. I have visited developer resources for both Samsung…
Behnam
  • 5,884
  • 5
  • 31
  • 65
1
2 3
72 73