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 152... | Line 152... | ||
| 152 | free(t); |
152 | free(t); |
| 153 | } |
153 | } |
| 154 | 154 | ||
| 155 | /** Map page to frame using page hash table. |
155 | /** Map page to frame using page hash table. |
| 156 | * |
156 | * |
| 157 | * Map virtual address @page to physical address @frame |
157 | * Map virtual address page to physical address frame |
| 158 | * using @flags. |
158 | * using flags. |
| 159 | * |
159 | * |
| 160 | * The page table must be locked and interrupts must be disabled. |
160 | * The page table must be locked and interrupts must be disabled. |
| 161 | * |
161 | * |
| 162 | * @param as Address space to which @page belongs. |
162 | * @param as Address space to which page belongs. |
| 163 | * @param page Virtual address of the page to be mapped. |
163 | * @param page Virtual address of the page to be mapped. |
| 164 | * @param frame Physical address of memory frame to which the mapping is done. |
164 | * @param frame Physical address of memory frame to which the mapping is done. |
| 165 | * @param flags Flags to be used for mapping. |
165 | * @param flags Flags to be used for mapping. |
| 166 | */ |
166 | */ |
| 167 | void ht_mapping_insert(as_t *as, __address page, __address frame, int flags) |
167 | void ht_mapping_insert(as_t *as, __address page, __address frame, int flags) |
| Line 188... | Line 188... | ||
| 188 | } |
188 | } |
| 189 | } |
189 | } |
| 190 | 190 | ||
| 191 | /** Remove mapping of page from page hash table. |
191 | /** Remove mapping of page from page hash table. |
| 192 | * |
192 | * |
| 193 | * Remove any mapping of @page within address space @as. |
193 | * Remove any mapping of page within address space as. |
| 194 | * TLB shootdown should follow in order to make effects of |
194 | * TLB shootdown should follow in order to make effects of |
| 195 | * this call visible. |
195 | * this call visible. |
| 196 | * |
196 | * |
| 197 | * The page table must be locked and interrupts must be disabled. |
197 | * The page table must be locked and interrupts must be disabled. |
| 198 | * |
198 | * |
| Line 215... | Line 215... | ||
| 215 | * |
215 | * |
| 216 | * Find mapping for virtual page. |
216 | * Find mapping for virtual page. |
| 217 | * |
217 | * |
| 218 | * The page table must be locked and interrupts must be disabled. |
218 | * The page table must be locked and interrupts must be disabled. |
| 219 | * |
219 | * |
| 220 | * @param as Address space to wich @page belongs. |
220 | * @param as Address space to wich page belongs. |
| 221 | * @param page Virtual page. |
221 | * @param page Virtual page. |
| 222 | * |
222 | * |
| 223 | * @return NULL if there is no such mapping; requested mapping otherwise. |
223 | * @return NULL if there is no such mapping; requested mapping otherwise. |
| 224 | */ |
224 | */ |
| 225 | pte_t *ht_mapping_find(as_t *as, __address page) |
225 | pte_t *ht_mapping_find(as_t *as, __address page) |