Subversion Repositories HelenOS-historic

Rev

Rev 793 | Rev 1044 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 793 Rev 826
Line 69... Line 69...
69
    for (i = 0; i < cnt; i++)
69
    for (i = 0; i < cnt; i++)
70
        page_mapping_insert(AS_KERNEL, s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE);
70
        page_mapping_insert(AS_KERNEL, s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE);
71
 
71
 
72
}
72
}
73
 
73
 
74
/** Map page to frame
74
/** Insert mapping of page to frame.
75
 *
75
 *
76
 * Map virtual address 'page' to physical address 'frame'
76
 * Map virtual address 'page' to physical address 'frame'
77
 * using 'flags'. Allocate and setup any missing page tables.
77
 * using 'flags'. Allocate and setup any missing page tables.
78
 *
78
 *
79
 * The address space must be locked and interrupts must be disabled.
79
 * The address space must be locked and interrupts must be disabled.
80
 *
80
 *
81
 * @param as Address space to wich page belongs..
81
 * @param as Address space to wich page belongs.
82
 * @param page Virtual address of the page to be mapped.
82
 * @param page Virtual address of the page to be mapped.
83
 * @param frame Physical address of memory frame to which the mapping is done.
83
 * @param frame Physical address of memory frame to which the mapping is done.
84
 * @param flags Flags to be used for mapping.
84
 * @param flags Flags to be used for mapping.
85
 */
85
 */
86
void page_mapping_insert(as_t *as, __address page, __address frame, int flags)
86
void page_mapping_insert(as_t *as, __address page, __address frame, int flags)
Line 89... Line 89...
89
    ASSERT(page_mapping_operations->mapping_insert);
89
    ASSERT(page_mapping_operations->mapping_insert);
90
   
90
   
91
    page_mapping_operations->mapping_insert(as, page, frame, flags);
91
    page_mapping_operations->mapping_insert(as, page, frame, flags);
92
}
92
}
93
 
93
 
-
 
94
/** Remove mapping of page.
-
 
95
 *
-
 
96
 * Remove any mapping of 'page' within address space 'as'.
-
 
97
 * TLB shootdown should follow in order to make effects of
-
 
98
 * this call visible.
-
 
99
 *
-
 
100
 * The address space must be locked and interrupts must be disabled.
-
 
101
 *
-
 
102
 * @param as Address space to wich page belongs.
-
 
103
 * @param page Virtual address of the page to be demapped.
-
 
104
 */
-
 
105
void page_mapping_remove(as_t *as, __address page)
-
 
106
{
-
 
107
    ASSERT(page_mapping_operations);
-
 
108
    ASSERT(page_mapping_operations->mapping_remove);
-
 
109
   
-
 
110
    page_mapping_operations->mapping_remove(as, page);
-
 
111
}
-
 
112
 
94
/** Find mapping for virtual page
113
/** Find mapping for virtual page
95
 *
114
 *
96
 * Find mapping for virtual page.
115
 * Find mapping for virtual page.
97
 *
116
 *
98
 * The address space must be locked and interrupts must be disabled.
117
 * The address space must be locked and interrupts must be disabled.