Initialize the PIC

This commit is contained in:
Philipp Oppermann
2019-01-25 14:04:55 +01:00
parent d8edfccca4
commit 6504bed810
4 changed files with 29 additions and 7 deletions

View File

@@ -6,6 +6,14 @@
use crate::{gdt, println};
use lazy_static::lazy_static;
use x86_64::structures::idt::{ExceptionStackFrame, InterruptDescriptorTable};
use pic8259_simple::ChainedPics;
use spin;
pub const PIC_1_OFFSET: u8 = 32;
pub const PIC_2_OFFSET: u8 = PIC_1_OFFSET + 8;
pub static PICS: spin::Mutex<ChainedPics> =
spin::Mutex::new(unsafe { ChainedPics::new(PIC_1_OFFSET, PIC_2_OFFSET) });
lazy_static! {
static ref IDT: InterruptDescriptorTable = {