aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kernel/cpu/ss.cpp
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2025-03-13 15:46:16 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2025-03-13 15:46:16 +0000
commit11db9338dac611ea32e202add5ce5055b54ebb58 (patch)
treefa68d328a1fe5e07e52e32aac866a0bcc57094ab /arch/x86_64/src/kernel/cpu/ss.cpp
parentbdbe6d4bc0f2966541bcd5a47c1a4ad9cbff16fa (diff)
downloadteachos-11db9338dac611ea32e202add5ce5055b54ebb58.tar.xz
teachos-11db9338dac611ea32e202add5ce5055b54ebb58.zip
fixup typing and continue adding gdt
Diffstat (limited to 'arch/x86_64/src/kernel/cpu/ss.cpp')
-rw-r--r--arch/x86_64/src/kernel/cpu/ss.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86_64/src/kernel/cpu/ss.cpp b/arch/x86_64/src/kernel/cpu/ss.cpp
index b7e52e1..9c8dd61 100644
--- a/arch/x86_64/src/kernel/cpu/ss.cpp
+++ b/arch/x86_64/src/kernel/cpu/ss.cpp
@@ -1,6 +1,6 @@
#include "arch/kernel/cpu/ss.hpp"
-namespace teachos::arch::memory::cpu
+namespace teachos::arch::kernel::cpu
{
segment_selector::segment_selector(uint16_t index, std::bitset<1U> table_indicator,
std::bitset<2U> requested_privilege_level)
@@ -20,14 +20,14 @@ namespace teachos::arch::memory::cpu
auto read_ss() -> uint16_t
{
uint16_t ss;
- __asm__("mov %%ss, %0" : "=r"(ss));
+ asm volatile("mov %%ss, %0" : "=r"(ss));
return ss;
}
auto write_ss(segment_selector selector) -> void
{
uint16_t ss = selector.to_uint16();
- __asm__("mov %0, %%ss" ::"r"(ss));
+ asm volatile("mov %0, %%ss" ::"r"(ss));
}
-} // namespace teachos::arch::memory::cpu \ No newline at end of file
+} // namespace teachos::arch::kernel::cpu \ No newline at end of file