Initialize a new OffsetPageTable. This function is unsafe because the caller must guarantee that the complete physical memory is mapped to virtual memory at the passed `physical_memory_offset`. Also, this function must be only called once to avoid aliasing `&mut` references (which is undefined behavior).
(physical_memory_offset: VirtAddr)
| 11 | /// `physical_memory_offset`. Also, this function must be only called once |
| 12 | /// to avoid aliasing `&mut` references (which is undefined behavior). |
| 13 | pub unsafe fn init(physical_memory_offset: VirtAddr) -> OffsetPageTable<'static> { |
| 14 | unsafe { |
| 15 | let level_4_table = active_level_4_table(physical_memory_offset); |
| 16 | OffsetPageTable::new(level_4_table, physical_memory_offset) |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | /// Returns a mutable reference to the active level 4 table. |
| 21 | /// |
nothing calls this directly
no test coverage detected