From fb69c7b05894cee2b8bb691ead948798a0674059 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Fri, 30 Apr 2021 10:43:44 +0200 Subject: Setup TSS segment --- src/core/asm.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/asm.hpp') 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)) -- cgit v1.2.3