【转】a simple page table

本文介绍如何为 ARM720T 的内存管理单元 (MMU) 设置一级描述符,实现虚拟地址到物理地址的扁平映射。文章详细说明了设置缓存、写缓冲区及读写权限的过程,并提供了具体示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/3697.html

 

Applies to: ARM720T

This FAQ assumes you have read the MMU datasheet description and know enough assembly language to turn the cache, MMU & write buffer on. A description of how the level 1 descriptors must be setup follows.

Assuming you simply want a flat mapping from virtual address to physical address, with the whole space mapped in 1MB sections to keep the page table as small as possible and with read/write access to all areas, the following is necessary:

You need to generate 4K entries, starting from the TTB address, which must lie on a 16K boundary. Each entry must look like this:

Bits 31:20 = Base address for the section (i.e 0MB for the first entry, 1MB for the second and so on)
Bits 19:12 = Don't care - should be 0
Bits 11:10 = Access Permission - write as 11 to allow all accesses
Bit 9 = Should be 0
Bits 8:5 = Domain 0 - make it 0 for simplicity as you did above.
Bit 4 = Must be '1'
Bits 3:2 = '11' Cacheable and bufferable.
Bits 1:0 Must be '10' for a section

So, the first entry will be 0x00000C1E, the next entry will be 0x00100C1E, then 00200C1E, all the way up to FFF00C1E.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值