module arch.x86_64.interrupts

Code Map

module arch.x86_64.interrupts;


alias IrqFn = fn (IrqState*, u64, void*) (void);

struct IrqState
{
public:
	ds: u64;
	r15: u64;
	r14: u64;
	r13: u64;
	r12: u64;
	r11: u64;
	r10: u64;
	r9: u64;
	r8: u64;
	rsi: u64;
	rdi: u64;
	rbp: u64;
	rdx: u64;
	rcx: u64;
	rbx: u64;
	rax: u64;
	errorCode: u64;
	rip: u64;
	cs: u64;
	rflags: u64;
	rsp: u64;
	ss: u64;
}

fn idt_init();
fn idt_enable();
fn idt_disable();
fn idt_get(vector: u64) u64*;
fn idt_set(offset: void*, vector: u64);
fn isr_stub_set(irqFunc: IrqFn, vec: u64);