ARM MMU page table framework

Publisher:TranquilDreamerLatest update time:2022-04-06 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere


Back to the alloc_init_pte function, line 605 sets the page table entry (i.e. pte) located by addr in the L2 page table. Its main task is to fill in the physical address of the corresponding physical page for the mmu hardware to implement address translation.


Line 604~line 607 loops through filling two hwpte page tables and completes the creation of a 2M physical memory mapping table.


Line 608 will eventually call the following function: static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte, pmdval_t prot)

Before executing this function, two L2 page tables have been created. The function is to set the corresponding table entries of the L1 page table to point to the two newly created L2 page tables (hwpte0, hwpte1). As mentioned earlier, since the L1 page table entry of Linux is 8 bytes in size, so:


Line133 points the first 4 bytes to the hwpte0 page table.


Line135 points the last 4 bytes to the hwpte1 page table. So far, the association of L1---〉L2 page table has been established.


Line 137 refreshes the TLB buffer so that the system's CPU can see the changes in the mapping


At this point, the mapping relationship between the virtual address and the physical address specified by the struct map_desc *md structure has been established, so that the hardware MMU can automatically translate the virtual address to the physical address.


In the above process, some details are selectively omitted due to space limitations. If you understand the process, you can read the relevant code in detail. For example, the set_pte_ext function above will call the assembly function to implement the setting of the pte table entry.

[1] [2]
Keywords:ARM Reference address:ARM MMU page table framework

Previous article:2440 flash programming problem
Next article:arm stack-(selection of stack starting address)

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components
Guess you like

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号