Maps the temporary page to the given frame in the active table. Returns the start address of the temporary page.
(&mut self, frame: Frame, active_table: &mut ActivePageTable)
| 22 | /// Maps the temporary page to the given frame in the active table. |
| 23 | /// Returns the start address of the temporary page. |
| 24 | pub fn map(&mut self, frame: Frame, active_table: &mut ActivePageTable) -> VirtualAddress { |
| 25 | use super::entry::WRITABLE; |
| 26 | |
| 27 | assert!(active_table.translate_page(self.page).is_none(), |
| 28 | "temporary page is already mapped"); |
| 29 | active_table.map_to(self.page, frame, WRITABLE, &mut self.allocator); |
| 30 | self.page.start_address() |
| 31 | } |
| 32 | |
| 33 | /// Unmaps the temporary page in the active table. |
| 34 | pub fn unmap(&mut self, active_table: &mut ActivePageTable) { |
no test coverage detected