05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Protected Memory System <strong>Architecture</strong> (PMSA)<br />

Note<br />

The XN bit, bit [12], is always valid in the IRACR.<br />

If you access this register when the RGNR does not point to a valid region in the MPU instruction address<br />

map, the result is UNPREDICTABLE.<br />

Accessing the IRACR<br />

To access the IRACR you read or write the CP15 registers with set to 0, set to c6, set to<br />

c1, <strong>and</strong> set to 5. For example:<br />

MRC p15,0,,c6,c1,5 ; Read CP15 Instruction Region Access Control Register<br />

MCR p15,0,,c6,c1,5 ; Write CP15 Instruction Region Access Control Register<br />

c6, MPU Region Number Register (RGNR)<br />

The MPU Region Number Register, RGNR, defines the current memory region in:<br />

the MPU data or unified address map<br />

the MPU instruction address map, if the MPU implements separate data <strong>and</strong> instruction address<br />

maps.<br />

The value in the RGNR identifies the memory region description accessed by the Region Base Address, Size<br />

<strong>and</strong> Enable, <strong>and</strong> Access Control Registers.<br />

Note<br />

There is only a single MPU Region Number Register. When the MPU implements separate data <strong>and</strong><br />

instruction address maps, the current region number is always identical for both address maps. This might<br />

mean that the current region number is valid for one address map but invalid for the other map.<br />

The RGNR is:<br />

a 32-bit read/write register<br />

accessible only in privileged modes.<br />

The format of the RGNR is:<br />

31 N N-1 0<br />

Bit [31:N] UNK/SBZP.<br />

Region, bits [N-1:0]<br />

UNK/SBZP Region<br />

The number of the current region in the Data or Unified address map, <strong>and</strong> in the Instruction<br />

address map if the MPU implements separate Data <strong>and</strong> Instruction address maps.<br />

The value of N is Log2(Number of regions supported) rounded up to an integer.<br />

B4-66 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!