commit
a0d5ccfd2c
|
@ -8,7 +8,7 @@ edition = "2018"
|
||||||
bootloader = { version = "0.9.11", features = ["map_physical_memory"] }
|
bootloader = { version = "0.9.11", features = ["map_physical_memory"] }
|
||||||
conquer-once = { version = "0.3.2", default-features = false }
|
conquer-once = { version = "0.3.2", default-features = false }
|
||||||
spinning_top = { version = "0.2.4", features = ["nightly"] }
|
spinning_top = { version = "0.2.4", features = ["nightly"] }
|
||||||
pic8259_simple = "0.2.0"
|
pic8259 = "0.10.1"
|
||||||
vga = { path = "../" }
|
vga = { path = "../" }
|
||||||
uart_16550 = "0.2.14"
|
uart_16550 = "0.2.14"
|
||||||
x86_64 = "0.14.2"
|
x86_64 = "0.14.2"
|
||||||
|
|
|
@ -2,7 +2,7 @@ use crate::gdt;
|
||||||
use crate::{hlt_loop, serial_print, serial_println};
|
use crate::{hlt_loop, serial_print, serial_println};
|
||||||
use conquer_once::spin::Lazy;
|
use conquer_once::spin::Lazy;
|
||||||
use core::convert::Into;
|
use core::convert::Into;
|
||||||
use pic8259_simple::ChainedPics;
|
use pic8259::ChainedPics;
|
||||||
use spinning_top::Spinlock;
|
use spinning_top::Spinlock;
|
||||||
use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame, PageFaultErrorCode};
|
use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame, PageFaultErrorCode};
|
||||||
|
|
||||||
|
@ -49,14 +49,14 @@ pub fn init_idt() {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "x86-interrupt" fn double_fault_handler(
|
extern "x86-interrupt" fn double_fault_handler(
|
||||||
stack_frame: &mut InterruptStackFrame,
|
stack_frame: InterruptStackFrame,
|
||||||
_error_code: u64,
|
_error_code: u64,
|
||||||
) -> ! {
|
) -> ! {
|
||||||
panic!("EXCEPTION: DOUBLE FAULT\n{:#?}", stack_frame);
|
panic!("EXCEPTION: DOUBLE FAULT\n{:#?}", stack_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "x86-interrupt" fn page_fault_handler(
|
extern "x86-interrupt" fn page_fault_handler(
|
||||||
stack_frame: &mut InterruptStackFrame,
|
stack_frame: InterruptStackFrame,
|
||||||
error_code: PageFaultErrorCode,
|
error_code: PageFaultErrorCode,
|
||||||
) {
|
) {
|
||||||
use x86_64::registers::control::Cr2;
|
use x86_64::registers::control::Cr2;
|
||||||
|
@ -69,7 +69,7 @@ extern "x86-interrupt" fn page_fault_handler(
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "x86-interrupt" fn segment_not_present(
|
extern "x86-interrupt" fn segment_not_present(
|
||||||
_stack_frame: &mut InterruptStackFrame,
|
_stack_frame: InterruptStackFrame,
|
||||||
_error_code: u64,
|
_error_code: u64,
|
||||||
) {
|
) {
|
||||||
// For some reason this sometimes gets thrown when running tests in qemu,
|
// For some reason this sometimes gets thrown when running tests in qemu,
|
||||||
|
|
Loading…
Reference in a new issue