<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > 關(guān)于A(yíng)RM9協(xié)處理器CP15及MCR和MRC指令

關(guān)于A(yíng)RM9協(xié)處理器CP15及MCR和MRC指令

作者: 時(shí)間:2016-11-24 來(lái)源:網(wǎng)絡(luò ) 收藏
在A(yíng)RM芯片資料中,針對協(xié)處理器CP15的介紹非常少,但是CP15又十分重要,例如在使用MMU編寫(xiě)虛擬地址映射表時(shí),最后的一步重要工作就是要將映射表的基地址存儲到CP15的寄存器C2中,還有一些控制的TLB,Cache等訪(fǎng)問(wèn)控制權限等等。。。

在基于A(yíng)RM的嵌入式應用系統中,存儲系統通常是通過(guò)系統控制協(xié)處理器CP15完成的。CP15包含16個(gè)32位的寄存器,其編號為0~15。

本文引用地址:http://dyxdggzs.com/article/201611/320982.htm

訪(fǎng)問(wèn)CP15寄存器的指令

MCRARM寄存器到協(xié)處理器寄存器的數據傳送

MRC協(xié)處理器寄存器到ARM寄存器的數據傳送

MCR指令和MRC指令只能在處理器模式為系統模式時(shí)執行,在用戶(hù)模式下執行MCR指令和MRC指令將會(huì )觸發(fā)未定義指令的異常中斷。

MCR指令

MCR指令將ARM處理器的寄存器中的數據傳送到協(xié)處理器寄存器中。如果協(xié)處理器不能成功地執行該操作,將產(chǎn)生未定義的指令異常中斷。

指令語(yǔ)法格式

MCR{}

,< opcode_1>,,,{,}

MCR{} p15,0,,,{,}

其中,為指令執行的條件碼。當忽略時(shí)指令為無(wú)條件執行。

< opcode_1>為協(xié)處理器將執行的操作的操作碼。對于CP15協(xié)處理器來(lái)說(shuō),< opcode_1>永遠為0b000,當< opcode_1>不為0b000時(shí),該指令操作結果不可預知。

作為源寄存器的ARM寄存器,其值將被傳送到協(xié)處理器寄存器中。

作為目標寄存器的協(xié)處理器寄存器,其編號可能是C0,C1,…,C15。

和兩者組合決定對協(xié)處理器寄存器進(jìn)行所需要的操作,如果沒(méi)有指定,則將為為C0,opcode_2為0,否則可能導致不可預知的結果。

The CRm field and opcode_2 field are used to specify a particular action when addressing registers.The opcode_1, opcode_2 and CRm fields should be zero, except when the values specified are used to select the desired operations, in all instructions which access CP15. Using other values will result in unpredictable behavior. Attempting to read from a non-readable register, or writing to a non-writable register will cause unpredictable results.

使用示例

下面的指令從ARM寄存器R4中中將數據傳送到協(xié)處理器CP15的寄存器C1中。其中R4為ARM寄存器,存放源操作數,C1、C0為協(xié)處理器寄存器,為目標寄存器,opcode_1為0,opcode_2為0。

MCRp15,0,R4,C1,C0,0

MRC指令

MRC指令將協(xié)處理器的寄存器中的數值傳送到ARM處理器的寄存器中、如果協(xié)處理器不能成功地執行該操作,將產(chǎn)生未定義的指令異常中斷。

指令語(yǔ)法格式

MRC{}

,< opcode_1>,,,{,}

MRC{} p15,0,,,{,}

參數用法同MCR指令

CP15中的寄存器介紹

Register(寄存器)

Read

Write

C0

ID Code (1)

Unpredictable

C0

Catch type(1)

Unpredictable

C1

Control

Control

C2

Translation table base

Translation table base

C3

Domain access control

Domain access control

C4

Unpredictable

Unpredictable

C5

Fault status(2)

Fault status (2)

C6

Fault address

Fault address

C7

Unpredictable

Cache operations

C8

Unpredictable

TLB operations

C9

Cache lockdown(2)

Cache lockdown (2)

C10

TLB lock down(2)

TLB lock down(2)

C11

Unpredictable

Unpredictable

C12

Unpredictable

Unpredictable

C13

Process ID

Process ID

C14

Unpredictable

Unpredictable

C15

Test configuration

Test configuration

Notes:

1.Register location 0 provides access to more than one register. The register accessed depends upon values of the opcode_2 field. See the register description for details.

2.Separate register for instruction and data .See the register description for details.

寄存器0:ID Code Register

This is a read-only register which returns a 32-bit device ID code

這是一個(gè)只讀寄存器,它存放微處理器的標識碼。

The ID code register is accessed by reading CP15 register 0 with the opcode_2 field set to any value other than 1(the CRm field should be zero when reading). For example:

MRCp15, 0, Rd, C0, C0,0

ID Code內容如下:

Register bits

Function

Value

[31:24]

Implementor

0x41(‘A’,表示Arm公司)

[23:20]

Specification revision

0x1

[19:16]

Architecture version(4T)

0x2(ARM體系版本4T)

[15:4]

Part number

0x920

[3:0]

Layout revision

0x0

寄存器0:Cache type register

This is a read-only register which contains information about the size and architecture of the caches, allowing operating systems to establish how to perform such operations as cache cleaning and lockdown.

這個(gè)只讀寄存器包含了高速緩存的大小和類(lèi)型。

The cache type register is accessed by reading CP15 register 0 with the opcode_2 field set to 1.for example:

MRCp15, 0, Rd, C0, C0,1; returns cache details

The format of cache type register (寄存器的數據格式如下)

Register bits

Function

Value

[31:29]

Reserved

000

[28:25]

Cache type (緩存類(lèi)型)

0110

[24]

Harvard/Unified

1(defines Harvard cache)

[23:21]

Reserved

000

[20:18]

Data Cache size(數據緩存大小)

101(defines 16KB)

[17:15]

Data Cache associativity

110(defines 64 way)

[14]

Reserved

0

[13:12]

Data Cache words per line

10(defines 8 words per line)

[11:9]

Reserved

000

[ 8:6]

Instruction Cache size(指令緩存大小)

101(defines 16KB)

[5:3]

Instruction Cache Associativity

110(defines 64 way)

[2]

Reserved

0

[1:0]

Instruction Cache per line

10(defines 8 words per line)


上一頁(yè) 1 2 下一頁(yè)

評論


技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>