write kernel sp to tss in dispatcher
This commit is contained in:
@@ -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" \
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#include "core.h"
|
||||
#include "tss.h"
|
||||
|
||||
TSS::Entry mytss;
|
||||
|
||||
namespace GDT {
|
||||
|
||||
// The static 32-bit Global Descriptor Table (GDT)
|
||||
|
||||
@@ -47,3 +47,5 @@ void init();
|
||||
void setStackpointer(void* ptr);
|
||||
|
||||
} // namespace TSS
|
||||
extern TSS::Entry mytss;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user