Subversion Repositories HelenOS-historic

Rev

Rev 1229 | Rev 1266 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1229 Rev 1248
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 97... Line 97...
97
    SET_FRAME_FLAGS(ptl3, PTL3_INDEX(page), flags);
97
    SET_FRAME_FLAGS(ptl3, PTL3_INDEX(page), flags);
98
}
98
}
99
 
99
 
100
/** Remove mapping of page from hierarchical page tables.
100
/** Remove mapping of page from hierarchical page tables.
101
 *
101
 *
102
 * Remove any mapping of 'page' within address space 'as'.
102
 * Remove any mapping of page within address space as.
103
 * TLB shootdown should follow in order to make effects of
103
 * TLB shootdown should follow in order to make effects of
104
 * this call visible.
104
 * this call visible.
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)