当前位置:网站首页>ARM V7 协处理器
ARM V7 协处理器
2022-06-25 12:02:00 【xiaozhiwise】
/*
* 2012/3/29 10:47 qing
*/
协处理器
1.CP14调试通信通道协处理器
2.CP15系统控制协处理器
他通过协处理器指令MCR和MRC提供具体的寄存器来配置和控制caches、MMU、保护系统、配置时钟模式(在
bootloader时钟初始化用到)
|31 28|27 24| 23 21| 20 |19 16|15 12|11 8|7 5|4 | 3 0 |
---------------------------------------------------------------------------
| cond | 1110 | 0 0 0 | 0 | CRn | Rd | cp_num | opcode_2| 1 | CRm |
---------------------------------------------------------------------------
mcr {<cond>} p15, 0, <Rd>, <CRn>, <CRm>{, <opcode_2>}
<opcode_1> 永远为0b000,不为0时,操作结果不可预知.
<Rd> 作为源寄存器的 ARM 寄存器,其值将被传送到的协处理器寄存器中.不能为PC.
<CRn> 作为目标寄存器的协处理器寄存,可能为C0, C1...C15.
<CRm> 附加的目标寄存器或者源操作数寄存器,用于区分同一个编号的不同物理寄存器.
当指令中不需要提供附加信息时,将C0指定为<CRm>,否则指令操作结果不可预和.
<opcode_2> 提供附加信息,用于区别一个编号的不同物理寄存.当指令中没有指定附加信息,
省略<opcode_2>或者将其指定为0,否则指令操作结果不可预知.
cond是条件码,bit20是L位,
如果L=1就表示Load,从外面读到CPU核中,也就是MRC指令,
如果L=0就表示Store,也就是MCR指令。[11:8]这四个位是协处理器编号,CP15编号是15,因此是4个1。
CRn是CP15寄存器编号,Rd是CPU核寄存器编号,各占4位。
对于CP15协处理器,规定opcod1应该为0,opcode2和CRm是指令的选项,具体含义取决于不同的寄存器。
CP15 中的寄存器: P180 <<arm_struc_prog>>
-----------------------------------------------------------------------------
寄存器编号 | 基本作用 | 在MMU中的作用 | 在PU中的作用
-----------------------------------------------------------------------------
0 ID编码(只读) ID编码和cache类型
1 控制位(W/R) 各种控制位
2 存储保护和控制 地址转换表基地址 Cachability的控制位
3 存储保护和控制 域访问控制位 Bufferablity控制位
4 存储保护和控制 保留 保留
5 存储保护和控制 内存失效状态 访问权限控制位
6 存储保护和控制 内存失效地址 保护区域控制
7 高速缓存和写缓存 高速缓存和写缓存控制
8 存储保护和控制 TLB控制 保留
9 高速缓存和写缓存 高速缓存锁定
10 存储保护和控制 TLB锁定 保留
11 保留
12 保留
13 进程标识符
14 保留
15 因不同设计而异
C0:
寄存器0,ID编码寄存器
这是一个用于返回设备ID编码的只读寄存器
你可以通过将opcode2设置为除1以外的值来访问CP15的ID编码寄存器R0(CRm此时应置为0)。例如:
MRC p15,0,Rd,c0,c0,0 ;返回ID寄存器的值
寄存器0,缓存类型寄存器
这是一个只读寄存器,它包含了缓存的架构和大小的信息,这就允许操作系统来确定要如何执行诸如清理缓存
和锁定缓存的操作。所有ARMv4T版本及以后的带缓存处理器都包含这个寄存器,允许实时操作系统的厂商生产
他们的操作系统的试验版本。
你可以通过将opcode_2设置为1来访问CP15的缓存类型寄存器R0。如:
MRC p15,0,Rd,c0,c0,1 ;返回关于缓存的详细信息
C1: P186
1.禁止/使能MMU以及其他的与存储系统相关的功能.
2.配置存储系统以及ARM处理器中的相关部分的工作方式.
读:
mrc p15, 0, r0, c1, 0, 0
写
mcr p15, 0, r0, c1, 0, 0
边栏推荐
- 设置图片的透明度从左到右渐变
- 为什么ping不通网站 但是却可以访问该网站?
- 做自媒体视频需要怎么做才能年收入一百万?
- R语言caTools包进行数据划分、scale函数进行数据缩放、e1071包的naiveBayes函数构建朴素贝叶斯模型
- The temporary table from XML to VFP is simple and easy to use and worth collecting
- Explain factor analysis in simple terms, with case teaching (full)
- devsecops与devops的理解与建设
- Simple use of stream (II)
- 开哪家证券公司的账户是比较好,比较安全的
- The latest IT learning route in 2020
猜你喜欢

Capacity expansion mechanism of Dict Of redis (rehash)

VFP serial port communication is difficult for 9527. Maomao just showed his skill and was defeated by kiss

The service layer reports an error. The XXX method invalid bound statement (not found) cannot be found

SDN系统方法 | 9. 接入网

什么是Flink?Flink能用来做什么?

The cloud native data lake has passed the evaluation and certification of the ICT Institute with its storage, computing, data management and other capabilities

15、wpf之button样式小记

Why can't you Ping the website but you can access it?

Manually rollback abnormal data

plt. GCA () picture frame and label
随机推荐
客从何处来
Quarkus SaaS dynamic data source switching implementation, simple and perfect
JS monitors the width and height changes of div
JS to realize the calculation of discrete aggregation points
JS indexof() always returns -1
黑马畅购商城---3.商品管理
MYSQL中对复杂JSON的更新
ROS 笔记(06)— 话题消息的定义和使用
How terrible is it not to use error handling in VFP?
一套自动化无纸办公系统(OA+审批流)源码:带数据字典
SDN系统方法 | 9. 接入网
黑马畅购商城---6.品牌、规格统计、条件筛选、分页排序、高亮显示
一个硬件工程师走过的弯路
Dark horse shopping mall ---6 Brand, specification statistics, condition filtering, paging sorting, highlighting
plt. GCA () picture frame and label
Develop two modes of BS mode verification code with VFP to make your website more secure
一款好用的印章设计工具 --(可转为ofd文件)
Translation of meisai C topic in 2022 + sharing of ideas
Using DBF of VFP to web salary query system
What should I do to dynamically add a column and button to the gird of VFP?