Expand description
Page-fault exception handler (vector 14, #PF).
Authors: MarioS271
Re-exportsยง
use crate::arch::x86_64::mm::vmm::page_type::PageType;๐use crate::lib::addr::VirtAddr;๐use crate::lib::panic::kernel_panic;๐use crate::lib::panic_codes::PanicCode;๐use crate::lib::types::fmt_buffer::FmtBuffer;๐use crate::mm::layout::USER_MAX;๐use crate::mm::pmm::FRAME_SIZE;๐use crate::mm::vmm::Vmm;๐use crate::mm::vmm::VmmError;๐use crate::mm::vmm::traits::VmmPaging;๐use crate::mm::vmm::vma::VmaFlags;๐use crate::state::kstate::KSTATE;๐use core::fmt::Write;๐use x86_64::registers::control::Cr2;๐use x86_64::structures::idt::InterruptStackFrame;๐use x86_64::structures::idt::PageFaultErrorCode;๐use crate::arch::x86_64::exception_table::search_exception_table;๐
Functionsยง
- handle_
kernel_ ๐address_ pf - Handle a kernel page fault; maps a new page if VMA is found, otherwise panics
- handle_
user_ ๐address_ pf - Handle Page Faults which happened when accessing a user address (either from userspace or from the kernel in a syscall)
- handler
- Handle Page Faults; dispatches to
handle_kernel_address_pfandhandle_user_address_pf - kernel_
pf_ ๐panic - Wrapper for
kernel_panicwhich appends the error code, CR2 address and interrupt stack frame onto the panic message - user_
pf_ ๐cant_ map_ handler - Handle the user page fault handler being unable to map