summaryrefslogtreecommitdiff
path: root/kernel/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/main.rs')
-rw-r--r--kernel/src/main.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/kernel/src/main.rs b/kernel/src/main.rs
index a0e1e56..c6c00c2 100644
--- a/kernel/src/main.rs
+++ b/kernel/src/main.rs
@@ -23,22 +23,16 @@ extern "C" fn _start() -> ! {
let apic = interrupts::apic::Apic::new().expect("no APIC support");
let mut apic = unsafe { interrupts::apic::set_local_apic(apic) };
- apic.set_timer_interrupt_handler(interrupts::apic::TimerDivideConfig::Div16, interrupts::InterruptType::Timer);
+ apic.set_timer_interrupt_handler(
+ interrupts::apic::TimerDivideConfig::Div16,
+ interrupts::InterruptType::Timer,
+ );
x86_64::instructions::interrupts::enable();
let mut stdout = OStream::new();
stdout.print(b"apic initialisation complete\n");
- loop {
- stdout.set_col(0);
- use core::fmt::Write;
- //let n = apic.get_timer_value();
- let n = apic.get_error_code();
- write!(&mut stdout, "timer: {} ", n);
- //write!(&mut stdout, "timer: {:08x} ", apic.ptr() as usize);
- }
-
if cfg!(test) {
qemu::exit_qemu(qemu::QemuExitCode::Success);
}