Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

developerWorks Community:

  • Close [x]

IBM AIX device driver development

A tutorial on AIX device driver framework and related APIs

Gautam Raut (gautraut@in.ibm.com), Senior Software Engineer, IBM
Gautam
Gautam Raut works as a Senior Software Engineer for the Andrew File System (AFS) Team at the IBM Software Labs in Pune, India. He works with kernel and user-level debugging of dumps and crashes, as well as reported bugs on the Linux and AIX platforms. He has also worked on various AFS-specific AIX kernel components. Gautam holds M.S. in Computer Science from the University of Pune. He is a Linux enthusiast who spends his spare time exploring the Linux kernel on his Fedora 8 box.

Summary:  This tutorial illustrates the IBM® AIX® device driver framework and related application programming interfaces (APIs). Here, we shall discuss about the device switch structure, API to register device switch methods, major and minor number management, and moving data from kernel to user space.

Date:  28 Mar 2013
Level:  Intermediate PDF:  A4 and Letter (244 KB | 15 pages)Get Adobe® Reader®

Activity:  20933 views
Comments:  

Introduction

In traditional UNIX®, the term device refers to hardware components, such as disk drives, tape drives, printers, keyboards, pseudo devices (such as the console, error special file and null special file), and so on. In AIX, these devices are referred to as kernel devices, which have device drivers and are known to the system by major and minor numbers.

AIX device drivers are a type of AIX kernel extensions. Kernel extensions run within a protected domain of a kernel. They can be loaded into kernel during system start or run time and removed at run time. User-level code can access registered device driver code only through system calls. Device drivers add extensibility, configurability and ease of system administration to AIX.

To understand basic kernel extension development, refer to the IBM developerWorks article, Writing AIX kernel extensions.

Device drivers use core kernel services exported by AIX kernel "/unix" by referring to /usr/lib/kernex.exp. "kernex.exp" contains a list of symbols exported by kernel. These exported symbols are essentially kernel functions and storage locations (kernel global data structure). The linker program (ld) uses this information while linking the compiled device driver code.

1 of 15 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX, Linux
ArticleID=861832
TutorialTitle= IBM AIX device driver development
publish-date=03282013
author1-email=gautraut@in.ibm.com
author1-email-cc=