write kernel sp to tss in dispatcher

This commit is contained in:
2025-11-26 06:46:19 +01:00
parent 4ffae9e1f0
commit 3808f494af
7 changed files with 21 additions and 14 deletions

View File

@@ -17,6 +17,10 @@ void switchToUsermode(void *stackpointer, void *kickoff,
constexpr uint16_t user_ds = 4 << 3 | 3;
asm volatile ( \
"mov %[user_data], %%ds \n" \
"mov %[user_data], %%es \n" \
"mov %[user_data], %%fs \n" \
"mov %[user_data], %%gs \n" \
"pushq %[user_data] \n" \
"pushq %[user_stack] \n" \
"pushq %[user_eflags] \n" \