aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kernel/cpu/tr.cpp
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2025-05-02 14:49:06 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2025-05-02 14:49:06 +0000
commit099a7fbbc35a71f98553fa39899f2d17c555242f (patch)
treeb80f9dfef02d223e08af123bf5adff41a98bc2bc /arch/x86_64/src/kernel/cpu/tr.cpp
parent7c045d8ded72017ff11fd4b9b02148987b944caf (diff)
downloadteachos-099a7fbbc35a71f98553fa39899f2d17c555242f.tar.xz
teachos-099a7fbbc35a71f98553fa39899f2d17c555242f.zip
Finish implementing 8-byte GDT entries and syscall arg loads.
Diffstat (limited to 'arch/x86_64/src/kernel/cpu/tr.cpp')
-rw-r--r--arch/x86_64/src/kernel/cpu/tr.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/x86_64/src/kernel/cpu/tr.cpp b/arch/x86_64/src/kernel/cpu/tr.cpp
index e281189..a435540 100644
--- a/arch/x86_64/src/kernel/cpu/tr.cpp
+++ b/arch/x86_64/src/kernel/cpu/tr.cpp
@@ -11,12 +11,6 @@ namespace teachos::arch::kernel::cpu
auto load_task_register(uint16_t gdt_offset) -> void
{
- // asm volatile("ltr %[input]" : /* no output from call */ : [input] "R"(gdt_offset));
- // https://www.scs.stanford.edu/05au-cs240c/lab/i386/s07_03.htm
- asm volatile("mov %[input], %%ax\n"
- "ltr %%ax\n"
- : /* no output from call */
- : [input] "r"(gdt_offset)
- : "ax");
+ asm volatile("ltr %[input]" : /* no output from call */ : [input] "m"(gdt_offset));
}
} // namespace teachos::arch::kernel::cpu