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.

B2.4.8 Access permission checking<br />

Common Memory System <strong>Architecture</strong> Features<br />

The function CheckPermission() is used by both the VMSA <strong>and</strong> PMSA architectures to perform access<br />

permission checking based on attributes derived from the translation tables or region descriptors. The domain<br />

<strong>and</strong> sectionnotpage arguments are only relevant for the VMSA architecture.<br />

The interpretation of the access permissions is shown in:<br />

Access permissions on page B3-28, for a VMSA implementation<br />

Access permissions on page B4-9, for a PMSA implementation.<br />

The following pseudocode describes the checking of the access permission:<br />

// CheckPermission()<br />

// =================<br />

CheckPermission(Permissions perms, bits(32) mva,<br />

boolean sectionnotpage, bits(4) domain, boolean iswrite, boolean ispriv)<br />

if SCTLR.AFE == ‘0’ then<br />

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

case perms.ap of<br />

when ‘000’ abort = TRUE;<br />

when ‘001’ abort = !ispriv;<br />

when ‘010’ abort = !ispriv && iswrite;<br />

when ‘011’ abort = FALSE;<br />

when ‘100’ UNPREDICTABLE;<br />

when ‘101’ abort = !ispriv || iswrite;<br />

when ‘110’ abort = iswrite;<br />

when ‘111’<br />

if MemorySystem<strong>Architecture</strong>() == MemArch_VMSA then<br />

abort = iswrite<br />

else<br />

UNPREDICTABLE;<br />

if abort then<br />

DataAbort(mva, domain, sectionnotpage, iswrite, DAbort_Permission);<br />

return;<br />

B2.4.9 Default memory access decode<br />

The function DefaultTEXDecode() is used by both the VMSA <strong>and</strong> PMSA architectures to decode the texcb<br />

<strong>and</strong> S attributes derived from the translation tables or region descriptors.<br />

The interpretation of the arguments is shown in:<br />

C, B, <strong>and</strong> TEX[2:0] encodings without TEX remap on page B3-33, for a VMSA implementation<br />

C, B, <strong>and</strong> TEX[2:0] encodings on page B4-11, for a PMSA implementation.<br />

The following pseudocode describes the default memory access decoding, when memory region remapping<br />

is not implemented:<br />

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

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

Saved successfully!

Ooh no, something went wrong!