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 />

base_address = DRBAR[r];<br />

access_control = DRACR[r];<br />

if size_enable == ‘1’ then // Region is enabled<br />

lsbit = UInt(size_enable) + 1;<br />

if lsbit < 2 then UNPREDICTABLE;<br />

if lsbit == 32 || va == base_address then<br />

if lsbit >= 8 then // can have subregions<br />

subregion = UInt(va);<br />

hit = (size_enable == ‘0’);<br />

else<br />

hit = TRUE;<br />

if hit then<br />

texcb = access_control;<br />

S = access_control;<br />

perms.ap = access_control;<br />

perms.xn = access_control;<br />

region_found = TRUE;<br />

// Generate the memory attributes, <strong>and</strong> also the permissions if no region found.<br />

if region_found then<br />

result.memattrs = DefaultTEXDecode(texcb, S);<br />

else<br />

if SCTLR.BR == ‘0’ || NOT(ispriv) then<br />

DataAbort(address, bits(4) UNKNOWN, boolean UNKNOWN, iswrite, DAbort_Background);<br />

else<br />

result.memattrs = DefaultMemoryAttributes(va);<br />

perms.ap = ‘011’;<br />

perms.xn = if va == ‘1111’ then NOT(SCTLR.V) else va;<br />

// Check the permissions.<br />

CheckPermission(perms, VA, boolean UNKNOWN, bits(4) UNKNOWN, iswrite, ispriv);<br />

return result;<br />

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