aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2025-03-29 14:47:04 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2025-03-29 14:47:04 +0000
commitaba154ad01fc0e1e1274f2582b1493e78daa2559 (patch)
tree15aad40a97406a76e466191ef7afc5ed4ab10006 /CMakeLists.txt
parent98be1b722f17e77880e8c0b0f464a9ba31230fc4 (diff)
downloadteachos-aba154ad01fc0e1e1274f2582b1493e78daa2559.tar.xz
teachos-aba154ad01fc0e1e1274f2582b1493e78daa2559.zip
fix gdt segments, improve idt and trial&error for triple fault
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c895618..35cfd65 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,8 +122,14 @@ add_library("teachos::exception" ALIAS "_exception")
add_library("_context" OBJECT)
add_library("teachos::context_switching" ALIAS "_context")
+add_library("_interrupt_handling" OBJECT)
+add_library("teachos::interrupt_handling" ALIAS "_interrupt_handling")
+# https://forum.osdev.org/viewtopic.php?f=1&t=36712
+# https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#index-interrupt-function-attribute_002c-x86
+target_compile_options("_interrupt_handling" PRIVATE "-mgeneral-regs-only")
+
#[============================================================================[
-# The Context switching Library
+# The Stub Standard Library
#]============================================================================]
add_library("_stl" OBJECT)
@@ -145,6 +151,7 @@ target_link_libraries("_kernel" PRIVATE
"teachos::exception"
"teachos::stl"
"teachos::context_switching"
+ "teachos::interrupt_handling"
)
#[============================================================================[