Fill in all exception and IRQ entries. Handle PIT, keyboard IRQs
This commit is contained in:
parent
a9a8c2b340
commit
f784e9a06a
1 changed files with 441 additions and 219 deletions
97
arch/x86_64/src/interrupt/exception.rs
Normal file
97
arch/x86_64/src/interrupt/exception.rs
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
use super::halt;
|
||||
|
||||
interrupt!(divide_by_zero, {
|
||||
print!("Divide by zero fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt!(debug, {
|
||||
print!("Debug trap\n");
|
||||
});
|
||||
|
||||
interrupt!(non_maskable, {
|
||||
print!("Non-maskable interrupt\n");
|
||||
});
|
||||
|
||||
interrupt!(breakpoint, {
|
||||
print!("Breakpoint trap\n");
|
||||
});
|
||||
|
||||
interrupt!(overflow, {
|
||||
print!("Overflow trap\n");
|
||||
});
|
||||
|
||||
interrupt!(bound_range, {
|
||||
print!("Bound range exceeded fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt!(invalid_opcode, {
|
||||
print!("Invalid opcode fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt!(device_not_available, {
|
||||
print!("Device not available fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt_error!(double_fault, {
|
||||
print!("Double fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt_error!(invalid_tss, {
|
||||
print!("Invalid TSS fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt_error!(segment_not_present, {
|
||||
print!("Segment not present fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt_error!(stack_segment, {
|
||||
print!("Stack segment fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt_error!(protection, {
|
||||
print!("Protection fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt_error!(page, {
|
||||
print!("Page fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt!(fpu, {
|
||||
print!("FPU floating point fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt_error!(alignment_check, {
|
||||
print!("Alignment check fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt!(machine_check, {
|
||||
print!("Machine check fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt!(simd, {
|
||||
print!("SIMD floating point fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt!(virtualization, {
|
||||
print!("Virtualization fault\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
|
||||
interrupt_error!(security, {
|
||||
print!("Security exception\n");
|
||||
loop { halt(); }
|
||||
});
|
||||
Loading…
Reference in a new issue