source: mainline/doc/mm@ 758e065

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 758e065 was 20d50a1, checked in by Jakub Jermar <jakub@…>, 20 years ago

Memory management work.

  • vm.* → as.* (as like address space is, imho, more fitting)
  • Don't do TLB shootdown on vm_install(). Some architectures only need to call tlb_invalidate_asid().
  • Don't allocate all frames for as_area in as_area_create(), but let them be allocated on-demand by as_page_fault().
  • Add high-level page fault handler as_page_fault().
  • Add as_area_load_mapping().
  • Property mode set to 100644
File size: 2.6 KB
Line 
1Memory management
2=================
3
41. Virtual Address Translation
5
61.1 Hierarchical 4-level per address space page tables
7
8SPARTAN kernel deploys generic interface for 4-level page tables
9for these architectures: amd64, ia32, mips32 and ppc32. In this
10setting, page tables are hierarchical and are not shared by
11address spaces (i.e. one set of page tables per address space).
12
13
14 VADDR
15 +-----------------------------------------------------------------------------+
16 | PTL0_INDEX | PTL1_INDEX | PTL2_INDEX | PTL3_INDEX | OFFSET |
17 +-----------------------------------------------------------------------------+
18
19
20 PTL0 PTL1 PTL2 PTL3
21 +--------+ +--------+ +--------+ +--------+
22 | | | | | PTL3 | -----\ | |
23 | | | | +--------+ | | |
24 | | +--------+ | | | | |
25 | | | PTL2 | -----\ | | | | |
26 | | +--------+ | | | | | |
27 | | | | | | | | +--------+
28 +--------+ | | | | | | | FRAME |
29 | PTL1 | -----\ | | | | | | +--------+
30 +--------+ | | | | | | | | |
31 | | | | | | | | | | |
32 | | | | | | | | | | |
33 +--------+ \----> +--------+ \----> +--------+ \----> +--------+
34 ^
35 |
36 |
37 +--------+
38 | PTL0 |
39 +--------+
40
41
42PTL0 Page Table Level 0 (Page Directory)
43PTL1 Page Table Level 1
44PTL2 Page Table Level 2
45PTL3 Page Table Level 3
46
47PTL0_INDEX Index into PTL0
48PTL1_INDEX Index into PTL1
49PTL2_INDEX Index into PTL2
50PTL3_INDEX Index into PTL3
51
52VADDR Virtual address for which mapping is looked up
53FRAME Physical address of memory frame to which VADDR is mapped
54
55
56On architectures whose hardware has fewer levels, PTL2 and, if need be, PTL1 are
57left out. TLB-only architectures are to define custom format for software page
58tables.
59
60
61
621.2 Single global page hash table
63
64Generic page hash table interface is deployed on 64-bit architectures without
65implied hardware support for hierarchical page tables, i.e. ia64 and sparc64.
66There is only one global page hash table in the system shared by all address
67spaces.
Note: See TracBrowser for help on using the repository browser.