Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CS 220 / ARM / ARM1176JZ-S Technical Reference Mmanual.pdf
Источник:
Скачиваний:
45
Добавлен:
16.04.2015
Размер:
4.47 Mб
Скачать

System Control Coprocessor

The lockdown region of the TLB contains eight entries. TLB organization on page 6-4 describes the structure of the TLB.

The Invalidate TLB unlocked entries operation does not invalidate TLB entries in the lockdown region.

Invalidate TLB Entry by MVA and Invalidate TLB Entry on ASID Match operations invalidate any TLB entries that correspond to the MVA or ASID given in Rd, if they are in the lockdown region or if they are in the set-associative region of the TLB. See c8, TLB Operations Register on page 3-86 for a description of the TLB invalidate operations.

The victim automatically increments after any page table walk that results in a write puts an entry into the lockdown part of the TLB.

To use the TLB Lockdown Register read or write CP15 with:

Opcode_1 set to 0

CRn set to c10

CRm set to c0

Opcode_2 set to 0.

For example:

MRC

p15,

0,

<Rd>,

c10,

c0,

0

;

Read TLB Lockdown Register

MCR

p15,

0,

<Rd>,

c10,

c0,

0

;

Write TLB Lockdown Register.

Example 3-2 is a code sequence that locks down an entry to the current victim.

 

Example 3-2 Lock down an entry to the current victim

 

 

ADR R1,LockAddr

; set R1 to the value of the address to be locked down

MCR p15,0,R1,c8,c7,1

; invalidate TLB single entry to ensure that

 

; LockAddr is not already in the TLB

MRC p15,0,R0,c10,c0,0

; read the lockdown register

ORR R0,R0,#1

; set the preserve bit

MCR p15,0,R0,c10,c0,0

; write to the lockdown register

LDR R1,[R1]

; TLB misses, and entry is loaded

MRC p15,0,R0,c10,c0,0

; read the lockdown register (victim

 

; increments)

BIC R0,R0,#1

; clear preserve bit

MCR p15,0,R0,c10,c0,0

; write to the lockdown register

 

 

3.2.32c10, Memory region remap registers

The purpose of the memory region remap registers is to remap memory region attributes encoded by the TEX[2:0], C, and B bits in the page tables that the Data side, Instruction side, and DMA use. For details of memory remap, see Memory region attributes on page 6-14.

The memory region remap registers are:

in CP15 c10

two 32-bit read/write registers banked for the Secure and Non-secure worlds:

the Primary Region Remap Register

the Normal Memory Remap Register.

accessible in privileged modes only.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

3-101

ID012410

Non-Confidential, Unrestricted Access

 

System Control Coprocessor

These registers apply to all memory accesses and this includes accesses from the Data side, Instruction side, and DMA. Table 3-99 lists the purposes of the individual bits in the Primary Region Remap Register. Table 3-101 on page 3-103 lists the purposes of the individual bits in the Normal Memory Remap Register.

Note

The behavior of the memory region remap registers depends on the TEX remap bit, see c1, Control Register on page 3-44.

Figure 3-57 shows the arrangement of the bits in the Primary Region Remap Register.

31

20 19 18 17 16 15 14 13 12 11 10

9

8

7

6

5

4

3

2

1

0

UNP/SBZ

 

-

-

-

-

-

-

-

 

-

 

-

 

-

 

-

 

-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 3-57 Primary Region Remap Register format

Table 3-99 lists the functional bits of the Primary Region Remap Register.

Table 3-99 Primary Region Remap Register bit functions

Bits

Field name

Functiona

[31:20]

-

UNP/SBZ

 

 

 

[19]

-

Remaps shareable attribute when S=1 for Normal regionsb

 

 

1 = reset value

 

 

 

[18]

-

Remaps shareable attribute when S=0 for Normal regionsb

 

 

0 = reset value

 

 

 

[17]

-

Remaps shareable attribute when S=1 for Device regionsb

 

 

0 = reset value

 

 

 

[16]

-

Remaps shareable attribute when S= 0 for Device regionsb

 

 

1= reset value

 

 

 

[15:14]

-

Remaps {TEX[0],C,B} = b111

 

 

b10 = reset value

 

 

 

[13:12]

-

Remaps {TEX[0],C,B} = b110

 

 

b00 = reset value

 

 

 

[11:10]

-

Remaps {TEX[0],C,B} = b101

 

 

b10 = reset value

 

 

 

[9:8]

-

Remaps {TEX[0],C,B} = b100

 

 

b10 = reset value

 

 

 

[7:6]

-

Remaps {TEX[0],C,B} = b011

 

 

b10 = reset value

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

3-102

ID012410

Non-Confidential, Unrestricted Access

 

System Control Coprocessor

Table 3-99 Primary Region Remap Register bit functions (continued)

Bits

Field name

Functiona

[5:4]

-

Remaps {TEX[0],C,B} = b010

 

 

b10 = reset value

 

 

 

[3:2]

-

Remaps {TEX[0],C,B} = b001

 

 

b01 = reset value

 

 

 

[1:0]

-

Remaps {TEX[0],C,B} = b000

 

 

b00 = reset value

a.The reset values ensure that no remapping occurs at reset

b.Shareable attributes can map for both shared and non-shared memory. If the Shared bit read from the TLB or page tables is 0, then the bit remaps to the Not Shared attributes in this register. If the Shared bit read from the TLB or page tables is 1, then the bit remaps to the Shared attributes of this register.

Table 3-100 lists the encoding of the remapping for the primary memory type.

Table 3-100 Encoding for the remapping of the primary memory type

Encoding

Memory type

 

 

b00

Strongly ordered

 

 

b01

Device

 

 

b10

Normal

 

 

b11

UNP, normal

 

 

Figure 3-58 shows the arrangement of the bits in the Normal Memory Remap Register.

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10

9

8

7

6

5

4

3

2

1

0

-

-

-

-

-

-

-

-

-

-

-

-

 

 

-

 

-

 

-

 

-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 3-58 Normal Memory Remap Register format

Table 3-101 lists how the bit values correspond with the Normal Memory Remap Register functions.

Table 3-101 Normal Memory Remap Register bit functions

Bits

Field name

Functiona

[31:30]

-

Remaps Outer attribute for {TEX[0],C,B} = b111

 

 

b01 = reset value

 

 

 

[29:28]

-

Remaps Outer attribute for {TEX[0],C,B} = b110

 

 

b00 = reset value

 

 

 

[27:26]

-

Remaps Outer attribute for {TEX[0],C,B} = b101

 

 

b01 = reset value

 

 

 

[25:24]

-

Remaps Outer attribute for {TEX[0],C,B} = b100

 

 

b00 = reset value

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

3-103

ID012410

Non-Confidential, Unrestricted Access

 

System Control Coprocessor

Table 3-101 Normal Memory Remap Register bit functions (continued)

Bits

Field name

Functiona

[23:22]

-

Remaps Outer attribute for {TEX[0],C,B} = b011

 

 

b11 = reset value

 

 

 

[21:20]

-

Remaps Outer attribute for {TEX[0],C,B} = b010

 

 

b10 = reset value

 

 

 

[19:18]

-

Remaps Outer attribute for {TEX[0],C,B} = b001

 

 

b00 = reset value

 

 

 

[17:16]

-

Remaps Outer attribute for {TEX[0],C,B} = b000

 

 

b00 = reset value

 

 

 

[15:14]

-

Remaps Inner attribute for {TEX[0],C,B} = b111

 

 

b01 = reset value

 

 

 

[13:12]

-

Remaps Inner attribute for {TEX[0],C,B} = b110

 

 

b00 = reset value

 

 

 

[11:10]

-

Remaps Inner attribute for {TEX[0],C,B} = b101

 

 

b10 = reset value

 

 

 

[9:8]

-

Remaps Inner attribute for {TEX[0],C,B} = b100

 

 

b00 = reset value

 

 

 

[7:6]

-

Remaps Inner attribute for {TEX[0],C,B} = b011

 

 

b11 = reset value

 

 

 

[5:4]

-

Remaps Inner attribute for {TEX[0],C,B} = b010

 

 

b10 = reset value

 

 

 

[3:2]

-

Remaps Inner attribute for {TEX[0],C,B} = b001

 

 

b00 = reset value

 

 

 

[1:0]

-

Remaps Inner attribute for {TEX[0],C,B} = b000

 

 

b00 = reset value

a. The reset values ensure that no remapping occurs at reset.

Table 3-102 lists the encoding for the Inner or Outer cacheable attribute bit fields I0 to I7 and O0 to O7.

Table 3-102 Remap encoding for Inner or Outer cacheable attributes

Encoding

Cacheable attribute

 

 

b00

Noncacheable

 

 

b01

Write-back, allocate on write

 

 

b10

Write-through, no allocate on write

 

 

b11

Write-back, no allocate on write

 

 

Attempts to write to this register in Secure Privileged mode when CP15SDISABLE is HIGH result in an Undefined exception, see TrustZone write access disable on page 2-9.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

3-104

ID012410

Non-Confidential, Unrestricted Access

 

Соседние файлы в папке ARM