EmbLogic's Blog

Category Archives: Device Drivers

PARALLEL PORT -8 led array

Succesfully implemented the parallel port outb operations using 8-led array!!! I had firstly make a sculldev allocate memory to it so that i can map the file_operations through the cdev_init and cdev_add operations and then map the parallel port address … Continue reading

Posted in Parallel Port Driver | Leave a comment

Character Device Driver

?The kernel offers several subroutines or functions in user space, which allow the end user application programmer to interact with the hardware. Usually, in UNIX or Linux systems, this dialogue is performed through functions or subroutines in order to read and write files. … Continue reading

Posted in Character Driver | Leave a comment

simple print at kernel

head    1.1; access; symbols; locks root:1.1; strict; comment    @ * @; 1.1 date    2014.06.21.09.20.59;    author root;    state Exp; branches; next    ; desc @print on kernel. @ 1.1 log @Initial revision @

Posted in Character Driver | Leave a comment

head 1.1; access; symbols; locks emblogic:1.1; strict; comment @ * @; 1.1 date 2014.06.21.06.46.49; author emblogic; state Exp; branches; next ; desc @create a module.. using module_init and module_exit system calls.. then insert and delete the module from the list … Continue reading

Posted in Character Driver | Leave a comment

Character driver – initialization and cleanup

RCS file: ./header.h,v Working file: ./header.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: include the header files for module_exit() and for module_init() also include the license —————————- revision … Continue reading

Posted in Character Driver | Leave a comment

Kernel Timers

Timers are used to schedule execution of a function (a timer handler) at a particular time in the future. They thus work differently from task queues and in that you can specify when in the future your function will be … Continue reading

Posted in Character Driver | Leave a comment

implemented ioctl :change quantum and qset using operation

RCS file: ./ioctl.c,v Working file: ./ioctl.c head: 1.23 branch: locks: strict root: 1.23 access list: symbolic names: keyword substitution: kv total revisions: 23; selected revisions: 23 description: this is our ioctl.c file for driver operations —————————- revision 1.23 locked by: … Continue reading

Posted in Character Driver | Leave a comment

implemented :completion synchronization technique

RCS file: ./write.c,v 3 Working file: ./write.c 4 head: 1.163 5 branch: 6 locks: strict 7 root: 1.163 8 access list: 9 symbolic names: 10 keyword substitution: kv 11 total revisions: 163; selected revisions: 163 12 description: 13 this is … Continue reading

Posted in Character Driver, Device Drivers | Leave a comment

character driver-seek_SET,SEEK_CUR and SEEK_END working fine for reading

RCS file: ./read2.c,v Working file: ./read2.c head: 1.40 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 40; selected revisions: 40 description: this is working fine with lseek —————————- revision 1.40 date: 2014/05/27 17:52:40; author: root; state: … Continue reading

Posted in Character Driver | Leave a comment

Character driver -lseek operation

ranch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 19; selected revisions: 19 description: this is working fine with lseek —————————- revision 1.19 date: 2014/05/26 18:30:46; author: root; state: Exp; lines: +1 -0 working successfully for read … Continue reading

Posted in Character Driver | Leave a comment

writing in character driver with multiple quantum

#include”header.h” #include”declration.c” struct ScullQset *create_scullqset(int nosqset) { struct ScullQset *lscullqset,*temp,*new; int i,flag=1; lscullqset=NULL; //int i; printk(KERN_INFO”begin=%s\n”,__func__); for(i=0;inext=NULL; lscullqset->data=NULL; } else { new = (struct ScullQset *)kmalloc(sizeof(struct ScullQset),GFP_KERNEL); new->next=NULL; new->data=NULL; temp->next=new; temp=temp->next; } #include”header.h” #include”declration.c” struct ScullQset *create_scullqset(int nosqset) { struct … Continue reading

Posted in Character Driver | Leave a comment

Character driver-sucessfully working for min 32 distinct user

The code is working fine for 32 distinct user acessing 2 nodes node0 and node1 ie, 32 user can acess this driver at a time without reporting a bug. there are 2 operation that i perform for each application 1.write … Continue reading

Posted in Character Driver | Leave a comment

character driver—>devwrite.c

Major reasons for kernel Crash 1>>you trying to access a location in kernel space which you are not authorised. 2>>you are trying to write data in the memory location which is not part of quantums(***MAJOR CRASH***).  

Posted in Character Driver, Device Drivers | Leave a comment

CHARACTER Driver :entered data in multiple scullqsets ,qsets and quantums

RCS file: write.c,v Working file: write.c head: 1.81 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 81; selected revisions: 81 description: this is the file for user write like operation —————————- revision 1.81 date: 2014/05/16 12:53:09; … Continue reading

Posted in Character Driver | Leave a comment

project05==character driver

Common Errors which most of us will face while doing character drivers 1) Multiple definitions of the variable {bcoz of wrong use of extern} 2)control reaches end of non-void function{bcoz not returning any value to that non-void function} 3)warning: variable … Continue reading

Posted in Character Driver | Leave a comment