summaryrefslogtreecommitdiffhomepage
path: root/src/loader/inc/int.h
diff options
context:
space:
mode:
authorMarvin Borner2021-07-12 18:14:44 +0200
committerMarvin Borner2021-07-12 18:15:29 +0200
commit1b429c0fc28e5cd8b474ad5a1de1fa6f3d7c2e2a (patch)
tree593af3e3ec78795bb47553f492db07fb7e87e373 /src/loader/inc/int.h
parentd414d2f6f46bd425d727af5baae3e2658d6e1384 (diff)
Renamed files to match presentation
Diffstat (limited to 'src/loader/inc/int.h')
-rw-r--r--src/loader/inc/int.h49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/loader/inc/int.h b/src/loader/inc/int.h
deleted file mode 100644
index ccd9ea8..0000000
--- a/src/loader/inc/int.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// MIT License, Copyright (c) 2021 Marvin Borner
-
-#ifndef INT_H
-#define INT_H
-
-#include <def.h>
-
-#define INT_GATE 0x8e
-#define INT_TRAP 0xef
-#define INT_USER 0x60
-#define IDT_ENTRY(offset, selector, type) \
- (struct idt_entry) \
- { \
- .base_low = (u16)((offset)&0xffff), .sel = (selector), .zero = 0, .flags = (type), \
- .base_high = (u16)(((offset) >> 16) & 0xffff), \
- }
-
-struct int_frame {
- u32 gs, fs, es, ds;
- u32 edi, esi, ebp, esp, ebx, edx, ecx, eax;
- u32 int_no, err_code;
- u32 eip, cs, eflags;
-} PACKED;
-
-struct int_frame_user {
- u32 gs, fs, es, ds;
- u32 edi, esi, ebp, esp, ebx, edx, ecx, eax;
- u32 int_no, err_code;
- u32 eip, cs, eflags;
- u32 useresp, ss;
-} PACKED;
-
-struct idt_entry {
- u16 base_low;
- u16 sel; // Kernel segment
- u8 zero; // Always 0
- u8 flags;
- u16 base_high;
-} PACKED;
-
-struct idt_ptr {
- u16 size;
- void *base;
-} PACKED;
-
-void idt_install(void);
-void int_event_handler_add(u32 int_no, void (*handler)(void));
-
-#endif