Font Size: a A A

Research On A Modular Approach For Device Driver Development

Posted on:2014-02-05Degree:MasterType:Thesis
Country:ChinaCandidate:Y Q JiFull Text:PDF
GTID:2308330482951979Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Device drivers are one of the most important parts of a computer system, through which applications and operating systems manage and operate on peripheral devices. In addition, device driver codes account for a very large proportion in modern operating systems. For example, they constitute 70% of the Linux code base and likely more of Windows. At the same time, device drivers are a major resource of the crash of operating systems. Existing research results show that device drivers contain more errors per line of code than other system components.The huge volume and error-prone characteristics of device drivers is determined by their intrinsic complexity. In terms of the configuration of underlying hardware platform, device drivers are obliged to manage and operate on devices complying with the drivers specification defined by operating systems and according to the datasheet released by device vendors. Any changes applied to operating systems, hardware platforms or devices, will result in a reconstruction of device drivers. The structure of the device driver is very complicated due to the fact that code related to operating systems, hardware platforms and devices are tangled and interfered with each other. It is very difficult to effectively develop and maintain device drivers. As a result, how to raise the efficiency of device drivers development and how to improve the quality of device drivers by reducing errors in device drivers have been a main concern for the device driver development.In this paper, we propose a modular approach for device driver development that tries to resolve these problems. The approach divides the complicated device driver into three independent modules:an operating system-specific module, a device-specific module and a platform-specific module. The three modules can be developed independently and integrated as a whole device driver by explicitly defined interfaces between them. Adopting this approach, we developed the modular device driver development framework for Ethernet devices.Then using the framework, we developed drivers for the four Network Interface Cards:Realtek RTL8019AS, Realtek RTL8150, CS8900 and DM9000 in Embedded Linux and Vxworks. The experiment shows that the complexity of the device driver is effectively controlled as the framework enables the three modules to be developed independently. The burden of device driver development and errors of device drivers can be reduced by reusing developed modules. And the new drivers have no significant performance loss compared with the native Ethernet driver. In detail, the main contributions of this paper include:(1) A modular approach for device driver development. This approach divides the complicated device driver into three modules:a platform-specific module, a device-specific module and an operating system-specific module. The platform-specific module describes the hardware configuration parameters of the platform it locates. It can be developed by the system platform manufacturer. The device-specific module defines and implements an interface controlling and managing a class of devices as well as attributes and statuses for it, which can be developed by the device manufacturer. The operating system-specific module builds the final device driver by calling hardware configuration parameters of the platform-specific module, the device class control interface of the device-specific module and kernel services of operating systems under the guidance of the driver specification defined by the operating system. It can be developed by OS developers. This approach allows device driver development tasks to be shared by different roles and every role develops its own module. Then by invoking explicitly defined interfaces between these modules, the new device driver is integrated. The goal that is greatly reduced the complexity, highly reused modules across different device, operating system and hardware platform is achieved simultaneously.(2) Based on the proposed modular approach for device driver development, we design a modular device driver development framework for Ethernet devices:the platform-specific module provides hardware configuration parameters for other modules, which describes the hardware environment in which the Ethernet device work. It includes the CPU description, bus description, interrupts description and address space description; The Ethernet device-specific module provides invocation of Ethernet class device control layer (including the Ethernet class device attributes, the Ethernet class device status and Ethernet class device functions) for Ethernet class OS-specific module, and implements the corresponding functions of Ethernet class devices defined in it. Ethernet class OS-specific module implements the driver interface, which needs to be implemented by Ethernet driver and is provided by operating systems. This implementation need to translate the driver interface into Ethernet class device functions, and simultaneously call the Kernel services, Ethernet class device attributes, Ethernet class device status, and platform configuration parameters.(3) Based on defined modular device driver development framework for the Ethernet device, we developed the OS-specific module for Linux and VxWorks, and the Ethernet device-specific module and platform-specific module for RTL8019AS NIC on Samsung s3c2410 SoC, RTL8150 USB NIC, CS8900 NIC on Samsung s3c2440 SoC, and DM9000 NIC on Samsung s3c2410 Soc. Then we reuse and combine different modules to construct the corresponding Ethernet device driver. Lastly, we evaluated the correctness of the generated Ethernet drivers, the efficiency of the development process (including complexity controlling and module reusing), and the performance of the generated Ethernet drivers.
Keywords/Search Tags:device driver, complexity, reusability, quality, modular approach, driver generation
PDF Full Text Request
Related items