Linux device driver summary: the basic concept of the kernel

  
 

The role of a .linux device driver

Kernel: used to manage hardware and software resources, and provide a running environment. Such as the allocation of 4G virtual space and so on.

linux device driver: is the bridge between the connection hardware and the kernel.

Linux system can be divided according to personal understanding:

Application layer:
including POSIX interface, LIBC, graphics library, etc., for providing users with access to the kernel interface . In user mode, ARM runs in user mode (usr) or system mode (sys).

Core layer:
After the application calls the relevant interface, it will execute the SWI instruction to switch the ARM working mode to the super user (svc) mode through the system call, and execute according to the requirements of the user function. The corresponding operation.

Hardware layer:
Hardware devices, when the user needs to operate the hardware, the kernel will operate the hardware device according to the driver interface.

The diagram structure is as follows:
linux graph structure < Br>

Let a relatively evil analogy:

In the hotel, I often see some cards in the door, saying that you can provide a certain service by calling and delivering the goods.
linux analogy diagram


II. Kernel code tree introduction

linux-2.6.29

Copyright © Windows knowledge All Rights Reserved