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.

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

B2.4 Pseudocode details of general memory system operations<br />

This section contains pseudocode describing general memory operations, in the subsections:<br />

Memory data type definitions.<br />

Basic memory accesses on page B2-30.<br />

Interfaces to memory system specific pseudocode on page B2-30.<br />

Aligned memory accesses on page B2-31<br />

Unaligned memory accesses on page B2-32<br />

Reverse endianness on page B2-34<br />

Exclusive monitors operations on page B2-35<br />

Access permission checking on page B2-37<br />

Default memory access decode on page B2-37<br />

Data Abort exception on page B2-39.<br />

The pseudocode in this section applies to both VMSA <strong>and</strong> PMSA implementations. Additional pseudocode<br />

for memory operations is given in:<br />

Pseudocode details of VMSA memory system operations on page B3-156<br />

Pseudocode details of PMSA memory system operations on page B4-79.<br />

B2.4.1 Memory data type definitions<br />

The following data type definitions are used by the memory system pseudocode functions:<br />

// Types of memory<br />

enumeration MemType {MemType_Normal, MemType_Device, MemType_StronglyOrdered};<br />

// Memory attributes descriptor<br />

type MemoryAttributes is (<br />

MemType type,<br />

bits(2) innerattrs, // ‘00’ = Non-cacheable; ‘01’ = WBWA; ‘10’ = WT; ‘11’ = WBnWA<br />

bits(2) outerattrs, // ‘00’ = Non-cacheable; ‘01’ = WBWA; ‘10’ = WT; ‘11’ = WBnWA<br />

boolean shareable,<br />

boolean outershareable<br />

)<br />

// Physical address type, with extra bits used by some VMSA features<br />

type FullAddress is (<br />

bits(32) physicaladdress,<br />

bits(8) physicaladdressext,<br />

bit NS // ‘0’ = Secure, ‘1’ = Non-secure<br />

)<br />

// Descriptor used to access the underlying memory array<br />

type AddressDescriptor is (<br />

MemoryAttributes memattrs,<br />

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

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

Saved successfully!

Ooh no, something went wrong!