Linux Device Driver Programming-complex Device Driver

Source: Internet
Author: User
Linux Device Driver Programming-Linux general technology-Linux programming and kernel information-complex device driver-the following is a detailed description. The complex device drivers mentioned here involve PCI, USB, network devices, Block devices, and so on (strictly speaking, these devices are not in the same concept, for example, they are tied with Block devices by character devices, PCI and USB devices may all belong to character devices. The drivers of these devices involve complex data structures and program structures related to specific device types. This article will not describe too much about the driver details of these devices, but just give a brief description.

PCI is The abbreviation of The Peripheral Component Interconnect-Bus. The CPU uses The PCI bridge chipset to communicate with The PCI device. The PCI bridge chipset processes all data interactions between The PCI subsystem and The memory subsystem, the PCI device is completely isolated from the memory subsystem. Demonstrate the principles of the PCI subsystem:



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // dev.yesky.com/imagelist/06/44/f00mjk3tvl70.jpg'); ">



Each PCI device has a 256-Byte Device Configuration block. The first 64 bytes are used as the device ID and basic configuration information. Linux provides a set of functions to process PCI configuration blocks. Before a PCI device can be used, the Linux driver needs to determine the specific parameters of the device from the information in the PCI device configuration block and set the parameters so that the PCI device can be operated correctly.

The general process of PCI device initialization function processing is as follows:

(1) check whether the kernel supports PCI-Bios;

(2) check whether the device exists and obtain the configuration information of the device;

1 ~ 2. The two steps are as follows:
QUOTE:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.