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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Figure B4-1 shows a case where the MPU is programmed with overlapping memory regions.<br />

In this example:<br />

Figure B4-1 Overlapping memory regions in the MPU<br />

Data region 2 is programmed to be 4KB in size, starting from address 0x3000 with AP[2:0} == 0b010,<br />

giving privileged mode full access, User mode read-only access.<br />

Data region 1 is programmed to be 16KB in size, starting from address 0x0 with AP[2:0} == 0b001,<br />

giving privileged mode access only.<br />

If the processor performs a data load from address 0x3010 while in User mode, the address is in both region 1<br />

<strong>and</strong> region 2. Region 2 has the higher priority, therefore the region 2 attributes apply to the access. This<br />

means the load does not abort.<br />

B4.1.4 The background region<br />

0x3010<br />

0x4000<br />

0x3000<br />

0x0000<br />

Region 2<br />

Region 1<br />

Background region refers to a region that matches the entire 4GB physical address map, <strong>and</strong> has a lower<br />

priority than any other region. Therefore, a background region provides the memory attributes for any<br />

memory access that does not match any of the defined memory regions.<br />

When the SCTLR.BR bit is set to 0, the MPU behaves as if there is a background region that generates a<br />

Background Fault memory abort on any access. This means that any memory access that does not match<br />

any of the programmed memory regions generates a Background Fault memory abort. This is the same as<br />

the behavior in PMSAv6.<br />

If you want a background region with a different set of memory attributes, you can program region 0 as a<br />

4GB region with the attributes you require. Because region 0 has the lowest priority this region then acts as<br />

a background region.<br />

B4-4 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!