x86_64 icon indicating copy to clipboard operation
x86_64 copied to clipboard

`next` branch - "entry should be mapped at this point" when calling `map_to` on offset page table

Open ChocolateLoverRaj opened this issue 5 months ago • 2 comments

I am using the next branch because I am using the PAT_4KIB_PAGE flag. Today I encountered a panic:

[0] ERROR panicked at /home/rajas/.cargo/git/checkouts/x86_64-380b825b01a45fff/c845be9/src/structures/paging/mapper/mapped_page_table.rs:877:51:
entry should be mapped at this point

I'm not sure if there is something wrong with my code, but I don't think there is since this is a freshly zeroed L4 page table.

This happens when I call map_to. The full code is at https://github.com/ChocolateLoverRaj/rust-os-tutorial/blob/e0fb8f4e767acf8711e4ef22d56af939bd3cdfd2/kernel/src/syscall_handlers/spawn_process.rs#L142 (run cargo r -- --nographic to reproduce).

ChocolateLoverRaj avatar Jun 30 '25 18:06 ChocolateLoverRaj