From d46527108f0bffe182ce18d7ed4069c6e8e458f5 Mon Sep 17 00:00:00 2001 From: able Date: Sun, 31 Jul 2022 03:03:59 -0500 Subject: [PATCH] update --- ableos/src/arch/x86_64/interrupts.rs | 9 ++++----- ableos/src/print.rs | 13 +++++++------ ableos/src/vterm.rs | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ableos/src/arch/x86_64/interrupts.rs b/ableos/src/arch/x86_64/interrupts.rs index c6c9887df..5c5328deb 100644 --- a/ableos/src/arch/x86_64/interrupts.rs +++ b/ableos/src/arch/x86_64/interrupts.rs @@ -61,7 +61,7 @@ static IDT: Lazy = 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 = 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(), diff --git a/ableos/src/print.rs b/ableos/src/print.rs index 5dba9075b..3687ee0f7 100644 --- a/ableos/src/print.rs +++ b/ableos/src/print.rs @@ -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")] diff --git a/ableos/src/vterm.rs b/ableos/src/vterm.rs index 8fd613932..4b9317230 100644 --- a/ableos/src/vterm.rs +++ b/ableos/src/vterm.rs @@ -93,7 +93,7 @@ impl Term { x += 1 } } - self.set_dirty(true); + self.set_dirty(false); trace!("Finished drawing"); } }