Allocate pages in the active page table Inputs ------ start_addr Virtual address in the first page size Size of the region in bytes. flags Set permissions / properties
(
start_addr: VirtAddr,
size: u64,
flags: PageTableFlags)
| 298 | /// flags Set permissions / properties |
| 299 | /// |
| 300 | pub fn allocate_active_pages( |
| 301 | start_addr: VirtAddr, |
| 302 | size: u64, |
| 303 | flags: PageTableFlags) |
| 304 | -> Result<(), MapToError<Size4KiB>> { |
| 305 | |
| 306 | let memory_info = unsafe {MEMORY_INFO.as_mut().unwrap()}; |
| 307 | let level_4_table = unsafe {active_level_4_table(memory_info.physical_memory_offset)}; |
| 308 | |
| 309 | allocate_pages(&mut *level_4_table, start_addr, size, flags) |
| 310 | } |
| 311 | |
| 312 | /// Create user-accessible pages, which are allocated on demand |
| 313 | /// ie when written to. |
nothing calls this directly
no test coverage detected