7: Memory Management Unit
ARM720T CORE CPU MANUAL EPSON 7-21
7.8 External abortsIn addition to the MMU-generated aborts, the ARM720T processor can be externally aborted
by the AMBA bus. This can be used to flag an error on an external memory access. However,
not all accesses can be aborted in this way and the
Bus Interface Unit
(BIU) ignores external
aborts that cannot be handled.
The following accesses can be aborted:
• noncached reads
• unbuffered writes
• read-lock-write sequence, to noncachable memory.
In the case of a read-lock-write (SWP) sequence, if the read aborts, the write is never
attempted.
7.9 Interaction of the MMU and cacheThe MMU is enabled and disabled using bit 0 of the CP15 Control Register c1 as described in:
•
Enabling the MMU
•
Disabling the MMU
.
7.9.1 Enabling the MMU
To enab le the MM U:
1 Program the TTB and Domain Access Control Registers.
2 Program level 1 and level 2 page tables as required.
3 Enable the MMU by setting bit 0 in the control register.
You must take care if the translated address differs from the untranslated address because
several instructions following the enabling of the MMU might have been prefetched with the
MMU off (using physical = VA - flat translation).
In this case, enabling the MMU can be considered as a branch with delayed execution. A
similar situation occurs when the MMU is disabled. Consider the following code sequence:
MRC p15, 0, r1, c1, c0, 0 ; Read control register
ORR R1, R1, #0x01
MCR p15,0, r1, c1, c0, 0 ; Enable MMUS
Fetch Flat
Fetch Flat
Fetch Translated
7.9.2 Disabling the MMU
To disable the MMU, clear bit 0 in the control register. The data cache must be disabled prior
to, or at the same time as, the MMU is disabled by clearing bit 2 of the control register. See
Enabling the MMU
regarding prefetch effects.
Note: If the MMU is enabled, then disabled and subsequently re-enabled, the contents of
the TLB are preserved. If these are now invalid, you must invalidate the TLB before
re-enabling the MMU. See
TLB Operations Register
on page 3-7.