aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/interrupts/idt.c
diff options
context:
space:
mode:
authorMarvin Borner2020-05-06 19:04:05 +0200
committerMarvin Borner2020-05-06 19:04:05 +0200
commitd94ffac4a584dc7a4f6f2ec567b8caab05ce9253 (patch)
tree559cd596a0a407d4b40c1d12d3c6a0686494da16 /src/kernel/interrupts/idt.c
parent1a8563a05608b5b5e27eada44cf4790926001c68 (diff)
New build parameters and shared includes
This changes many files but I've just applied some replace commands.. So - nothing special!
Diffstat (limited to 'src/kernel/interrupts/idt.c')
-rw-r--r--src/kernel/interrupts/idt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/kernel/interrupts/idt.c b/src/kernel/interrupts/idt.c
index 4be3d7c..532435a 100644
--- a/src/kernel/interrupts/idt.c
+++ b/src/kernel/interrupts/idt.c
@@ -1,12 +1,12 @@
-#include <kernel/lib/lib.h>
-#include <kernel/system.h>
+#include <lib/lib.h>
+#include <system.h>
struct idt_entry {
- uint16_t base_low;
- uint16_t sel; // Kernel segment
- uint8_t always0; // Always 0
- uint8_t flags;
- uint16_t base_high;
+ u16 base_low;
+ u16 sel; // Kernel segment
+ u8 always0; // Always 0
+ u8 flags;
+ u16 base_high;
} __attribute__((packed));
struct idt_ptr {
@@ -24,13 +24,13 @@ extern void idt_load();
void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags)
{
// Specify the interrupt routine's base address
- idt[num].base_low = (uint16_t)(base & 0xFFFF);
- idt[num].base_high = (uint16_t)((base >> 16) & 0xFFFF);
+ idt[num].base_low = (u16)(base & 0xFFFF);
+ idt[num].base_high = (u16)((base >> 16) & 0xFFFF);
// Set selector/segment of IDT entry
idt[num].sel = sel;
idt[num].always0 = 0;
- idt[num].flags = (uint8_t)(flags | 0x60);
+ idt[num].flags = (u8)(flags | 0x60);
}
// Install IDT