DOC PREVIEW
UMBC CMSC 691 - DEVICE DRIVER

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

DEVICE DRIVERIntroductionTasks involvedBuilding device driver moduleCharacter device driversDesign and implementation of ScullExamples-Hello WorldExamples-ScullConclusionsFuture workDEVICE DRIVERVINOD KAMATHCS691X PROJECT WORKIntroduction•How to write/install device drivers•Systems, Kernel Programming•Character, Block and Network devicesTasks involved•Building and Running modules•Character device driversBuilding device driver module•Module vs. Applications–Appln - single task–Module - register for future•Compiling and Loading–___KERNEL__, MODULE–insmod,rmmod–Global var-Symtab•Do in Kernel space (not User space)–response time; block/network devsCharacter device drivers•Scull - Simple Char. Util. for Loading Localities–Acts on mem. Area as though it is a device–Demonstrate interface betn. Kernel and Char drivers–n devices for n mem. areas•Major/Minor no.- (un)register chr_devDesign and implementation of Scull•File operations/structure–Device id. By file structure–Kenerl uses file ops. To access driver’s functions •Open and Close–Initialize device, usage count, •Memory–Device-memory Link List•Read and Write–Transfer data from Kernel-User •Testing/Debugging–cp, cat, dd wls-l > dev/scull0Examples-Hello World•#define MODULE•#include <linux/module.h>•int init_module (void) {printk(“<1>Hello, World\n”); return 0}•void cleanup_module {printk(“<1>Goodbye, cruel World\n”);}Examples-Scull•#define MODULE, __KERNEL__•#include <linux/module.h>….•Struct file_operations d0_fops = {r,w,o,c }•int init_module (void) {malloc, reg do_fops}•void cleanup_module (unreg, free...);lConclusions•Writing device drivers is not for faint heart/Adventure•Very careful with Kernel codesFuture work •Try Advanced drivers, Scheduling•Understand principle for multi


View Full Document

UMBC CMSC 691 - DEVICE DRIVER

Documents in this Course
NOTES

NOTES

8 pages

OWL

OWL

109 pages

Security

Security

53 pages

SIP

SIP

45 pages

Proposals

Proposals

30 pages

Proposals

Proposals

30 pages

Load more
Download DEVICE DRIVER
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view DEVICE DRIVER and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view DEVICE DRIVER 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?