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.

1100 questions
8
votes
1 answer

For a shared interrupt line how do I find which interrupt handler to use?

For a shared interrupt line,I can have several interrupt handlers. The kernel will sequentially invoke all the handlers for that particular shared line. As far as I know, each handler, when invoked informs the kernel whether it was the correct…
hit.at.ro
  • 306
  • 3
  • 11
8
votes
1 answer

How to issue USB device reconnection under Windows

I have an USB device based on FTDI chip. Sometimes, its driver get stuck. Under linux, there no problem -- device get automatically disconnected, and reconnected by default kernel, and only problem is device name changed -- that can be fixed by udev…
datacompboy
  • 301
  • 5
  • 17
7
votes
1 answer

Replacing Touchscreen driver in Android Kernel

I'm adapting a Gingerbread kernel for my custom board. I'm trying to replace a resistive touch screen that uses an on-chip ADC controller (S5PV210 processor from Samsung). In my design, I need a capacitive controller supported by eGalaxyTouch…
7
votes
3 answers

Do the equivalent of installing a driver from a folder, programatically, in Windows XP or higher

I need to have a driver installed in my customers' computers. Unfortunately, the only way to do this right now is having Windows show its "Hardware Update Wizard" when the device is plugged in, and then have the user do the following: select "No,…
Jong Bor Lee
  • 3,805
  • 1
  • 24
  • 27
7
votes
1 answer

What is the purpose of class and class device?

I followed some tutorials that explained how to write Linux kernel modules and I am a bit confused. Even after reading the official "documentation", I have poor understanding of the concepts. After creating a character device (register_chrdev), I…
Artium
  • 5,147
  • 8
  • 39
  • 60
7
votes
7 answers

Linux Device Driver: Symbol "memcpy" not found

I'm trying to write a Linux device driver. I've got it to work really well, until I tried to use "memcpy". I don't even get a compiler error, when I "make" it just warns me: WARNING: "memcpy" [/root/homedir/sv/main.ko] undefined! OK and when I try…
Hinton
  • 2,320
  • 4
  • 26
  • 32
7
votes
2 answers

Is virtual memory used when using Port-mapped I/O?

If I have a Memory-mapped I/O device, and I want to write to a register for this device located at address 0x16D34, the 0x16D34 address is actually a virtual address, and the CPU will translate it to a physical address first, and then write the data…
Steve
  • 691
  • 5
  • 18
7
votes
5 answers

Is there a way to directly query the file system device driver for listing out the files in a directory?

I'm currently using FindFirstFile, FindNextFile API to recursively iterate through directories for searching files based on a given criteria. I noticed that "dir /s" command gives better performance than my program. I'm tried checking out the events…
ivymike
  • 1,511
  • 2
  • 20
  • 27
7
votes
2 answers

Check if a Windows driver exists for a given Device ID

I'm writing a Windows library using C++. This library should be able to check if the device driver of a specific device is installed on the system. So I am searching for a way to check if a driver is installed for a known Device ID. So far, I found…
flyx
  • 35,506
  • 7
  • 89
  • 126
7
votes
3 answers

/dev/video0 : invalid argument

Why I am not able to read this file. I tried reading this file with cat as : cat /dev/video0 But it says cat: /dev/video0 : invalid arguments Similarly, if I try to use dd as : dd if=/dev/video0 ~/vid It still is not able to read it. Note that…
pranavk
  • 1,774
  • 3
  • 17
  • 25
7
votes
1 answer

Is it possible to retrieve the CPU that created a WDFREQUEST?

I am trying to affinitise the completion of CompleteRequest to the CPU that originally issued the request. Is there a way to retrieve the CPU that issued the request during FdoDeviceControl or any onother way to see where the request came from…
Thomas Kejser
  • 1,264
  • 1
  • 10
  • 30
7
votes
2 answers

Windows Driver Development: Deploy option missing in Visual Studio 2012

I was trying to compile and deploy the WFP sample obtained from MSDN called msnmntr but the same problem applies to all samples. This and all samples fail to deploy because there's one step in the documentation that are missing in Visual Studio 2012…
ppaulojr
  • 3,579
  • 4
  • 29
  • 56
6
votes
2 answers

Find event device for keyboard, mouse

What is a foolproof method to find the event device node for the hardware keyboard or mouse? What I have tried is to read /proc/bus/input/devices and search for 'Keyboard' or 'Mouse' in the device name, but this doesn't work always, as the device…
vikraman
  • 358
  • 7
  • 14
6
votes
1 answer

Instrument a Windows 7 Bluetooth stack

I'm working with various (mostly Bluetooth) development boards (ConnectBlue, Ubertooth, USRPs etc.) in order to research about Bluetooth communication behaviour at PHY level. In order to get some more insights I'm looking for a way to debug the…
wishi
  • 7,188
  • 17
  • 64
  • 103
6
votes
1 answer

Linux spin_lock vs. NT KeAcquireSpinLock

From what I can gather: NT's KeAcquireSpinLock is equivalent to spin_lock_bh: the one raises IRQL to DISPATCH_LEVEL, the other masks the bottom half interrupts -- functionally the same. While the NT variant keeps the OldIrql, the Linux variant…
Ilya
  • 5,533
  • 2
  • 29
  • 57