fix: idt
This commit is contained in:
@@ -56,4 +56,14 @@ impl InterruptDescriptorTable {
|
||||
self.entries[vector as usize].set_handler(handler, 0x28, 0x8E);
|
||||
}
|
||||
|
||||
pub unsafe fn load(&'static self) {
|
||||
let ptr = IdtPtr {
|
||||
limit: (core::mem::size_of::<Self>() - 1) as u16,
|
||||
base: self as *const _ as u64,
|
||||
};
|
||||
unsafe {
|
||||
asm!("lidt [{}]", in(reg) &ptr, options(readonly, nostack, preserves_flags));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user