update
This commit is contained in:
parent
a4cc9cdf4f
commit
d46527108f
|
@ -61,7 +61,7 @@ static IDT: Lazy<InterruptDescriptorTable> = Lazy::new(|| {
|
|||
|
||||
idt[InterruptIndex::Timer.as_usize()].set_handler_fn(timer_interrupt_handler);
|
||||
idt[InterruptIndex::Keyboard.as_usize()].set_handler_fn(keyboard_interrupt_handler);
|
||||
idt[InterruptIndex::Mouse.as_usize()].set_handler_fn(crate::hardware::mouse_interrupt_handler);
|
||||
// idt[InterruptIndex::Mouse.as_usize()].set_handler_fn(crate::hardware::mouse_interrupt_handler);
|
||||
|
||||
// run `a + b + l + e + o + s print;` in ablescript and its 54 thats why this seemingly arbitrary number was chosen
|
||||
idt[54].set_handler_fn(software_int_handler);
|
||||
|
@ -70,11 +70,11 @@ static IDT: Lazy<InterruptDescriptorTable> = Lazy::new(|| {
|
|||
});
|
||||
|
||||
extern "x86-interrupt" fn software_int_handler(stack_frame: InterruptStackFrame) {
|
||||
println!("EXCEPTION: SOFTWARE INT\n{:#?}", stack_frame);
|
||||
trace!("EXCEPTION: SOFTWARE INT\n{:#?}", stack_frame);
|
||||
}
|
||||
|
||||
extern "x86-interrupt" fn breakpoint_handler(stack_frame: InterruptStackFrame) {
|
||||
println!("EXCEPTION: BREAKPOINT\n{:#?}", stack_frame);
|
||||
trace!("EXCEPTION: BREAKPOINT\n{:#?}", stack_frame);
|
||||
}
|
||||
|
||||
extern "x86-interrupt" fn double_fault_handler(
|
||||
|
@ -90,7 +90,6 @@ extern "x86-interrupt" fn double_fault_handler(
|
|||
extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: InterruptStackFrame) {
|
||||
use super::task_switcher;
|
||||
unsafe {
|
||||
// print!(".");
|
||||
asm!(
|
||||
|
||||
// Kernel tick
|
||||
|
@ -134,7 +133,7 @@ extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: InterruptStac
|
|||
// Backspace
|
||||
'\u{8}' => {
|
||||
// TODO: Fix this and apply to new term
|
||||
WRITER.lock().backspace();
|
||||
// WRITER.lock().backspace();
|
||||
KEYBUFF.lock().push(8.into());
|
||||
}
|
||||
// '^' => KERNEL_STATE.lock().shutdown(),
|
||||
|
|
|
@ -24,12 +24,13 @@ impl core::fmt::Write for Stdout {
|
|||
use crate::TERM;
|
||||
|
||||
trace!("printing");
|
||||
x86_64::instructions::interrupts::without_interrupts(|| {
|
||||
let mut term = TERM.lock();
|
||||
term.set_dirty(true);
|
||||
term.print(s.to_string());
|
||||
drop(term);
|
||||
});
|
||||
// x86_64::instructions::interrupts::without_interrupts(|| {
|
||||
let mut term = TERM.lock();
|
||||
term.set_dirty(true);
|
||||
term.print(s.to_string());
|
||||
drop(term);
|
||||
// });
|
||||
trace!("Finished printing");
|
||||
Ok(())
|
||||
}
|
||||
#[cfg(target_arch = "riscv64")]
|
||||
|
|
|
@ -93,7 +93,7 @@ impl Term {
|
|||
x += 1
|
||||
}
|
||||
}
|
||||
self.set_dirty(true);
|
||||
self.set_dirty(false);
|
||||
trace!("Finished drawing");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue