Rev 534 | Rev 822 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 534 | Rev 703 | ||
---|---|---|---|
1 | Memory management |
1 | Memory management |
2 | ================= |
2 | ================= |
3 | 3 | ||
- | 4 | 1. Virtual Address Translation |
|
- | 5 | ||
- | 6 | 1.1 Hierarchical 4-level per address space page tables |
|
- | 7 | ||
4 | SPARTAN kernel deploys generic interface for 4-level page tables, |
8 | SPARTAN kernel deploys generic interface for 4-level page tables |
- | 9 | for these architectures: amd64, ia32, mips32 and ppc32. In this |
|
5 | no matter what the real underlying hardware architecture is. |
10 | setting, page tables are hierarchical and are not shared by |
- | 11 | address spaces (i.e. one set of page tables per address space). |
|
6 | 12 | ||
7 | 13 | ||
8 | VADDR |
14 | VADDR |
9 | +-----------------------------------------------------------------------------+ |
15 | +-----------------------------------------------------------------------------+ |
10 | | PTL0_INDEX | PTL1_INDEX | PTL2_INDEX | PTL3_INDEX | OFFSET | |
16 | | PTL0_INDEX | PTL1_INDEX | PTL2_INDEX | PTL3_INDEX | OFFSET | |
11 | +-----------------------------------------------------------------------------+ |
17 | +-----------------------------------------------------------------------------+ |
12 | 18 | ||
13 | 19 | ||
14 | PTL0 PTL1 PTL2 PTL3 |
20 | PTL0 PTL1 PTL2 PTL3 |
15 | +--------+ +--------+ +--------+ +--------+ |
21 | +--------+ +--------+ +--------+ +--------+ |
16 | | | | | | PTL3 | -----\ | | |
22 | | | | | | PTL3 | -----\ | | |
17 | | | | | +--------+ | | | |
23 | | | | | +--------+ | | | |
18 | | | +--------+ | | | | | |
24 | | | +--------+ | | | | | |
19 | | | | PTL2 | -----\ | | | | | |
25 | | | | PTL2 | -----\ | | | | | |
20 | | | +--------+ | | | | | | |
26 | | | +--------+ | | | | | | |
21 | | | | | | | | | +--------+ |
27 | | | | | | | | | +--------+ |
22 | +--------+ | | | | | | | FRAME | |
28 | +--------+ | | | | | | | FRAME | |
23 | | PTL1 | -----\ | | | | | | +--------+ |
29 | | PTL1 | -----\ | | | | | | +--------+ |
24 | +--------+ | | | | | | | | | |
30 | +--------+ | | | | | | | | | |
25 | | | | | | | | | | | | |
31 | | | | | | | | | | | | |
26 | | | | | | | | | | | | |
32 | | | | | | | | | | | | |
27 | +--------+ \----> +--------+ \----> +--------+ \----> +--------+ |
33 | +--------+ \----> +--------+ \----> +--------+ \----> +--------+ |
28 | ^ |
34 | ^ |
29 | | |
35 | | |
30 | | |
36 | | |
31 | +--------+ |
37 | +--------+ |
32 | | PTL0 | |
38 | | PTL0 | |
33 | +--------+ |
39 | +--------+ |
34 | 40 | ||
35 | 41 | ||
36 | PTL0 Page Table Level 0 (Page Directory) |
42 | PTL0 Page Table Level 0 (Page Directory) |
37 | PTL1 Page Table Level 1 |
43 | PTL1 Page Table Level 1 |
38 | PTL2 Page Table Level 2 |
44 | PTL2 Page Table Level 2 |
39 | PTL3 Page Table Level 3 |
45 | PTL3 Page Table Level 3 |
40 | 46 | ||
41 | PTL0_INDEX Index into PTL0 |
47 | PTL0_INDEX Index into PTL0 |
42 | PTL1_INDEX Index into PTL1 |
48 | PTL1_INDEX Index into PTL1 |
43 | PTL2_INDEX Index into PTL2 |
49 | PTL2_INDEX Index into PTL2 |
44 | PTL3_INDEX Index into PTL3 |
50 | PTL3_INDEX Index into PTL3 |
45 | 51 | ||
46 | VADDR Virtual address for which mapping is looked up |
52 | VADDR Virtual address for which mapping is looked up |
47 | FRAME Physical address of memory frame to which VADDR is mapped |
53 | FRAME Physical address of memory frame to which VADDR is mapped |
48 | 54 | ||
49 | 55 | ||
50 | On architectures whose hardware has fewer levels, PTL2 and, if need be, PTL1 are |
56 | On architectures whose hardware has fewer levels, PTL2 and, if need be, PTL1 are |
51 | left out. TLB-only architectures are to define custom format for software page |
57 | left out. TLB-only architectures are to define custom format for software page |
52 | tables. |
58 | tables. |
- | 59 | ||
- | 60 | ||
- | 61 | ||
- | 62 | 1.2 Single global page hash table |
|
- | 63 | ||
- | 64 | Generic page hash table interface is deployed on 64-bit architectures without |
|
- | 65 | implied hardware support for hierarchical page tables, i.e. ia64 and sparc64. |
|
- | 66 | There is only one global page hash table in the system shared by all address |
|
- | 67 | spaces. |
|
53 | 68 |