MMU and SMMU (Linux) notes

本文详细介绍了Linux中的内存管理单元(MMU)和系统内存管理单元(SMMU)的工作原理。MMU包括每个进程的页表、全局内核页表、页故障处理、vmalloc和kmalloc的内存分配以及物理页面的管理。SMMU则涉及不同的页表、DMA API、地址映射以及流ID等概念,是DMA驱动在Linux中的底层支持。
摘要由CSDN通过智能技术生成

MMU:

1. Each process has a MMU page table--including user space entries and kernel space entries.

2. All processes share one global kernel MMU page table--init_mm, all kernel space entries are on it.

3. When a new process trap into kernel, page fault handler will copy global kernel MMU page table, kernel space entries, to process's MMU page table.

4.When page fault happens, kernel will update process's user space entries on it's page table or the kernel space entries on both its page table and init_mm. -- Need confirm by reading kernel code.

 

5. All page tables in the system for different EL(exception levels)

6. vmalloc() will 1)allocate continuous vitrual address 2)allocate seperate physical pages 3)mapping virtual address to physical pages in MMU page table. map_vm_area() is the step 3 function -- it

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值