【MMU】
Keywords:ARM
Reference address:ARM·MMU
The main functions of MMU: 1) Setting permissions 2) Address mapping
(Here we mainly talk about address mapping)
[Mapping of virtual address to physical address]
Question 1: Why do we need virtual addresses?
Reason 1: Let's look at a problem first. Program A needs 10MB of memory, and program B needs 110MB of memory. If A and B run at the same time, 20MB of memory is needed. If there is only 10MB of memory left, what if program C needs 20MB of memory? Therefore, the capacity requirement of our physical memory is very large.
Reason 2: If some programs exit at this time, there is 20M memory, but this memory is not continuous, but randomly allocated, but the total is 20M, which can allow the C program to run, but the C program has no fixed running address;
Reason 3:
Here, the memory allocation of physical address is used. Imagine that if program B fails, accesses the address of program A, and modifies the memory of program A, then program A will also fail. In other words, the crash of one program will cause the crash of multiple programs, which will make the system very unstable.
Combining the above two reasons, we can see the necessity of the invention of virtual addresses.
【Virtual address improvements】
(1)
Segmented memory mapping
Although this solves problems 2 and 3, the physical address and virtual address are in a one-to-one correspondence, the physical address has not been expanded, and the capacity is still very small.
(2) Paging method (page size in ARM is 1MB)
In the segmentation method, the entire program is always loaded into the memory each time the program is run; in the paging method, memory is allocated to the page to which the program runs.
Let's use an example to illustrate:
Assume that when a file A is executed in memory, the operating system will first create a 4GB process virtual address space for the program (not a real space, but a data structure, namely the page directory and page table)
The core idea of the paging method is that when the executable file executes to page x, a memory page y is allocated for page x, and then this memory page is added to the mapping table of the process virtual address space. This mapping table is equivalent to a function y=f(x).
Previous article:ARM SecureCRT connects Windows and Linux
Next article:ARM Nand Flash Control
Recommended ReadingLatest update time:2024-11-17 06:34
Design of Embedded Internet Radio Based on ARM
As a tool for receiving broadcasts, radio has gone through a long development process, from single-band to multi-band, from electron tubes and transistors to integrated circuits, from mechanical tuning to digital tuning functions, and its technology and quality have made great progress. Nowadays, new members ar
[Microcontroller]
[Embedded Development] Introduction to ARM chips (ARM chip types | ARM processor working modes | ARM registers | ARM addressing)
1. ARM chip type
1. ARM Classification
(1) ARM classification type (chip | core | instruction architecture)
ARM Category:
-- ARM chip type: 6410, 2440, 210;
-- ARM core type: arm11, arm9, CortexA9;
-- Instruction architecture: armv7, armv6;
[Microcontroller]
Design and Analysis of ARM Startup Code
ARM Architecture
At present, the ARM series of general-purpose 32-bit RISC microprocessors include ARM7, ARM9, ARM9E, ARM10 and other products. These processors can work in 7 modes. All modes except User mode are called privileged modes, and the other 5 modes except User and System are called exception modes. M
[Microcontroller]
Sondrel IP platform integrates Arm security subsystem to provide powerful edge computing
Sondrel has created a powerful quad-core IP platform, the SFA 200, which is ideally suited for ASIC (Application Specific Integrated Circuit) solutions for remote acquisition and processing of video and edge data, and for secure transmission of the results. The resulting single-channel ASIC can be arranged in series t
[Embedded]
ARM Linux: Implementation principle of switching from usr mode to svc mode
Everyone knows that if a Linux application wants to access the kernel, it must use a system call to switch from usr mode to svc mode. Let's take a look at its implementation process. System call is a service provided by the OS operating system. User programs use various system calls to reference various services pro
[Microcontroller]
From PC bus to ARM internal bus
When I was studying Chapter 9 and Hardware Communication in "Linux Device Drivers (3rd Edition)", I was not very clear about the concept of IO bus, so I looked for relevant information. Now I summarize it as follows: References for this article: 1. "Introduction to AMBA, AHB, APB Buses" Author: adamzhao Date: 2006-11
[Microcontroller]
Wei Dongshan ARM bare metal learning notes - S3C2440 serial port driver programming principles
Preface Explain the serial port driver principle of Wei Dongshan JZ2440 development board, and supplement the serial port usage content in Wei Dongshan's Wiki tutorial. Click here to enter the serial port usage. Here we mainly talk about the programming ideas of the serial port driver, how to write the simplest serial
[Microcontroller]
ARM Assembly: Data Processing Instruction Set
The data processing instructions are: MOV, ADD, ADDS, ADC, SUB, SUBS, SBC, RSB, MUL, AND, ORR, EOR, BIC, CMP, TST, TEQ, LSL, LSR, ASR, RORV Data processing instruction syntax Operation{ cond }{S} Rd , Rn , Operand2 Operation code Destination register Rd First operation register Rn Second operand Ope
[Microcontroller]
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
Guess you like
- DC-DC Converter Circuit Design
- TI Impedance Trace Coulometer Chemical ID Acquisition Method
- In-depth analysis of T-BOX system solution: power rail
- 51 single chip microcomputer, using timer to control the servo, resulting in LCD1602 displaying temperature
- Question: Problems with the LM5118 buck-boost circuit?
- Share: Differences in power of wireless charging mobile phones and EMC rectification measures
- Pipeline water leakage monitor based on sound waves] Material unpacking-ESP32-S3-DEVKITC+STM32L496 Discovery kit
- [ESK32-360 Review] Potentiometer to adjust LCD text color
- Selling ZYNQ 7020 and other idle development boards
- During the Mid-Autumn Festival, engineers will not work overtime!