38
32000D–04/2011
AVR32
5.2.1
Virtual Memory Models
The MMU provides two different virtual memory models, selected by the Mode (M) bit in the
MMU Control Register:
Shared virtual memory, where the same virtual address space is shared between all
processes
Private virtual memory, where each process has its own virtual address space
In shared virtual memory, the virtual address uniquely identifies which physical address it should
be mapped to. Two different processes addressing the same virtual address will always access
the same physical address. In other words, the Virtual Page Number (VPN) section of the virtual
address uniquely specifies the Physical Frame Number (PFN) section in the physical address.
In private virtual memory, each process has its own virtual memory space. This is implemented
by using both the VPN and the Application Space Identifier (ASID) of the current process when
searching the TLB for a match. Each process has a unique ASID. Therefore, two different pro-
cesses accessing the same VPN won’t hit the same TLB entry, since their ASID is different.
Pages can be shared between processes in private virtual mode by setting the Global (G) bit in
the page table entry. This will disable the ASID check in the TLB search, causing the VPN sec-
tion uniquely to identify the PFN for the particular page.
5.2.2
MMU interface registers
The following registers are used to control the MMU, and provide the interface between the
MMU and the operating system. Most registers can be altered both by the application software
(by writing to them) and by hardware when an exception occurs. All the registers are mapped
Figure 5-3.
The MMU interface registers
VP N
ASID
G
D
0
7
10
31
TLB E H I
PFN
C
B
0
9
10
31
TLB E L O
V
SZ
AP
W
I
876
4321
PTB R
0
31
PTB R
T L BE AR
0
31
T L BE AR
DL A
E
M
0
7
8
31
MM U C R
IL A
DRP
IR P
1
-
2
13
14
20
26
1 9
25
I
3
98
N
4
5
S
TL B A R L O / TL B A R H I
0
31
TLB A R L O / T L B A R H I