diff options
author | Anton Kling <anton@kling.gg> | 2024-02-21 20:06:35 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-02-21 20:06:35 +0100 |
commit | 9b475d3db3275d4c34f02161ae70ced5595a0fdb (patch) | |
tree | 0c50e4af3ce52017f295c44f6f4319e4a43de085 /kernel/cpu/gdt.c | |
parent | 6c9cb0bd8ceb039ce387c850e25adc6f99cfcd6f (diff) |
Kernel: Remove all inline assembly.
Now the kernel does not rely upon inline assembly which is often very
error prone. This also means that the kernel could probably be compiled
with any c99 compiler which would help future bootstrapping.
Diffstat (limited to 'kernel/cpu/gdt.c')
-rw-r--r-- | kernel/cpu/gdt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cpu/gdt.c b/kernel/cpu/gdt.c index 2f9f90b..d91abed 100644 --- a/kernel/cpu/gdt.c +++ b/kernel/cpu/gdt.c @@ -1,4 +1,5 @@ #include "gdt.h" +#include <cpu/arch_inst.h> #include <interrupts.h> extern void flush_tss(void); @@ -39,8 +40,7 @@ void write_tss(struct GDT_Entry *gdt_entry) { memset(&tss_entry, 0, sizeof tss_entry); tss_entry.ss0 = GDT_KERNEL_DATA_SEGMENT * GDT_ENTRY_SIZE; - register u32 esp asm("esp"); - tss_entry.esp0 = esp; + tss_entry.esp0 = get_current_sp(); } void gdt_init() { |