From 8d14c729c43ee555c240a043e3909617e4fa5043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Thu, 27 Feb 2025 09:24:17 +0000 Subject: Add files to cmake and implement gdt flags --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8657cab..3717788 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,13 @@ add_library("teachos::memory" ALIAS "_memory") add_library("_exception" OBJECT) add_library("teachos::exception" ALIAS "_exception") +#[============================================================================[ +# The Context switching Library +#]============================================================================] + +add_library("_context" OBJECT) +add_library("teachos::context_switching" ALIAS "_context") + #[============================================================================[ # The Shared Library #]============================================================================] -- cgit v1.2.3 From b8a0024ee71a64ec0e87a1e2d0c0c7280dc954e6 Mon Sep 17 00:00:00 2001 From: Fabian Imhof Date: Thu, 13 Mar 2025 09:36:00 +0000 Subject: create GDT and fix segment descriptor bit order --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3717788..daf87b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,7 @@ target_link_libraries("_kernel" PRIVATE "teachos::memory" "teachos::exception" "teachos::shared" + "teachos::context_switching" ) #[============================================================================[ -- cgit v1.2.3 From 2b8e6e7e10f084a9a9ba5c0b79a041f4d1ac459b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sat, 15 Mar 2025 11:29:26 +0000 Subject: implement loading of gdtr register --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index daf87b8..c895618 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,11 +123,11 @@ add_library("_context" OBJECT) add_library("teachos::context_switching" ALIAS "_context") #[============================================================================[ -# The Shared Library +# The Context switching Library #]============================================================================] -add_library("_shared" OBJECT) -add_library("teachos::shared" ALIAS "_shared") +add_library("_stl" OBJECT) +add_library("teachos::stl" ALIAS "_stl") #[============================================================================[ # The Kernel @@ -143,7 +143,7 @@ target_link_libraries("_kernel" PRIVATE "teachos::video" "teachos::memory" "teachos::exception" - "teachos::shared" + "teachos::stl" "teachos::context_switching" ) -- cgit v1.2.3 From aba154ad01fc0e1e1274f2582b1493e78daa2559 Mon Sep 17 00:00:00 2001 From: Fabian Imhof Date: Sat, 29 Mar 2025 14:47:04 +0000 Subject: fix gdt segments, improve idt and trial&error for triple fault --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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" ) #[============================================================================[ -- cgit v1.2.3