summaryrefslogtreecommitdiff
path: root/sys/include/arch/amd64/asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include/arch/amd64/asm.h')
-rw-r--r--sys/include/arch/amd64/asm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/asm.h b/sys/include/arch/amd64/asm.h
index e85dd87..04d5e42 100644
--- a/sys/include/arch/amd64/asm.h
+++ b/sys/include/arch/amd64/asm.h
@@ -70,6 +70,18 @@ amd64_read_gs_base(void)
return rdmsr(IA32_KERNEL_GS_BASE);
}
+static inline void
+amd64_write_fs_base(uintptr_t val)
+{
+ wrmsr(IA32_FS_BASE, val);
+}
+
+static inline uintptr_t
+amd64_read_fs_base(uintptr_t val)
+{
+ return rdmsr(IA32_FS_BASE);
+}
+
static inline uint64_t
amd64_read_cr0(void)
{