From 78fe37ddb3d7652b4692f48729e37fa05cd93f19 Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 6 Sep 2022 11:44:37 +0200 Subject: [PATCH] Move declaration of IDTR to header --- kernel/include/interrupts/IDT.h | 6 ++++++ kernel/src/interrupts/IDT.cpp | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/include/interrupts/IDT.h b/kernel/include/interrupts/IDT.h index 7bbd01d8..48d4ec33 100644 --- a/kernel/include/interrupts/IDT.h +++ b/kernel/include/interrupts/IDT.h @@ -5,6 +5,12 @@ #define IDT_TA_CallGate 0b10001100 #define IDT_TA_TrapGate 0b10001111 +struct IDTR +{ + uint16_t limit; + uint64_t offset; +} __attribute__((packed)); + namespace IDT { void add_handler(short interrupt_number, void* handler, uint8_t type_attr); diff --git a/kernel/src/interrupts/IDT.cpp b/kernel/src/interrupts/IDT.cpp index 9a3c6aa4..bb32e9b5 100644 --- a/kernel/src/interrupts/IDT.cpp +++ b/kernel/src/interrupts/IDT.cpp @@ -14,12 +14,6 @@ struct IDTEntry uint64_t get_offset(); }; -struct IDTR -{ - uint16_t limit; - uint64_t offset; -} __attribute__((packed)); - static IDTEntry entries[256]; void IDTEntry::set_offset(uint64_t offset)