You copied the Doc URL to your clipboard.

3.2.25. c1, Control Register

The purpose of the Control Register is to provide control and configuration of:

  • memory alignment, endianness, protection, and fault behavior

  • MMU, cache enables, and cache replacement strategy

  • interrupts and behavior of interrupt latency

  • location for exception vectors

  • program flow prediction.

The Control Register is:

  • a 32-bit read/write register

  • accessible in privileged modes only

  • partially banked.

Figure 3.20 shows the bit arrangement of the Control Register.

Figure 3.20. Control Register bit assignments

Figure 3.20. Control Register bit assignments

Table 3.46 shows how the bit values correspond with the Control Register functions.

Table 3.46. Control Register bit functions

Bits

Field

Access[a]

Function

[31]

-

-

Reserved. UNP, SBZP.

[30]

TE

Banked

Thumb exception enable bit:

0 = Enables ARM exception generation. On exception entry, the CPSR T bit is 0 and J bit is 0.

1 = Enables Thumb exception generation. On exception entry, the CPSR T bit is 1 and J bit is 0.

The primary input CFGTE defines the reset value.

[29]AFEBanked

This is the Access Flag Enable bit. It controls whether VMSAv7 redefines the AP[0] bit as an access flag or whether the software maintains binary compatibility with VMSAv6:

0 = AP[0] behavior defined, reset value

1 = access flag behavior defined.

The TLB must be invalidated after changing the AFE bit.

[28]TREBanked

This bit controls the TEX remap functionality in the MMU, see MMU software-accessible registers:

0 = TEX remap disabled. Normal ARMv6 or later behavior, reset value.

1 = TEX remap enabled. TEX[2:1] become translation table bits for OS.

[27]

NMFI

Read-only

This is the Non-Maskable Fast Interrupt enable bit. The reset value is determined by CFGNMFI. The pin cannot be configured by software:

0 = FIQ exceptions can be masked by software

1 = FIQ exceptions cannot be masked by software.

[26]

-

-

Reserved. RAZ, SBZP.

[25]

EE bit

Banked

Determines how the E bit in the CPSR is set on an exception:

0 = CPSR E bit is set to 0 on an exception

1 = CPSR E bit is set to 1 on an exception.

The primary input CFGEND0 defines the reset value of the EE bit.

[24:14]

-

-

This field returns 11'b01100010100 when read.

[13]

V bit

Banked

Determines the location of exception vectors, see c12, Secure or Nonsecure Vector Base Address Register. The primary input VINITHI defines the reset value of the V bit:

0 = Normal exception vectors selected, reset value. The Vector Base Address Registers determine the address range.

1 = High exception vectors selected, address range = 0xFFFF0000-0xFFFF001C.

[12]

I bit

Banked

Determines if instructions can be cached in any instruction cache at any cache level:

0 = instruction caching disabled at all levels, reset value

1 = instruction caching enabled.

[11]

Z bit

Banked

Enables program flow prediction:

0 = program flow prediction disabled, reset value

1 = program flow prediction enabled.

[10:7]

-

-

Reserved. RAZ, SBZP.

[6:3]

-

-

Reserved. Read-As-One (RAO), Should-Be-One or Preserved (SBOP).

[2]

C bit

Banked

Determines if data can be cached in a data or unified cache at any cache level:

0 = data caching disabled at all levels, reset value

1 = data caching enabled.

[1]

A bit

Banked

Enables strict alignment of data to detect alignment faults in data accesses:

0 = strict alignment fault checking disabled, reset value

1 = strict alignment fault checking enabled.

[0]

M bit

Banked

Enables the MMU:

0 = MMU disabled, reset value

1 = MMU enabled.

[a] The reset values for Secure and Non-secure banked access for the Control Register are the same.


Attempts to read or write the Control Register from secure or nonsecure User modes result in an Undefined Instruction exception.

Attempts to write to this register in secure privileged mode when CP15SDISABLE is HIGH result in an Undefined Instruction exception, see Security Extensions write access disable.

Table 3.47 shows the actions that result from attempted access for each mode.

Table 3.47. Results of access to the Control Register[23]
Secure privilegedNonsecure privilegedSecure UserNonsecure User
ReadWriteReadWriteReadWriteReadWrite
Secure bitSecure bitNonsecure bitNonsecure bitUndefinedUndefinedUndefinedUndefined

[23] An entry of Undefined in the table means that the access gives an Undefined Instruction exception when the coprocessor instruction is executed.


To access the Control Register, read or write CP15 with:

MRC p15, 0, <Rd>, c1, c0, 0 ; Read Control Register
MCR p15, 0, <Rd>, c1, c0, 0 ; Write Control Register

Table 3.48 shows the behavior of the processor caching instructions or data for the I bit and C bit of the c1, Control Register and the L2EN bit of the c1, Auxiliary Control Register.

Table 3.48. Behavior of the processor when enabling caches
I bitC bitL2EN bitDescription
00xInstruction cache, data cache, L2 cache disabled for all instruction and data requests
010Instruction cache disabled, data cache enabled, L2 cache disabled for all instruction and data requests
011Instruction cache disabled, data cache enabled, L2 cache enabled for all instruction and data requests
10xInstruction cache enabled, data cache disabled, L2 cache disabled for all instruction and data requests
110Instruction cache enabled, data cache enabled, L2 cache disabled for all instruction and data requests
111Instruction cache, data cache, and L2 cache enabled for all requests

Was this page helpful? Yes No