Linux BSP Practical Course (Network): Packet Reception Process

Linux BSP Practical Course (Network): Packet Reception Process

Network Card to Memory Kernel’s Network Module Protocol Stack IP Layer UDP Layer Socket Conclusion This article will introduce how a UDP packet is received step by step from the network card to the process in a Linux system. Network Card to Memory The network interface card must have the appropriate driver installed to function … Read more

Understanding the Linux Kernel

Understanding the Linux Kernel

Author: aurelianliu Refer to scheduling, memory, files, networks, etc., encountered during work. 1. OS Running States X86 architecture, user mode runs in ring3, kernel mode runs in ring0, two privilege levels. (1) The kernel and some privileged instructions, such as filling page tables, switching process environments, etc., generally operate in ring0. Kernel mode includes the … Read more

Understanding Preemptive Scheduling in RTOS

Understanding Preemptive Scheduling in RTOS

Content Overview: This article begins with how tasks switch, introducing the ready list and priority table in the RTOS kernel, layer by layer unveiling the mystery of the RTOS kernel’s preemptive scheduling method. Only with an in-depth understanding of the kernel can better applications be created. 1. Knowledge Point Review 1.1. Review of Previous Article … Read more

Introduction to Linux Character Device Driver Framework

Introduction to Linux Character Device Driver Framework

This article discusses Linux device drivers. In Linux, I/O devices can be divided into two categories: block devices and character devices. These two types of devices do not have any hardware differences; they are mainly classified based on different functionalities, and their main difference lies in whether they can randomly access and manipulate data on … Read more

A Brief Discussion on Linux PCI Device Drivers (Part 1)

A Brief Discussion on Linux PCI Device Drivers (Part 1)

Click on the top“Baiwen Technology”, select the top public account Embedded essentials delivered promptly —— Author | linuxdrivers Source | https://blog.csdn.net/linuxdrivers/article/details/5849698 A student suggested writing about PCI drivers, and today I found a long article that is one of the most detailed blogs on PCI available online. It is divided into two parts, and this … Read more

Deep Understanding of Linux Bus Device Driver Framework

Deep Understanding of Linux Bus Device Driver Framework

The development of Linux drivers is quite different from the development of application programs. These differences lead to the essential distinction between writing Linux device drivers and writing application programs. 1. User Mode and Kernel Mode The Linux operating system is divided into user mode and kernel mode. The kernel mode completes interactions with hardware, … Read more

Analysis of USB Device Driver

Analysis of USB Device Driver

Click the above blue text to follow us! Introduction In previous articles, we have discussed the USB device driver framework. In this article, we will look at a specific device driver to further familiarize ourselves with these concepts. We will take the USB mouse as an example. Analysis of USB Device Driver Kernel Version: 4.20.12 … Read more

Developing PCI Device Drivers on Linux

Developing PCI Device Drivers on Linux

1. PCI Bus System Architecture PCI stands for Peripheral Component Interconnect, which is a universal bus interface standard that has been widely used in current computer systems. PCI provides a complete set of bus interface specifications aimed at describing how to connect peripheral devices in a structured and controlled manner, while also characterizing the electrical … Read more

Deep Understanding of Linux Bus Device Driver Framework

Deep Understanding of Linux Bus Device Driver Framework

Developing Linux drivers is significantly different from developing application programs. These differences lead to the essential distinction between writing Linux device drivers and writing application programs. 1. User Mode and Kernel Mode The Linux operating system is divided into user mode and kernel mode. The kernel mode handles interactions with hardware, such as reading and … Read more

How to Write a Block Device Driver

How to Write a Block Device Driver

First, refer to the kernel code in z2ram.c Simulate a block device driver using memory The specific process of a block device driver: 1. Register the block device with the kernel int register_blkdev(unsigned int major, const char *name) Parameter 1: major write 0 to automatically get the major device number Parameter 2: The registered name … Read more