blob: 0dbcce2757f45e2dbf60692e6734bd0078623428 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#include "../idt.h"
static_assert(sizeof(IDT::Entry) == 8); // size of IDT::Entry in protected mode is 64 bits
IDT::Entry::Entry(void (*handler)(), uint16_t select, IDT::InterruptType t) {
offset_0_15 = reinterpret_cast<uint32_t>(handler) & 0xffff;
offset_16_31 = (reinterpret_cast<uint32_t>(handler) >> 16) & 0xffff;
selector = select;
type = t;
}
|