aboutsummaryrefslogtreecommitdiff
path: root/src/core/asm.hpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-04-30 10:43:44 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-04-30 10:43:44 +0200
commitfb69c7b05894cee2b8bb691ead948798a0674059 (patch)
treec5357f771178b091e2fdcacec8608ee7f498d37e /src/core/asm.hpp
parent66f2ca62469eba4b46e1f19f54dde9476b08d956 (diff)
Setup TSS segment
Diffstat (limited to 'src/core/asm.hpp')
-rw-r--r--src/core/asm.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/asm.hpp b/src/core/asm.hpp
index 8a931f6..a1d7437 100644
--- a/src/core/asm.hpp
+++ b/src/core/asm.hpp
@@ -21,3 +21,6 @@
#define inb(port,dst) \
asm volatile ("inb %%dx, %%al": "=a" (dst) : "d" (port))
+
+#define lpml4(pml4) \
+ asm volatile ("mov %0, %%rax; mov %%rax, %%cr3":: "r" (pml4))