37
32000D–04/2011
AVR32
Figure 5-2.
The AVR32 segment translation map
5.2
Understanding the MMU
The AVR32 Memory Management Unit (MMU) is responsible for mapping virtual to physical
addresses. When a memory access is performed, the MMU translates the virtual address speci-
fied into a physical address, while checking the access permissions. If an error occurs in the
translation process, or Operating System intervention is needed for some reason, the MMU will
issue an exception, allowing the problem to be resolved by software.
The MMU architecture uses paging to map memory pages from the 32-bit virtual address space
to a 32-bit physical address space. Page sizes of 1, 4, 64 kilobytes and 1 megabyte are sup-
ported. Each page has individual access rights, providing fine protection granularity.
The information needed in order to perform the virtual-to-physical mapping resides in a page
table. Each page has its own entry in the page table. The page table also contains protection
information and other data needed in the translation process. Conceptually, the page table is
accessed for every memory access, in order to read the mapping information for each page.
In order to speed up the translation process, a special page table cache is used. This cache is
called a Translation Lookaside Buffer (TLB). The TLB contains the n most recently used page
table entries. The number n of entries in the TLB is IMPLEMENTATION DEFINED. It is also
IMPLEMENTATION DEFINED whether a single unified TLB should be used for both instruction
and memory accesses, or if two separate TLBs are implemented. The architecture supports one
or two TLBs with up to 64 entries in each. TLB entries can also be locked in the TLB, guarantee-
ing high-speed memory accesses.
2GB translated space
cacheable
512MB system space,
non-cacheable
512MB translated space,
cacheable
512MB non-translated
space, non-cacheable
512MB non-translated
space, cacheable
0x00000000
0x80000000
0xA0000000
0xC0000000
0xE0000000
0xFFFFFFFF
P0 / U0
P1
P2
P3
P4
2GB physical address
space
Virtual address space
512MB physical address
space
0x00000000
0x80000000
0xE0000000
0xFFFFFFFF
0x20000000
Physical address space
Segment
translation