summaryrefslogtreecommitdiff
path: root/kernel/src/main.rs
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2019-11-20 03:47:08 +0100
committerDennis Kobert <dennis@kobert.dev>2019-11-20 03:47:08 +0100
commit0cb231bd3de9bcd4c39064399211fbd2fbc6237e (patch)
treec3713274ae1057afdcd6ce1f9af1f96a03503e93 /kernel/src/main.rs
parent78ed9468fb817ffa225b8af3cfdd124c8e37d320 (diff)
Fix memory mapping for LAIC and setup it's paging
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);
}