Rev 1044 | Rev 1266 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1044 | Rev 1229 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | .mapping_find = pt_mapping_find |
47 | .mapping_find = pt_mapping_find |
48 | }; |
48 | }; |
49 | 49 | ||
50 | /** Map page to frame using hierarchical page tables. |
50 | /** Map page to frame using hierarchical page tables. |
51 | * |
51 | * |
52 | * Map virtual address 'page' to physical address 'frame' |
52 | * Map virtual address @page to physical address @frame |
53 | * using 'flags'. |
53 | * using @flags. |
54 | * |
54 | * |
55 | * The page table must be locked and interrupts must be disabled. |
55 | * The page table must be locked and interrupts must be disabled. |
56 | * |
56 | * |
57 | * @param as Address space to wich page belongs. |
57 | * @param as Address space to wich page belongs. |
58 | * @param page Virtual address of the page to be mapped. |
58 | * @param page Virtual address of the page to be mapped. |
Line 105... | Line 105... | ||
105 | * |
105 | * |
106 | * Empty page tables except PTL0 are freed. |
106 | * Empty page tables except PTL0 are freed. |
107 | * |
107 | * |
108 | * The page table must be locked and interrupts must be disabled. |
108 | * The page table must be locked and interrupts must be disabled. |
109 | * |
109 | * |
110 | * @param as Address space to wich page belongs. |
110 | * @param as Address space to wich @page belongs. |
111 | * @param page Virtual address of the page to be demapped. |
111 | * @param page Virtual address of the page to be demapped. |
112 | */ |
112 | */ |
113 | void pt_mapping_remove(as_t *as, __address page) |
113 | void pt_mapping_remove(as_t *as, __address page) |
114 | { |
114 | { |
115 | pte_t *ptl0, *ptl1, *ptl2, *ptl3; |
115 | pte_t *ptl0, *ptl1, *ptl2, *ptl3; |
Line 225... | Line 225... | ||
225 | * |
225 | * |
226 | * Find mapping for virtual page. |
226 | * Find mapping for virtual page. |
227 | * |
227 | * |
228 | * The page table must be locked and interrupts must be disabled. |
228 | * The page table must be locked and interrupts must be disabled. |
229 | * |
229 | * |
230 | * @param as Address space to which page belongs. |
230 | * @param as Address space to which @page belongs. |
231 | * @param page Virtual page. |
231 | * @param page Virtual page. |
232 | * |
232 | * |
233 | * @return NULL if there is no such mapping; entry from PTL3 describing the mapping otherwise. |
233 | * @return NULL if there is no such mapping; entry from PTL3 describing the mapping otherwise. |
234 | */ |
234 | */ |
235 | pte_t *pt_mapping_find(as_t *as, __address page) |
235 | pte_t *pt_mapping_find(as_t *as, __address page) |