aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/include/arch/context_switching/syscall/main.hpp2
-rw-r--r--arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp3
-rw-r--r--arch/x86_64/src/context_switching/syscall/syscall_handler.cpp4
3 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86_64/include/arch/context_switching/syscall/main.hpp b/arch/x86_64/include/arch/context_switching/syscall/main.hpp
index e391c1f..59adc13 100644
--- a/arch/x86_64/include/arch/context_switching/syscall/main.hpp
+++ b/arch/x86_64/include/arch/context_switching/syscall/main.hpp
@@ -28,7 +28,7 @@ namespace teachos::arch::context_switching::syscall
* @brief Possible error codes that can be returned by the different syscall methods called depending on the type
* enum.
*/
- enum class error
+ enum class error : uint8_t
{
OK = 0U, ///< No error occured in syscall.
OUT_OF_MEMORY = 1U, ///< Expanding heap failed because we have run out of mappable virtual address space.
diff --git a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp
index b211b8b..81ac0cb 100644
--- a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp
+++ b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp
@@ -129,6 +129,9 @@ namespace teachos::arch::memory::paging
0x209000, // .stl_text (Contains code for custom std implementations and standard library code)
0x218000, // .user_text (Contains the actual user code executed)
0x21F000, // .user_data (Contains static user variables)
+
+ 0x20A000 // .text (Necessary, because symbols for all template standard library features are placed here if
+ // they were first used in the Kernel Code Section)
};
for (auto const & section : mem_info.sections)
diff --git a/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp b/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp
index af6d911..84dbe5f 100644
--- a/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp
+++ b/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp
@@ -108,9 +108,9 @@ namespace teachos::arch::context_switching::syscall
: [input] "m"(rflags)
: "memory");
- // Additionally call leave, because x86 allocates tack space for the internal variables. If we do not clean up this
+ // Additionally call leave, because x86 allocates stack space for the internal variables. If we do not clean up this
// newly created stack frame the syscall instruction that landed in this syscall_handler, will never return to the
- // method that originally called it, becuase the RIP has not been restored from the previous stack frame.
+ // method that originally called it, because the RIP has not been restored from the previous stack frame.
asm volatile("leave\n"
"sysretq");
}