aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorMarvin Borner2021-04-08 15:10:32 +0200
committerMarvin Borner2021-04-08 15:10:32 +0200
commitcff1032555afc9853a490714d7cfa22fdb4c499d (patch)
treef6a5ef5f51a78400c0e659f2da5cb5fe170b1f37 /kernel/drivers
parent5a03f41951c4c73a1238e0dc1afa4136ca4363a3 (diff)
Added UMIP
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/drivers/cpu.c b/kernel/drivers/cpu.c
index f751d33..5d53bef 100644
--- a/kernel/drivers/cpu.c
+++ b/kernel/drivers/cpu.c
@@ -168,6 +168,13 @@ CLEAR void cpu_enable_features(void)
} else {
print("No SMAP support :(\n");
}
+
+ // Enable UMIP // TODO: QEMU support?!
+ if (cpu_extended_features.ecx & CPUID_EXT_FEAT_ECX_UMIP) {
+ cr4_set(cr4_get() | 0x800);
+ } else {
+ print("No UMIP support :(\n");
+ }
}
void clac(void)