Process virtual address space is an important abstraction of Linux. The system provides a 4 GB virtual address space for each running Linux Process without interfering with each other, you can only access your own virtual address space address. The
The following is an example of applying for a DMA buffer in ARM Linux. DMA requires Uncached virtual address space and the physical memory to be mapped must be continuous. Therefore, specific functions are required to help us.Info-> data_buff =
It has been tested to run smoothly on fedora10 and requires root permission for execution.
#! /Bin/bash # written by cpuwolf@gmail.com 2010 mountpt =/Media/disk devicename = SDB sdcard =/dev/$ devicename If test $ #-Le 0; then echo "error:
Refer:
Http://blog.chinaunix.net/space.php? Uid = 15887868 & Do = Blog & id = 2758294
Http://www.cnblogs.com/hoys/archive/2011/04/01/2002299.html1. driver_register registers the driver to the bus.
/*** Driver_register-register driver with bus * @
Today, I happened to see typeof, but I only know that it is probably the type of the returned variable. Later I checked it online and found that this keyword is used in many Linux systems, the following describes what typeof is and how to use it. In
Copyright 2009 (c) benzus
The following code comes from the Linux-1.0 kernel include/Linux/sched. h file.
(Note that the Linux 0.11 kernel is basically the same as this code, so this article also applies to the 0.11 kernel)
01 # define switch_to (n )
Software package to be prepared: system package: uClinux-dist-20040408.tar.gz: Ready
1 decompress uclinux-dist-20040408.tar.gz[Root @ localhost opt] # tar-zxvf the uClinux-Dist directory is generated under the current directory after the
Take LCD as an example. register device first and then driver. The names of the two are the same.
Static struct pxafb_mode_info tpo_tdo24mtea1_modes [] = {
[0] = {
/* VGA */
. Pixclock = 38250,
. Xres = 480,
. Yres = 640,
. Bpp = 16,
. Hsync_len = 8,
The I/O operation can be performed directly on the physical address, or on the memory address after being reflected to the memory. The operation can also be performed using both the physical address and the memory address.3.1 I/O Ports
# Include
On 32bit machines, due to the limitations of 32bit address space, the maximum addressing range is 2 ^ 32-1, that is, 4G linear address space, 2G/2g, 1g/3G allocation method, divide the 4G address space into two parts
The so-called 3g/1G is 3G
Because you often need to download and install software, and the software that provides download is usually packaged and compressed, it is very important to package the compressed tar command, I found an article on "example and explanation of tar
Analysis of the ramdisk root file system creation process in Linux
This article describes how to create the ramdisk root file system in Linux.
1. modify an existing File System
Set the file system compressed file to ramdisk.gz.
1. Extract
# Cd
1. Diff
--------------------NameDiff-find differences between two filesSynopsisDiff [Options] From-file to-file--------------------
The diff function is used to compare the differences between the two files, and then record them, that is, the
As a system administrator, you may need to add users to a machine frequently, either by adding many users to a machine or by adding the same user to many machines.
I am such a system engineer. Every time a new employee enters the company, he has
Absolute and relative Linux paths
The absolute path in Linux is from the root directory. For example,/dev/somedir /..
The relative path starts from the current directory ./
There are four relative paths:
Current
Operations related to process information are in the unistd. h file. The following functions are commonly used.
Getuid
Function prototype: uid_t getuid (void );
Function: gets the ID of the user who calls the process.
Function return: the ID of the
When shmget is used, we can specify the size of the shared memory. What if the size is out of bounds?
As follows:
/* * ShareMem.h * * Created on: 2013-2-25 * Author: coreycui */#ifndef SHAREMEM_H_#define SHAREMEM_H_#include #include #include
Linux File locks are the default recommended locks.
Two points are confirmed as follows:
1) exclusive read/write locks.
2) Lock contention when the file lock areas cross.
Filemutex. h:
class FileMutex {public:FileMutex(const string&
Summary: Chapter 1 Introduction to device drivers
Chapter 2 Construction and Operation Module
When talking about the driver, you have to start with two terms: kernel space and user space. The user space is the space where your applications run. The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service