aboutsummaryrefslogtreecommitdiffstats
path: root/idt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'idt.cpp')
-rw-r--r--idt.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/idt.cpp b/idt.cpp
index c889c14..de15ec9 100644
--- a/idt.cpp
+++ b/idt.cpp
@@ -62,10 +62,22 @@ struct StubEntry
asm volatile(R"(
pusha
+ mov %%ds, %%ax
+ push %%ax
+ mov $0x10, %%ax
+ mov %%ax, %%ds
+ mov %%ax, %%es
+ mov %%ax, %%fs
+ mov %%ax, %%gs
push %0
cld
call interruptGeneralHandler
pop %%eax
+ pop %%ax
+ mov %%ax, %%ds
+ mov %%ax, %%es
+ mov %%ax, %%fs
+ mov %%ax, %%gs
popa
add $0x4, %%esp
iret