-
Couldn't load subscription status.
- Fork 220
Closed
Description
The bootloader panics on line 242 with failed to identity map fame PhysFrame[4kib](20a000): PageAlreadyMapped(PhysFrame[4Kib](0x20a000))
Lines 229 to 244 in c73786d
| // identity-map context switch function, so that we don't get an immediate pagefault | |
| // after switching the active page table | |
| let context_switch_function = PhysAddr::new(context_switch as *const () as u64); | |
| let context_switch_function_start_frame: PhysFrame = | |
| PhysFrame::containing_address(context_switch_function); | |
| for frame in PhysFrame::range_inclusive( | |
| context_switch_function_start_frame, | |
| context_switch_function_start_frame + 1, | |
| ) { | |
| match unsafe { | |
| kernel_page_table.identity_map(frame, PageTableFlags::PRESENT, frame_allocator) | |
| } { | |
| Ok(tlb) => tlb.flush(), | |
| Err(err) => panic!("failed to identity map frame {:?}: {:?}", frame, err), | |
| } | |
| } |
I checked the mapping for 0x20b000 and QEMU says its mapped to 0x20b000
A potental fix would be to just ignore the error with an extra match arm Err(MapToError::PageAlreadyMapped(frame)) => {}
Metadata
Metadata
Assignees
Labels
No labels