diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/arch/i386/pagedir.c | 7 | ||||
-rw-r--r-- | src/kernel/arch/i386/sysenter.s | 5 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/arch/i386/pagedir.c b/src/kernel/arch/i386/pagedir.c index 264508b..b52075d 100644 --- a/src/kernel/arch/i386/pagedir.c +++ b/src/kernel/arch/i386/pagedir.c @@ -89,10 +89,5 @@ void pagedir_map(struct pagedir *dir, void *virt, void *phys, } void pagedir_use(struct pagedir *dir) { - asm volatile("mov %0, %%cr3;" - - "mov %%cr0, %%eax;" - "or $0x80000001, %%eax;" - "mov %%eax, %%cr0;" - : : "r" (dir) : "eax"); + asm volatile("mov %0, %%cr3;" : : "r" (dir) : "memory"); } diff --git a/src/kernel/arch/i386/sysenter.s b/src/kernel/arch/i386/sysenter.s index 666c0f0..5630c3b 100644 --- a/src/kernel/arch/i386/sysenter.s +++ b/src/kernel/arch/i386/sysenter.s @@ -18,6 +18,11 @@ sysexit: mov %ax, %fs mov %ax, %gs + // enable paging + mov %cr0, %eax + or $0x80000000, %eax + mov %eax, %cr0 + sysexit |