diff options
author | Marvin Borner | 2020-05-07 00:16:52 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-07 00:16:52 +0200 |
commit | 31767b532e69c5a63df0106fa08e137e3106a449 (patch) | |
tree | ea7a91347e030c0b120361b7d9975547a5af19d1 /src/kernel/interrupts | |
parent | 8083536f321ad8a12ad4668c2bf41a65c3e3b2f6 (diff) |
Some fixes here and there...
Also implemented serial console in userspace
Diffstat (limited to 'src/kernel/interrupts')
-rw-r--r-- | src/kernel/interrupts/idt.c | 4 | ||||
-rw-r--r-- | src/kernel/interrupts/interrupts.h | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/kernel/interrupts/idt.c b/src/kernel/interrupts/idt.c index 532435a..a01f1c1 100644 --- a/src/kernel/interrupts/idt.c +++ b/src/kernel/interrupts/idt.c @@ -10,7 +10,7 @@ struct idt_entry { } __attribute__((packed)); struct idt_ptr { - unsigned short limit; + u16 limit; void *base; } __attribute__((packed)); @@ -21,7 +21,7 @@ struct idt_ptr idtp; // Defined in idt.asm extern void idt_load(); -void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags) +void idt_set_gate(u8 num, unsigned long base, u16 sel, u8 flags) { // Specify the interrupt routine's base address idt[num].base_low = (u16)(base & 0xFFFF); diff --git a/src/kernel/interrupts/interrupts.h b/src/kernel/interrupts/interrupts.h index f7b5846..50fd437 100644 --- a/src/kernel/interrupts/interrupts.h +++ b/src/kernel/interrupts/interrupts.h @@ -16,16 +16,16 @@ void idt_install(); * @param sel The kernel code segment (0x08) * @param flags The IDT access byte entry (P DPL 01110) */ -void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags); +void idt_set_gate(u8 num, unsigned long base, u16 sel, u8 flags); /** * Registers that get passed into an IRQ handler */ struct regs { - unsigned int gs, fs, es, ds; - unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax; - unsigned int int_no, err_code; - unsigned int eip, cs, eflags, useresp, ss; + u32 gs, fs, es, ds; + u32 edi, esi, ebp, esp, ebx, edx, ecx, eax; + u32 int_no, err_code; + u32 eip, cs, eflags, useresp, ss; }; /** |