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.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/src/main.rs b/kernel/src/main.rs
index 1613292..08778f2 100644
--- a/kernel/src/main.rs
+++ b/kernel/src/main.rs
@@ -19,8 +19,11 @@ pub use io::{qemu, serial, vga_text};
#[no_mangle]
extern "C" fn _start() -> ! {
kernel::init();
+ x86_64::instructions::interrupts::enable();
let apic = interrupts::apic::Apic::new();
+ let apic = interrupts::apic::set_local_apic(apic);
+ apic.set_timer_interrupt_handler(interrupts::apic::TimerDivideConfig::Div32, interrupts::InterruptType::Timer);
if cfg!(test) {
qemu::exit_qemu(qemu::QemuExitCode::Success);