aboutsummaryrefslogtreecommitdiff
path: root/i686/idt.h
blob: 45744dcfa1afc05c3a89188867bf7e727b3aabef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <stdint.h>

struct interrupt_frame {
  uint32_t ip;
  uint32_t cs;
  uint32_t flags;
  uint32_t sp;
  uint32_t ss;
};

// typedef void (*irq_handler)();

/* isr.c */
void abort_handler(struct interrupt_frame *frame);
void syscall_handler(struct interrupt_frame *frame);
void irq0x00(struct interrupt_frame *frame); // timer interrupt
void irq0x01(struct interrupt_frame *frame); // keyboard interrupt
void irq0x0c(struct interrupt_frame *frame); // mouse interrupt

/* lidt.c */
void idt_install();