Expand description
Handles trap.
ModulesΒ§
- gdt π
- Configure the Global Descriptor Table (GDT).
- idt π
- Configure the Interrupt Descriptor Table (IDT).
- syscall π
- Configure fast syscall.
StructsΒ§
- RawUser
Context π - Userspace context.
- Trap
Frame - Trap frame of kernel interrupt
StaticsΒ§
FunctionsΒ§
- handle_
kernel_ πpage_ fault - FIXME: this is a hack because we donβt allocate kernel space for IO memory. We are currently using the linear mapping for IO memory. This is not a good practice.
- handle_
user_ πpage_ fault - Handles page fault from user space.
- init π β
- Initializes interrupt handling on x86_64.
- inject_
user_ page_ fault_ handler - Injects a custom handler for page faults that occur in the kernel and are caused by user-space address.
- is_
kernel_ interrupted - Returns true if this function is called within the context of an IRQ handler and the IRQ occurs while the CPU is executing in the kernel mode. Otherwise, it returns false.
- trap_
handler π - Handle traps (only from kernel).