summaryrefslogtreecommitdiff
path: root/Kernel/Arch/i386/CPU.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-01 12:56:21 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-01 12:57:00 +0100
commit5aeaab601ec60df85152482cb97c12f9d503c68e (patch)
treef6ee39cc12b5d5c3a958649738c38683ff890555 /Kernel/Arch/i386/CPU.h
parent3d59db4be4532e73fbc407b6e09fe3f8ac6dfe80 (diff)
downloadserenity-5aeaab601ec60df85152482cb97c12f9d503c68e.zip
Kernel: Move CPU feature detection to Arch/x86/CPU.{cpp.h}
We now refuse to boot on machines that don't support PAE since all of our paging code depends on it. Also let's only enable SSE and PGE support if the CPU advertises it.
Diffstat (limited to 'Kernel/Arch/i386/CPU.h')
-rw-r--r--Kernel/Arch/i386/CPU.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Kernel/Arch/i386/CPU.h b/Kernel/Arch/i386/CPU.h
index d946a783f0..9c831ad067 100644
--- a/Kernel/Arch/i386/CPU.h
+++ b/Kernel/Arch/i386/CPU.h
@@ -506,3 +506,10 @@ public:
asm volatile("wrmsr" ::"a"(low), "d"(high), "c"(m_msr));
}
};
+
+void detect_cpu_features();
+extern bool g_cpu_supports_nx;
+extern bool g_cpu_supports_pae;
+extern bool g_cpu_supports_pge;
+extern bool g_cpu_supports_smep;
+extern bool g_cpu_supports_sse;