2018-07-20 15:41:58 +02:00
|
|
|
#pragma once
|
2018-08-06 21:00:58 +02:00
|
|
|
#include "stdarg.h"
|
2018-07-20 15:41:58 +02:00
|
|
|
|
|
|
|
|
2020-04-22 16:52:54 +02:00
|
|
|
// c.f. intel software-developer-vol-1 6.4.1
|
|
|
|
struct interrupt_frame {
|
|
|
|
uint32_t eip;
|
|
|
|
uint32_t cs;
|
|
|
|
uint32_t eflags;
|
|
|
|
uint32_t esp;
|
|
|
|
uint32_t ss;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Exception
|
2018-07-20 15:41:58 +02:00
|
|
|
void print_handler(struct interrupt_frame *frame, ulong error_code);
|
2018-11-13 18:02:47 +01:00
|
|
|
void pagefault_handler(struct interrupt_frame *frame, ulong error_code);
|
2018-07-20 15:41:58 +02:00
|
|
|
|
2020-04-22 16:52:54 +02:00
|
|
|
// IRQ
|
2020-04-23 00:49:09 +02:00
|
|
|
void pit_handler(struct interrupt_frame *frame);
|
2018-07-20 15:41:58 +02:00
|
|
|
void keyboard_handler(struct interrupt_frame *frame);
|
|
|
|
void timer_handler(struct interrupt_frame *frame);
|
2018-11-08 21:37:38 +01:00
|
|
|
void serial_handler(struct interrupt_frame *frame);
|