Jump to user mode.

This instantly creates a page fault as we always map pages with ring 0
permissions.
This commit is contained in:
Drew Galbraith 2023-05-29 12:44:26 -07:00
parent aefb4f082b
commit 7184f527a0
7 changed files with 37 additions and 7 deletions

View file

@ -90,3 +90,5 @@ void InitGdt() {
"ltr %%ax;" ::
: "rax");
}
void SetRsp0(uint64_t rsp0) { gTaskStateSegment.rsp0 = rsp0; }

View file

@ -1,3 +1,7 @@
#pragma once
#include <stdint.h>
void InitGdt();
void SetRsp0(uint64_t rsp0);